diff options
| author | 2026-10-20 09:30:55 +0200 | |
|---|---|---|
| committer | 2026-10-20 09:30:56 +0200 | |
| commit | f34e7e887549eceae6bde4b120d510bfbe2963b9 (patch) | |
| tree | 0929e3bfe3db95ec6ebf75e50f7031e83e491f6d /scripts/Makefile.thinlto | |
| parent | Merge branch 'net-rnpgbe-add-tx-rx-and-link-status-support' (diff) | |
| parent | net: macb: use context swapping in .ndo_change_mtu() (diff) | |
Merge branch 'net-macb-implement-context-swapping'
says:
====================
net: macb: implement context swapping
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-by: Nicolai Buchwitz <nb@tipi-net.de> # RPi CM5 with RP1 GEM
---
I wonder if we can get those changes in before the next merge window?
The idea being that we can restart iterating on XDP [1] & XSK [2]
during the next kernel cycle, bringing those long awaited features into
MACB.
[0]: https://lore.kernel.org/netdev/20260317-macb-set-channels-v4-0-1bd4f4ffcfca@bootlin.com/
[1]: https://lore.kernel.org/netdev/20260323221047.2749577-1-pvalerio@redhat.com/
[2]: https://lore.kernel.org/netdev/20260304-macb-xsk-v1-0-ba2ebe2bdaa3@bootlin.com/
[3]: https://lore.kernel.org/all/DJXGIM9EGPT8.4UHNYP2Y0GOP@bootlin.com/
[4]: https://lore.kernel.org/netdev/20260930-macb-irq-v1-1-8994a4c8f3bb@bootlin.com/
[5]: https://lore.kernel.org/netdev/20260918-macb-ncr-rmw-v1-1-30c3494f93cd@bootlin.com/
- v10: https://patch.msgid.link/20261001-macb-context-v10-0-beb541bbb7df@bootlin.com
- v9: https://patch.msgid.link/20260812-macb-context-v9-0-7ddbf5f715e0@bootlin.com
- v8: https://patch.msgid.link/20260805-macb-context-v8-0-bc302ffd1174@bootlin.com
- v7: https://patch.msgid.link/20260803-macb-context-v7-0-4d7d4af04849@bootlin.com
- v6: https://patch.msgid.link/20260731-macb-context-v6-0-49d5a1439d48@bootlin.com
- v5: https://patch.msgid.link/20260724-macb-context-v5-0-569b1852bc7f@bootlin.com
- v4: https://patch.msgid.link/20260717-macb-context-v4-0-0acbe7f10cdb@bootlin.com
- v3: https://patch.msgid.link/20260701-macb-context-v3-0-00268d5b1502@bootlin.com
- v2: https://patch.msgid.link/20260410-macb-context-v2-0-af39f71d40b6@bootlin.com
- v1: https://patch.msgid.link/20260401-macb-context-v1-0-9590c5ab7272@bootlin.com
====================
Link: https://patch.msgid.link/20261013-macb-context-v11-0-b27785167566@bootlin.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
