[Intel-wired-lan] [PATCH net-next v2 2/2] ice: Implement FCS/CRC and VLAN stripping co-existence policy

Mekala, SunithaX D sunithax.d.mekala at intel.com
Wed Jul 20 05:31:46 UTC 2022


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Anatolii Gerasymenko
> Sent: Monday, July 11, 2022 5:11 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Brandeburg, Jesse <jesse.brandeburg at intel.com>; Gerasymenko, Anatolii <anatolii.gerasymenko at intel.com>
> Subject: [Intel-wired-lan] [PATCH net-next v2 2/2] ice: Implement FCS/CRC and VLAN stripping co-existence policy
>
> Make sure that only the valid combinations of FCS/CRC stripping and VLAN stripping offloads are allowed.
>
> You cannot have FCS/CRC stripping disabled while VLAN stripping is enabled - this breaks the correctness of the FCS/CRC.
>
> If administrator tries to enable VLAN stripping when FCS/CRC stripping is disabled, the request should be rejected.
>
> If administrator tries to disable FCS/CRC stripping when VLAN stripping is enabled, the request should be rejected if VLANs are configured. If there is no VLAN configured, then both FCS/CRC and VLAN stripping should be disabled.
>
> Testing Hints:
> The default settings after driver load are:
> - VLAN C-Tag offloads are enabled
> - VLAN S-Tag offloads are disabled
> - FCS/CRC stripping is enabled
>
> Restore the default settings before each test with the command:
> ethtool -K eth0 rx-fcs off rxvlan on txvlan on rx-vlan-stag-hw-parse off tx-vlan-stag-hw-insert off
>
> Test 1:
> Disable FCS/CRC and VLAN stripping:
> ethtool -K eth0 rx-fcs on rxvlan off
> Try to enable VLAN stripping:
> ethtool -K eth0 rxvlan on
>
> Expected: VLAN stripping request is rejected
>
> Test 2:
> Try to disable FCS/CRC stripping:
> ethtool -K eth0 rx-fcs on
>
> Expected: VLAN stripping is also disabled, as there are no VLAN configured
>
> Test 3:
> Add a VLAN:
> ip link add link eth0 eth0.42 type vlan id 42 ip link set eth0 up Try to disable FCS/CRC stripping:
> ethtool -K eth0 rx-fcs on
>
> Expected: FCS/CRC stripping request is rejected
>
> Signed-off-by: Anatolii Gerasymenko <anatolii.gerasymenko at intel.com>
> Acked-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
> ---
> v2: rebase on top of Maciej Fijalkowski's patches
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 25 +++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>
Tested-by: Sunitha Mekala <sunithax.d.mekala at intel.com> (A Contingent worker at Intel)


More information about the Intel-wired-lan mailing list