Re: [PATCH net-next v9 2/6] net: change netdev_hw_addr_list count through helpers

From: Yuyang Huang

Date: Wed Sep 30 2026 - 11:14:00 EST


> If you respin a version, you can use netdev_hw_addr_list_count() in
> __hw_addr_list_snapshot() also.

Thanks, will do if there is a v10.

On Wed, Sep 30, 2026 at 10:03 PM Nicolas Dichtel
<nicolas.dichtel@xxxxxxxxx> wrote:
>
> Le 30/09/2026 à 13:28, Yuyang Huang a écrit :
> > The count of a netdev_hw_addr_list is changed in several places of
> > dev_addr_lists.c and a few drivers read it directly. The next patch
> > needs to account every change of the count of dev->mc.
> >
> > Add __hw_addr_count_add(), __hw_addr_count_inc(), __hw_addr_count_dec()
> > and __hw_addr_count_reset(), use them for every change of the count
> > and rename the field to _count so that a direct write stands out.
> > Readers keep using netdev_hw_addr_list_count() and the netdev_uc_count()
> > and netdev_mc_count() helpers, the few that read the field directly
> > are converted. No functional change.
> >
> > Signed-off-by: Yuyang Huang <sigefriedhyy@xxxxxxxxx>
> Reviewed-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>
>
> If you respin a version, you can use netdev_hw_addr_list_count() in
> __hw_addr_list_snapshot() also.
>
> Thanks,
> Nicolas