From: Thinh Tran <thinhtr@linux.vnet.ibm.com>
To: kuba@kernel.org
Cc: aelior@marvell.com, davem@davemloft.net, edumazet@google.com,
manishc@marvell.com, netdev@vger.kernel.org, pabeni@redhat.com,
skalluru@marvell.com, VENKATA.SAI.DUGGI@ibm.com,
Thinh Tran <thinhtr@linux.vnet.ibm.com>,
Abdul Haleem <abdhalee@in.ibm.com>,
David Christensen <drc@linux.vnet.ibm.com>,
Simon Horman <simon.horman@corigine.com>,
Venkata Sai Duggi <venkata.sai.duggi@ibm.com>
Subject: [Patch v6 0/4] bnx2x: Fix error recovering in switch configuration
Date: Fri, 18 Aug 2023 11:14:39 -0500 [thread overview]
Message-ID: <20230818161443.708785-1-thinhtr@linux.vnet.ibm.com> (raw)
In-Reply-To: <20230728211133.2240873-1-thinhtr@linux.vnet.ibm.com>
While injecting PCIe errors to the upstream PCIe switch of
a BCM57810 NIC, system hangs/crashes were observed.
After several calls to bnx2x_tx_timout() complete,
bnx2x_nic_unload() is called to free up HW resources
and bnx2x_napi_disable() is called to release NAPI objects.
Later, when the EEH driver calls bnx2x_io_slot_reset() to
complete the recovery process, bnx2x attempts to disable
NAPI again by calling bnx2x_napi_disable() and freeing
resources which have already been freed, resulting in a
hang or crash.
This patch set introduces a new flag to track the HW
resource and NAPI allocation state, refactor duplicated
code into a single function, check page pool allocation
status before freeing, and reduces debug output when
a TX timeout event occurs.
Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: Manish Chopra <manishc@marvell.com>
Tested-by: Abdul Haleem <abdhalee@in.ibm.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Venkata Sai Duggi <venkata.sai.duggi@ibm.com>
v6:
- Clarifying and updating commit messages
v5:
- Breaking down into a series of individual patches
v4:
- factoring common code into new function bnx2x_stop_nic()
that disables and releases IRQs and NAPIs
v3:
- no changes, just repatched to the latest driver level
- updated the reviewed-by Manish in October, 2022
v2:
- Check the state of the NIC before calling disable nappi
and freeing the IRQ
- Prevent recurrence of TX timeout by turning off the carrier,
calling netif_carrier_off() in bnx2x_tx_timeout()
- Check and bail out early if fp->page_pool already freed
Thinh Tran (4):
bnx2x: new the bp->nic_stopped variable for checking NIC status
bnx2x: factor out common code to bnx2x_stop_nic()
bnx2x: Prevent access to a freed page in page_pool
bnx2x: prevent excessive debug information during a TX timeout
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 2 ++
.../net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 33 ++++++++++++++-----
.../net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 4 +++
.../net/ethernet/broadcom/bnx2x/bnx2x_main.c | 26 +++------------
.../net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 9 ++---
5 files changed, 37 insertions(+), 37 deletions(-)
--
2.27.0
next prev parent reply other threads:[~2023-08-18 16:15 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 20:00 [PATCH] bnx2x: Fix error recovering in switch configuration Thinh Tran
2022-08-27 1:44 ` Jakub Kicinski
2022-08-30 16:15 ` Thinh Tran
2022-09-16 19:51 ` [PATCH v2] " Thinh Tran
2022-09-19 13:53 ` [EXT] " Manish Chopra
2022-09-21 20:11 ` Thinh Tran
2022-09-28 21:33 ` Thinh Tran
2022-10-10 22:01 ` Thinh Tran
2022-10-17 11:14 ` Manish Chopra
2022-10-20 19:12 ` Thinh Tran
2023-07-19 22:02 ` [Patch v3] " Thinh Tran
2023-07-24 11:48 ` Simon Horman
2023-07-24 22:50 ` Jakub Kicinski
2023-07-27 13:29 ` Thinh Tran
2023-07-28 21:11 ` [PATCH v4] " Thinh Tran
2023-08-01 0:47 ` Jakub Kicinski
2023-08-01 8:30 ` Paolo Abeni
2023-08-07 21:15 ` Thinh Tran
2023-08-07 21:08 ` Thinh Tran
2023-08-07 21:24 ` Jakub Kicinski
2023-08-07 21:35 ` Jakub Kicinski
2023-08-11 20:15 ` [Patch v5 0/4] " Thinh Tran
2023-08-11 20:15 ` [Patch v5 1/4] bnx2x: new the bp->nic_stopped variable for checking NIC status Thinh Tran
2023-08-11 20:15 ` [Patch v5 2/4] bnx2x: factor out common code to bnx2x_stop_nic() Thinh Tran
2023-08-11 22:08 ` Jakub Kicinski
2023-08-11 20:15 ` [Patch v5 3/4] bnx2x: Prevent access to a freed page in page_pool Thinh Tran
2023-08-11 20:15 ` [Patch v5 4/4] bnx2x: prevent excessive debug information during a TX timeout Thinh Tran
2023-08-11 22:09 ` [Patch v5 0/4] bnx2x: Fix error recovering in switch configuration Jakub Kicinski
2023-08-18 13:24 ` Thinh Tran
2023-08-18 16:14 ` Thinh Tran [this message]
2023-08-18 16:14 ` [Patch v6 1/4] bnx2x: new flag for track HW resource Thinh Tran
2023-08-18 16:14 ` [Patch v6 2/4] bnx2x: factor out common code to bnx2x_stop_nic() Thinh Tran
2023-08-18 16:14 ` [Patch v6 3/4] bnx2x: Prevent access to a freed page in page_pool Thinh Tran
2023-08-18 16:14 ` [Patch v6 4/4] bnx2x: prevent excessive debug information during a TX timeout Thinh Tran
2022-08-30 9:19 ` [EXT] [PATCH] bnx2x: Fix error recovering in switch configuration Manish Chopra
2022-08-30 21:01 ` Thinh Tran
-- strict thread matches above, loose matches on Subject: below --
2023-11-16 16:08 [Patch v6 0/4] " Thinh Tran
2023-11-16 20:56 ` Simon Horman
2024-01-17 21:56 ` Thinh Tran
2024-01-17 23:55 ` Jakub Kicinski
2024-01-18 16:53 ` Thinh Tran
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=20230818161443.708785-1-thinhtr@linux.vnet.ibm.com \
--to=thinhtr@linux.vnet.ibm.com \
--cc=VENKATA.SAI.DUGGI@ibm.com \
--cc=abdhalee@in.ibm.com \
--cc=aelior@marvell.com \
--cc=davem@davemloft.net \
--cc=drc@linux.vnet.ibm.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=skalluru@marvell.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;
as well as URLs for NNTP newsgroup(s).