]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix mis-counting IRQ vector numbers issue
authorYonglong Liu <liuyonglong@huawei.com>
Fri, 18 Oct 2019 03:42:59 +0000 (11:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Oct 2019 18:40:55 +0000 (11:40 -0700)
commit20995055fded87663c7dbecb930a301083a59395
treefe8c46e944af6091a27893e9fce480f453f55798
parentd688d4a4a9d628d32feb880d76e40744394954cb
net: hns3: fix mis-counting IRQ vector numbers issue

Currently, 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 adds a new variable num_nic_msi to store the vector
numbers of NIC, and adjust the default TQP numbers and rss_size
according to the value of num_nic_msi.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h