diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2018-04-17 16:45:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-17 10:50:28 -0400 |
commit | 1ffcbc8537d0bc32aaca7000cb9c904ec4b6300f (patch) | |
tree | f40c0917875b9f4276128e3382ffdfa9655a4fd4 /include/linux/if_tun.h | |
parent | c0048cff8abb69c956ce1277d17a3f7a14e41522 (diff) | |
download | blackbird-obmc-linux-1ffcbc8537d0bc32aaca7000cb9c904ec4b6300f.tar.gz blackbird-obmc-linux-1ffcbc8537d0bc32aaca7000cb9c904ec4b6300f.zip |
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>
Diffstat (limited to 'include/linux/if_tun.h')
-rw-r--r-- | include/linux/if_tun.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index fd00170b494f..3d2996dc7d85 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h @@ -22,7 +22,7 @@ #if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE) struct socket *tun_get_socket(struct file *); struct ptr_ring *tun_get_tx_ring(struct file *file); -bool tun_is_xdp_buff(void *ptr); +bool tun_is_xdp_frame(void *ptr); void *tun_xdp_to_ptr(void *ptr); void *tun_ptr_to_xdp(void *ptr); void tun_ptr_free(void *ptr); @@ -39,7 +39,7 @@ static inline struct ptr_ring *tun_get_tx_ring(struct file *f) { return ERR_PTR(-EINVAL); } -static inline bool tun_is_xdp_buff(void *ptr) +static inline bool tun_is_xdp_frame(void *ptr) { return false; } |