Le 30/09/2026 à 13:28, Yuyang Huang a écrit : > A multi-part RTM_GETMULTICAST dump of dev->mc resumes by position, so > entries added or removed between two dump rounds can be skipped or > repeated. The IPv4 and IPv6 dumps report that with NLM_F_DUMP_INTR by > stamping cb->seq from a per netns generation counter combined with > dev_base_seq, see inet_base_seq(). > > Add the equivalent for the device multicast lists: a per netns counter > bumped whenever an entry is added to or removed from any dev->mc. The > list helpers do not know which device a list belongs to, so give > netdev_hw_addr_list an owner, set for the lists of a device and NULL > for snapshots and other standalone lists, and bump the counter of > dev_net(owner) from the count helpers when the list is dev->mc. That > covers the dev_mc_* helpers, both lists of a sync, the hardware sync > helpers drivers call from their rx mode callbacks or their own workers > and the reconciliation after an asynchronous rx mode update. It is > atomic since the writers only hold the address lock of their own > device. > > Used by the following patch for the AF_PACKET multicast dump. > > Signed-off-by: Yuyang Huang <[email protected]>
Reviewed-by: Nicolas Dichtel <[email protected]>

