naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0178-RH-INTERNAL-update-kernel-headers-to-v4.6.0.patch

049c96
From aefa5a575081f3ce848944ab4150918b41bc1268 Mon Sep 17 00:00:00 2001
049c96
From: Davide Caratti <dcaratti@redhat.com>
049c96
Date: Wed, 6 Jul 2016 18:41:38 +0200
049c96
Subject: [PATCH] RH-INTERNAL: update kernel headers to v4.6.0
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1300765
049c96
049c96
4.6.0 is the latest iproute2 tag including support for MACsec.
049c96
Obtained using the following command:
049c96
049c96
$ git checkout v4.6.0 -- include/linux
049c96
049c96
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
049c96
---
049c96
 include/linux/bpf.h                      | 155 +++++++++++++++++++++++--------
049c96
 include/linux/devlink.h                  |  72 ++++++++++++++
049c96
 include/linux/genetlink.h                |   1 +
049c96
 include/linux/if.h                       |  30 +++++-
049c96
 include/linux/if_bridge.h                |  38 +++++++-
049c96
 include/linux/if_ether.h                 |   1 +
049c96
 include/linux/if_link.h                  | 101 ++++++++++++++++++++
049c96
 include/linux/ila.h                      |  37 ++++++++
049c96
 include/linux/in6.h                      |   1 +
049c96
 include/linux/libc-compat.h              |  44 +++++++++
049c96
 include/linux/lwtunnel.h                 |  43 +++++++++
049c96
 include/linux/mpls_iptunnel.h            |  28 ++++++
049c96
 include/linux/netconf.h                  |   1 +
049c96
 include/linux/netfilter_ipv4/ip_tables.h |   1 +
049c96
 include/linux/netlink.h                  |   1 +
049c96
 include/linux/pkt_cls.h                  |   7 ++
049c96
 include/linux/pkt_sched.h                |   4 +
049c96
 include/linux/rtnetlink.h                |   3 +
049c96
 include/linux/sock_diag.h                |   1 +
049c96
 include/linux/tc_act/tc_ife.h            |  38 ++++++++
049c96
 include/linux/tcp.h                      |   5 +
049c96
 21 files changed, 571 insertions(+), 41 deletions(-)
049c96
 create mode 100644 include/linux/devlink.h
049c96
 create mode 100644 include/linux/ila.h
049c96
 create mode 100644 include/linux/lwtunnel.h
049c96
 create mode 100644 include/linux/mpls_iptunnel.h
049c96
 create mode 100644 include/linux/tc_act/tc_ife.h
049c96
049c96
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
049c96
index 3d6d00b..0f5d6f5 100644
049c96
--- a/include/linux/bpf.h
049c96
+++ b/include/linux/bpf.h
049c96
@@ -63,50 +63,16 @@ struct bpf_insn {
049c96
 	__s32	imm;		/* signed immediate constant */
049c96
 };
049c96
 
049c96
-/* BPF syscall commands */
049c96
+/* BPF syscall commands, see bpf(2) man-page for details. */
049c96
 enum bpf_cmd {
049c96
-	/* create a map with given type and attributes
049c96
-	 * fd = bpf(BPF_MAP_CREATE, union bpf_attr *, u32 size)
049c96
-	 * returns fd or negative error
049c96
-	 * map is deleted when fd is closed
049c96
-	 */
049c96
 	BPF_MAP_CREATE,
049c96
-
049c96
-	/* lookup key in a given map
049c96
-	 * err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size)
049c96
-	 * Using attr->map_fd, attr->key, attr->value
049c96
-	 * returns zero and stores found elem into value
049c96
-	 * or negative error
049c96
-	 */
049c96
 	BPF_MAP_LOOKUP_ELEM,
049c96
-
049c96
-	/* create or update key/value pair in a given map
049c96
-	 * err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size)
049c96
-	 * Using attr->map_fd, attr->key, attr->value, attr->flags
049c96
-	 * returns zero or negative error
049c96
-	 */
049c96
 	BPF_MAP_UPDATE_ELEM,
049c96
-
049c96
-	/* find and delete elem by key in a given map
049c96
-	 * err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size)
049c96
-	 * Using attr->map_fd, attr->key
049c96
-	 * returns zero or negative error
049c96
-	 */
049c96
 	BPF_MAP_DELETE_ELEM,
049c96
-
049c96
-	/* lookup key in a given map and return next key
049c96
-	 * err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size)
049c96
-	 * Using attr->map_fd, attr->key, attr->next_key
049c96
-	 * returns zero and stores next key or negative error
049c96
-	 */
049c96
 	BPF_MAP_GET_NEXT_KEY,
049c96
-
049c96
-	/* verify and load eBPF program
049c96
-	 * prog_fd = bpf(BPF_PROG_LOAD, union bpf_attr *attr, u32 size)
049c96
-	 * Using attr->prog_type, attr->insns, attr->license
049c96
-	 * returns fd or negative error
049c96
-	 */
049c96
 	BPF_PROG_LOAD,
049c96
+	BPF_OBJ_PIN,
049c96
+	BPF_OBJ_GET,
049c96
 };
049c96
 
049c96
 enum bpf_map_type {
049c96
@@ -115,6 +81,9 @@ enum bpf_map_type {
049c96
 	BPF_MAP_TYPE_ARRAY,
049c96
 	BPF_MAP_TYPE_PROG_ARRAY,
049c96
 	BPF_MAP_TYPE_PERF_EVENT_ARRAY,
049c96
+	BPF_MAP_TYPE_PERCPU_HASH,
049c96
+	BPF_MAP_TYPE_PERCPU_ARRAY,
049c96
+	BPF_MAP_TYPE_STACK_TRACE,
049c96
 };
049c96
 
049c96
 enum bpf_prog_type {
049c96
@@ -132,12 +101,15 @@ enum bpf_prog_type {
049c96
 #define BPF_NOEXIST	1 /* create new element if it didn't exist */
049c96
 #define BPF_EXIST	2 /* update existing element */
049c96
 
049c96
+#define BPF_F_NO_PREALLOC	(1U << 0)
049c96
+
049c96
 union bpf_attr {
049c96
 	struct { /* anonymous struct used by BPF_MAP_CREATE command */
049c96
 		__u32	map_type;	/* one of enum bpf_map_type */
049c96
 		__u32	key_size;	/* size of key in bytes */
049c96
 		__u32	value_size;	/* size of value in bytes */
049c96
 		__u32	max_entries;	/* max number of entries in a map */
049c96
+		__u32	map_flags;	/* prealloc or not */
049c96
 	};
049c96
 
049c96
 	struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
049c96
@@ -160,6 +132,11 @@ union bpf_attr {
049c96
 		__aligned_u64	log_buf;	/* user supplied buffer */
049c96
 		__u32		kern_version;	/* checked when prog_type=kprobe */
049c96
 	};
049c96
+
049c96
+	struct { /* anonymous struct used by BPF_OBJ_* commands */
049c96
+		__aligned_u64	pathname;
049c96
+		__u32		bpf_fd;
049c96
+	};
049c96
 } __attribute__((aligned(8)));
049c96
 
049c96
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
049c96
@@ -272,9 +249,103 @@ enum bpf_func_id {
049c96
 	BPF_FUNC_skb_get_tunnel_key,
049c96
 	BPF_FUNC_skb_set_tunnel_key,
049c96
 	BPF_FUNC_perf_event_read,	/* u64 bpf_perf_event_read(&map, index) */
049c96
+	/**
049c96
+	 * bpf_redirect(ifindex, flags) - redirect to another netdev
049c96
+	 * @ifindex: ifindex of the net device
049c96
+	 * @flags: bit 0 - if set, redirect to ingress instead of egress
049c96
+	 *         other bits - reserved
049c96
+	 * Return: TC_ACT_REDIRECT
049c96
+	 */
049c96
+	BPF_FUNC_redirect,
049c96
+
049c96
+	/**
049c96
+	 * bpf_get_route_realm(skb) - retrieve a dst's tclassid
049c96
+	 * @skb: pointer to skb
049c96
+	 * Return: realm if != 0
049c96
+	 */
049c96
+	BPF_FUNC_get_route_realm,
049c96
+
049c96
+	/**
049c96
+	 * bpf_perf_event_output(ctx, map, index, data, size) - output perf raw sample
049c96
+	 * @ctx: struct pt_regs*
049c96
+	 * @map: pointer to perf_event_array map
049c96
+	 * @index: index of event in the map
049c96
+	 * @data: data on stack to be output as raw data
049c96
+	 * @size: size of data
049c96
+	 * Return: 0 on success
049c96
+	 */
049c96
+	BPF_FUNC_perf_event_output,
049c96
+	BPF_FUNC_skb_load_bytes,
049c96
+
049c96
+	/**
049c96
+	 * bpf_get_stackid(ctx, map, flags) - walk user or kernel stack and return id
049c96
+	 * @ctx: struct pt_regs*
049c96
+	 * @map: pointer to stack_trace map
049c96
+	 * @flags: bits 0-7 - numer of stack frames to skip
049c96
+	 *         bit 8 - collect user stack instead of kernel
049c96
+	 *         bit 9 - compare stacks by hash only
049c96
+	 *         bit 10 - if two different stacks hash into the same stackid
049c96
+	 *                  discard old
049c96
+	 *         other bits - reserved
049c96
+	 * Return: >= 0 stackid on success or negative error
049c96
+	 */
049c96
+	BPF_FUNC_get_stackid,
049c96
+
049c96
+	/**
049c96
+	 * bpf_csum_diff(from, from_size, to, to_size, seed) - calculate csum diff
049c96
+	 * @from: raw from buffer
049c96
+	 * @from_size: length of from buffer
049c96
+	 * @to: raw to buffer
049c96
+	 * @to_size: length of to buffer
049c96
+	 * @seed: optional seed
049c96
+	 * Return: csum result
049c96
+	 */
049c96
+	BPF_FUNC_csum_diff,
049c96
+
049c96
+	/**
049c96
+	 * bpf_skb_[gs]et_tunnel_opt(skb, opt, size)
049c96
+	 * retrieve or populate tunnel options metadata
049c96
+	 * @skb: pointer to skb
049c96
+	 * @opt: pointer to raw tunnel option data
049c96
+	 * @size: size of @opt
049c96
+	 * Return: 0 on success for set, option size for get
049c96
+	 */
049c96
+	BPF_FUNC_skb_get_tunnel_opt,
049c96
+	BPF_FUNC_skb_set_tunnel_opt,
049c96
 	__BPF_FUNC_MAX_ID,
049c96
 };
049c96
 
049c96
+/* All flags used by eBPF helper functions, placed here. */
049c96
+
049c96
+/* BPF_FUNC_skb_store_bytes flags. */
049c96
+#define BPF_F_RECOMPUTE_CSUM		(1ULL << 0)
049c96
+#define BPF_F_INVALIDATE_HASH		(1ULL << 1)
049c96
+
049c96
+/* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags.
049c96
+ * First 4 bits are for passing the header field size.
049c96
+ */
049c96
+#define BPF_F_HDR_FIELD_MASK		0xfULL
049c96
+
049c96
+/* BPF_FUNC_l4_csum_replace flags. */
049c96
+#define BPF_F_PSEUDO_HDR		(1ULL << 4)
049c96
+#define BPF_F_MARK_MANGLED_0		(1ULL << 5)
049c96
+
049c96
+/* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
049c96
+#define BPF_F_INGRESS			(1ULL << 0)
049c96
+
049c96
+/* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
049c96
+#define BPF_F_TUNINFO_IPV6		(1ULL << 0)
049c96
+
049c96
+/* BPF_FUNC_get_stackid flags. */
049c96
+#define BPF_F_SKIP_FIELD_MASK		0xffULL
049c96
+#define BPF_F_USER_STACK		(1ULL << 8)
049c96
+#define BPF_F_FAST_STACK_CMP		(1ULL << 9)
049c96
+#define BPF_F_REUSE_STACKID		(1ULL << 10)
049c96
+
049c96
+/* BPF_FUNC_skb_set_tunnel_key flags. */
049c96
+#define BPF_F_ZERO_CSUM_TX		(1ULL << 1)
049c96
+#define BPF_F_DONT_FRAGMENT		(1ULL << 2)
049c96
+
049c96
 /* user accessible mirror of in-kernel sk_buff.
049c96
  * new fields can only be added to the end of this structure
049c96
  */
049c96
@@ -293,11 +364,19 @@ struct __sk_buff {
049c96
 	__u32 tc_index;
049c96
 	__u32 cb[5];
049c96
 	__u32 hash;
049c96
+	__u32 tc_classid;
049c96
 };
049c96
 
049c96
 struct bpf_tunnel_key {
049c96
 	__u32 tunnel_id;
049c96
-	__u32 remote_ipv4;
049c96
+	union {
049c96
+		__u32 remote_ipv4;
049c96
+		__u32 remote_ipv6[4];
049c96
+	};
049c96
+	__u8 tunnel_tos;
049c96
+	__u8 tunnel_ttl;
049c96
+	__u16 tunnel_ext;
049c96
+	__u32 tunnel_label;
049c96
 };
049c96
 
049c96
 #endif /* __LINUX_BPF_H__ */
049c96
diff --git a/include/linux/devlink.h b/include/linux/devlink.h
049c96
new file mode 100644
049c96
index 0000000..a96e1a0
049c96
--- /dev/null
049c96
+++ b/include/linux/devlink.h
049c96
@@ -0,0 +1,72 @@
049c96
+/*
049c96
+ * include/uapi/linux/devlink.h - Network physical device Netlink interface
049c96
+ * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
049c96
+ * Copyright (c) 2016 Jiri Pirko <jiri@mellanox.com>
049c96
+ *
049c96
+ * This program is free software; you can redistribute it and/or modify
049c96
+ * it under the terms of the GNU General Public License as published by
049c96
+ * the Free Software Foundation; either version 2 of the License, or
049c96
+ * (at your option) any later version.
049c96
+ */
049c96
+
049c96
+#ifndef _LINUX_DEVLINK_H_
049c96
+#define _LINUX_DEVLINK_H_
049c96
+
049c96
+#define DEVLINK_GENL_NAME "devlink"
049c96
+#define DEVLINK_GENL_VERSION 0x1
049c96
+#define DEVLINK_GENL_MCGRP_CONFIG_NAME "config"
049c96
+
049c96
+enum devlink_command {
049c96
+	/* don't change the order or add anything between, this is ABI! */
049c96
+	DEVLINK_CMD_UNSPEC,
049c96
+
049c96
+	DEVLINK_CMD_GET,		/* can dump */
049c96
+	DEVLINK_CMD_SET,
049c96
+	DEVLINK_CMD_NEW,
049c96
+	DEVLINK_CMD_DEL,
049c96
+
049c96
+	DEVLINK_CMD_PORT_GET,		/* can dump */
049c96
+	DEVLINK_CMD_PORT_SET,
049c96
+	DEVLINK_CMD_PORT_NEW,
049c96
+	DEVLINK_CMD_PORT_DEL,
049c96
+
049c96
+	DEVLINK_CMD_PORT_SPLIT,
049c96
+	DEVLINK_CMD_PORT_UNSPLIT,
049c96
+
049c96
+	/* add new commands above here */
049c96
+
049c96
+	__DEVLINK_CMD_MAX,
049c96
+	DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
049c96
+};
049c96
+
049c96
+enum devlink_port_type {
049c96
+	DEVLINK_PORT_TYPE_NOTSET,
049c96
+	DEVLINK_PORT_TYPE_AUTO,
049c96
+	DEVLINK_PORT_TYPE_ETH,
049c96
+	DEVLINK_PORT_TYPE_IB,
049c96
+};
049c96
+
049c96
+enum devlink_attr {
049c96
+	/* don't change the order or add anything between, this is ABI! */
049c96
+	DEVLINK_ATTR_UNSPEC,
049c96
+
049c96
+	/* bus name + dev name together are a handle for devlink entity */
049c96
+	DEVLINK_ATTR_BUS_NAME,			/* string */
049c96
+	DEVLINK_ATTR_DEV_NAME,			/* string */
049c96
+
049c96
+	DEVLINK_ATTR_PORT_INDEX,		/* u32 */
049c96
+	DEVLINK_ATTR_PORT_TYPE,			/* u16 */
049c96
+	DEVLINK_ATTR_PORT_DESIRED_TYPE,		/* u16 */
049c96
+	DEVLINK_ATTR_PORT_NETDEV_IFINDEX,	/* u32 */
049c96
+	DEVLINK_ATTR_PORT_NETDEV_NAME,		/* string */
049c96
+	DEVLINK_ATTR_PORT_IBDEV_NAME,		/* string */
049c96
+	DEVLINK_ATTR_PORT_SPLIT_COUNT,		/* u32 */
049c96
+	DEVLINK_ATTR_PORT_SPLIT_GROUP,		/* u32 */
049c96
+
049c96
+	/* add new attributes above here, update the policy in devlink.c */
049c96
+
049c96
+	__DEVLINK_ATTR_MAX,
049c96
+	DEVLINK_ATTR_MAX = __DEVLINK_ATTR_MAX - 1
049c96
+};
049c96
+
049c96
+#endif /* _LINUX_DEVLINK_H_ */
049c96
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h
049c96
index 8a1d500..e792092 100644
049c96
--- a/include/linux/genetlink.h
049c96
+++ b/include/linux/genetlink.h
049c96
@@ -21,6 +21,7 @@ struct genlmsghdr {
049c96
 #define GENL_CMD_CAP_DO		0x02
049c96
 #define GENL_CMD_CAP_DUMP	0x04
049c96
 #define GENL_CMD_CAP_HASPOL	0x08
049c96
+#define GENL_UNS_ADMIN_PERM	0x10
049c96
 
049c96
 /*
049c96
  * List of reserved static generic netlink identifiers:
049c96
diff --git a/include/linux/if.h b/include/linux/if.h
049c96
index a55a9e0..5b84948 100644
049c96
--- a/include/linux/if.h
049c96
+++ b/include/linux/if.h
049c96
@@ -19,14 +19,20 @@
049c96
 #ifndef _LINUX_IF_H
049c96
 #define _LINUX_IF_H
049c96
 
049c96
+#include <linux/libc-compat.h>          /* for compatibility with glibc */
049c96
 #include <linux/types.h>		/* for "__kernel_caddr_t" et al	*/
049c96
 #include <linux/socket.h>		/* for "struct sockaddr" et al	*/
049c96
 		/* for "__user" et al           */
049c96
 
049c96
+#if __UAPI_DEF_IF_IFNAMSIZ
049c96
 #define	IFNAMSIZ	16
049c96
+#endif /* __UAPI_DEF_IF_IFNAMSIZ */
049c96
 #define	IFALIASZ	256
049c96
 #include <linux/hdlc/ioctl.h>
049c96
 
049c96
+/* For glibc compatibility. An empty enum does not compile. */
049c96
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && \
049c96
+    __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0
049c96
 /**
049c96
  * enum net_device_flags - &struct net_device flags
049c96
  *
049c96
@@ -37,7 +43,7 @@
049c96
  * are shared for all types of net_devices. The sysfs entries are available
049c96
  * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs
049c96
  * are annotated below, note that only a few flags can be toggled and some
049c96
- * other flags are always always preserved from the original net_device flags
049c96
+ * other flags are always preserved from the original net_device flags
049c96
  * even if you try to set them via sysfs. Flags which are always preserved
049c96
  * are kept under the flag grouping @IFF_VOLATILE. Flags which are __volatile__
049c96
  * are annotated below as such.
049c96
@@ -68,6 +74,8 @@
049c96
  * @IFF_ECHO: echo sent packets. Volatile.
049c96
  */
049c96
 enum net_device_flags {
049c96
+/* for compatibility with glibc net/if.h */
049c96
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
049c96
 	IFF_UP				= 1<<0,  /* sysfs */
049c96
 	IFF_BROADCAST			= 1<<1,  /* __volatile__ */
049c96
 	IFF_DEBUG			= 1<<2,  /* sysfs */
049c96
@@ -84,11 +92,17 @@ enum net_device_flags {
049c96
 	IFF_PORTSEL			= 1<<13, /* sysfs */
049c96
 	IFF_AUTOMEDIA			= 1<<14, /* sysfs */
049c96
 	IFF_DYNAMIC			= 1<<15, /* sysfs */
049c96
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */
049c96
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
049c96
 	IFF_LOWER_UP			= 1<<16, /* __volatile__ */
049c96
 	IFF_DORMANT			= 1<<17, /* __volatile__ */
049c96
 	IFF_ECHO			= 1<<18, /* __volatile__ */
049c96
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
049c96
 };
049c96
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 && __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0 */
049c96
 
049c96
+/* for compatibility with glibc net/if.h */
049c96
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
049c96
 #define IFF_UP				IFF_UP
049c96
 #define IFF_BROADCAST			IFF_BROADCAST
049c96
 #define IFF_DEBUG			IFF_DEBUG
049c96
@@ -105,9 +119,13 @@ enum net_device_flags {
049c96
 #define IFF_PORTSEL			IFF_PORTSEL
049c96
 #define IFF_AUTOMEDIA			IFF_AUTOMEDIA
049c96
 #define IFF_DYNAMIC			IFF_DYNAMIC
049c96
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */
049c96
+
049c96
+#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
049c96
 #define IFF_LOWER_UP			IFF_LOWER_UP
049c96
 #define IFF_DORMANT			IFF_DORMANT
049c96
 #define IFF_ECHO			IFF_ECHO
049c96
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
049c96
 
049c96
 #define IFF_VOLATILE	(IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
049c96
 		IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
049c96
@@ -166,6 +184,8 @@ enum {
049c96
  *	being very small might be worth keeping for clean configuration.
049c96
  */
049c96
 
049c96
+/* for compatibility with glibc net/if.h */
049c96
+#if __UAPI_DEF_IF_IFMAP
049c96
 struct ifmap {
049c96
 	unsigned long mem_start;
049c96
 	unsigned long mem_end;
049c96
@@ -175,6 +195,7 @@ struct ifmap {
049c96
 	unsigned char port;
049c96
 	/* 3 bytes spare */
049c96
 };
049c96
+#endif /* __UAPI_DEF_IF_IFMAP */
049c96
 
049c96
 struct if_settings {
049c96
 	unsigned int type;	/* Type of physical device or protocol */
049c96
@@ -200,6 +221,8 @@ struct if_settings {
049c96
  * remainder may be interface specific.
049c96
  */
049c96
 
049c96
+/* for compatibility with glibc net/if.h */
049c96
+#if __UAPI_DEF_IF_IFREQ
049c96
 struct ifreq {
049c96
 #define IFHWADDRLEN	6
049c96
 	union
049c96
@@ -223,6 +246,7 @@ struct ifreq {
049c96
 		struct	if_settings ifru_settings;
049c96
 	} ifr_ifru;
049c96
 };
049c96
+#endif /* __UAPI_DEF_IF_IFREQ */
049c96
 
049c96
 #define ifr_name	ifr_ifrn.ifrn_name	/* interface name 	*/
049c96
 #define ifr_hwaddr	ifr_ifru.ifru_hwaddr	/* MAC address 		*/
049c96
@@ -249,6 +273,8 @@ struct ifreq {
049c96
  * must know all networks accessible).
049c96
  */
049c96
 
049c96
+/* for compatibility with glibc net/if.h */
049c96
+#if __UAPI_DEF_IF_IFCONF
049c96
 struct ifconf  {
049c96
 	int	ifc_len;			/* size of buffer	*/
049c96
 	union {
049c96
@@ -256,6 +282,8 @@ struct ifconf  {
049c96
 		struct ifreq *ifcu_req;
049c96
 	} ifc_ifcu;
049c96
 };
049c96
+#endif /* __UAPI_DEF_IF_IFCONF */
049c96
+
049c96
 #define	ifc_buf	ifc_ifcu.ifcu_buf		/* buffer address	*/
049c96
 #define	ifc_req	ifc_ifcu.ifcu_req		/* array of structures	*/
049c96
 
049c96
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
049c96
index f24050b..8de96b7 100644
049c96
--- a/include/linux/if_bridge.h
049c96
+++ b/include/linux/if_bridge.h
049c96
@@ -127,6 +127,7 @@ enum {
049c96
 #define BRIDGE_VLAN_INFO_UNTAGGED	(1<<2)	/* VLAN egresses untagged */
049c96
 #define BRIDGE_VLAN_INFO_RANGE_BEGIN	(1<<3) /* VLAN is start of vlan range */
049c96
 #define BRIDGE_VLAN_INFO_RANGE_END	(1<<4) /* VLAN is end of vlan range */
049c96
+#define BRIDGE_VLAN_INFO_BRENTRY	(1<<5) /* Global bridge VLAN entry */
049c96
 
049c96
 struct bridge_vlan_info {
049c96
 	__u16 flags;
049c96
@@ -136,11 +137,17 @@ struct bridge_vlan_info {
049c96
 /* Bridge multicast database attributes
049c96
  * [MDBA_MDB] = {
049c96
  *     [MDBA_MDB_ENTRY] = {
049c96
- *         [MDBA_MDB_ENTRY_INFO]
049c96
+ *         [MDBA_MDB_ENTRY_INFO] {
049c96
+ *		struct br_mdb_entry
049c96
+ *		[MDBA_MDB_EATTR attributes]
049c96
+ *         }
049c96
  *     }
049c96
  * }
049c96
  * [MDBA_ROUTER] = {
049c96
- *    [MDBA_ROUTER_PORT]
049c96
+ *    [MDBA_ROUTER_PORT] = {
049c96
+ *        u32 ifindex
049c96
+ *        [MDBA_ROUTER_PATTR attributes]
049c96
+ *    }
049c96
  * }
049c96
  */
049c96
 enum {
049c96
@@ -165,6 +172,22 @@ enum {
049c96
 };
049c96
 #define MDBA_MDB_ENTRY_MAX (__MDBA_MDB_ENTRY_MAX - 1)
049c96
 
049c96
+/* per mdb entry additional attributes */
049c96
+enum {
049c96
+	MDBA_MDB_EATTR_UNSPEC,
049c96
+	MDBA_MDB_EATTR_TIMER,
049c96
+	__MDBA_MDB_EATTR_MAX
049c96
+};
049c96
+#define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
049c96
+
049c96
+/* multicast router types */
049c96
+enum {
049c96
+	MDB_RTR_TYPE_DISABLED,
049c96
+	MDB_RTR_TYPE_TEMP_QUERY,
049c96
+	MDB_RTR_TYPE_PERM,
049c96
+	MDB_RTR_TYPE_TEMP
049c96
+};
049c96
+
049c96
 enum {
049c96
 	MDBA_ROUTER_UNSPEC,
049c96
 	MDBA_ROUTER_PORT,
049c96
@@ -172,6 +195,15 @@ enum {
049c96
 };
049c96
 #define MDBA_ROUTER_MAX (__MDBA_ROUTER_MAX - 1)
049c96
 
049c96
+/* router port attributes */
049c96
+enum {
049c96
+	MDBA_ROUTER_PATTR_UNSPEC,
049c96
+	MDBA_ROUTER_PATTR_TIMER,
049c96
+	MDBA_ROUTER_PATTR_TYPE,
049c96
+	__MDBA_ROUTER_PATTR_MAX
049c96
+};
049c96
+#define MDBA_ROUTER_PATTR_MAX (__MDBA_ROUTER_PATTR_MAX - 1)
049c96
+
049c96
 struct br_port_msg {
049c96
 	__u8  family;
049c96
 	__u32 ifindex;
049c96
@@ -182,6 +214,8 @@ struct br_mdb_entry {
049c96
 #define MDB_TEMPORARY 0
049c96
 #define MDB_PERMANENT 1
049c96
 	__u8 state;
049c96
+#define MDB_FLAGS_OFFLOAD	(1 << 0)
049c96
+	__u8 flags;
049c96
 	__u16 vid;
049c96
 	struct {
049c96
 		union {
049c96
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
049c96
index bf278d6..8f3b0f4 100644
049c96
--- a/include/linux/if_ether.h
049c96
+++ b/include/linux/if_ether.h
049c96
@@ -83,6 +83,7 @@
049c96
 #define ETH_P_8021AD	0x88A8          /* 802.1ad Service VLAN		*/
049c96
 #define ETH_P_802_EX1	0x88B5		/* 802.1 Local Experimental 1.  */
049c96
 #define ETH_P_TIPC	0x88CA		/* TIPC 			*/
049c96
+#define ETH_P_MACSEC	0x88E5		/* 802.1ae MACsec */
049c96
 #define ETH_P_8021AH	0x88E7          /* 802.1ah Backbone Service Tag */
049c96
 #define ETH_P_MVRP	0x88F5          /* 802.1Q MVRP                  */
049c96
 #define ETH_P_1588	0x88F7		/* IEEE 1588 Timesync */
049c96
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
049c96
index 73b5556..6a688e8 100644
049c96
--- a/include/linux/if_link.h
049c96
+++ b/include/linux/if_link.h
049c96
@@ -35,6 +35,8 @@ struct rtnl_link_stats {
049c96
 	/* for cslip etc */
049c96
 	__u32	rx_compressed;
049c96
 	__u32	tx_compressed;
049c96
+
049c96
+	__u32	rx_nohandler;		/* dropped, no handler found	*/
049c96
 };
049c96
 
049c96
 /* The main device statistics structure */
049c96
@@ -68,6 +70,8 @@ struct rtnl_link_stats64 {
049c96
 	/* for cslip etc */
049c96
 	__u64	rx_compressed;
049c96
 	__u64	tx_compressed;
049c96
+
049c96
+	__u64	rx_nohandler;		/* dropped, no handler found	*/
049c96
 };
049c96
 
049c96
 /* The struct should be in sync with struct ifmap */
049c96
@@ -149,6 +153,8 @@ enum {
049c96
 	IFLA_LINK_NETNSID,
049c96
 	IFLA_PHYS_PORT_NAME,
049c96
 	IFLA_PROTO_DOWN,
049c96
+	IFLA_GSO_MAX_SEGS,
049c96
+	IFLA_GSO_MAX_SIZE,
049c96
 	__IFLA_MAX
049c96
 };
049c96
 
049c96
@@ -216,6 +222,7 @@ enum in6_addr_gen_mode {
049c96
 	IN6_ADDR_GEN_MODE_EUI64,
049c96
 	IN6_ADDR_GEN_MODE_NONE,
049c96
 	IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
049c96
+	IN6_ADDR_GEN_MODE_RANDOM,
049c96
 };
049c96
 
049c96
 /* Bridge section */
049c96
@@ -230,11 +237,47 @@ enum {
049c96
 	IFLA_BR_PRIORITY,
049c96
 	IFLA_BR_VLAN_FILTERING,
049c96
 	IFLA_BR_VLAN_PROTOCOL,
049c96
+	IFLA_BR_GROUP_FWD_MASK,
049c96
+	IFLA_BR_ROOT_ID,
049c96
+	IFLA_BR_BRIDGE_ID,
049c96
+	IFLA_BR_ROOT_PORT,
049c96
+	IFLA_BR_ROOT_PATH_COST,
049c96
+	IFLA_BR_TOPOLOGY_CHANGE,
049c96
+	IFLA_BR_TOPOLOGY_CHANGE_DETECTED,
049c96
+	IFLA_BR_HELLO_TIMER,
049c96
+	IFLA_BR_TCN_TIMER,
049c96
+	IFLA_BR_TOPOLOGY_CHANGE_TIMER,
049c96
+	IFLA_BR_GC_TIMER,
049c96
+	IFLA_BR_GROUP_ADDR,
049c96
+	IFLA_BR_FDB_FLUSH,
049c96
+	IFLA_BR_MCAST_ROUTER,
049c96
+	IFLA_BR_MCAST_SNOOPING,
049c96
+	IFLA_BR_MCAST_QUERY_USE_IFADDR,
049c96
+	IFLA_BR_MCAST_QUERIER,
049c96
+	IFLA_BR_MCAST_HASH_ELASTICITY,
049c96
+	IFLA_BR_MCAST_HASH_MAX,
049c96
+	IFLA_BR_MCAST_LAST_MEMBER_CNT,
049c96
+	IFLA_BR_MCAST_STARTUP_QUERY_CNT,
049c96
+	IFLA_BR_MCAST_LAST_MEMBER_INTVL,
049c96
+	IFLA_BR_MCAST_MEMBERSHIP_INTVL,
049c96
+	IFLA_BR_MCAST_QUERIER_INTVL,
049c96
+	IFLA_BR_MCAST_QUERY_INTVL,
049c96
+	IFLA_BR_MCAST_QUERY_RESPONSE_INTVL,
049c96
+	IFLA_BR_MCAST_STARTUP_QUERY_INTVL,
049c96
+	IFLA_BR_NF_CALL_IPTABLES,
049c96
+	IFLA_BR_NF_CALL_IP6TABLES,
049c96
+	IFLA_BR_NF_CALL_ARPTABLES,
049c96
+	IFLA_BR_VLAN_DEFAULT_PVID,
049c96
 	__IFLA_BR_MAX,
049c96
 };
049c96
 
049c96
 #define IFLA_BR_MAX	(__IFLA_BR_MAX - 1)
049c96
 
049c96
+struct ifla_bridge_id {
049c96
+	__u8	prio[2];
049c96
+	__u8	addr[6]; /* ETH_ALEN */
049c96
+};
049c96
+
049c96
 enum {
049c96
 	BRIDGE_MODE_UNSPEC,
049c96
 	BRIDGE_MODE_HAIRPIN,
049c96
@@ -254,6 +297,19 @@ enum {
049c96
 	IFLA_BRPORT_PROXYARP,	/* proxy ARP */
049c96
 	IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */
049c96
 	IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */
049c96
+	IFLA_BRPORT_ROOT_ID,	/* designated root */
049c96
+	IFLA_BRPORT_BRIDGE_ID,	/* designated bridge */
049c96
+	IFLA_BRPORT_DESIGNATED_PORT,
049c96
+	IFLA_BRPORT_DESIGNATED_COST,
049c96
+	IFLA_BRPORT_ID,
049c96
+	IFLA_BRPORT_NO,
049c96
+	IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
049c96
+	IFLA_BRPORT_CONFIG_PENDING,
049c96
+	IFLA_BRPORT_MESSAGE_AGE_TIMER,
049c96
+	IFLA_BRPORT_FORWARD_DELAY_TIMER,
049c96
+	IFLA_BRPORT_HOLD_TIMER,
049c96
+	IFLA_BRPORT_FLUSH,
049c96
+	IFLA_BRPORT_MULTICAST_ROUTER,
049c96
 	__IFLA_BRPORT_MAX
049c96
 };
049c96
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
049c96
@@ -349,6 +405,43 @@ enum {
049c96
 
049c96
 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
049c96
 
049c96
+enum {
049c96
+	IFLA_VRF_PORT_UNSPEC,
049c96
+	IFLA_VRF_PORT_TABLE,
049c96
+	__IFLA_VRF_PORT_MAX
049c96
+};
049c96
+
049c96
+#define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
049c96
+
049c96
+/* MACSEC section */
049c96
+enum {
049c96
+	IFLA_MACSEC_UNSPEC,
049c96
+	IFLA_MACSEC_SCI,
049c96
+	IFLA_MACSEC_PORT,
049c96
+	IFLA_MACSEC_ICV_LEN,
049c96
+	IFLA_MACSEC_CIPHER_SUITE,
049c96
+	IFLA_MACSEC_WINDOW,
049c96
+	IFLA_MACSEC_ENCODING_SA,
049c96
+	IFLA_MACSEC_ENCRYPT,
049c96
+	IFLA_MACSEC_PROTECT,
049c96
+	IFLA_MACSEC_INC_SCI,
049c96
+	IFLA_MACSEC_ES,
049c96
+	IFLA_MACSEC_SCB,
049c96
+	IFLA_MACSEC_REPLAY_PROTECT,
049c96
+	IFLA_MACSEC_VALIDATION,
049c96
+	__IFLA_MACSEC_MAX,
049c96
+};
049c96
+
049c96
+#define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
049c96
+
049c96
+enum macsec_validation_type {
049c96
+	MACSEC_VALIDATE_DISABLED = 0,
049c96
+	MACSEC_VALIDATE_CHECK = 1,
049c96
+	MACSEC_VALIDATE_STRICT = 2,
049c96
+	__MACSEC_VALIDATE_END,
049c96
+	MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
049c96
+};
049c96
+
049c96
 /* IPVLAN section */
049c96
 enum {
049c96
 	IFLA_IPVLAN_UNSPEC,
049c96
@@ -392,6 +485,7 @@ enum {
049c96
 	IFLA_VXLAN_GBP,
049c96
 	IFLA_VXLAN_REMCSUM_NOPARTIAL,
049c96
 	IFLA_VXLAN_COLLECT_METADATA,
049c96
+	IFLA_VXLAN_LABEL,
049c96
 	__IFLA_VXLAN_MAX
049c96
 };
049c96
 #define IFLA_VXLAN_MAX	(__IFLA_VXLAN_MAX - 1)
049c96
@@ -505,6 +599,8 @@ enum {
049c96
 				 */
049c96
 	IFLA_VF_STATS,		/* network device statistics */
049c96
 	IFLA_VF_TRUST,		/* Trust VF */
049c96
+	IFLA_VF_IB_NODE_GUID,	/* VF Infiniband node GUID */
049c96
+	IFLA_VF_IB_PORT_GUID,	/* VF Infiniband port GUID */
049c96
 	__IFLA_VF_MAX,
049c96
 };
049c96
 
049c96
@@ -537,6 +633,11 @@ struct ifla_vf_spoofchk {
049c96
 	__u32 setting;
049c96
 };
049c96
 
049c96
+struct ifla_vf_guid {
049c96
+	__u32 vf;
049c96
+	__u64 guid;
049c96
+};
049c96
+
049c96
 enum {
049c96
 	IFLA_VF_LINK_STATE_AUTO,	/* link state of the uplink */
049c96
 	IFLA_VF_LINK_STATE_ENABLE,	/* link always up */
049c96
diff --git a/include/linux/ila.h b/include/linux/ila.h
049c96
new file mode 100644
049c96
index 0000000..4f9e1de
049c96
--- /dev/null
049c96
+++ b/include/linux/ila.h
049c96
@@ -0,0 +1,37 @@
049c96
+/* ila.h - ILA Interface */
049c96
+
049c96
+#ifndef _LINUX_ILA_H
049c96
+#define _LINUX_ILA_H
049c96
+
049c96
+/* NETLINK_GENERIC related info */
049c96
+#define ILA_GENL_NAME		"ila"
049c96
+#define ILA_GENL_VERSION	0x1
049c96
+
049c96
+enum {
049c96
+	ILA_ATTR_UNSPEC,
049c96
+	ILA_ATTR_LOCATOR,			/* u64 */
049c96
+	ILA_ATTR_IDENTIFIER,			/* u64 */
049c96
+	ILA_ATTR_LOCATOR_MATCH,			/* u64 */
049c96
+	ILA_ATTR_IFINDEX,			/* s32 */
049c96
+	ILA_ATTR_DIR,				/* u32 */
049c96
+
049c96
+	__ILA_ATTR_MAX,
049c96
+};
049c96
+
049c96
+#define ILA_ATTR_MAX		(__ILA_ATTR_MAX - 1)
049c96
+
049c96
+enum {
049c96
+	ILA_CMD_UNSPEC,
049c96
+	ILA_CMD_ADD,
049c96
+	ILA_CMD_DEL,
049c96
+	ILA_CMD_GET,
049c96
+
049c96
+	__ILA_CMD_MAX,
049c96
+};
049c96
+
049c96
+#define ILA_CMD_MAX	(__ILA_CMD_MAX - 1)
049c96
+
049c96
+#define ILA_DIR_IN	(1 << 0)
049c96
+#define ILA_DIR_OUT	(1 << 1)
049c96
+
049c96
+#endif /* _LINUX_ILA_H */
049c96
diff --git a/include/linux/in6.h b/include/linux/in6.h
049c96
index 994f4c2..aa5b66d 100644
049c96
--- a/include/linux/in6.h
049c96
+++ b/include/linux/in6.h
049c96
@@ -196,6 +196,7 @@ struct in6_flowlabel_req {
049c96
 
049c96
 #define IPV6_IPSEC_POLICY	34
049c96
 #define IPV6_XFRM_POLICY	35
049c96
+#define IPV6_HDRINCL		36
049c96
 #endif
049c96
 
049c96
 /*
049c96
diff --git a/include/linux/libc-compat.h b/include/linux/libc-compat.h
049c96
index 9bed5b6..b3c2085 100644
049c96
--- a/include/linux/libc-compat.h
049c96
+++ b/include/linux/libc-compat.h
049c96
@@ -51,6 +51,40 @@
049c96
 /* We have included glibc headers... */
049c96
 #if defined(__GLIBC__)
049c96
 
049c96
+/* Coordinate with glibc net/if.h header. */
049c96
+#if defined(_NET_IF_H)
049c96
+
049c96
+/* GLIBC headers included first so don't define anything
049c96
+ * that would already be defined. */
049c96
+
049c96
+#define __UAPI_DEF_IF_IFCONF 0
049c96
+#define __UAPI_DEF_IF_IFMAP 0
049c96
+#define __UAPI_DEF_IF_IFNAMSIZ 0
049c96
+#define __UAPI_DEF_IF_IFREQ 0
049c96
+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
049c96
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
049c96
+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
049c96
+#ifndef __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
049c96
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
049c96
+#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
049c96
+
049c96
+#else /* _NET_IF_H */
049c96
+
049c96
+/* Linux headers included first, and we must define everything
049c96
+ * we need. The expectation is that glibc will check the
049c96
+ * __UAPI_DEF_* defines and adjust appropriately. */
049c96
+
049c96
+#define __UAPI_DEF_IF_IFCONF 1
049c96
+#define __UAPI_DEF_IF_IFMAP 1
049c96
+#define __UAPI_DEF_IF_IFNAMSIZ 1
049c96
+#define __UAPI_DEF_IF_IFREQ 1
049c96
+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
049c96
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
049c96
+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
049c96
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
049c96
+
049c96
+#endif /* _NET_IF_H */
049c96
+
049c96
 /* Coordinate with glibc netinet/in.h header. */
049c96
 #if defined(_NETINET_IN_H)
049c96
 
049c96
@@ -117,6 +151,16 @@
049c96
  * that we need. */
049c96
 #else /* !defined(__GLIBC__) */
049c96
 
049c96
+/* Definitions for if.h */
049c96
+#define __UAPI_DEF_IF_IFCONF 1
049c96
+#define __UAPI_DEF_IF_IFMAP 1
049c96
+#define __UAPI_DEF_IF_IFNAMSIZ 1
049c96
+#define __UAPI_DEF_IF_IFREQ 1
049c96
+/* Everything up to IFF_DYNAMIC, matches net/if.h until glibc 2.23 */
049c96
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1
049c96
+/* For the future if glibc adds IFF_LOWER_UP, IFF_DORMANT and IFF_ECHO */
049c96
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 1
049c96
+
049c96
 /* Definitions for in.h */
049c96
 #define __UAPI_DEF_IN_ADDR		1
049c96
 #define __UAPI_DEF_IN_IPPROTO		1
049c96
diff --git a/include/linux/lwtunnel.h b/include/linux/lwtunnel.h
049c96
new file mode 100644
049c96
index 0000000..1d2f4f6
049c96
--- /dev/null
049c96
+++ b/include/linux/lwtunnel.h
049c96
@@ -0,0 +1,43 @@
049c96
+#ifndef _LWTUNNEL_H_
049c96
+#define _LWTUNNEL_H_
049c96
+
049c96
+#include <linux/types.h>
049c96
+
049c96
+enum lwtunnel_encap_types {
049c96
+	LWTUNNEL_ENCAP_NONE,
049c96
+	LWTUNNEL_ENCAP_MPLS,
049c96
+	LWTUNNEL_ENCAP_IP,
049c96
+	LWTUNNEL_ENCAP_ILA,
049c96
+	LWTUNNEL_ENCAP_IP6,
049c96
+	__LWTUNNEL_ENCAP_MAX,
049c96
+};
049c96
+
049c96
+#define LWTUNNEL_ENCAP_MAX (__LWTUNNEL_ENCAP_MAX - 1)
049c96
+
049c96
+enum lwtunnel_ip_t {
049c96
+	LWTUNNEL_IP_UNSPEC,
049c96
+	LWTUNNEL_IP_ID,
049c96
+	LWTUNNEL_IP_DST,
049c96
+	LWTUNNEL_IP_SRC,
049c96
+	LWTUNNEL_IP_TTL,
049c96
+	LWTUNNEL_IP_TOS,
049c96
+	LWTUNNEL_IP_FLAGS,
049c96
+	__LWTUNNEL_IP_MAX,
049c96
+};
049c96
+
049c96
+#define LWTUNNEL_IP_MAX (__LWTUNNEL_IP_MAX - 1)
049c96
+
049c96
+enum lwtunnel_ip6_t {
049c96
+	LWTUNNEL_IP6_UNSPEC,
049c96
+	LWTUNNEL_IP6_ID,
049c96
+	LWTUNNEL_IP6_DST,
049c96
+	LWTUNNEL_IP6_SRC,
049c96
+	LWTUNNEL_IP6_HOPLIMIT,
049c96
+	LWTUNNEL_IP6_TC,
049c96
+	LWTUNNEL_IP6_FLAGS,
049c96
+	__LWTUNNEL_IP6_MAX,
049c96
+};
049c96
+
049c96
+#define LWTUNNEL_IP6_MAX (__LWTUNNEL_IP6_MAX - 1)
049c96
+
049c96
+#endif /* _LWTUNNEL_H_ */
049c96
diff --git a/include/linux/mpls_iptunnel.h b/include/linux/mpls_iptunnel.h
049c96
new file mode 100644
049c96
index 0000000..4132c3c
049c96
--- /dev/null
049c96
+++ b/include/linux/mpls_iptunnel.h
049c96
@@ -0,0 +1,28 @@
049c96
+/*
049c96
+ *	mpls tunnel api
049c96
+ *
049c96
+ *	Authors:
049c96
+ *		Roopa Prabhu <roopa@cumulusnetworks.com>
049c96
+ *
049c96
+ *	This program is free software; you can redistribute it and/or
049c96
+ *	modify it under the terms of the GNU General Public License
049c96
+ *	as published by the Free Software Foundation; either version
049c96
+ *	2 of the License, or (at your option) any later version.
049c96
+ */
049c96
+
049c96
+#ifndef _LINUX_MPLS_IPTUNNEL_H
049c96
+#define _LINUX_MPLS_IPTUNNEL_H
049c96
+
049c96
+/* MPLS tunnel attributes
049c96
+ * [RTA_ENCAP] = {
049c96
+ *     [MPLS_IPTUNNEL_DST]
049c96
+ * }
049c96
+ */
049c96
+enum {
049c96
+	MPLS_IPTUNNEL_UNSPEC,
049c96
+	MPLS_IPTUNNEL_DST,
049c96
+	__MPLS_IPTUNNEL_MAX,
049c96
+};
049c96
+#define MPLS_IPTUNNEL_MAX (__MPLS_IPTUNNEL_MAX - 1)
049c96
+
049c96
+#endif /* _LINUX_MPLS_IPTUNNEL_H */
049c96
diff --git a/include/linux/netconf.h b/include/linux/netconf.h
049c96
index 7210fe4..70306a8 100644
049c96
--- a/include/linux/netconf.h
049c96
+++ b/include/linux/netconf.h
049c96
@@ -19,6 +19,7 @@ enum {
049c96
 	__NETCONFA_MAX
049c96
 };
049c96
 #define NETCONFA_MAX	(__NETCONFA_MAX - 1)
049c96
+#define NETCONFA_ALL	-1
049c96
 
049c96
 #define NETCONFA_IFINDEX_ALL		-1
049c96
 #define NETCONFA_IFINDEX_DEFAULT	-2
049c96
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
049c96
index 38542b4..456fb86 100644
049c96
--- a/include/linux/netfilter_ipv4/ip_tables.h
049c96
+++ b/include/linux/netfilter_ipv4/ip_tables.h
049c96
@@ -17,6 +17,7 @@
049c96
 
049c96
 #include <linux/types.h>
049c96
 
049c96
+#include <linux/if.h>
049c96
 #include <linux/netfilter_ipv4.h>
049c96
 
049c96
 #include <linux/netfilter/x_tables.h>
049c96
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
049c96
index 352b5b8..8a7ca5c 100644
049c96
--- a/include/linux/netlink.h
049c96
+++ b/include/linux/netlink.h
049c96
@@ -54,6 +54,7 @@ struct nlmsghdr {
049c96
 #define NLM_F_ACK		4	/* Reply with ack, with zero or error code */
049c96
 #define NLM_F_ECHO		8	/* Echo this request 		*/
049c96
 #define NLM_F_DUMP_INTR		16	/* Dump was inconsistent due to sequence change */
049c96
+#define NLM_F_DUMP_FILTERED	32	/* Dump was filtered as requested */
049c96
 
049c96
 /* Modifiers to GET request */
049c96
 #define NLM_F_ROOT	0x100	/* specify tree	root	*/
049c96
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
049c96
index 25af89f..b69358b 100644
049c96
--- a/include/linux/pkt_cls.h
049c96
+++ b/include/linux/pkt_cls.h
049c96
@@ -33,6 +33,7 @@ enum {
049c96
 #define TC_ACT_STOLEN		4
049c96
 #define TC_ACT_QUEUED		5
049c96
 #define TC_ACT_REPEAT		6
049c96
+#define TC_ACT_REDIRECT		7
049c96
 #define TC_ACT_JUMP		0x10000000
049c96
 
049c96
 /* Action type identifiers*/
049c96
@@ -117,6 +118,7 @@ enum {
049c96
 	TCA_U32_INDEV,
049c96
 	TCA_U32_PCNT,
049c96
 	TCA_U32_MARK,
049c96
+	TCA_U32_FLAGS,
049c96
 	__TCA_U32_MAX
049c96
 };
049c96
 
049c96
@@ -319,6 +321,8 @@ enum {
049c96
 
049c96
 /* BPF classifier */
049c96
 
049c96
+#define TCA_BPF_FLAG_ACT_DIRECT		(1 << 0)
049c96
+
049c96
 enum {
049c96
 	TCA_BPF_UNSPEC,
049c96
 	TCA_BPF_ACT,
049c96
@@ -328,6 +332,7 @@ enum {
049c96
 	TCA_BPF_OPS,
049c96
 	TCA_BPF_FD,
049c96
 	TCA_BPF_NAME,
049c96
+	TCA_BPF_FLAGS,
049c96
 	__TCA_BPF_MAX,
049c96
 };
049c96
 
049c96
@@ -358,6 +363,8 @@ enum {
049c96
 	TCA_FLOWER_KEY_TCP_DST,		/* be16 */
049c96
 	TCA_FLOWER_KEY_UDP_SRC,		/* be16 */
049c96
 	TCA_FLOWER_KEY_UDP_DST,		/* be16 */
049c96
+
049c96
+	TCA_FLOWER_FLAGS,
049c96
 	__TCA_FLOWER_MAX,
049c96
 };
049c96
 
049c96
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
049c96
index 8d2530d..8cb18b4 100644
049c96
--- a/include/linux/pkt_sched.h
049c96
+++ b/include/linux/pkt_sched.h
049c96
@@ -72,6 +72,10 @@ struct tc_estimator {
049c96
 #define TC_H_UNSPEC	(0U)
049c96
 #define TC_H_ROOT	(0xFFFFFFFFU)
049c96
 #define TC_H_INGRESS    (0xFFFFFFF1U)
049c96
+#define TC_H_CLSACT	TC_H_INGRESS
049c96
+
049c96
+#define TC_H_MIN_INGRESS	0xFFF2U
049c96
+#define TC_H_MIN_EGRESS		0xFFF3U
049c96
 
049c96
 /* Need to corrospond to iproute2 tc/tc_core.h "enum link_layer" */
049c96
 enum tc_link_layer {
049c96
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
049c96
index 3244947..6aaa2a3 100644
049c96
--- a/include/linux/rtnetlink.h
049c96
+++ b/include/linux/rtnetlink.h
049c96
@@ -270,6 +270,7 @@ enum rt_scope_t {
049c96
 #define RTM_F_CLONED		0x200	/* This route is cloned		*/
049c96
 #define RTM_F_EQUALIZE		0x400	/* Multipath equalizer: NI	*/
049c96
 #define RTM_F_PREFIX		0x800	/* Prefix addresses		*/
049c96
+#define RTM_F_LOOKUP_TABLE	0x1000	/* set rtm_table to FIB lookup result */
049c96
 
049c96
 /* Reserved table identifiers */
049c96
 
049c96
@@ -310,6 +311,7 @@ enum rtattr_type_t {
049c96
 	RTA_PREF,
049c96
 	RTA_ENCAP_TYPE,
049c96
 	RTA_ENCAP,
049c96
+	RTA_EXPIRES,
049c96
 	__RTA_MAX
049c96
 };
049c96
 
049c96
@@ -664,6 +666,7 @@ struct tcamsg {
049c96
 #define RTEXT_FILTER_VF		(1 << 0)
049c96
 #define RTEXT_FILTER_BRVLAN	(1 << 1)
049c96
 #define RTEXT_FILTER_BRVLAN_COMPRESSED	(1 << 2)
049c96
+#define	RTEXT_FILTER_SKIP_STATS	(1 << 3)
049c96
 
049c96
 /* End of information exported to user level */
049c96
 
049c96
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
049c96
index 024e1f4..dafcb89 100644
049c96
--- a/include/linux/sock_diag.h
049c96
+++ b/include/linux/sock_diag.h
049c96
@@ -4,6 +4,7 @@
049c96
 #include <linux/types.h>
049c96
 
049c96
 #define SOCK_DIAG_BY_FAMILY 20
049c96
+#define SOCK_DESTROY 21
049c96
 
049c96
 struct sock_diag_req {
049c96
 	__u8	sdiag_family;
049c96
diff --git a/include/linux/tc_act/tc_ife.h b/include/linux/tc_act/tc_ife.h
049c96
new file mode 100644
049c96
index 0000000..d648ff6
049c96
--- /dev/null
049c96
+++ b/include/linux/tc_act/tc_ife.h
049c96
@@ -0,0 +1,38 @@
049c96
+#ifndef __UAPI_TC_IFE_H
049c96
+#define __UAPI_TC_IFE_H
049c96
+
049c96
+#include <linux/types.h>
049c96
+#include <linux/pkt_cls.h>
049c96
+
049c96
+#define TCA_ACT_IFE 25
049c96
+/* Flag bits for now just encoding/decoding; mutually exclusive */
049c96
+#define IFE_ENCODE 1
049c96
+#define IFE_DECODE 0
049c96
+
049c96
+struct tc_ife {
049c96
+	tc_gen;
049c96
+	__u16 flags;
049c96
+};
049c96
+
049c96
+/*XXX: We need to encode the total number of bytes consumed */
049c96
+enum {
049c96
+	TCA_IFE_UNSPEC,
049c96
+	TCA_IFE_PARMS,
049c96
+	TCA_IFE_TM,
049c96
+	TCA_IFE_DMAC,
049c96
+	TCA_IFE_SMAC,
049c96
+	TCA_IFE_TYPE,
049c96
+	TCA_IFE_METALST,
049c96
+	__TCA_IFE_MAX
049c96
+};
049c96
+#define TCA_IFE_MAX (__TCA_IFE_MAX - 1)
049c96
+
049c96
+#define IFE_META_SKBMARK 1
049c96
+#define IFE_META_HASHID 2
049c96
+#define	IFE_META_PRIO 3
049c96
+#define	IFE_META_QMAP 4
049c96
+/*Can be overridden at runtime by module option*/
049c96
+#define	__IFE_META_MAX 5
049c96
+#define IFE_META_MAX (__IFE_META_MAX - 1)
049c96
+
049c96
+#endif
049c96
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
049c96
index 1e9b4a6..7f21db9 100644
049c96
--- a/include/linux/tcp.h
049c96
+++ b/include/linux/tcp.h
049c96
@@ -196,6 +196,11 @@ struct tcp_info {
049c96
 	__u64	tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
049c96
 	__u32	tcpi_segs_out;	     /* RFC4898 tcpEStatsPerfSegsOut */
049c96
 	__u32	tcpi_segs_in;	     /* RFC4898 tcpEStatsPerfSegsIn */
049c96
+
049c96
+	__u32	tcpi_notsent_bytes;
049c96
+	__u32	tcpi_min_rtt;
049c96
+	__u32	tcpi_data_segs_in;	/* RFC4898 tcpEStatsDataSegsIn */
049c96
+	__u32	tcpi_data_segs_out;	/* RFC4898 tcpEStatsDataSegsOut */
049c96
 };
049c96
 
049c96
 /* for TCP_MD5SIG socket option */
049c96
-- 
049c96
1.8.3.1
049c96