On 11/07/2025 4:53, Jakub Kicinski wrote:
Test configuring input-xfrm and hash fields with all the limitations.
Tested on mlx5 (CX6):
# ./ksft-net-drv/drivers/net/hw/rss_api.py
TAP version 13
1..10
ok 1 rss_api.test_rxfh_nl_set_fail
ok 2 rss_api.test_rxfh_nl_set_indir
ok 3 rss_api.test_rxfh_nl_set_indir_ctx
ok 4 rss_api.test_rxfh_indir_ntf
ok 5 rss_api.test_rxfh_indir_ctx_ntf
ok 6 rss_api.test_rxfh_nl_set_key
ok 7 rss_api.test_rxfh_fields
ok 8 rss_api.test_rxfh_fields_set
ok 9 rss_api.test_rxfh_fields_set_xfrm
ok 10 rss_api.test_rxfh_fields_ntf
# Totals: pass:10 fail:0 xfail:0 xpass:0 skip:0 error:0
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Hmm, I'm running on the same device and getting:
TAP version 13
1..10
ok 1 rss_api.test_rxfh_nl_set_fail
ok 2 rss_api.test_rxfh_nl_set_indir
ok 3 rss_api.test_rxfh_nl_set_indir_ctx
ok 4 rss_api.test_rxfh_indir_ntf
ok 5 rss_api.test_rxfh_indir_ctx_ntf
ok 6 rss_api.test_rxfh_nl_set_key
ok 7 rss_api.test_rxfh_fields
# Exception while handling defer / cleanup (callback 1 of 1)!
# Defer Exception| Traceback (most recent call last):
# Defer Exception| File
"/root/devel/linux/tools/testing/selftests/net/lib/py/ksft.py", line
154, in ksft_flush_defer
# Defer Exception| entry.exec_only()
# Defer Exception| File
"/root/devel/linux/tools/testing/selftests/net/lib/py/utils.py", line
157, in exec_only
# Defer Exception| self.func(*self.args, **self.kwargs)
# Defer Exception| File
"/root/devel/linux/tools/net/ynl/pyynl/lib/ynl.py", line 1106, in _op
# Defer Exception| return self._ops(ops)[0]
# Defer Exception| ^^^^^^^^^^^^^^
# Defer Exception| File
"/root/devel/linux/tools/net/ynl/pyynl/lib/ynl.py", line 1062, in _ops
# Defer Exception| raise NlError(nl_msg)
# Defer Exception| net.ynl.pyynl.lib.ynl.NlError: Netlink error: Invalid
argument
# Defer Exception| nl_len = 84 (68) nl_flags = 0x300 nl_type = 2
# Defer Exception| error: -22
# Defer Exception| extack: {'msg': 'hash field config is not
symmetric', 'bad-attr': '.input-xfrm'}
not ok 8 rss_api.test_rxfh_fields_set
ok 9 rss_api.test_rxfh_fields_set_xfrm # SKIP no input-xfrm supported
ok 10 rss_api.test_rxfh_fields_ntf
# Totals: pass:8 fail:1 xfail:0 xpass:0 skip:1 error:0
Also, after the test runs I see inconsistency in the rxfh values:
$ cli.py --family ethtool --dump rss-get
'tcp4': {'ip-src', 'ip-dst', 'l4-b-0-1', 'l4-b-2-3'},
$ ethtool -n eth2 rx-flow-hash tcp4
TCP over IPV4 flows use these fields for computing Hash flow key:
IP SA