Commit cb6cc8e
net: stmmac: Apply new page pool parameters when SPH is enabled
Commit df542f6 ("net: stmmac: Switch to zero-copy in
non-XDP RX path") makes DMA write received frame into buffer at offset
of NET_SKB_PAD and sets page pool parameters to sync from offset of
NET_SKB_PAD. But when Header Payload Split is enabled, the header is
written at offset of NET_SKB_PAD, while the payload is written at
offset of zero. Uncorrect offset parameter for the payload breaks dma
coherence [1] since both CPU and DMA touch the page buffer from offset
of zero which is not handled by the page pool sync parameter.
And in case the DMA cannot split the received frame, for example,
a large L2 frame, pp_params.max_len should grow to match the tail
of entire frame.
[1] https://lore.kernel.org/netdev/[email protected]/
Reported-by: Jon Hunter <[email protected]>
Reported-by: Brad Griffis <[email protected]>
Suggested-by: Ido Schimmel <[email protected]>
Fixes: df542f6 ("net: stmmac: Switch to zero-copy in non-XDP RX path")
Signed-off-by: Furong Xu <[email protected]>
Tested-by: Jon Hunter <[email protected]>
Tested-by: Thierry Reding <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 011b033 commit cb6cc8e
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2094 | 2094 | | |
2095 | 2095 | | |
2096 | 2096 | | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
2097 | 2102 | | |
2098 | 2103 | | |
2099 | 2104 | | |
| |||
0 commit comments