lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCtQIK-vFm6j6o9w@mini-arch>
Date: Mon, 19 May 2025 08:37:04 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Mina Almasry <almasrymina@...gle.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Simon Horman <horms@...nel.org>,
	Jesper Dangaard Brouer <hawk@...nel.org>,
	Ilias Apalodimas <ilias.apalodimas@...aro.org>,
	Neal Cardwell <ncardwell@...gle.com>,
	Kuniyuki Iwashima <kuniyu@...zon.com>,
	David Ahern <dsahern@...nel.org>,
	Andrew Lunn <andrew+netdev@...n.ch>, Shuah Khan <shuah@...nel.org>,
	sdf@...ichev.me, ap420073@...il.com, praan@...gle.com,
	shivajikant@...gle.com
Subject: Re: [PATCH net-next v1 7/9] net: devmem: ksft: add 5 tuple FS support

On 05/19, Mina Almasry wrote:
> ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple
> FS support, but the ksft is currently 3-tuple only. Support drivers that
> have 5-tuple FS supported by adding a ksft arg.
> 
> Signed-off-by: Mina Almasry <almasrymina@...gle.com>
> 
> ---
>  .../testing/selftests/drivers/net/hw/devmem.py  | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/testing/selftests/drivers/net/hw/devmem.py
> index 39b5241463aa..40fe5b525d51 100755
> --- a/tools/testing/selftests/drivers/net/hw/devmem.py
> +++ b/tools/testing/selftests/drivers/net/hw/devmem.py
> @@ -21,14 +21,27 @@ def require_devmem(cfg):
>  def check_rx(cfg, ipver) -> None:
>      require_devmem(cfg)
>  
> +    fs_5_tuple = False
> +    if "FLOW_STEERING_5_TUPLE" in cfg.env:
> +        fs_5_tuple = cfg.env["FLOW_STEERING_5_TUPLE"]

I wonder if we can transparently handle it in ncdevmem: if -c is passed,
try installing 3-tuple rule, and if it fails, try 5-tuple one. This
should work without any user input / extra environment variable.

>      addr = cfg.addr_v[ipver]
> +    remote_addr = cfg.remote_addr_v[ipver]
> +    port = rand_port()
> +
>      if ipver == "6":
>          addr = "[" + addr + "]"
> +        remote_addr = "[" + remote_addr + "]"
>  
>      socat = f"socat -u - TCP{ipver}:{addr}:{port}"
>  
> -    port = rand_port()
> -    listen_cmd = f"{cfg.bin_local} -l -f {cfg.ifname} -s {cfg.addr_v['6']} -p {port}"
> +    if fs_5_tuple:
> +        socat += f",bind={remote_addr}:{port}"

This we can always do regardless of 3 or 5 tuple?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ