[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114095449.GA667167@gmail.com>
Date: Thu, 14 Nov 2024 09:54:49 +0000
From: Martin Habets <habetsm.xilinx@...il.com>
To: edward.cree@....com
Cc: davem@...emloft.net, kuba@...nel.org, edumazet@...gle.com,
pabeni@...hat.com, Edward Cree <ecree.xilinx@...il.com>,
netdev@...r.kernel.org, linux-net-drivers@....com, horms@...nel.org,
andrew+netdev@...n.ch, shuah@...nel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 3/5] selftest: include dst-ip in ethtool ntuple
rules
On Wed, Nov 13, 2024 at 12:13:11PM +0000, edward.cree@....com wrote:
>
> From: Edward Cree <ecree.xilinx@...il.com>
>
> sfc hardware does not support filters with only ipproto + dst-port;
> adding dst-ip to the flow spec allows the rss_ctx test to be run on
> these devices.
>
> Signed-off-by: Edward Cree <ecree.xilinx@...il.com>
Reviewed-by: Martin Habets <habetsm.xilinx@...il.com>
> ---
> I'm not sure if this change will break the test for other drivers that
> perhaps support the old filter but not the new one. If so we might
> need to add an option to cfg to control this choice.
>
> tools/testing/selftests/drivers/net/hw/rss_ctx.py | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/tools/testing/selftests/drivers/net/hw/rss_ctx.py b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> index 29995586993c..fb61dae20fd8 100755
> --- a/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> +++ b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> @@ -215,7 +215,7 @@ def test_rss_queue_reconfigure(cfg, main_ctx=True):
> defer(ethtool, f"-X {cfg.ifname} default")
> else:
> other_key = 'noise'
> - flow = f"flow-type tcp{cfg.addr_ipver} dst-port {port} context {ctx_id}"
> + flow = f"flow-type tcp{cfg.addr_ipver} dst-ip {cfg.addr} dst-port {port} context {ctx_id}"
> ntuple = ethtool_create(cfg, "-N", flow)
> defer(ethtool, f"-N {cfg.ifname} delete {ntuple}")
>
> @@ -429,7 +429,7 @@ def test_rss_context(cfg, ctx_cnt=1, create_with_cfg=None):
> ksft_eq(max(data['rss-indirection-table']), 2 + i * 2 + 1, "Unexpected context cfg: " + str(data))
>
> ports.append(rand_port())
> - flow = f"flow-type tcp{cfg.addr_ipver} dst-port {ports[i]} context {ctx_id}"
> + flow = f"flow-type tcp{cfg.addr_ipver} dst-ip {cfg.addr} dst-port {ports[i]} context {ctx_id}"
> ntuple = ethtool_create(cfg, "-N", flow)
> defer(ethtool, f"-N {cfg.ifname} delete {ntuple}")
>
> @@ -516,7 +516,7 @@ def test_rss_context_out_of_order(cfg, ctx_cnt=4):
> ctx.append(defer(ethtool, f"-X {cfg.ifname} context {ctx_id} delete"))
>
> ports.append(rand_port())
> - flow = f"flow-type tcp{cfg.addr_ipver} dst-port {ports[i]} context {ctx_id}"
> + flow = f"flow-type tcp{cfg.addr_ipver} dst-ip {cfg.addr} dst-port {ports[i]} context {ctx_id}"
> ntuple_id = ethtool_create(cfg, "-N", flow)
> ntuple.append(defer(ethtool, f"-N {cfg.ifname} delete {ntuple_id}"))
>
> @@ -569,7 +569,7 @@ def test_rss_context_overlap(cfg, other_ctx=0):
>
> port = rand_port()
> if other_ctx:
> - flow = f"flow-type tcp{cfg.addr_ipver} dst-port {port} context {other_ctx}"
> + flow = f"flow-type tcp{cfg.addr_ipver} dst-ip {cfg.addr} dst-port {port} context {other_ctx}"
> ntuple_id = ethtool_create(cfg, "-N", flow)
> ntuple = defer(ethtool, f"-N {cfg.ifname} delete {ntuple_id}")
>
> @@ -587,7 +587,7 @@ def test_rss_context_overlap(cfg, other_ctx=0):
> # Now create a rule for context 1 and make sure traffic goes to a subset
> if other_ctx:
> ntuple.exec()
> - flow = f"flow-type tcp{cfg.addr_ipver} dst-port {port} context {ctx_id}"
> + flow = f"flow-type tcp{cfg.addr_ipver} dst-ip {cfg.addr} dst-port {port} context {ctx_id}"
> ntuple_id = ethtool_create(cfg, "-N", flow)
> defer(ethtool, f"-N {cfg.ifname} delete {ntuple_id}")
>
> @@ -620,7 +620,7 @@ def test_delete_rss_context_busy(cfg):
>
> # utilize context from ntuple filter
> port = rand_port()
> - flow = f"flow-type tcp{cfg.addr_ipver} dst-port {port} context {ctx_id}"
> + flow = f"flow-type tcp{cfg.addr_ipver} dst-ip {cfg.addr} dst-port {port} context {ctx_id}"
> ntuple_id = ethtool_create(cfg, "-N", flow)
> defer(ethtool, f"-N {cfg.ifname} delete {ntuple_id}")
>
Powered by blists - more mailing lists