** Description changed: - <placeholder> + [ Impact ] + + The veth.sh selftest fails on Focal systems running 5.15 hwe kernel + due to incompatibilities with older ethtool version shipped in Focal. + + Two specific failures occur: + 1. The test command "ethtool -K veth$DST generic-receive-offload on" + fails with "ethtool: bad command line argument(s)" because ethtool 5.4 + does not recognize the long form feature name with the -K option. + 2. The chk_channels() function incorrectly reports failures for combined + channels because ethtool 5.4 outputs '0' for unsupported channels while + the test expects 'n/a'. + + These failures occur even when the underlying kernel functionality being + tested works correctly, causing false negatives in the test suite. + + [ Fix ] + + Use the short form 'gro' instead of 'generic-receive-offload' when + setting features with ethtool -K. The short form is compatible with + both old and new ethtool versions, while the long form only works with + newer versions for the -K (set) operation. + + Modify the chk_channels() function to accept both 'n/a' and '0' as valid + values for unsupported combined channels. This accommodates the + different output formats between ethtool versions while maintaining the + correct validation logic. + + Both fixes are purely compatibility changes that do not alter the test + logic or the kernel functionality being tested. + + [ Test Plan ] + + Test ubuntu_kselftest_net net:veth.sh on both Jammy 5.15 and Focal 5.15 kernels. + The expected output is the following: + + # selftests: net: veth.sh + # default - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - aggregation ok + # - aggregation with TSO off ok + # with gro on - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - aggregation with TSO off ok + # gro vs xdp while down - gro flag on ok + # - after down ok + # - after xdp off ok + # - after up ok + # - after peer xdp ok + # default channels ok + # with gro enabled on link down - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - aggregation with TSO off ok + # setting tx channels ok + # setting both rx and tx channels ok + # bad setting: combined channels ok + # setting invalid channels nr ok + # bad setting: XDP with RX nr less than TX ok + # bad setting: reducing RX nr below peer TX with XDP set ok + # bad setting: increasing peer TX nr above RX with XDP set ok + # setting invalid channels nr ok + # with xdp attached - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - no aggregation ok + # - gro flag with GRO on ok + # - aggregation ok + # - after dev off, flag ok + # - peer flag ok + # - after gro on xdp off, gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # decreasing tx channels with device down ok + # - aggregation ok + # increasing tx channels with device down ok + # aggregation again with default and TSO off ok + ok 7 selftests: net: veth.sh + + [ Regression Potential ] + + The patchset only modify the selftest script and do not change any + kernel code. The changes improve compatibility with different ethtool + versions by using universally supported feature names and accepting + multiple valid output formats. In case of a regression, it would only + affect test execution, not kernel functionality. + + [ Other Info ] + + The bug affects all Focal's 5.15 kernels. + In order to fix them all the patchset has been submitted for Jammy.
** Description changed: [ Impact ] The veth.sh selftest fails on Focal systems running 5.15 hwe kernel due to incompatibilities with older ethtool version shipped in Focal. Two specific failures occur: 1. The test command "ethtool -K veth$DST generic-receive-offload on" - fails with "ethtool: bad command line argument(s)" because ethtool 5.4 - does not recognize the long form feature name with the -K option. + fails with "ethtool: bad command line argument(s)" because ethtool 5.4 + does not recognize the long form feature name with the -K option. 2. The chk_channels() function incorrectly reports failures for combined - channels because ethtool 5.4 outputs '0' for unsupported channels while - the test expects 'n/a'. + channels because ethtool 5.4 outputs '0' for unsupported channels while + the test expects 'n/a'. These failures occur even when the underlying kernel functionality being tested works correctly, causing false negatives in the test suite. [ Fix ] Use the short form 'gro' instead of 'generic-receive-offload' when setting features with ethtool -K. The short form is compatible with both old and new ethtool versions, while the long form only works with - newer versions for the -K (set) operation. + newer versions for the -K operation. Modify the chk_channels() function to accept both 'n/a' and '0' as valid values for unsupported combined channels. This accommodates the different output formats between ethtool versions while maintaining the correct validation logic. Both fixes are purely compatibility changes that do not alter the test logic or the kernel functionality being tested. [ Test Plan ] Test ubuntu_kselftest_net net:veth.sh on both Jammy 5.15 and Focal 5.15 kernels. The expected output is the following: # selftests: net: veth.sh - # default - gro flag ok - # - peer gro flag ok - # - tso flag ok - # - peer tso flag ok - # - aggregation ok - # - aggregation with TSO off ok - # with gro on - gro flag ok - # - peer gro flag ok - # - tso flag ok - # - peer tso flag ok - # - aggregation with TSO off ok - # gro vs xdp while down - gro flag on ok - # - after down ok - # - after xdp off ok - # - after up ok - # - after peer xdp ok - # default channels ok - # with gro enabled on link down - gro flag ok - # - peer gro flag ok - # - tso flag ok - # - peer tso flag ok - # - aggregation with TSO off ok - # setting tx channels ok - # setting both rx and tx channels ok - # bad setting: combined channels ok - # setting invalid channels nr ok - # bad setting: XDP with RX nr less than TX ok - # bad setting: reducing RX nr below peer TX with XDP set ok - # bad setting: increasing peer TX nr above RX with XDP set ok - # setting invalid channels nr ok - # with xdp attached - gro flag ok - # - peer gro flag ok - # - tso flag ok - # - peer tso flag ok - # - no aggregation ok - # - gro flag with GRO on ok - # - aggregation ok - # - after dev off, flag ok - # - peer flag ok - # - after gro on xdp off, gro flag ok - # - peer gro flag ok - # - tso flag ok - # - peer tso flag ok - # decreasing tx channels with device down ok - # - aggregation ok - # increasing tx channels with device down ok - # aggregation again with default and TSO off ok + # default - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - aggregation ok + # - aggregation with TSO off ok + # with gro on - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - aggregation with TSO off ok + # gro vs xdp while down - gro flag on ok + # - after down ok + # - after xdp off ok + # - after up ok + # - after peer xdp ok + # default channels ok + # with gro enabled on link down - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - aggregation with TSO off ok + # setting tx channels ok + # setting both rx and tx channels ok + # bad setting: combined channels ok + # setting invalid channels nr ok + # bad setting: XDP with RX nr less than TX ok + # bad setting: reducing RX nr below peer TX with XDP set ok + # bad setting: increasing peer TX nr above RX with XDP set ok + # setting invalid channels nr ok + # with xdp attached - gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # - no aggregation ok + # - gro flag with GRO on ok + # - aggregation ok + # - after dev off, flag ok + # - peer flag ok + # - after gro on xdp off, gro flag ok + # - peer gro flag ok + # - tso flag ok + # - peer tso flag ok + # decreasing tx channels with device down ok + # - aggregation ok + # increasing tx channels with device down ok + # aggregation again with default and TSO off ok ok 7 selftests: net: veth.sh [ Regression Potential ] The patchset only modify the selftest script and do not change any kernel code. The changes improve compatibility with different ethtool versions by using universally supported feature names and accepting multiple valid output formats. In case of a regression, it would only affect test execution, not kernel functionality. [ Other Info ] The bug affects all Focal's 5.15 kernels. In order to fix them all the patchset has been submitted for Jammy. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2136734 Title: selftests: net: veth: fix compatibility with older ethtool versions To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2136734/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
