]> git.baikalelectronics.ru Git - kernel.git/commit
ice: respect metadata in legacy-rx/ice_construct_skb()
authorAlexander Lobakin <alexandr.lobakin@intel.com>
Wed, 8 Dec 2021 14:06:56 +0000 (15:06 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 31 Jan 2022 17:43:35 +0000 (09:43 -0800)
commitee803dca967ae5bd360e0e090a3bfb3ad09e8ecf
tree95d126a8d9bb198f777277fa15cb2d479807901b
parent6dba29537c0f639b482bd8f8bbd50ab4ae74b48d
ice: respect metadata in legacy-rx/ice_construct_skb()

In "legacy-rx" mode represented by ice_construct_skb(), we can
still use XDP (and XDP metadata), but after XDP_PASS the metadata
will be lost as it doesn't get copied to the skb.
Copy it along with the frame headers. Account its size on skb
allocation, and when copying just treat it as a part of the frame
and do a pull after to "move" it to the "reserved" zone.
Point net_prefetch() to xdp->data_meta instead of data. This won't
change anything when the meta is not here, but will save some cache
misses otherwise.

Suggested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c