summaryrefslogtreecommitdiff
path: root/init/main.c
diff options
context:
space:
mode:
authorAnatolii Gerasymenko <anatolii.gerasymenko@intel.com>2022-07-27 10:24:06 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2022-08-18 18:08:23 +0300
commitaffa1029d66f0fc2bb3614ead2166637c1371aad (patch)
tree2d8dba05a025bfbfc27c585acbda9d9b90e3c3be /init/main.c
parentdddd406d9dbe4a94919b377a84b696e97f709379 (diff)
downloadlinux-affa1029d66f0fc2bb3614ead2166637c1371aad.tar.xz
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@intel.com> Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions