net/hns3: fix rollback after setting PVID failure
authorChengchang Tang <tangchengchang@huawei.com>
Wed, 31 Mar 2021 10:01:38 +0000 (18:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 8 Apr 2021 16:57:09 +0000 (18:57 +0200)
commit39c4fe7042acaeea7a4dff0213ed3fd453a2c255
treebb712479e5fe0e4a377a88a23edac318e90400b1
parent32040ae365735f94253ce317b4b01e8bc4ea9c6b
net/hns3: fix rollback after setting PVID failure

Currently, three hardware operations are involved in setting the PVID.
If any operation fails, a failure will be returned. And there may be
residual hardware configurations because no rollback is performed.

This patch adds rollback operation for setting PVID to avoid residual
hardware configuration after the PVID fails to be configured.

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