]> 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)
commiteb32132fb054daebd39f3a6c08cde0f2f8deccf7
tree95d126a8d9bb198f777277fa15cb2d479807901b
parentc6f5a27d74d02dda0a79b2d81d1ec727bd16670d
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