Files
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
..
2021-05-20 10:21:42 -07:00
2021-12-21 09:17:47 -08:00
2021-05-26 09:11:41 -07:00
2021-12-21 09:17:47 -08:00
2021-12-21 09:17:47 -08:00
2020-06-29 18:21:09 -07:00
2020-05-19 15:01:48 -07:00
2018-10-17 13:52:00 -07:00
2018-10-17 13:52:00 -07:00
2021-07-20 16:11:36 -07:00
2021-08-27 09:31:09 -07:00
2021-08-27 09:31:09 -07:00
2021-08-27 09:31:08 -07:00
2021-05-20 10:21:42 -07:00
2021-08-27 09:31:09 -07:00
2021-03-29 09:09:53 -07:00