Commit 7b85c775 authored by Nimrod Oren's avatar Nimrod Oren Committed by Jakub Kicinski
Browse files

selftests: drv-net: rss_flow_label: skip unsupported devices



The test_rss_flow_label_6only test case fails on devices that do not
support IPv6 flow label hashing. Make it skip neatly, consistent with
the behavior of the test_rss_flow_label case.

Reviewed-by: default avatarGal Pressman <gal@nvidia.com>
Signed-off-by: default avatarNimrod Oren <noren@nvidia.com>
Link: https://patch.msgid.link/20260128090217.663366-1-noren@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent cff3e7c6
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -145,9 +145,14 @@ def test_rss_flow_label_6only(cfg):

    # Try to enable Flow Labels and check again, in case it leaks thru
    initial = _ethtool_get_cfg(cfg, "udp6")
    changed = initial.replace("l", "") if "l" in initial else initial + "l"

    cmd(f"ethtool -N {cfg.ifname} rx-flow-hash udp6 {changed}")
    no_lbl = initial.replace("l", "")
    if "l" not in initial:
        try:
            cmd(f"ethtool -N {cfg.ifname} rx-flow-hash udp6 l{no_lbl}")
        except CmdExitFailure as exc:
            raise KsftSkipEx("Device doesn't support Flow Label for UDP6") from exc
    else:
        cmd(f"ethtool -N {cfg.ifname} rx-flow-hash udp6 {no_lbl}")
    restore = defer(cmd, f"ethtool -N {cfg.ifname} rx-flow-hash udp6 {initial}")

    _check_v4_flow_types(cfg)