ice: Use xdp->frame_sz instead of recalculating truesize
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Tue, 31 Jan 2023 20:45:02 +0000 (21:45 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 1 Feb 2023 22:30:27 +0000 (23:30 +0100)
commit8a11b334ec9b8088b54764424a49adb8ef1c002a
treec329557ea0fa2f0e4ba0ea54bfbae03d0714ec58
parent9070fe3da0b126044c3cffd169d5fb2565365a0e
ice: Use xdp->frame_sz instead of recalculating truesize

SKB path calculates truesize on three different functions, which could
be avoided as xdp_buff carries the already calculated truesize under
xdp_buff::frame_sz. If ice_add_rx_frag() is adjusted to take the
xdp_buff as an input just like functions responsible for creating
sk_buff initially, codebase could be simplified by removing these
redundant recalculations and rely on xdp_buff::frame_sz instead.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Link: https://lore.kernel.org/bpf/20230131204506.219292-10-maciej.fijalkowski@intel.com
drivers/net/ethernet/intel/ice/ice_txrx.c