Thread (7 messages) 7 messages, 3 authors, 1d ago

Re: [PATCH net-next 3/3] bnxt: convert to core rx_mode retry mechanism

From: Stanislav Fomichev <hidden>
Date: 2026-05-28 21:30:28

On 05/27, Michael Chan wrote:
On Tue, May 26, 2026 at 6:41 PM Stanislav Fomichev [off-list ref] wrote:
quoted
Remove the driver-specific BNXT_STATE_L2_FILTER_RETRY + timer + sp_task
retry mechanism and rely on the core stack's ndo_set_rx_mode_async retry
instead.

bnxt_cfg_rx_mode() now returns errors (including -ENODEV when the VF
cannot reach the PF), allowing the core stack to schedule retries with
exponential backoff.

Call core's netif_rx_mode_schedule_retry during reset to handle
VF reopen.

Cc: Michael Chan <michael.chan@broadcom.com>
Cc: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 36 ++++++++---------------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h |  2 --
 2 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
quoted
@@ -13757,21 +13763,14 @@ static int bnxt_cfg_rx_mode(struct bnxt *bp, struct netdev_hw_addr_list *uc,
        for (i = 1, off = 0; i < vnic->uc_filter_count; i++, off += ETH_ALEN) {
                rc = bnxt_hwrm_set_vnic_filter(bp, 0, i, vnic->uc_list + off);
                if (rc) {
-                       if (BNXT_VF(bp) && rc == -ENODEV) {
-                               if (!test_and_set_bit(BNXT_STATE_L2_FILTER_RETRY, &bp->state))
-                                       netdev_warn(bp->dev, "Cannot configure L2 filters while PF is unavailable, will retry\n");
-                               else
-                                       netdev_dbg(bp->dev, "PF still unavailable while configuring L2 filters.\n");
-                               rc = 0;
-                       } else {
+                       if (BNXT_VF(bp) && rc == -ENODEV)
+                               netdev_warn(bp->dev, "Cannot configure L2 filters while PF is unavailable, will retry\n");
Maybe we can set rc to -EAGAIN here so it's easier for the caller to
check for retry.
Yeah, that makes sense, will do, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help