From: Bhargava Marreddy <bhargava.marreddy@broadcom.com>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
michael.chan@broadcom.com, pavan.chebbi@broadcom.com,
vsrama-krishna.nemani@broadcom.com, vikas.gupta@broadcom.com,
Bhargava Marreddy <bhargava.marreddy@broadcom.com>
Subject: [PATCH net-next v2 0/6] bnge: Support async events while down
Date: Tue, 22 Sep 2026 10:58:58 +0530 [thread overview]
Message-ID: <20260922052904.59237-1-bhargava.marreddy@broadcom.com> (raw)
Hi,
This series refactors the bnge driver's Notification Queue 0 (NQ0)
lifecycle so that NQ0 remains persistent across interface close/open
cycles instead of being torn down and rebuilt each time.
This persistent NQ0 setup lays the groundwork for additional async events
in future patches.
v2:
- Dropped patch 7/7 ("bnge: Process async events while administratively down"):
- Link events while down are unnecessary to process since bnge_open() already
queries and updates PHY settings via bnge_update_phy_setting().
- Keeps the series focused strictly on the NQ0/NAPI lifecycle refactoring.
- Corrected the order of operations in bnge_quiesce_nq0() to disable NAPI
first, synchronize IRQ, and then ring the doorbell to prevent NAPI
rescheduling race conditions.
- Added support for dynamic MSI-X vector reallocation by introducing
bnge_reinit_nq0() during interface open.
- Fixed potential NULL pointer dereferences in core ring cleanups (e.g. bn->rx_ring,
bn->tx_ring, and bn->grp_info) on allocation failure paths and failed opens.
- Fixed a resource leak in bnge_init_nic() where RX ring pair buffers
were leaked if chip initialization failed.
- Corrected the MSI-X vector demand check in bnge_resc.c to ensure
sufficient vectors are allocated for both NQ0/aux and main rings.
- Changed CPU affinity hint failure from a fatal error to a warning.
- Added robust NULL pointer and safety checks in ring allocation and
cleanup paths to prevent potential kernel crashes on allocation failures.
v1: https://lore.kernel.org/all/20260901191728.643212-1-bhargava.marreddy@broadcom.com/
Bhargava Marreddy (6):
bnge: Extract bnapi allocation and cleanup into helpers
bnge: Extract per-NQ ring allocation and init helpers
bnge: Move bnapi and ring_grp allocation to probe/remove
bnge: Drop obsolete bn->bnapi NULL checks in open/close paths
bnge: Quiesce NQ0 around ring teardown in bnge_free_core()
bnge: Create NQ0 during probe and keep active across open/close
.../net/ethernet/broadcom/bnge/bnge_ethtool.c | 2 +-
.../net/ethernet/broadcom/bnge/bnge_netdev.c | 514 ++++++++++++++----
.../net/ethernet/broadcom/bnge/bnge_netdev.h | 11 +
.../net/ethernet/broadcom/bnge/bnge_resc.c | 2 +-
.../net/ethernet/broadcom/bnge/bnge_rmem.c | 26 +-
.../net/ethernet/broadcom/bnge/bnge_rmem.h | 4 +-
.../net/ethernet/broadcom/bnge/bnge_txrx.c | 15 +
7 files changed, 470 insertions(+), 104 deletions(-)
--
2.47.3
next reply other threads:[~2026-09-22 5:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 5:28 Bhargava Marreddy [this message]
2026-09-22 5:28 ` [PATCH net-next v2 1/6] bnge: Extract bnapi allocation and cleanup into helpers Bhargava Marreddy
2026-09-22 5:29 ` [PATCH net-next v2 2/6] bnge: Extract per-NQ ring allocation and init helpers Bhargava Marreddy
2026-09-22 5:29 ` [PATCH net-next v2 3/6] bnge: Move bnapi and ring_grp allocation to probe/remove Bhargava Marreddy
2026-09-22 5:29 ` [PATCH net-next v2 4/6] bnge: Drop obsolete bn->bnapi NULL checks in open/close paths Bhargava Marreddy
2026-09-22 5:29 ` [PATCH net-next v2 5/6] bnge: Quiesce NQ0 around ring teardown in bnge_free_core() Bhargava Marreddy
2026-09-22 5:29 ` [PATCH net-next v2 6/6] bnge: Create NQ0 during probe and keep active across open/close Bhargava Marreddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260922052904.59237-1-bhargava.marreddy@broadcom.com \
--to=bhargava.marreddy@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=vikas.gupta@broadcom.com \
--cc=vsrama-krishna.nemani@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®