net/hns3: fix VLAN strip configuration when setting PVID
authorChengchang Tang <tangchengchang@huawei.com>
Wed, 3 Jun 2020 09:31:59 +0000 (17:31 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 5 Jun 2020 09:32:08 +0000 (11:32 +0200)
commit4c623ca40013c58d73aec67717583e3ee1cb45e3
treef08ecd080fd1bd339650ed4625ffb0d3d15d7e9c
parent85c420f5941d0a0e463493e7659fe6ed96afc71b
net/hns3: fix VLAN strip configuration when setting PVID

Currently, based on hns3 PF device, hardware will strip 2 vlan tags when
ULP calls rte_eth_dev_set_vlan_pvid API function to set a PVID whether
vlan strip related offload is turned on by calling rte_eth_dev_configure
or rte_eth_dev_set_vlan_offload API function.

When receiving a QinQ packet with the pvid tag, if ULP does not
configure the vlan strip by the method mentioned above, a layer of vlan
tag will be lost to ULP, which is not the expected result.

It is supposed to configure the vlan strip according to the upper level
process's configuration.

Fixes: 411d23b9eafb ("net/hns3: support VLAN")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_ethdev.c