diff options
author | Norbert Zulinski <norbertx.zulinski@intel.com> | 2023-09-06 13:57:04 -0600 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2023-09-13 08:59:14 -0700 |
commit | 7559d6724298004b696ffead61ee5dce1f97e908 (patch) | |
tree | be89c1c3896d6f2a3f969bc42806ddc7a068d3f4 /drivers/net/ethernet/intel/iavf/iavf.h | |
parent | 7bd48d8d414b378caa5d8a374b931196f8d173e9 (diff) |
iavf: Add ability to turn off CRC stripping for VF
Previously CRC stripping was always enabled for VF.
Now it is possible to turn off CRC stripping via ethtool:
#ethtool -K <interface> rx-fcs on
To turn off CRC stripping, first VLAN stripping must be disabled:
#ethtool -K <interface> rx-vlan-offload off
if any VLAN interfaces exists, otherwise VLAN stripping will be turned
off by the driver.
In iavf_configure_queues add check if CRC stripping is enabled for
VF, if it's enabled then set crc_disabled to false on every VF's
queue. In iavf_set_features add check if CRC stripping setting was
changed then schedule reset.
Signed-off-by: Norbert Zulinski <norbertx.zulinski@intel.com>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
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>
Diffstat (limited to 'drivers/net/ethernet/intel/iavf/iavf.h')
-rw-r--r-- | drivers/net/ethernet/intel/iavf/iavf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h index 738e25657c6b..f32b0453584f 100644 --- a/drivers/net/ethernet/intel/iavf/iavf.h +++ b/drivers/net/ethernet/intel/iavf/iavf.h @@ -406,6 +406,8 @@ struct iavf_adapter { VIRTCHNL_VF_OFFLOAD_VLAN) #define VLAN_V2_ALLOWED(_a) ((_a)->vf_res->vf_cap_flags & \ VIRTCHNL_VF_OFFLOAD_VLAN_V2) +#define CRC_OFFLOAD_ALLOWED(_a) ((_a)->vf_res->vf_cap_flags & \ + VIRTCHNL_VF_OFFLOAD_CRC) #define VLAN_V2_FILTERING_ALLOWED(_a) \ (VLAN_V2_ALLOWED((_a)) && \ ((_a)->vlan_v2_caps.filtering.filtering_support.outer || \ |