aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_txrx_lib.h
diff options
context:
space:
mode:
authorMaciej Fijalkowski <[email protected]>2025-01-23 15:01:17 +0000
committerTony Nguyen <[email protected]>2025-01-31 18:06:26 +0000
commit11c4aa074d547d825b19cd8d9f288254d89d805c (patch)
treec0e5f6241a6e498a113dd94f055697a4cc1d7f60 /drivers/net/ethernet/intel/ice/ice_txrx_lib.h
parentice: put Rx buffers after being done with current frame (diff)
downloadkernel-11c4aa074d547d825b19cd8d9f288254d89d805c.tar.gz
kernel-11c4aa074d547d825b19cd8d9f288254d89d805c.zip
ice: gather page_count()'s of each frag right before XDP prog call
If we store the pgcnt on few fragments while being in the middle of gathering the whole frame and we stumbled upon DD bit not being set, we terminate the NAPI Rx processing loop and come back later on. Then on next NAPI execution we work on previously stored pgcnt. Imagine that second half of page was used actively by networking stack and by the time we came back, stack is not busy with this page anymore and decremented the refcnt. The page reuse algorithm in this case should be good to reuse the page but given the old refcnt it will not do so and attempt to release the page via page_frag_cache_drain() with pagecnt_bias used as an arg. This in turn will result in negative refcnt on struct page, which was initially observed by Xu Du. Therefore, move the page count storage from ice_get_rx_buf() to a place where we are sure that whole frame has been collected, but before calling XDP program as it internally can also change the page count of fragments belonging to xdp_buff. Fixes: ac0753391195 ("ice: Store page count inside ice_rx_buf") Reported-and-tested-by: Xu Du <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Reviewed-by: Simon Horman <[email protected]> Co-developed-by: Jacob Keller <[email protected]> Signed-off-by: Jacob Keller <[email protected]> Signed-off-by: Maciej Fijalkowski <[email protected]> Tested-by: Chandan Kumar Rout <[email protected]> (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_txrx_lib.h')
0 files changed, 0 insertions, 0 deletions