mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "tanhuazhong@huawei.com" <tanhuazhong@huawei.com>,
	"davem@davemloft.net" <davem@davemloft.net>
Cc: "lipeng321@huawei.com" <lipeng321@huawei.com>,
	"yisen.zhuang@huawei.com" <yisen.zhuang@huawei.com>,
	"salil.mehta@huawei.com" <salil.mehta@huawei.com>,
	"linuxarm@huawei.com" <linuxarm@huawei.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"liuyonglong@huawei.com" <liuyonglong@huawei.com>
Subject: Re: [PATCH net-next 04/11] net: hns3: fix mis-counting IRQ vector numbers issue
Date: Wed, 24 Jul 2019 18:28:16 +0000	[thread overview]
Message-ID: <ad63b46dfb7e36d63d95866a023ef181af40aa76.camel@mellanox.com> (raw)
In-Reply-To: <1563938327-9865-5-git-send-email-tanhuazhong@huawei.com>

On Wed, 2019-07-24 at 11:18 +0800, Huazhong Tan wrote:
> From: Yonglong Liu <liuyonglong@huawei.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@huawei.com>
> Signed-off-by: Peng Li <lipeng321@huawei.com>
> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.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);
> 

  reply	other threads:[~2019-07-24 18:28 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  3:18 [PATCH net-next 00/11] net: hns3: some code optimizations & bugfixes & features Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 01/11] net: hns3: add reset checking before set channels Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 02/11] net: hns3: add a check for get_reset_level Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 03/11] net: hns3: remove upgrade reset level when reset fail Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 04/11] net: hns3: fix mis-counting IRQ vector numbers issue Huazhong Tan
2019-07-24 18:28   ` Saeed Mahameed [this message]
2019-07-25  2:04     ` tanhuazhong
2019-07-24  3:18 ` [PATCH net-next 05/11] net: hns3: change GFP flag during lock period Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 06/11] net: hns3: modify firmware version display format Huazhong Tan
2019-07-24 18:34   ` Saeed Mahameed
2019-07-25  2:34     ` tanhuazhong
2019-07-25 21:32       ` Saeed Mahameed
2019-07-26  1:50         ` tanhuazhong
2019-07-24  3:18 ` [PATCH net-next 07/11] net: hns3: adds debug messages to identify eth down cause Huazhong Tan
2019-07-24 19:12   ` Saeed Mahameed
2019-07-25 12:28     ` liuyonglong
2019-07-25 21:59       ` Saeed Mahameed
2019-07-26  1:28         ` Jakub Kicinski
2019-07-26  2:33           ` liuyonglong
2019-07-26  2:21         ` liuyonglong
2019-07-24  3:18 ` [PATCH net-next 08/11] net: hns3: add interrupt affinity support for misc interrupt Huazhong Tan
2019-07-24 19:24   ` Saeed Mahameed
2019-07-25  2:05     ` Yunsheng Lin
2019-07-26 23:18       ` Saeed Mahameed
2019-07-29 10:17         ` Yunsheng Lin
2019-07-29  9:18   ` Salil Mehta
2019-07-29 10:37     ` Yunsheng Lin
2019-07-24  3:18 ` [PATCH net-next 09/11] net: hns3: make hclge_service use delayed workqueue Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 10/11] net: hns3: Add support for using order 1 pages with a 4K buffer Huazhong Tan
2019-07-24  3:18 ` [PATCH net-next 11/11] net: hns3: add support for handling IMP error Huazhong Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad63b46dfb7e36d63d95866a023ef181af40aa76.camel@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=tanhuazhong@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®