DPDK patches and discussions
 help / color / mirror / Atom feed
From: Guoyang Zhou <zhouguoyang@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <bluca@debian.org>,
	<cloud.wangxiaoyun@huawei.com>, <luoxianjun@huawei.com>,
	<yin.yinshi@huawei.com>, <luojiachen@huawei.com>,
	<zhouguoyang@huawei.com>, <chenlizhong@huawei.com>,
	<zhaohui8@huawei.com>, <chenchanghu@huawei.com>,
	<stevex.yang@intel.com>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH v1 1/3] net/hinic: increase the protection of the VLAN
Date: Fri, 16 Jul 2021 17:54:28 +0800	[thread overview]
Message-ID: <502c35d4f03e7958216e3de8eadf9a6e68208a44.1626429126.git.zhouguoyang@huawei.com> (raw)
In-Reply-To: <cover.1626429126.git.zhouguoyang@huawei.com>

If the vlan id 0 is deleted for hinic, all packets without
vlan will be discarded when the vlan filter is turned on.

Fixes: 50ce3e7aec8f ("ethdev: fix VLAN offloads set if no relative capabilities")
Cc: stable@dpdk.org
Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
 drivers/net/hinic/hinic_pmd_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 9464657..75849f2 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1617,6 +1617,9 @@ static int hinic_vlan_filter_set(struct rte_eth_dev *dev,
 	if (vlan_id > RTE_ETHER_MAX_VLAN_ID)
 		return -EINVAL;
 
+	if (vlan_id == 0)
+		return 0;
+
 	func_id = hinic_global_func_id(nic_dev->hwdev);
 
 	if (enable) {
-- 
1.8.3.1


  reply	other threads:[~2021-07-16  9:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  9:54 [dpdk-dev] [PATCH v1 0/3] fix some problems of mtu, vlan, lro Guoyang Zhou
2021-07-16  9:54 ` Guoyang Zhou [this message]
2021-07-16  9:54 ` [dpdk-dev] [PATCH v1 2/3] net/hinic/base: fix the problem of LRO Guoyang Zhou
2021-07-16  9:54 ` [dpdk-dev] [PATCH v1 3/3] net/hinic: fix the problem of MTU inconsistent Guoyang Zhou
2021-07-23 13:39 ` [dpdk-dev] [PATCH v1 0/3] fix some problems of mtu, vlan, lro Thomas Monjalon

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=502c35d4f03e7958216e3de8eadf9a6e68208a44.1626429126.git.zhouguoyang@huawei.com \
    --to=zhouguoyang@huawei.com \
    --cc=bluca@debian.org \
    --cc=chenchanghu@huawei.com \
    --cc=chenlizhong@huawei.com \
    --cc=cloud.wangxiaoyun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=luojiachen@huawei.com \
    --cc=luoxianjun@huawei.com \
    --cc=stable@dpdk.org \
    --cc=stevex.yang@intel.com \
    --cc=yin.yinshi@huawei.com \
    --cc=zhaohui8@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;
as well as URLs for NNTP newsgroup(s).