Re: [PATCH net-next v5 0/4] rtnetlink: dump link-layer multicast addresses
From: Yuyang Huang
Date: Fri Sep 18 2026 - 21:26:16 EST
On Thu, Sep 17, 2026 at 10:47 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
> You compare the situation to IP but for L2 the UC addresses
> are not exposed via RTM_GETADDR. Are you going to add it?
I'm not sure exposing dev->uc via RTM_GETADDR is useful: I haven't
found a use case, and iproute2 does not dump it today either ("ip
addr" only shows IFLA_ADDRESS). If you think
it is worth having for consistency, I'm happy to do it as a follow-up.
> Is that the only justification? To avoid reading proc?
> Are you planning to extend this interface with new features?
For more background: we have some hardware offload control logic in
userspace that
needs the L2 and L3 multicast state of devices. L3 already comes
over netlink; dev->mc is the last piece read from procfs, so we have to
maintain two copies of the code, one for netlink and one for procfs,
and parsing procfs has none of the benefits netlink gives (e.g. per
interface filtering).
The same split exists in iproute2, where "ip maddr" parses
/proc/net/dev_mcast for the link-layer entries. I already updated
iproute2 to get rid of the procfs parsing for IPv4/IPv6 multicast; L2
multicast is the final piece, and I have something working locally.
Once this patchset is merged, I plan to send the iproute2 patchset.
Thanks,
Yuyang