[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad63b46dfb7e36d63d95866a023ef181af40aa76.camel@mellanox.com>
Date: Wed, 24 Jul 2019 18:28:16 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: "tanhuazhong@...wei.com" <tanhuazhong@...wei.com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: "lipeng321@...wei.com" <lipeng321@...wei.com>,
"yisen.zhuang@...wei.com" <yisen.zhuang@...wei.com>,
"salil.mehta@...wei.com" <salil.mehta@...wei.com>,
"linuxarm@...wei.com" <linuxarm@...wei.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"liuyonglong@...wei.com" <liuyonglong@...wei.com>
Subject: Re: [PATCH net-next 04/11] net: hns3: fix mis-counting IRQ vector
numbers issue
On Wed, 2019-07-24 at 11:18 +0800, Huazhong Tan wrote:
> From: Yonglong Liu <liuyonglong@...wei.com>
>
> The num_msi_left means the vector numbers of NIC, but if the
> PF supported RoCE, it contains the vector numbers of NIC and
> RoCE(Not expected).
>
> This may cause interrupts lost in some case, because of the
> NIC module used the vector resources which belongs to RoCE.
>
> This patch corrects the value of num_msi_left to be equals to
> the vector numbers of NIC, and adjust the default tqp numbers
> according to the value of num_msi_left.
>
> Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine &
> Compatibility Layer Support")
> Signed-off-by: Yonglong Liu <liuyonglong@...wei.com>
> Signed-off-by: Peng Li <lipeng321@...wei.com>
> Signed-off-by: Huazhong Tan <tanhuazhong@...wei.com>
> ---
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 5 ++++-
> drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 12
> ++++++++++--
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> index 3c64d70..a59d13f 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -1470,13 +1470,16 @@ static int hclge_vport_setup(struct
> hclge_vport *vport, u16 num_tqps)
> {
> struct hnae3_handle *nic = &vport->nic;
> struct hclge_dev *hdev = vport->back;
> + u16 alloc_tqps;
> int ret;
>
> nic->pdev = hdev->pdev;
> nic->ae_algo = &ae_algo;
> nic->numa_node_mask = hdev->numa_node_mask;
>
> - ret = hclge_knic_setup(vport, num_tqps,
> + alloc_tqps = min_t(u16, hdev->roce_base_msix_offset - 1,
Why do you need the extra alloc_tqps ? just overwrite num_tqps, the
original value is not needed afterwards.
> num_tqps);
> +
> + ret = hclge_knic_setup(vport, alloc_tqps,
> hdev->num_tx_desc, hdev->num_rx_desc);
> if (ret)
> dev_err(&hdev->pdev->dev, "knic setup failed %d\n",
> ret);
>
Powered by blists - more mailing lists