[08/22] net/ice/base: do not set VLAN mode in DCF mode

Message ID 20210803083817.1243796-9-wenjun1.wu@intel.com (mailing list archive)
State Not Applicable, archived
Delegated to: Qi Zhang
Series backport feature support to DPDK 20.11 |


Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Wenjun Wu Aug. 3, 2021, 8:38 a.m. UTC
  From: Haiyue Wang <haiyue.wang@intel.com>

[ upstream commit 70f4e156ea52e3d8278acff30d06447eab623a15 ]

The PF will set the VLAN mode globally, DCF just needs to get the VLAN

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
 drivers/net/ice/base/ice_vlan_mode.c | 6 ++++++
 1 file changed, 6 insertions(+)


diff --git a/drivers/net/ice/base/ice_vlan_mode.c b/drivers/net/ice/base/ice_vlan_mode.c
index c86e803c52..42bb108928 100644
--- a/drivers/net/ice/base/ice_vlan_mode.c
+++ b/drivers/net/ice/base/ice_vlan_mode.c
@@ -354,6 +354,12 @@  static enum ice_status ice_set_svm(struct ice_hw *hw)
 enum ice_status ice_set_vlan_mode(struct ice_hw *hw)
+	/* DCF only has the ability to query the VLAN mode. Setting the VLAN
+	 * mode is done by the PF.
+	 */
+	if (hw->dcf_enabled)
+		return ICE_SUCCESS;
 	if (!ice_is_dvm_supported(hw))
 		return ICE_SUCCESS;