linux/drivers/net/ethernet/intel/igc
Alexander Lobakin f9e61d365b igc: don't reserve excessive XDP_PACKET_HEADROOM on XSK Rx to skb
{__,}napi_alloc_skb() allocates and reserves additional NET_SKB_PAD
+ NET_IP_ALIGN for any skb.
OTOH, igc_construct_skb_zc() currently allocates and reserves
additional `xdp->data_meta - xdp->data_hard_start`, which is about
XDP_PACKET_HEADROOM for XSK frames.
There's no need for that at all as the frame is post-XDP and will
go only to the networking stack core.
Pass the size of the actual data only (+ meta) to
__napi_alloc_skb() and don't reserve anything. This will give
enough headroom for stack processing.
Also, net_prefetch() xdp->data_meta and align the copy size to
speed-up memcpy() a little and better match igc_construct_skb().

Fixes: fc9df2a0b5 ("igc: Enable RX via AF_XDP zero-copy")
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Nechama Kraus <nechamax.kraus@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-01-31 09:47:13 -08:00
..
igc.h igc: Add support for CBS offloading 2021-08-27 09:31:09 -07:00
igc_base.c igc: Change Device Reset to Port Reset 2021-10-29 10:36:58 -07:00
igc_base.h igc: Enable TX via AF_XDP zero-copy 2021-05-20 10:21:42 -07:00
igc_defines.h igc: Remove obsolete define 2021-12-21 09:17:47 -08:00
igc_diag.c
igc_diag.h
igc_dump.c igb/igc: use strongly typed pointer 2021-05-26 09:11:41 -07:00
igc_ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
igc_hw.h igc: Remove obsolete nvm type 2021-12-21 09:17:47 -08:00
igc_i225.c igc: Remove obsolete nvm type 2021-12-21 09:17:47 -08:00
igc_i225.h
igc_mac.c
igc_mac.h
igc_main.c igc: don't reserve excessive XDP_PACKET_HEADROOM on XSK Rx to skb 2022-01-31 09:47:13 -08:00
igc_nvm.c
igc_nvm.h
igc_phy.c igc: Remove _I_PHY_ID checking 2021-07-20 16:11:36 -07:00
igc_phy.h
igc_ptp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-30 12:12:12 -08:00
igc_regs.h igc: Add support for CBS offloading 2021-08-27 09:31:09 -07:00
igc_tsn.c igc: Add support for CBS offloading 2021-08-27 09:31:09 -07:00
igc_tsn.h igc: Simplify TSN flags handling 2021-08-27 09:31:08 -07:00
igc_xdp.c net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
igc_xdp.h igc: Enable RX via AF_XDP zero-copy 2021-05-20 10:21:42 -07:00
Makefile