This series includes some bugfixes for the HNS3 ethernet driver.
Chengwen Feng (1):
net: hns3: fix possible mismatches resp of mailbox
Jian Shen (2):
net: hns3: disable port VLAN filter when support function level VLAN
filter control
net: hns3: fix rx VLAN offload state inconsistent issue
Peng Li (1):
net: hns3: add match_id to check mailbox response from PF to VF
drivers/net/ethernet/hisilicon/hns3/hclge_mbx.h | 7 +++++--
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++--
.../net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 1 +
.../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++++++++++
.../net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c | 19 +++++++++++++++++++
5 files changed, 41 insertions(+), 4 deletions(-)
--
2.8.1
From: Jian Shen <[email protected]>
For hardware limitation, port VLAN filter is port level, and
effective for all the functions of the port. So if not support
port VLAN bypass, it's necessary to disable the port VLAN filter,
in order to support function level VLAN filter control.
Fixes: 2ba306627f59 ("net: hns3: add support for modify VLAN filter state")
Signed-off-by: Jian Shen <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index dd3354a57c62..ebeaf12e409b 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -9552,13 +9552,17 @@ static int hclge_set_vport_vlan_filter(struct hclge_vport *vport, bool enable)
if (ret)
return ret;
- if (test_bit(HNAE3_DEV_SUPPORT_PORT_VLAN_BYPASS_B, ae_dev->caps))
+ if (test_bit(HNAE3_DEV_SUPPORT_PORT_VLAN_BYPASS_B, ae_dev->caps)) {
ret = hclge_set_port_vlan_filter_bypass(hdev, vport->vport_id,
!enable);
- else if (!vport->vport_id)
+ } else if (!vport->vport_id) {
+ if (test_bit(HNAE3_DEV_SUPPORT_VLAN_FLTR_MDF_B, ae_dev->caps))
+ enable = false;
+
ret = hclge_set_vlan_filter_ctrl(hdev, HCLGE_FILTER_TYPE_PORT,
HCLGE_FILTER_FE_INGRESS,
enable, 0);
+ }
return ret;
}
--
2.8.1
From: Jian Shen <[email protected]>
Currently, VF doesn't enable rx VLAN offload when initializating,
and PF does it for VFs. If user disable the rx VLAN offload for
VF with ethtool -K, and reload the VF driver, it may cause the
rx VLAN offload state being inconsistent between hardware and
software.
Fixes it by enabling rx VLAN offload when VF initializing.
Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Jian Shen <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
index 52eaf82b7cd7..8784d61e833f 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
@@ -2641,6 +2641,16 @@ static int hclgevf_rss_init_hw(struct hclgevf_dev *hdev)
static int hclgevf_init_vlan_config(struct hclgevf_dev *hdev)
{
+ struct hnae3_handle *nic = &hdev->nic;
+ int ret;
+
+ ret = hclgevf_en_hw_strip_rxvtag(nic, true);
+ if (ret) {
+ dev_err(&hdev->pdev->dev,
+ "failed to enable rx vlan offload, ret = %d\n", ret);
+ return ret;
+ }
+
return hclgevf_set_vlan_filter(&hdev->nic, htons(ETH_P_8021Q), 0,
false);
}
--
2.8.1
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Mon, 19 Jul 2021 17:13:04 +0800 you wrote:
> This series includes some bugfixes for the HNS3 ethernet driver.
>
> Chengwen Feng (1):
> net: hns3: fix possible mismatches resp of mailbox
>
> Jian Shen (2):
> net: hns3: disable port VLAN filter when support function level VLAN
> filter control
> net: hns3: fix rx VLAN offload state inconsistent issue
>
> [...]
Here is the summary with links:
- [net,1/4] net: hns3: fix possible mismatches resp of mailbox
https://git.kernel.org/netdev/net/c/1b713d14dc3c
- [net,2/4] net: hns3: add match_id to check mailbox response from PF to VF
https://git.kernel.org/netdev/net/c/4671042f1ef0
- [net,3/4] net: hns3: disable port VLAN filter when support function level VLAN filter control
https://git.kernel.org/netdev/net/c/184cd221a863
- [net,4/4] net: hns3: fix rx VLAN offload state inconsistent issue
https://git.kernel.org/netdev/net/c/bbfd4506f962
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html