virtio_net: Add XDP meta data support
authorYuya Kusakabe <yuya.kusakabe@gmail.com>
Tue, 25 Feb 2020 03:32:12 +0000 (12:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:22:34 +0000 (08:22 +0200)
commit15f135b4ea6e31215d184ef26d0bbb44e1cbe9f5
treef6c471349ee612f3c6c5f5fbb5acf8222b3a1a38
parentd64734b26c4596403290ed18da428147669bb76c
virtio_net: Add XDP meta data support

[ Upstream commit 503d539a6e417b018616bf3060e0b5814fafce47 ]

Implement support for transferring XDP meta data into skb for
virtio_net driver; before calling into the program, xdp.data_meta points
to xdp.data, where on program return with pass verdict, we call
into skb_metadata_set().

Tested with the script at
https://github.com/higebu/virtio_net-xdp-metadata-test.

Signed-off-by: Yuya Kusakabe <yuya.kusakabe@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/bpf/20200225033212.437563-2-yuya.kusakabe@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/virtio_net.c