summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-06-07 17:57:47 +0300
committerJakub Kicinski <kuba@kernel.org>2026-06-10 05:29:55 +0300
commitaa97f11a76e545ed73cc455bcdd1ece4b480b507 (patch)
treef258347da34100bab0e75904254e92fe9e5b4331 /include/linux/debugobjects.h
parent90e63d5354951d37fa2b3b91e6f17b95d2bf9bee (diff)
downloadlinux-aa97f11a76e545ed73cc455bcdd1ece4b480b507.tar.xz
net: lan966x: restore RX state on reload failure
lan966x_fdma_reload() backs up rx->page_pool and rx->fdma before reallocating the RX resources for the new MTU. If the allocation fails, the restore path puts these fields back before restarting RX. However, the reload path also updates rx->page_order and rx->max_mtu before calling lan966x_fdma_rx_alloc(). These fields are not restored on failure, so RX can be restarted with the old pages, old FDMA state and old page pool, but with the page geometry from the failed new MTU. This can make the XDP path advertise a frame size derived from the new page_order while the actual RX pages still come from the old allocation. For example, after a failed reload to a jumbo MTU, xdp_init_buff() may be called with a frame size larger than the restored RX pages. lan966x_fdma_rx_alloc_page_pool() also registers the newly allocated page pool with each port's XDP RXQ before fdma_alloc_coherent() is called. If fdma_alloc_coherent() fails, the new page pool is destroyed, but the rollback path does not restore the per-port XDP RXQ mem model registration either. Save and restore rx->page_order and rx->max_mtu, and restore the old page pool registration for each port's XDP RXQ before RX is started again. This keeps the restored RX state consistent after a failed reload. Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Reviewed-by: David Carlier <devnexen@gmail.com> Link: https://patch.msgid.link/20260607145747.1494514-1-lgs201920130244@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions