aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>2026-10-12 17:24:39 +0200
committerPaolo Abeni <pabeni@redhat.com>2026-10-19 15:40:24 +0200
commit2d5c08ec1532547fd776e8171dee5d32a257e592 (patch)
tree3f0b8404bbb6efd9ae6ee95a8d3c1aaa8953ef09 /scripts/Makefile.thinlto
parentnet: stmmac: unwind the WoL IRQ after a safety IRQ request failure (diff)
net: stmmac: fix XDP TX DMA address for compound RX pages
When RX buffers are compound pages (order > 0), only the head page carries the DMA address programmed by the page pool (page_pool_get_dma_addr()). stmmac_xdp_xmit_xdpf() computed the head buffer's bus address from the page that happens to contain the data: page = frag ? skb_frag_page(frag) : virt_to_page(xdpf->data); dma_addr = page_pool_get_dma_addr(page); ... RX pages become compound as soon as dma_buf_sz needs more than one page (pp_params.order = order_base_2(num_pages) > 0), which happens from an MTU around 3000 bytes once dma_buf_sz reaches 4096. If an XDP program moves the data forward with bpf_xdp_adjust_head() by more than about a page, xdpf->data points into a tail page whose struct page has no DMA address: page_pool_get_dma_addr() then returns a bogus bus address, and dma_sync_single_for_device() together with the TX descriptor transmit from the wrong location. Use virt_to_head_page() to read the DMA base of the buffer and keep the offset relative to the head page (sizeof(*xdpf) + xdpf->headroom), which is correct no matter which page the data ends up in. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Reviewed-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Link: https://patch.msgid.link/20261012-stmmac-xdp-tx-pre-fixes-v1-1-05fd0c90f7e1@oss.qualcomm.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions