Received: by 10.223.176.46 with SMTP id f43csp543124wra; Fri, 26 Jan 2018 03:04:44 -0800 (PST) X-Google-Smtp-Source: AH8x227ijiRcVDWszTOq/0Kh5fr4fVOlf+Jr0+sJy+6cP3p8UpyA6lVFq8ZzNKoYzzKY4NuMJMgv X-Received: by 10.98.231.11 with SMTP id s11mr18865653pfh.174.1516964684228; Fri, 26 Jan 2018 03:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516964684; cv=none; d=google.com; s=arc-20160816; b=sw3jJj6t3uW1b4Uupo7onStG7PgQBZjzp5ise2lcxMOCYM96RBVXt/4WMNfEQuz0oH R0KoicXvlXooptB0YYdyMzZz8fp2/08AWccbvdx2bZhn3j8rytcNy/f6LRA+ROiyaVwg Y+To9a6sNsqK28wINOSy8mUi+Qd5ZgSvpK52gj9TyAxUrzhNwkX25p12rG9cgqQlMFRs I+j0x3RGKx9R8nHU0umoQeljqNyN/ZzzXlNT7iLw8XsiD567GBLf+XM9kG7PLwlfuXh4 54wROcFWafoz+FWMn6+1n8wZ1QsiYWBQzpDi5sJXO9ZF3gPVkR13yPzcE6FUWl7A4p2x ieYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=xAA41ti0f3JFdG8QjaV8h/tiMI0KgTm8RIvp5cO2xRQ=; b=RS+83SQRlDZytc08aaWfYwWajXUliNFrbvwGdl2hj0lRtPxfeKb4Ysxm4pRqUj6Hd+ e9/BHU8lI91iJLcKLUtdHVq6/JDLF5Qq/pFpNoPi9kJ8Z35kiKb8+Bv7KT1K5qI+c4OL NbRFaFewNexVVUh/BCXfxaps3wENLnRFpeMA7ewhnlmZXE/pfXrzsmiZdJVjFcdiDB61 PqK3EMI8HzYj2F9M4ZtfL/OeNhL0LxQ8toyNJ+/0QJpAGPw4YjNNKgGqSeI5e6uNXTz8 6CmO+Yo9pYkcHUhaqTCC/1e1xbYqX1ytGb8R6Z0AdnOKhmEXntrgaGWmcSnmvfvJYFC0 SgYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si2844730pgu.722.2018.01.26.03.04.29; Fri, 26 Jan 2018 03:04:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753257AbeAZLCv (ORCPT + 99 others); Fri, 26 Jan 2018 06:02:51 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:4708 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753234AbeAZLCu (ORCPT ); Fri, 26 Jan 2018 06:02:50 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B7D9B9378A2B6; Fri, 26 Jan 2018 19:02:35 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.361.1; Fri, 26 Jan 2018 19:02:27 +0800 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 2/2] net: hns3: add int_gl_idx setup for VF Date: Fri, 26 Jan 2018 19:31:25 +0800 Message-ID: <1516966285-48898-3-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516966285-48898-1-git-send-email-lipeng321@huawei.com> References: <1516966285-48898-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang Just like PF, if the int_gl_idx of VF does not be set, the default interrupt coalesce index of VF is 0. But it should be GL1 for TX queues and GL0 for RX queues. This patch adds the int_gl_idx setup for VF. Fixes: 200ecda42598 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support") Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 8 ++++++++ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c index 96f453f..f38fc5c 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -116,6 +116,9 @@ static int hclge_get_ring_chain_from_mbx( hnae_set_bit(ring_chain->flag, HNAE3_RING_TYPE_B, req->msg[3]); ring_chain->tqp_index = hclge_get_queue_id(vport->nic.kinfo.tqp[req->msg[4]]); + hnae_set_field(ring_chain->int_gl_idx, HCLGE_INT_GL_IDX_M, + HCLGE_INT_GL_IDX_S, + req->msg[5]); cur_chain = ring_chain; @@ -133,6 +136,11 @@ static int hclge_get_ring_chain_from_mbx( [req->msg[HCLGE_RING_NODE_VARIABLE_NUM * i + HCLGE_RING_MAP_MBX_BASIC_MSG_NUM + 1]]); + hnae_set_field(new_chain->int_gl_idx, HCLGE_INT_GL_IDX_M, + HCLGE_INT_GL_IDX_S, + req->msg[HCLGE_RING_NODE_VARIABLE_NUM * i + + HCLGE_RING_MAP_MBX_BASIC_MSG_NUM + 2]); + cur_chain->next = new_chain; cur_chain = new_chain; } diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index 3d2bc9a..0d89965 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c @@ -565,6 +565,11 @@ static int hclgevf_bind_ring_to_vector(struct hnae3_handle *handle, bool en, hnae_get_bit(node->flag, HNAE3_RING_TYPE_B); req->msg[HCLGEVF_RING_NODE_VARIABLE_NUM * i + 1] = node->tqp_index; + req->msg[HCLGEVF_RING_NODE_VARIABLE_NUM * i + 2] = + hnae_get_field(node->int_gl_idx, + HNAE3_RING_GL_IDX_M, + HNAE3_RING_GL_IDX_S); + if (i == (HCLGE_MBX_VF_MSG_DATA_NUM - HCLGEVF_RING_MAP_MBX_BASIC_MSG_NUM) / HCLGEVF_RING_NODE_VARIABLE_NUM) { -- 1.9.1