diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-11-18 10:38:08 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-12-09 05:05:30 -0500 |
commit | e999d6ea2a4f313a5bba514b08f6f01b0c0072a9 (patch) | |
tree | cbd0aa5bbdc098c6aeda2ed2079cf6fa3abbd8c9 /include/uapi/linux/if_tun.h | |
parent | 40630b82c20b7d800ea52919093cb7f0e3b03e3e (diff) |
tun: add VNET_LE flag
virtio 1.0 modified virtio net header format,
making all fields little endian.
Users can tweak header format before submitting it to tun,
but this means more data copies where none were necessary.
And if the iovec is in RO memory, this means we might
need to split iovec also means we might in theory overflow
iovec max size.
This patch adds a simpler way for applications to handle this,
using new "little endian" flag in tun.
As a result, tun simply byte-swaps header fields as appropriate.
This is a NOP on LE architectures.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/uapi/linux/if_tun.h')
-rw-r--r-- | include/uapi/linux/if_tun.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h index 277a2607d166..18b2403982f9 100644 --- a/include/uapi/linux/if_tun.h +++ b/include/uapi/linux/if_tun.h | |||
@@ -57,6 +57,7 @@ | |||
57 | #define IFF_ONE_QUEUE 0x2000 | 57 | #define IFF_ONE_QUEUE 0x2000 |
58 | #define IFF_VNET_HDR 0x4000 | 58 | #define IFF_VNET_HDR 0x4000 |
59 | #define IFF_TUN_EXCL 0x8000 | 59 | #define IFF_TUN_EXCL 0x8000 |
60 | #define IFF_VNET_LE 0x10000 | ||
60 | #define IFF_MULTI_QUEUE 0x0100 | 61 | #define IFF_MULTI_QUEUE 0x0100 |
61 | #define IFF_ATTACH_QUEUE 0x0200 | 62 | #define IFF_ATTACH_QUEUE 0x0200 |
62 | #define IFF_DETACH_QUEUE 0x0400 | 63 | #define IFF_DETACH_QUEUE 0x0400 |