This series adds some fixes for the HNS3 ethernet driver.
Guangbin Huang (1):
net: hns3: fix VF RSS failed problem after PF enable multi-TCs
Hao Chen (2):
net: hns3: add check NULL address for page pool
net: hns3: fix one incorrect value of page pool info when queried by
debugfs
Jie Wang (1):
net: hns3: fix incorrect components info of ethtool --reset command
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 8 +++++++-
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 4 ++++
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 4 ++--
3 files changed, 13 insertions(+), 3 deletions(-)
--
2.33.0
From: Jie Wang <redacted>
Currently, HNS3 driver doesn't clear the reset flags of components after
successfully executing reset, it causes userspace info of
"Components reset" and "Components not reset" is incorrect.
So fix this problem by clear corresponding reset flag after reset process.
Fixes: ddccc5e368a3 ("net: hns3: add support for triggering reset by ethtool")
Signed-off-by: Jie Wang <redacted>
Signed-off-by: Guangbin Huang <redacted>
---
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 4 ++++
1 file changed, 4 insertions(+)
From: Hao Chen <redacted>
When page pool is not enabled, its address value is still NULL and page
pool should not be accessed, so add a check for it.
Fixes: 850bfb912a6d ("net: hns3: debugfs add support dumping page pool info")
Signed-off-by: Hao Chen <redacted>
Signed-off-by: Guangbin Huang <redacted>
---
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -1106,6 +1106,11 @@ hns3_dbg_page_pool_info(struct hnae3_handle *h, char *buf, int len)return-EFAULT;}+if(!priv->ring[h->kinfo.num_tqps].page_pool){+dev_err(&h->pdev->dev,"page pool is not initialized\n");+return-EFAULT;+}+for(i=0;i<ARRAY_SIZE(page_pool_info_items);i++)result[i]=&data_str[i][0];
From: Hao Chen <redacted>
Currently, when user queries page pool info by debugfs command
"cat page_pool_info", the cnt of allocated page for page pool may be
incorrect because of memory inconsistency problem caused by compiler
optimization.
So this patch uses READ_ONCE() to read value of pages_state_hold_cnt to
fix this problem.
Fixes: 850bfb912a6d ("net: hns3: debugfs add support dumping page pool info")
Signed-off-by: Hao Chen <redacted>
Signed-off-by: Guangbin Huang <redacted>
---
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
When PF is set to multi-TCs and configured mapping relationship between
priorities and TCs, the hardware will active these settings for this PF
and its VFs.
In this case when VF just uses one TC and its rx packets contain priority,
and if the priority is not mapped to TC0, as other TCs of VF is not valid,
hardware always put this kind of packets to the queue 0. It cause this kind
of packets of VF can not be used RSS function.
To fix this problem, set tc mode of all unused TCs of VF to the setting of
TC0, then rx packet with priority which map to unused TC will be direct to
TC0.
Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Guangbin Huang <redacted>
---
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Hello:
This series was applied to netdev/net.git (master)
by Jakub Kicinski [off-list ref]:
On Fri, 26 Nov 2021 20:03:14 +0800 you wrote:
This series adds some fixes for the HNS3 ethernet driver.
Guangbin Huang (1):
net: hns3: fix VF RSS failed problem after PF enable multi-TCs
Hao Chen (2):
net: hns3: add check NULL address for page pool
net: hns3: fix one incorrect value of page pool info when queried by
debugfs
[...]