From: Guoyang Zhou Date: Fri, 16 Jul 2021 09:54:28 +0000 (+0800) Subject: net/hinic: increase protection of the VLAN X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2cfd68ec407609becd75661787043e7cae35f15c;p=dpdk.git net/hinic: increase protection of the VLAN 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 --- diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index 946465779f..75849f28be 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) {