Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Nicolai Buchwitz
Tue, 13 Oct 2026 19:04
Re: [PATCH net-next v11 0/9] net: macb: implement context swapping
Author: Nicolai Buchwitz
Date: Tue, 13 Oct 2026 19:04
Date: Tue, 13 Oct 2026 19:04
46 lines
7926 bytes
7926 bytes
Hi Théo On 13.10.2026 15:16, Théo Lebrun wrote: > MACB has a pretty primitive approach to buffer management. They are all > stored in `struct macb *bp`. On operations that require buffer realloc > (set_ringparam & change_mtu at the moment), the only option is to close > the interface, change our global state and re-open the interface. > > Two issues: > - It doesn't fly on memory pressured systems; we free our precious > buffers and don't manage to reallocate fully, meaning our machine > just lost its network access. > - Anecdotally, it is pretty slow because it implies a full PHY reinit. > > Instead, we shall: > - allocate a new context (including buffers) first > - if it fails, early return without any impact to the interface > - stop interface > - update global state (bp, netdev, etc) > - pass newly allocated buffer pointers to the hardware > - start interface > - free old context > > This is what we implement here. Both .set_ringparam() and > .ndo_change_mtu() are covered by this series. In the future, > at least .set_channels() [0], XDP [1] and XSK [2] would benefit. > [...] Tested on a Raspberry Pi CM5 (RP1 GEM) with lockdep and KASAN enabled: - ring and MTU changes under bidirectional TCP and a UDP flood - ring and MTU changes while the interface is down - ring and MTU changes during autoneg - injected allocation failures in both paths - PTP and EEE after a swap Everything worked, and changing either no longer takes the link down. For the series: Tested-by: Nicolai Buchwitz <nb@tipi-net.de> # RPi CM5 with RP1 GEM Thanks, Nicolai
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads