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>, Jian Shen <shenjian15@huawei.com>
Subject: [PATCH net-next 03/11] net: hns3: Fix error of checking used vlan id
Date: Mon, 3 Sep 2018 11:21:48 +0100 [thread overview]
Message-ID: <20180903102156.18676-4-salil.mehta@huawei.com> (raw)
In-Reply-To: <20180903102156.18676-1-salil.mehta@huawei.com>
From: Jian Shen <shenjian15@huawei.com>
PF uses hdev->vlan_table to manage the port vlan table. In function
hclge_set_vlan_filter_hw(), it checks whether a vlan id has been used,
by foreach all the vport bits. It should use macro HCLGE_VPORT_NUM,
not VLAN_N_VID as the foreach condition.
Fixes: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full")
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>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 8f1339a..3cf8b80 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -4769,7 +4769,7 @@ static int hclge_set_vlan_filter_hw(struct hclge_dev *hdev, __be16 proto,
return -EINVAL;
}
- for_each_set_bit(vport_idx, hdev->vlan_table[vlan_id], VLAN_N_VID)
+ for_each_set_bit(vport_idx, hdev->vlan_table[vlan_id], HCLGE_VPORT_NUM)
vport_num++;
if ((is_kill && vport_num == 0) || (!is_kill && vport_num == 1))
--
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 ` [PATCH net-next 01/11] net: hns3: Fix for vf vlan delete failed problem Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 02/11] net: hns3: Fix for multicast failure Salil Mehta
2018-09-03 10:21 ` Salil Mehta [this message]
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-4-salil.mehta@huawei.com \
--to=salil.mehta@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=mehta.salil@opnsrc.net \
--cc=netdev@vger.kernel.org \
--cc=shenjian15@huawei.com \
--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®