tun: convert to use generic xdp_frame and xdp_return_frame API
authorJesper Dangaard Brouer <brouer@redhat.com>
Tue, 17 Apr 2018 14:45:47 +0000 (16:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Apr 2018 14:50:28 +0000 (10:50 -0400)
commit1ffcbc8537d0bc32aaca7000cb9c904ec4b6300f
treef40c0917875b9f4276128e3382ffdfa9655a4fd4
parentc0048cff8abb69c956ce1277d17a3f7a14e41522
tun: convert to use generic xdp_frame and xdp_return_frame API

The tuntap driver invented it's own driver specific way of queuing
XDP packets, by storing the xdp_buff information in the top of
the XDP frame data.

Convert it over to use the more generic xdp_frame structure.  The
main problem with the in-driver method is that the xdp_rxq_info pointer
cannot be trused/used when dequeueing the frame.

V3: Remove check based on feedback from Jason

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c
drivers/vhost/net.c
include/linux/if_tun.h