From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B081A0C4F; Fri, 16 Jul 2021 11:43:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35B9841355; Fri, 16 Jul 2021 11:43:12 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 95A524014D; Fri, 16 Jul 2021 11:43:10 +0200 (CEST) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4GR5kJ1MxdzYd0c; Fri, 16 Jul 2021 17:37:28 +0800 (CST) Received: from dggpeml500019.china.huawei.com (7.185.36.137) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 16 Jul 2021 17:43:05 +0800 Received: from tester.localdomain (10.175.119.39) by dggpeml500019.china.huawei.com (7.185.36.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 16 Jul 2021 17:43:05 +0800 From: Guoyang Zhou To: CC: , , , , , , , , , , , Date: Fri, 16 Jul 2021 17:54:28 +0800 Message-ID: <502c35d4f03e7958216e3de8eadf9a6e68208a44.1626429126.git.zhouguoyang@huawei.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.119.39] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500019.china.huawei.com (7.185.36.137) X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH v1 1/3] net/hinic: increase the protection of the VLAN X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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