ice: Check CRC strip requirement for VLAN strip
authorHaiyue Wang <haiyue.wang@intel.com>
Wed, 6 Sep 2023 19:57:03 +0000 (13:57 -0600)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 13 Sep 2023 15:58:23 +0000 (08:58 -0700)
commit7bd48d8d414b378caa5d8a374b931196f8d173e9
tree4367b176d6311f7edbc51d4d348a75c4858036a6
parent730cb741815c71d9dd8d1bc7d0b7d9a0acc615a8
ice: Check CRC strip requirement for VLAN strip

When VLAN strip is enabled, the CRC strip must not be disabled. And when
the CRC strip is disabled, the VLAN strip should not be enabled.

The driver needs to check CRC strip disable setting parameter before
configuring the Rx/Tx queues, otherwise, in current error handling,
the already set Tx queue context doesn't roll back correctly, it will
cause the Tx queue setup failure next time:
"Failed to set LAN Tx queue context"

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_vf_lib.h
drivers/net/ethernet/intel/ice/ice_virtchnl.c