RE: [Intel-wired-lan] [PATCH v4 net-next 3/9] ice: respect metadata in legacy-rx/ice_construct_skb()
From: Bhandare, KiranX <hidden>
Date: 2022-01-10 10:17:17
Also in:
bpf, intel-wired-lan, lkml
-----Original Message----- From: Intel-wired-lan <redacted> On Behalf Of Alexander Lobakin Sent: Wednesday, December 8, 2021 7:37 PM To: intel-wired-lan@lists.osuosl.org Cc: Song Liu <redacted>; Alexei Starovoitov <ast@kernel.org>; Andrii Nakryiko [off-list ref]; Daniel Borkmann [off-list ref]; John Fastabend [off-list ref]; Jesper Dangaard Brouer [off-list ref]; Yonghong Song [off-list ref]; Jesper Dangaard Brouer [off-list ref]; KP Singh [off-list ref]; Jakub Kicinski [off-list ref]; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; David S. Miller [off-list ref]; Björn Töpel [off-list ref]; bpf@vger.kernel.org; Martin KaFai Lau [off-list ref] Subject: [Intel-wired-lan] [PATCH v4 net-next 3/9] 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 <redacted> Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Alexander Lobakin <redacted> Reviewed-by: Michal Swiatkowski <redacted> --- drivers/net/ethernet/intel/ice/ice_txrx.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
Tested-by: Kiran Bhandare <redacted> A Contingent Worker at Intel