Re: [PATCH net v2 2/2] selftests: drv-net: rss_ctx: Add test for ntuple rule
From: Edward Cree
Date: Tue Nov 12 2024 - 06:26:31 EST
On 12/11/2024 02:23, Daniel Xu wrote:
> Extend the rss_ctx test suite to test that an ntuple action that
> redirects to an RSS context contains that information in `ethtool -n`.
> Otherwise the output from ethtool is highly deceiving. This test helps
> ensure drivers are compliant with the API.
>
> Signed-off-by: Daniel Xu <dxu@xxxxxxxxx>
...
> +def _ntuple_rule_check(cfg, rule_id, ctx_id):
> + """Check that ntuple rule references RSS context ID"""
> + text = ethtool(f"-n {cfg.ifname} rule {rule_id}").stdout
> + pattern = f"RSS Context ID: {ctx_id}"
> + ksft_true(re.search(pattern, text, re.IGNORECASE),
This won't match the output from your ethtool patch, because that
removes the colon. Probably want to wait until the patch is
finalised and then write a regex that matches both versions.