summaryrefslogtreecommitdiffstats
path: root/include/net/erspan.h
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2018-01-25 13:20:10 -0800
committerDavid S. Miller <davem@davemloft.net>2018-01-25 21:39:43 -0500
commitd350a823020e71e20a10d1dfa44f1d1d653b0334 (patch)
tree71ed16bf911148db581e907fa002a2566a6adcb6 /include/net/erspan.h
parentc69de58ba84f480879de64571d9dae5102d10ed6 (diff)
downloadlinux-d350a823020e71e20a10d1dfa44f1d1d653b0334.tar.bz2
net: erspan: create erspan metadata uapi header
The patch adds a new uapi header file, erspan.h, and moves the 'struct erspan_metadata' from internal erspan.h to it. Signed-off-by: William Tu <u9012063@gmail.com> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/erspan.h')
-rw-r--r--include/net/erspan.h32
1 files changed, 2 insertions, 30 deletions
diff --git a/include/net/erspan.h b/include/net/erspan.h
index 6d30fe898286..5daa4866412b 100644
--- a/include/net/erspan.h
+++ b/include/net/erspan.h
@@ -46,6 +46,8 @@
* GRE proto ERSPAN type II = 0x88BE, type III = 0x22EB
*/
+#include <uapi/linux/erspan.h>
+
#define ERSPAN_VERSION 0x1 /* ERSPAN type II */
#define VER_MASK 0xf000
#define VLAN_MASK 0x0fff
@@ -68,29 +70,6 @@
#define HWID_OFFSET 4
#define DIR_OFFSET 3
-/* ERSPAN version 2 metadata header */
-struct erspan_md2 {
- __be32 timestamp;
- __be16 sgt; /* security group tag */
-#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 hwid_upper:2,
- ft:5,
- p:1;
- __u8 o:1,
- gra:2,
- dir:1,
- hwid:4;
-#elif defined(__BIG_ENDIAN_BITFIELD)
- __u8 p:1,
- ft:5,
- hwid_upper:2;
- __u8 hwid:4,
- dir:1,
- gra:2,
- o:1;
-#endif
-};
-
enum erspan_encap_type {
ERSPAN_ENCAP_NOVLAN = 0x0, /* originally without VLAN tag */
ERSPAN_ENCAP_ISL = 0x1, /* originally ISL encapsulated */
@@ -100,13 +79,6 @@ enum erspan_encap_type {
#define ERSPAN_V1_MDSIZE 4
#define ERSPAN_V2_MDSIZE 8
-struct erspan_metadata {
- union {
- __be32 index; /* Version 1 (type II)*/
- struct erspan_md2 md2; /* Version 2 (type III) */
- } u;
- int version;
-};
struct erspan_base_hdr {
#if defined(__LITTLE_ENDIAN_BITFIELD)