[PATCH v7 2/5] net/mlx5: remove redundant MAC address index checks
David Marchand
david.marchand at redhat.com
Mon Sep 21 12:06:10 CEST 2026
Hello Raslan,
On Mon, 21 Sept 2026 at 10:32, Raslan Darawsheh <rasland at nvidia.com> wrote:
>
> Hi David,
>
> 🤖 This review was drafted with assistance from Claude (Anthropic) and reviewed by me before posting.
>
> In mlx5_os_mac_addr_remove() (drivers/net/mlx5/linux/mlx5_os.c), this
> patch drops both the netlink `index` arg and the Linux bounds guard:
>
> - if (index < MLX5_MAX_MAC_ADDRESSES)
> - BITFIELD_RESET(priv->mac_own, index);
> + BITFIELD_RESET(priv->mac_own, index);
>
> but the Windows counterpart (windows/mlx5_os.c) still has an equivalent
> check, so the two backends diverge in defensiveness after this patch.
> The check is indeed redundant given mlx5_mac.c's index validation before
> calling into the OS helper -- but for consistency the Windows-side check
> should be dropped too, rather than left as the odd one out. Could you
> remove it there as well in the next version?
Indeed, fixed.
--
David Marchand
More information about the dev
mailing list