diff options
| author | Yuyang Huang <sigefriedhyy@gmail.com> | 2026-10-12 10:17:04 +0900 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-10-21 10:51:26 +0200 |
| commit | 646cb8868bd29646b79e11fc0d574b8e25801a23 (patch) | |
| tree | 7b54b615a8945e7ec9eb9c289d13893a8f63c280 /include/uapi/linux | |
| parent | 778a262a6c690621a5c37d2a1cebc88e4585a870 (diff) | |
| download | linux-646cb8868bd29646b79e11fc0d574b8e25801a23.tar.gz linux-646cb8868bd29646b79e11fc0d574b8e25801a23.zip | |
net: add a generation counter for dev->mc changes
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 mc_dev pointer, set for dev->mc only, and bump
the counter of dev_net(mc_dev) from the count helpers. 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 <sigefriedhyy@gmail.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://patch.msgid.link/20261012011707.3378-4-sigefriedhyy@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
