linux_dsm_epyc7002/drivers/net/ethernet/hisilicon/hns3
Jian Shen b4f1d30327 net: hns3: Fix tqp array traversal condition for vf
There are two tqp_num variables "hdev->tqp_num" and "kinfo->tqp_num"
used in VF. "hdev->tqp_num" is the total tqp number allocated to the
VF, and "kinfo->tqp_num" indicates the tqp number being used by the
VF. Usually the two variables are equal. But for the case hdev->tqp_num
larger than rss_size_max, and num_tc is 1, "kinfo->tqp_num" will be
less than "hdev->tqp_num".

In original codes, "hdev->tqp_num" is always used to traverse the
tqp array of kinfo. It may cause null pointer error when "hdev->tqp_num"
is larger than "kinfo->tqp_num"

Fixes: e2cb1dec97 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-21 19:29:32 -07:00
..
hns3pf net: hns3: Adjust prefix of tx/rx statistic names 2018-09-21 19:29:32 -07:00
hns3vf net: hns3: Fix tqp array traversal condition for vf 2018-09-21 19:29:32 -07:00
hclge_mbx.h net: hns3: Optimize the VF's process of updating multicast MAC 2018-06-01 14:23:58 -04:00
hnae3.c net: hns3: Fix client initialize state issue when roce client initialize failed 2018-09-19 21:20:22 -07:00
hnae3.h net: hns3: Fix client initialize state issue when roce client initialize failed 2018-09-19 21:20:22 -07:00
hns3_dcbnl.c net: hns3: Add SPDX tags to HNS3 PF driver 2018-07-21 08:44:23 -07:00
hns3_enet.c net: hns3: Add support for hns3_nic_netdev_ops.ndo_do_ioctl 2018-09-19 21:20:22 -07:00
hns3_enet.h net: hns3: Remove tx budget to clean more TX descriptors in a napi 2018-09-19 21:20:22 -07:00
hns3_ethtool.c net: hns3: Adjust prefix of tx/rx statistic names 2018-09-21 19:29:32 -07:00
Makefile net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC 2017-12-15 10:55:34 -05:00