Thread (14 messages) 14 messages, 3 authors, 4d ago

RE: [PATCH net-next v11 6/6] selftests: net: test AF_PACKET multicast dumps

flat view

From: Loktionov, Aleksandr <hidden>
Date: 2026-10-14 10:46:22
Also in: linux-kselftest, linux-wireless, lkml

quoted hunk ↗ jump to hunk
-----Original Message-----
From: Yuyang Huang <redacted> On Behalf Of Yuyang Huang
Sent: Monday, October 12, 2026 3:17 AM
To: Yuyang Huang <redacted>
Cc: Ajay Singh <ajay.kathat@microchip.com>; Loktionov, Aleksandr
[off-list ref]; Andrew Lunn [off-list ref];
Claudiu Beznea [off-list ref]; David S. Miller
[off-list ref]; David Ahern [off-list ref]; Donald Hunter
[off-list ref]; Eric Dumazet [off-list ref]; Ido
Schimmel [off-list ref]; Keller, Jacob E
[off-list ref]; Jakub Kicinski [off-list ref]; Johannes
Berg [off-list ref]; Kees Cook [off-list ref]; Kory
Maincent [off-list ref]; Kuniyuki Iwashima
[off-list ref]; Nicolas Dichtel [off-list ref];
Nikolaos Gkarlis [off-list ref]; Paolo Abeni
[off-list ref]; Sabrina Dubroca [off-list ref]; Shuah Khan
[off-list ref]; Simon Horman [off-list ref]; Stanislav Fomichev
[off-list ref]; Vadim Fedorenko [off-list ref];
Willem de Bruijn [off-list ref]; linux-kernel@vger.kernel.org;
linux-kselftest@vger.kernel.org; linux-wireless@vger.kernel.org;
netdev@vger.kernel.org
Subject: [PATCH net-next v11 6/6] selftests: net: test AF_PACKET
multicast dumps

Dump the link-layer multicast addresses of a dummy device and verify
that ifa_index restricts the dump to that device, that the all-hosts
address joined on link up is listed without IFA_F_GLOBAL, that an
address added with SIOCADDMULTI is listed with IFA_F_GLOBAL and
IFA_MC_USERS, and that IFA_TARGET_NETNSID dumps another netns.

Signed-off-by: Yuyang Huang <redacted>
Reviewed-by: Nicolas Dichtel <redacted>
---
 tools/testing/selftests/net/rtnetlink.py | 73 +++++++++++++++++++++++-
 1 file changed, 71 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/rtnetlink.py
b/tools/testing/selftests/net/rtnetlink.py
index dc8c77db48974..5534ade056a5c 100755
--- a/tools/testing/selftests/net/rtnetlink.py
+++ b/tools/testing/selftests/net/rtnetlink.py
@@ -5,13 +5,18 @@ import socket
 import struct
 import time
 from lib.py import bkg, ip, ksft_exit, ksft_run, ksft_eq, ksft_ge,
ksft_true, KsftSkipEx -from lib.py import ksft_not_in, ksft_not_none
+from lib.py import ksft_in, ksft_not_in, ksft_not_none
 from lib.py import CmdExitFailure, NetNS, NetNSEnter, RtnlAddrFamily,
RtnlRouteFamily  from lib.py import defer

 IPV4_ALL_HOSTS_MULTICAST = b'\xe0\x00\x00\x01'
 IPV4_TEST_MULTICAST = b'\xef\x01\x01\x01'
 IPV6_TEST_MULTICAST = bytes.fromhex('ff020000000000000000000000000123')
+ETH_ALL_HOSTS_MULTICAST = bytes.fromhex('01005e000001')
+ETH_TEST_MULTICAST_STR = '01:00:5e:01:01:01'
+ETH_TEST_MULTICAST = bytes.fromhex(ETH_TEST_MULTICAST_STR.replace(':',
+'')) ETH_PEER_MULTICAST_STR = '01:00:5e:02:02:02'
+ETH_PEER_MULTICAST = bytes.fromhex(ETH_PEER_MULTICAST_STR.replace(':',
+''))


 def _users_for(rtnl: RtnlAddrFamily, family: int, grp: bytes, ifindex:
int):
@@ -105,6 +110,69 @@ def dump_mcaddr6_check() -> None:
                 s2.close()
...
               ipv6_route_del_reason_expired,
               ipv6_route_del_reason_ra_withdrawn,
               ipv6_route_del_reason_absent,
--
2.43.0
Reviewed-by: Aleksandr Loktionov <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help