Re: [PATCH net v3] bnxt_en: avoid redundant RX mask updates in UC overflow state
From: Jakub Kicinski
Date: Sat Sep 05 2026 - 14:31:54 EST
On Tue, 01 Sep 2026 14:46:47 +0200 Johnathan Browall via B4 Relay wrote:
> Tested with the equivalent patch on 6.12.y on BCM57416: the repeated
> SET_RX_MASK invocations no longer occur and the receive disruption is
> no longer reproducible.
You must test this on the kernel tree you are targeting.
> Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
> Cc: stable@xxxxxxxxxxxxxxx # needs adjustment for <= 6.18
Please delete these and resend this to net-next, this is an improvement
not a bug fix.
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -13791,6 +13791,16 @@ static bool bnxt_uc_list_updated(struct bnxt *bp,
> struct netdev_hw_addr *ha;
> int off = 0;
>
> + /* In the overflow state no secondary L2 filters are programmed
> + * and unicast RX relies on the promiscuous mask, so the list
> + * only needs reprogramming once it fits the available filters
> + * again. Reporting an update here would resend an identical
> + * SET_RX_MASK on every callback, which causes brief RX packet
> + * loss on some chips.
Please trim the slop comments significantly, or remove them.
> + */
> + if (vnic->flags & BNXT_VNIC_UC_PROMISC_FLAG)
> + return netdev_hw_addr_list_count(uc) <= (BNXT_MAX_UC_ADDRS - 1);
> + /* Commit the overflow state only once the mask is installed, so
> + * that a failed attempt keeps the state marked as changed and the
> + * next retry or rx-mode callback programs the mask again.
> + */
slop
> + netif_addr_lock_bh(dev);
> + if (uc_promisc)
> + vnic->flags |= BNXT_VNIC_UC_PROMISC_FLAG;
> + else
> + vnic->flags &= ~BNXT_VNIC_UC_PROMISC_FLAG;
> + netif_addr_unlock_bh(dev);