net/hns3: fix return value of setting VLAN offload
authorChengwen Feng <fengchengwen@huawei.com>
Thu, 26 Mar 2020 07:14:33 +0000 (15:14 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:04 +0000 (13:57 +0200)
commite7f4213c304bd8d71fc3ca7702c85c434eff0805
treeaa9bedac19f58100e3350fbaef00fc5460742ba5
parent7c9f68872d5ca23ba7951f424c646c30211dbb52
net/hns3: fix return value of setting VLAN offload

Currently, the '.vlan_offload_set' ops implementation function named
hns3vf_vlan_offload_set always return 0 in hns3 VF PMD driver.

This patch fixes it with the following modification in the function
named hns3vf_vlan_offload_set.
1. Avoid setting hardware configuration and return -EIO during resetting.
2. Add the return value detection process for calling internal static
   function named hns3vf_en_hw_strip_rxvtag.

Fixes: a5475d61fa34 ("net/hns3: support VF")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_ethdev_vf.c