mlxbf_gige: disable MAC after panic
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mlxbf_gige: protect against MAC disable during TXdrivers/ | +19 | 0 replies | |
| 2/2 | mlxbf_gige: disable MAC after kernel panicdrivers/ drivers/ | +41 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net-next v1 0/2] mlxbf_gige: disable MAC after panic
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
Signature · 1 line
2.34.1