Re: [PATCH net-next v2 00/14] net: macb: implement context swapping

From: Théo Lebrun

Date: Fri Apr 10 2026 - 15:59:41 EST


On Fri Apr 10, 2026 at 9:51 PM CEST, Théo Lebrun wrote:
> Changes in v2:
> - Patch "add subset of `struct macb` to `struct macb_context`" was
> messed up. It contained much more than what the name implied. Split
> into three commits (I caused trouble by rebase reordering).
> - Fix tieoff; V1 allocated it without initialisation.
> - Fix NULL pointer dereference on context in mab_get_regs() and
> macb_get_ringparam() when interface is offline.
> - Patch "unify device pointer naming convention":
> - Fix build issue when CONFIG_NETCONSOLE=y.
> - Rename `struct net_device *dev` to `netdev` in macb.h.
> - Rename `struct phy_device *phy` to `phydev` in macb_main.c.
> - On swap, call netdev_tx_reset_queue() to reset all DQL counters.
> - At end of swap, add missing kfree(old_ctx).
> - During HW disabling in swap, grab bp->lock to protect against IRQ
> handler.
> - On swap, cancel the three BH features MACB has:
> bp->hresp_err_bh_work, bp->tx_lpi_work and queue->tx_error_task.
> - On swap, call macb_configure_dma() which writes buffer size to
> hardware registers. This is important because the change_mtu codepath
> changes the buffer size.
> - Rebase onto latest net-next/main (58dd34dbd5b0) & resolve conflicts.
> - Link to v1: https://patch.msgid.link/20260401-macb-context-v1-0-9590c5ab7272@xxxxxxxxxxx

Forgot mentioning patch "re-read ISR inside IRQ handler locked section".
This is a follow-up to the race condition discussion we had on V1.
It addresses a race against IRQ and a swap operation.

Thanks,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com