Re: [[RFC PATCH v4 net-next] 0/2] net: dsa: hsr: Enable HSR HW offloading for KSZ9477
From: Jakub Kicinski
Date: Tue Oct 03 2023 - 09:34:12 EST
On Mon, 11 Sep 2023 20:02:22 +0300 Vladimir Oltean wrote:
> Hi @Jakub, I remember you fixed some issues with the dev->dev_addr writes,
> after dev_addr_lists.c was changed to a rbtree. Is it easy for you to
> tell if the change below is safe from an API perspective?
>
> Is the answer "yes, because dev_uc_add() uses an addr_type of NETDEV_HW_ADDR_T_UNICAST,
> and dev->dev_addr uses NETDEV_HW_ADDR_T_LAN, so they never share a struct netdev_hw_addr
> for the same MAC address, and thus, they never collide"?
>
> The DSA and 8021q drivers currently have this pattern, from around 2008.
> But 8021q also tracks NETDEV_CHANGEADDR events on the real_dev, which is
> absent in DSA. If the change below is safe, it would be a simpler solution.
FWIW I think it should be fine from the rbtree perspective, but IDK how
the user space would react to having a duplicate lladdr.