Skip to content

Commit 5546da7

Browse files
committed
Revert "net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled"
This reverts commit b514c47. The commit describes that we don't have to sync the page when recycling, and it tries to optimize that case. But we do need to sync after allocation. Recycling side should be changed to pass the right sync size instead. Fixes: b514c47 ("net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled") Reported-by: Jon Hunter <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Jacob Keller <[email protected]> Reviewed-by: Furong Xu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5c14e51 commit 5546da7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
20352035
rx_q->queue_index = queue;
20362036
rx_q->priv_data = priv;
20372037

2038-
pp_params.flags = PP_FLAG_DMA_MAP | (xdp_prog ? PP_FLAG_DMA_SYNC_DEV : 0);
2038+
pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
20392039
pp_params.pool_size = dma_conf->dma_rx_size;
20402040
num_pages = DIV_ROUND_UP(dma_conf->dma_buf_sz, PAGE_SIZE);
20412041
pp_params.order = ilog2(num_pages);

0 commit comments

Comments
 (0)