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: <20231214141646.kdf5rnldpyglwvdd@skbuf>
Date: Thu, 14 Dec 2023 16:16:46 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: Roger Quadros <rogerq@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, shuah@...nel.org, s-vadapalli@...com,
	r-gunasekaran@...com, vigneshr@...com, srk@...com, horms@...nel.org,
	p-varis@...com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 net-next 02/11] selftests: forwarding: ethtool_mm:
 fall back to aggregate if device does not report pMAC stats

On Wed, Dec 13, 2023 at 01:07:12PM +0200, Roger Quadros wrote:
> diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
> index 8f6ca458af9a..763c262a3453 100755
> --- a/tools/testing/selftests/net/forwarding/lib.sh
> +++ b/tools/testing/selftests/net/forwarding/lib.sh
> @@ -146,6 +146,15 @@ check_ethtool_mm_support()
>  	fi
>  }
>  
> +check_ethtool_pmac_std_stats_support()
> +{
> +	local dev=$1; shift
> +	local grp=$1; shift
> +
> +	[ 0 -ne $(ethtool --json -S $dev --all-groups --src pmac 2>/dev/null \
> +		| jq '.[]."$grp" | length') ]
> +}
> +
>  check_locked_port_support()
>  {
>  	if ! bridge -d link show | grep -q " locked"; then
> -- 
> 2.34.1
>

FYI, there's another submitted patch that touches the exact same spot,
and it looks like it has a good chance of getting merged.
https://patchwork.kernel.org/project/netdevbpf/patch/20231214135029.383595-9-tobias@waldekranz.com/

You need to pay attention to merge conflicts, so you don't waste a patch
iteration just because of that one thing.

I guess you might be able to wing it, because the other patch does this:

diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 8f6ca458af9a..e3740163c384 100755
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -146,6 +146,15 @@  check_ethtool_mm_support()
 	fi
 }
 
+check_ethtool_counter_group_support()
+{
+	ethtool --help 2>&1| grep -- '--all-groups' &> /dev/null
+	if [[ $? -ne 0 ]]; then
+		echo "SKIP: ethtool too old; it is missing standard counter group support"
+		exit $ksft_skip
+	fi
+}
+
 check_locked_port_support()
 {
 	if ! bridge -d link show | grep -q " locked"; then

which quite coincidentally does not change what your patch sees in its
upper context, aka 3 lines like this:

----
 	fi
 }
 
----

You can check if your patch set applies on top of Tobias', by formatting
it as patch files on top of net-next/main, resetting HEAD to net-next,
applying Tobias' series and then your patches.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ