From: Salil Mehta <salil.mehta@huawei.com>
To: <davem@davemloft.net>
Cc: <salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
<lipeng321@huawei.com>, <mehta.salil@opnsrc.net>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, Yunsheng Lin <linyunsheng@huawei.com>
Subject: [PATCH net-next 01/11] net: hns3: Fix for vf vlan delete failed problem
Date: Mon, 3 Sep 2018 11:21:46 +0100 [thread overview]
Message-ID: <20180903102156.18676-2-salil.mehta@huawei.com> (raw)
In-Reply-To: <20180903102156.18676-1-salil.mehta@huawei.com>
From: Yunsheng Lin <linyunsheng@huawei.com>
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: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 8577dfc..1c2ab7e 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -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",
req0->resp_code);
} else {
+#define HCLGE_VF_VLAN_DEL_NO_FOUND 1
if (!req0->resp_code)
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,
"Kill vf vlan filter fail, ret =%d.\n",
req0->resp_code);
--
2.7.4
next prev parent reply other threads:[~2018-09-03 10:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 10:21 [PATCH net-next 00/11] Misc. bug fixes & small enhancements for HNS3 Driver Salil Mehta
2018-09-03 10:21 ` Salil Mehta [this message]
2018-09-03 10:21 ` [PATCH net-next 02/11] net: hns3: Fix for multicast failure Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 03/11] net: hns3: Fix error of checking used vlan id Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 04/11] net: hns3: Implement shutdown ops in hns3 pci driver Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 05/11] net: hns3: Fix for loopback selftest failed problem Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 06/11] net: hns3: Fix ping exited problem when doing lp selftest Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 07/11] net: hns3: Preserve vlan 0 in hardware table Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 08/11] net: hns3: Only update mac configuation when necessary Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 09/11] net: hns3: Change the dst mac addr of loopback packet Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 10/11] net: hns3: Remove redundant codes of query advertised flow control abilitiy Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 11/11] net: hns3: Refine hns3_get_link_ksettings() Salil Mehta
2018-09-04 5:06 ` [PATCH net-next 00/11] Misc. bug fixes & small enhancements for HNS3 Driver David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180903102156.18676-2-salil.mehta@huawei.com \
--to=salil.mehta@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=linyunsheng@huawei.com \
--cc=lipeng321@huawei.com \
--cc=mehta.salil@opnsrc.net \
--cc=netdev@vger.kernel.org \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®