Commit 41dafea2 authored by Yunsheng Lin's avatar Yunsheng Lin Committed by David S. Miller

net: hns3: Fix for vf vlan delete failed problem

There are only 128 entries in vf vlan table, if user has added
more than 128 vlan, fw will ignore it and disable the vf vlan
table. So when user deletes the vlan entry that has not been
set to vf vlan table, fw will return not found result and driver
treat that as error, which will cause vlan delete failed problem.

This patch fixes it by returning ok when fw returns not found
result.

Fixes: 6c251711 ("net: hns3: Disable vf vlan filter when vf vlan table is full")
Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 05a6843c
...@@ -4686,9 +4686,17 @@ static int hclge_set_vf_vlan_common(struct hclge_dev *hdev, int vfid, ...@@ -4686,9 +4686,17 @@ static int hclge_set_vf_vlan_common(struct hclge_dev *hdev, int vfid,
"Add vf vlan filter fail, ret =%d.\n", "Add vf vlan filter fail, ret =%d.\n",
req0->resp_code); req0->resp_code);
} else { } else {
#define HCLGE_VF_VLAN_DEL_NO_FOUND 1
if (!req0->resp_code) if (!req0->resp_code)
return 0; return 0;
if (req0->resp_code == HCLGE_VF_VLAN_DEL_NO_FOUND) {
dev_warn(&hdev->pdev->dev,
"vlan %d filter is not in vf vlan table\n",
vlan);
return 0;
}
dev_err(&hdev->pdev->dev, dev_err(&hdev->pdev->dev,
"Kill vf vlan filter fail, ret =%d.\n", "Kill vf vlan filter fail, ret =%d.\n",
req0->resp_code); req0->resp_code);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment