15/08/2025 03:55, Minggang(Gavin) Li: > > On 8/14/2025 10:05 PM, Thomas Monjalon wrote: > > 14/08/2025 12:08, Gavin Li: > >> Rules for multicast MAC addresses are intended to filter multicast traffic > >> and are managed through multicast MAC add/remove APIs. In mlx5_dev_spawn > >> function, devices (PF, VFs, and SFs) retrieve the netdev-configured MAC > >> addresses via netlink and store them in the PMD device data, which > >> includes multicast MAC addresses. > >> > >> To update multicast MAC address rules, create them within > >> mlx5_traffic_enable. > > Sorry this is not clear. > > Please explain what was the previous behaviour with a past tense, > > and what is the new changed behaviour. > ACK > >> BITFIELD_DECLARE(mac_own, uint64_t, MLX5_MAX_MAC_ADDRESSES); > >> + BITFIELD_DECLARE(mac_pmd, uint64_t, MLX5_MAX_MAC_ADDRESSES); > > Not sure about the naming. > > What is the difference between mac_own and mac_pmd? > > mac_own serves as a flag for MAC addresses, indicating that they were > added for VF by pmd. This flag is useful for the flush API, which can > clear flows associated with VF MAC addresses. Similarly, mac_pmd is used > to show that a MAC address was added by pmd for PF, VF, and SFs. It > helps differentiate MAC addresses that have been synchronized from the > kernel driver.
The description does not match the name. Please could you find a better name and add a comment in the code to explain the details? If you need to change the previous variable, I suppose it would be accepted.