All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Babroski <cbabroski@nvidia.com>
To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@kernel.org>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<davthompson@nvidia.com>, <cbabroski@nvidia.com>
Subject: [PATCH net-next v1 0/2] mlxbf_gige: disable MAC after panic
Date: Fri, 20 Nov 2026 15:24:01 -0500	[thread overview]
Message-ID: <cover.1795206150.git.cbabroski@nvidia.com> (raw)

Background
----------
On BlueField 2 and BlueField 3 the MAC HW is designed to repeatedly send
pause frames to its link partner when the RX FIFO is full. The internal
Ethernet switch on BlueField that is connected to this port is also
designed to stop traffic on all ports when it receives a high number of
continuous pause frames from one of the ports.

What this means is that when the MAC RX FIFO cannot be drained (e.g. due
to panic), it is possible to reproduce a scenario under steady and high
network load where the network becomes inaccessible for other devices
connected to the 3-port switch, namely the OOB host and DPU-BMC.

What this patch series does
---------------------------
Register a panic notifier at highest priority that disables MAC RX and
clears the RX FIFO to ensure that the MAC can no longer receive packets
or send pause frames after a kernel panic.

Add protection in the mlxbf_gige driver for the case when firmware
disables the MAC after handling a fatal error or panic that the kernel
could not detect.

Testing
-------
The following testing was done:
* Verified no performance difference when testing with iperf.
* No regressions found when copying large files to and from DUT.
* Repeated module load/unload succeeds.
* Bringing interface down and up repeatedly succeeds.
* Flooded the interface with broadcast packets to keep MAC RX FIFO full
  while monitoring pause frames received on the internal 3 port switch.
  With this test setup verified pause frames stopped after:
  * ATF FW panic
  * kernel panic triggered with sysrq
  * power off
  * reboot
  * module unload
* No unexpected kernel Oops or warnings when implementing custom ATF FW
  to disable OOB MAC while mlxbf_gige is actively draining the RX queue.

Chris Babroski (2):
  mlxbf_gige: protect against MAC disable during TX
  mlxbf_gige: disable MAC after kernel panic

 .../ethernet/mellanox/mlxbf_gige/mlxbf_gige.h |  2 +
 .../mellanox/mlxbf_gige/mlxbf_gige_main.c     | 39 +++++++++++++++++++
 .../mellanox/mlxbf_gige/mlxbf_gige_tx.c       | 29 +++++++++-----
 3 files changed, 60 insertions(+), 10 deletions(-)


base-commit: 2208ab00f4f213ade91ab775e7f8c4dacdcc856e
-- 
2.34.1


             reply	other threads:[~2026-11-20 20:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20 20:24 Chris Babroski [this message]
2026-11-20 20:24 ` [PATCH net-next v1 1/2] mlxbf_gige: protect against MAC disable during TX Chris Babroski
2026-11-20 20:24 ` [PATCH net-next v1 2/2] mlxbf_gige: disable MAC after kernel panic Chris Babroski
2026-11-20 20:27 ` [PATCH net-next v1 0/2] mlxbf_gige: disable MAC after panic netdev-bot+sinfo
2026-11-20 20:43   ` Chris Babroski

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=cover.1795206150.git.cbabroski@nvidia.com \
    --to=cbabroski@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=davthompson@nvidia.com \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.