naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

Blame SOURCES/iproute2-3.10.0-linux.patch

a4b897
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
a4b897
new file mode 100644
a4b897
index 0000000..08aab3a
a4b897
--- /dev/null
a4b897
+++ b/include/linux/bpf.h
a4b897
@@ -0,0 +1,226 @@
a4b897
+/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
a4b897
+ *
a4b897
+ * This program is free software; you can redistribute it and/or
a4b897
+ * modify it under the terms of version 2 of the GNU General Public
a4b897
+ * License as published by the Free Software Foundation.
a4b897
+ */
a4b897
+#ifndef __LINUX_BPF_H__
a4b897
+#define __LINUX_BPF_H__
a4b897
+
a4b897
+#include <linux/types.h>
a4b897
+#include <linux/bpf_common.h>
a4b897
+
a4b897
+/* Extended instruction set based on top of classic BPF */
a4b897
+
a4b897
+/* instruction classes */
a4b897
+#define BPF_ALU64	0x07	/* alu mode in double word width */
a4b897
+
a4b897
+/* ld/ldx fields */
a4b897
+#define BPF_DW		0x18	/* double word */
a4b897
+#define BPF_XADD	0xc0	/* exclusive add */
a4b897
+
a4b897
+/* alu/jmp fields */
a4b897
+#define BPF_MOV		0xb0	/* mov reg to reg */
a4b897
+#define BPF_ARSH	0xc0	/* sign extending arithmetic shift right */
a4b897
+
a4b897
+/* change endianness of a register */
a4b897
+#define BPF_END		0xd0	/* flags for endianness conversion: */
a4b897
+#define BPF_TO_LE	0x00	/* convert to little-endian */
a4b897
+#define BPF_TO_BE	0x08	/* convert to big-endian */
a4b897
+#define BPF_FROM_LE	BPF_TO_LE
a4b897
+#define BPF_FROM_BE	BPF_TO_BE
a4b897
+
a4b897
+#define BPF_JNE		0x50	/* jump != */
a4b897
+#define BPF_JSGT	0x60	/* SGT is signed '>', GT in x86 */
a4b897
+#define BPF_JSGE	0x70	/* SGE is signed '>=', GE in x86 */
a4b897
+#define BPF_CALL	0x80	/* function call */
a4b897
+#define BPF_EXIT	0x90	/* function return */
a4b897
+
a4b897
+/* Register numbers */
a4b897
+enum {
a4b897
+	BPF_REG_0 = 0,
a4b897
+	BPF_REG_1,
a4b897
+	BPF_REG_2,
a4b897
+	BPF_REG_3,
a4b897
+	BPF_REG_4,
a4b897
+	BPF_REG_5,
a4b897
+	BPF_REG_6,
a4b897
+	BPF_REG_7,
a4b897
+	BPF_REG_8,
a4b897
+	BPF_REG_9,
a4b897
+	BPF_REG_10,
a4b897
+	__MAX_BPF_REG,
a4b897
+};
a4b897
+
a4b897
+/* BPF has 10 general purpose 64-bit registers and stack frame. */
a4b897
+#define MAX_BPF_REG	__MAX_BPF_REG
a4b897
+
a4b897
+struct bpf_insn {
a4b897
+	__u8	code;		/* opcode */
a4b897
+	__u8	dst_reg:4;	/* dest register */
a4b897
+	__u8	src_reg:4;	/* source register */
a4b897
+	__s16	off;		/* signed offset */
a4b897
+	__s32	imm;		/* signed immediate constant */
a4b897
+};
a4b897
+
a4b897
+/* BPF syscall commands */
a4b897
+enum bpf_cmd {
a4b897
+	/* create a map with given type and attributes
a4b897
+	 * fd = bpf(BPF_MAP_CREATE, union bpf_attr *, u32 size)
a4b897
+	 * returns fd or negative error
a4b897
+	 * map is deleted when fd is closed
a4b897
+	 */
a4b897
+	BPF_MAP_CREATE,
a4b897
+
a4b897
+	/* lookup key in a given map
a4b897
+	 * err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size)
a4b897
+	 * Using attr->map_fd, attr->key, attr->value
a4b897
+	 * returns zero and stores found elem into value
a4b897
+	 * or negative error
a4b897
+	 */
a4b897
+	BPF_MAP_LOOKUP_ELEM,
a4b897
+
a4b897
+	/* create or update key/value pair in a given map
a4b897
+	 * err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size)
a4b897
+	 * Using attr->map_fd, attr->key, attr->value, attr->flags
a4b897
+	 * returns zero or negative error
a4b897
+	 */
a4b897
+	BPF_MAP_UPDATE_ELEM,
a4b897
+
a4b897
+	/* find and delete elem by key in a given map
a4b897
+	 * err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size)
a4b897
+	 * Using attr->map_fd, attr->key
a4b897
+	 * returns zero or negative error
a4b897
+	 */
a4b897
+	BPF_MAP_DELETE_ELEM,
a4b897
+
a4b897
+	/* lookup key in a given map and return next key
a4b897
+	 * err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size)
a4b897
+	 * Using attr->map_fd, attr->key, attr->next_key
a4b897
+	 * returns zero and stores next key or negative error
a4b897
+	 */
a4b897
+	BPF_MAP_GET_NEXT_KEY,
a4b897
+
a4b897
+	/* verify and load eBPF program
a4b897
+	 * prog_fd = bpf(BPF_PROG_LOAD, union bpf_attr *attr, u32 size)
a4b897
+	 * Using attr->prog_type, attr->insns, attr->license
a4b897
+	 * returns fd or negative error
a4b897
+	 */
a4b897
+	BPF_PROG_LOAD,
a4b897
+};
a4b897
+
a4b897
+enum bpf_map_type {
a4b897
+	BPF_MAP_TYPE_UNSPEC,
a4b897
+	BPF_MAP_TYPE_HASH,
a4b897
+	BPF_MAP_TYPE_ARRAY,
a4b897
+};
a4b897
+
a4b897
+enum bpf_prog_type {
a4b897
+	BPF_PROG_TYPE_UNSPEC,
a4b897
+	BPF_PROG_TYPE_SOCKET_FILTER,
a4b897
+	BPF_PROG_TYPE_SCHED_CLS,
a4b897
+	BPF_PROG_TYPE_SCHED_ACT,
a4b897
+};
a4b897
+
a4b897
+#define BPF_PSEUDO_MAP_FD	1
a4b897
+
a4b897
+/* flags for BPF_MAP_UPDATE_ELEM command */
a4b897
+#define BPF_ANY		0 /* create new element or update existing */
a4b897
+#define BPF_NOEXIST	1 /* create new element if it didn't exist */
a4b897
+#define BPF_EXIST	2 /* update existing element */
a4b897
+
a4b897
+union bpf_attr {
a4b897
+	struct { /* anonymous struct used by BPF_MAP_CREATE command */
a4b897
+		__u32	map_type;	/* one of enum bpf_map_type */
a4b897
+		__u32	key_size;	/* size of key in bytes */
a4b897
+		__u32	value_size;	/* size of value in bytes */
a4b897
+		__u32	max_entries;	/* max number of entries in a map */
a4b897
+	};
a4b897
+
a4b897
+	struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
a4b897
+		__u32		map_fd;
a4b897
+		__aligned_u64	key;
a4b897
+		union {
a4b897
+			__aligned_u64 value;
a4b897
+			__aligned_u64 next_key;
a4b897
+		};
a4b897
+		__u64		flags;
a4b897
+	};
a4b897
+
a4b897
+	struct { /* anonymous struct used by BPF_PROG_LOAD command */
a4b897
+		__u32		prog_type;	/* one of enum bpf_prog_type */
a4b897
+		__u32		insn_cnt;
a4b897
+		__aligned_u64	insns;
a4b897
+		__aligned_u64	license;
a4b897
+		__u32		log_level;	/* verbosity level of verifier */
a4b897
+		__u32		log_size;	/* size of user buffer */
a4b897
+		__aligned_u64	log_buf;	/* user supplied buffer */
a4b897
+	};
a4b897
+} __attribute__((aligned(8)));
a4b897
+
a4b897
+/* integer value in 'imm' field of BPF_CALL instruction selects which helper
a4b897
+ * function eBPF program intends to call
a4b897
+ */
a4b897
+enum bpf_func_id {
a4b897
+	BPF_FUNC_unspec,
a4b897
+	BPF_FUNC_map_lookup_elem, /* void *map_lookup_elem(&map, &key) */
a4b897
+	BPF_FUNC_map_update_elem, /* int map_update_elem(&map, &key, &value, flags) */
a4b897
+	BPF_FUNC_map_delete_elem, /* int map_delete_elem(&map, &key) */
a4b897
+	BPF_FUNC_get_prandom_u32, /* u32 prandom_u32(void) */
a4b897
+	BPF_FUNC_get_smp_processor_id, /* u32 raw_smp_processor_id(void) */
a4b897
+
a4b897
+	/**
a4b897
+	 * skb_store_bytes(skb, offset, from, len, flags) - store bytes into packet
a4b897
+	 * @skb: pointer to skb
a4b897
+	 * @offset: offset within packet from skb->data
a4b897
+	 * @from: pointer where to copy bytes from
a4b897
+	 * @len: number of bytes to store into packet
a4b897
+	 * @flags: bit 0 - if true, recompute skb->csum
a4b897
+	 *         other bits - reserved
a4b897
+	 * Return: 0 on success
a4b897
+	 */
a4b897
+	BPF_FUNC_skb_store_bytes,
a4b897
+
a4b897
+	/**
a4b897
+	 * l3_csum_replace(skb, offset, from, to, flags) - recompute IP checksum
a4b897
+	 * @skb: pointer to skb
a4b897
+	 * @offset: offset within packet where IP checksum is located
a4b897
+	 * @from: old value of header field
a4b897
+	 * @to: new value of header field
a4b897
+	 * @flags: bits 0-3 - size of header field
a4b897
+	 *         other bits - reserved
a4b897
+	 * Return: 0 on success
a4b897
+	 */
a4b897
+	BPF_FUNC_l3_csum_replace,
a4b897
+
a4b897
+	/**
a4b897
+	 * l4_csum_replace(skb, offset, from, to, flags) - recompute TCP/UDP checksum
a4b897
+	 * @skb: pointer to skb
a4b897
+	 * @offset: offset within packet where TCP/UDP checksum is located
a4b897
+	 * @from: old value of header field
a4b897
+	 * @to: new value of header field
a4b897
+	 * @flags: bits 0-3 - size of header field
a4b897
+	 *         bit 4 - is pseudo header
a4b897
+	 *         other bits - reserved
a4b897
+	 * Return: 0 on success
a4b897
+	 */
a4b897
+	BPF_FUNC_l4_csum_replace,
a4b897
+	__BPF_FUNC_MAX_ID,
a4b897
+};
a4b897
+
a4b897
+/* user accessible mirror of in-kernel sk_buff.
a4b897
+ * new fields can only be added to the end of this structure
a4b897
+ */
a4b897
+struct __sk_buff {
a4b897
+	__u32 len;
a4b897
+	__u32 pkt_type;
a4b897
+	__u32 mark;
a4b897
+	__u32 queue_mapping;
a4b897
+	__u32 protocol;
a4b897
+	__u32 vlan_present;
a4b897
+	__u32 vlan_tci;
a4b897
+	__u32 vlan_proto;
a4b897
+	__u32 priority;
a4b897
+};
a4b897
+
a4b897
+#endif /* __LINUX_BPF_H__ */
a4b897
diff --git a/include/linux/bpf_common.h b/include/linux/bpf_common.h
a4b897
new file mode 100644
a4b897
index 0000000..afe7433
a4b897
--- /dev/null
a4b897
+++ b/include/linux/bpf_common.h
a4b897
@@ -0,0 +1,55 @@
a4b897
+#ifndef __LINUX_BPF_COMMON_H__
a4b897
+#define __LINUX_BPF_COMMON_H__
a4b897
+
a4b897
+/* Instruction classes */
a4b897
+#define BPF_CLASS(code) ((code) & 0x07)
a4b897
+#define		BPF_LD		0x00
a4b897
+#define		BPF_LDX		0x01
a4b897
+#define		BPF_ST		0x02
a4b897
+#define		BPF_STX		0x03
a4b897
+#define		BPF_ALU		0x04
a4b897
+#define		BPF_JMP		0x05
a4b897
+#define		BPF_RET		0x06
a4b897
+#define		BPF_MISC        0x07
a4b897
+
a4b897
+/* ld/ldx fields */
a4b897
+#define BPF_SIZE(code)  ((code) & 0x18)
a4b897
+#define		BPF_W		0x00
a4b897
+#define		BPF_H		0x08
a4b897
+#define		BPF_B		0x10
a4b897
+#define BPF_MODE(code)  ((code) & 0xe0)
a4b897
+#define		BPF_IMM		0x00
a4b897
+#define		BPF_ABS		0x20
a4b897
+#define		BPF_IND		0x40
a4b897
+#define		BPF_MEM		0x60
a4b897
+#define		BPF_LEN		0x80
a4b897
+#define		BPF_MSH		0xa0
a4b897
+
a4b897
+/* alu/jmp fields */
a4b897
+#define BPF_OP(code)    ((code) & 0xf0)
a4b897
+#define		BPF_ADD		0x00
a4b897
+#define		BPF_SUB		0x10
a4b897
+#define		BPF_MUL		0x20
a4b897
+#define		BPF_DIV		0x30
a4b897
+#define		BPF_OR		0x40
a4b897
+#define		BPF_AND		0x50
a4b897
+#define		BPF_LSH		0x60
a4b897
+#define		BPF_RSH		0x70
a4b897
+#define		BPF_NEG		0x80
a4b897
+#define		BPF_MOD		0x90
a4b897
+#define		BPF_XOR		0xa0
a4b897
+
a4b897
+#define		BPF_JA		0x00
a4b897
+#define		BPF_JEQ		0x10
a4b897
+#define		BPF_JGT		0x20
a4b897
+#define		BPF_JGE		0x30
a4b897
+#define		BPF_JSET        0x40
a4b897
+#define BPF_SRC(code)   ((code) & 0x08)
a4b897
+#define		BPF_K		0x00
a4b897
+#define		BPF_X		0x08
a4b897
+
a4b897
+#ifndef BPF_MAXINSNS
a4b897
+#define BPF_MAXINSNS 4096
a4b897
+#endif
a4b897
+
a4b897
+#endif /* __LINUX_BPF_COMMON_H__ */
a4b897
diff --git a/include/linux/can.h b/include/linux/can.h
a4b897
index e52958d..d9ba97f 100644
a4b897
--- a/include/linux/can.h
a4b897
+++ b/include/linux/can.h
a4b897
@@ -8,10 +8,42 @@
a4b897
  * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
a4b897
  * All rights reserved.
a4b897
  *
a4b897
+ * Redistribution and use in source and binary forms, with or without
a4b897
+ * modification, are permitted provided that the following conditions
a4b897
+ * are met:
a4b897
+ * 1. Redistributions of source code must retain the above copyright
a4b897
+ *    notice, this list of conditions and the following disclaimer.
a4b897
+ * 2. Redistributions in binary form must reproduce the above copyright
a4b897
+ *    notice, this list of conditions and the following disclaimer in the
a4b897
+ *    documentation and/or other materials provided with the distribution.
a4b897
+ * 3. Neither the name of Volkswagen nor the names of its contributors
a4b897
+ *    may be used to endorse or promote products derived from this software
a4b897
+ *    without specific prior written permission.
a4b897
+ *
a4b897
+ * Alternatively, provided that this notice is retained in full, this
a4b897
+ * software may be distributed under the terms of the GNU General
a4b897
+ * Public License ("GPL") version 2, in which case the provisions of the
a4b897
+ * GPL apply INSTEAD OF those given above.
a4b897
+ *
a4b897
+ * The provided data structures and external interfaces from this code
a4b897
+ * are not restricted to be used by modules with a GPL compatible license.
a4b897
+ *
a4b897
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
a4b897
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
a4b897
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
a4b897
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
a4b897
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
a4b897
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
a4b897
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
a4b897
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
a4b897
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
a4b897
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
a4b897
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
a4b897
+ * DAMAGE.
a4b897
  */
a4b897
 
a4b897
-#ifndef CAN_H
a4b897
-#define CAN_H
a4b897
+#ifndef _CAN_H
a4b897
+#define _CAN_H
a4b897
 
a4b897
 #include <linux/types.h>
a4b897
 #include <linux/socket.h>
a4b897
@@ -159,4 +191,4 @@ struct can_filter {
a4b897
 
a4b897
 #define CAN_INV_FILTER 0x20000000U /* to be set in can_filter.can_id */
a4b897
 
a4b897
-#endif /* CAN_H */
a4b897
+#endif /* !_UAPI_CAN_H */
a4b897
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h
a4b897
index 14966dd..6d4ec2a 100644
a4b897
--- a/include/linux/can/netlink.h
a4b897
+++ b/include/linux/can/netlink.h
a4b897
@@ -5,10 +5,18 @@
a4b897
  *
a4b897
  * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
a4b897
  *
a4b897
+ * This program is free software; you can redistribute it and/or modify
a4b897
+ * it under the terms of the version 2 of the GNU General Public License
a4b897
+ * as published by the Free Software Foundation
a4b897
+ *
a4b897
+ * This program is distributed in the hope that it will be useful,
a4b897
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
a4b897
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a4b897
+ * GNU General Public License for more details.
a4b897
  */
a4b897
 
a4b897
-#ifndef CAN_NETLINK_H
a4b897
-#define CAN_NETLINK_H
a4b897
+#ifndef _CAN_NETLINK_H
a4b897
+#define _CAN_NETLINK_H
a4b897
 
a4b897
 #include <linux/types.h>
a4b897
 
a4b897
@@ -84,10 +92,13 @@ struct can_ctrlmode {
a4b897
 };
a4b897
 
a4b897
 #define CAN_CTRLMODE_LOOPBACK		0x01	/* Loopback mode */
a4b897
-#define CAN_CTRLMODE_LISTENONLY		0x02 	/* Listen-only mode */
a4b897
+#define CAN_CTRLMODE_LISTENONLY		0x02	/* Listen-only mode */
a4b897
 #define CAN_CTRLMODE_3_SAMPLES		0x04	/* Triple sampling mode */
a4b897
 #define CAN_CTRLMODE_ONE_SHOT		0x08	/* One-Shot mode */
a4b897
 #define CAN_CTRLMODE_BERR_REPORTING	0x10	/* Bus-error reporting */
a4b897
+#define CAN_CTRLMODE_FD			0x20	/* CAN FD mode */
a4b897
+#define CAN_CTRLMODE_PRESUME_ACK	0x40	/* Ignore missing CAN ACKs */
a4b897
+#define CAN_CTRLMODE_FD_NON_ISO		0x80	/* CAN FD in non-ISO mode */
a4b897
 
a4b897
 /*
a4b897
  * CAN device statistics
a4b897
@@ -114,9 +125,11 @@ enum {
a4b897
 	IFLA_CAN_RESTART_MS,
a4b897
 	IFLA_CAN_RESTART,
a4b897
 	IFLA_CAN_BERR_COUNTER,
a4b897
+	IFLA_CAN_DATA_BITTIMING,
a4b897
+	IFLA_CAN_DATA_BITTIMING_CONST,
a4b897
 	__IFLA_CAN_MAX
a4b897
 };
a4b897
 
a4b897
 #define IFLA_CAN_MAX	(__IFLA_CAN_MAX - 1)
a4b897
 
a4b897
-#endif /* CAN_NETLINK_H */
a4b897
+#endif /* !_UAPI_CAN_NETLINK_H */
a4b897
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h
a4b897
index 51da65b..2b82d7e 100644
a4b897
--- a/include/linux/fib_rules.h
a4b897
+++ b/include/linux/fib_rules.h
a4b897
@@ -44,8 +44,8 @@ enum {
a4b897
 	FRA_FWMARK,	/* mark */
a4b897
 	FRA_FLOW,	/* flow/class id */
a4b897
 	FRA_UNUSED6,
a4b897
-	FRA_UNUSED7,
a4b897
-	FRA_UNUSED8,
a4b897
+	FRA_SUPPRESS_IFGROUP,
a4b897
+	FRA_SUPPRESS_PREFIXLEN,
a4b897
 	FRA_TABLE,	/* Extended table id */
a4b897
 	FRA_FWMASK,	/* mask for netfilter mark */
a4b897
 	FRA_OIFNAME,
a4b897
diff --git a/include/linux/filter.h b/include/linux/filter.h
a4b897
index 9a46cb6..344781d 100644
a4b897
--- a/include/linux/filter.h
a4b897
+++ b/include/linux/filter.h
a4b897
@@ -7,7 +7,7 @@
a4b897
 
a4b897
 
a4b897
 #include <linux/types.h>
a4b897
-
a4b897
+#include <linux/bpf_common.h>
a4b897
 
a4b897
 /*
a4b897
  * Current version of the filter code architecture.
a4b897
@@ -32,56 +32,6 @@ struct sock_fprog {	/* Required for SO_ATTACH_FILTER. */
a4b897
 	struct sock_filter *filter;
a4b897
 };
a4b897
 
a4b897
-/*
a4b897
- * Instruction classes
a4b897
- */
a4b897
-
a4b897
-#define BPF_CLASS(code) ((code) & 0x07)
a4b897
-#define         BPF_LD          0x00
a4b897
-#define         BPF_LDX         0x01
a4b897
-#define         BPF_ST          0x02
a4b897
-#define         BPF_STX         0x03
a4b897
-#define         BPF_ALU         0x04
a4b897
-#define         BPF_JMP         0x05
a4b897
-#define         BPF_RET         0x06
a4b897
-#define         BPF_MISC        0x07
a4b897
-
a4b897
-/* ld/ldx fields */
a4b897
-#define BPF_SIZE(code)  ((code) & 0x18)
a4b897
-#define         BPF_W           0x00
a4b897
-#define         BPF_H           0x08
a4b897
-#define         BPF_B           0x10
a4b897
-#define BPF_MODE(code)  ((code) & 0xe0)
a4b897
-#define         BPF_IMM         0x00
a4b897
-#define         BPF_ABS         0x20
a4b897
-#define         BPF_IND         0x40
a4b897
-#define         BPF_MEM         0x60
a4b897
-#define         BPF_LEN         0x80
a4b897
-#define         BPF_MSH         0xa0
a4b897
-
a4b897
-/* alu/jmp fields */
a4b897
-#define BPF_OP(code)    ((code) & 0xf0)
a4b897
-#define         BPF_ADD         0x00
a4b897
-#define         BPF_SUB         0x10
a4b897
-#define         BPF_MUL         0x20
a4b897
-#define         BPF_DIV         0x30
a4b897
-#define         BPF_OR          0x40
a4b897
-#define         BPF_AND         0x50
a4b897
-#define         BPF_LSH         0x60
a4b897
-#define         BPF_RSH         0x70
a4b897
-#define         BPF_NEG         0x80
a4b897
-#define		BPF_MOD		0x90
a4b897
-#define		BPF_XOR		0xa0
a4b897
-
a4b897
-#define         BPF_JA          0x00
a4b897
-#define         BPF_JEQ         0x10
a4b897
-#define         BPF_JGT         0x20
a4b897
-#define         BPF_JGE         0x30
a4b897
-#define         BPF_JSET        0x40
a4b897
-#define BPF_SRC(code)   ((code) & 0x08)
a4b897
-#define         BPF_K           0x00
a4b897
-#define         BPF_X           0x08
a4b897
-
a4b897
 /* ret - BPF_K and BPF_X also apply */
a4b897
 #define BPF_RVAL(code)  ((code) & 0x18)
a4b897
 #define         BPF_A           0x10
a4b897
@@ -91,10 +41,6 @@ struct sock_fprog {	/* Required for SO_ATTACH_FILTER. */
a4b897
 #define         BPF_TAX         0x00
a4b897
 #define         BPF_TXA         0x80
a4b897
 
a4b897
-#ifndef BPF_MAXINSNS
a4b897
-#define BPF_MAXINSNS 4096
a4b897
-#endif
a4b897
-
a4b897
 /*
a4b897
  * Macros for filter block array initializers.
a4b897
  */
a4b897
@@ -130,7 +76,9 @@ struct sock_fprog {	/* Required for SO_ATTACH_FILTER. */
a4b897
 #define SKF_AD_VLAN_TAG	44
a4b897
 #define SKF_AD_VLAN_TAG_PRESENT 48
a4b897
 #define SKF_AD_PAY_OFFSET	52
a4b897
-#define SKF_AD_MAX	56
a4b897
+#define SKF_AD_RANDOM	56
a4b897
+#define SKF_AD_VLAN_TPID	60
a4b897
+#define SKF_AD_MAX	64
a4b897
 #define SKF_NET_OFF   (-0x100000)
a4b897
 #define SKF_LL_OFF    (-0x200000)
a4b897
 
a4b897
diff --git a/include/linux/fou.h b/include/linux/fou.h
a4b897
new file mode 100644
a4b897
index 0000000..744c323
a4b897
--- /dev/null
a4b897
+++ b/include/linux/fou.h
a4b897
@@ -0,0 +1,41 @@
a4b897
+/* fou.h - FOU Interface */
a4b897
+
a4b897
+#ifndef _LINUX_FOU_H
a4b897
+#define _LINUX_FOU_H
a4b897
+
a4b897
+/* NETLINK_GENERIC related info
a4b897
+ */
a4b897
+#define FOU_GENL_NAME		"fou"
a4b897
+#define FOU_GENL_VERSION	0x1
a4b897
+
a4b897
+enum {
a4b897
+	FOU_ATTR_UNSPEC,
a4b897
+	FOU_ATTR_PORT,				/* u16 */
a4b897
+	FOU_ATTR_AF,				/* u8 */
a4b897
+	FOU_ATTR_IPPROTO,			/* u8 */
a4b897
+	FOU_ATTR_TYPE,				/* u8 */
a4b897
+	FOU_ATTR_REMCSUM_NOPARTIAL,		/* flag */
a4b897
+
a4b897
+	__FOU_ATTR_MAX,
a4b897
+};
a4b897
+
a4b897
+#define FOU_ATTR_MAX		(__FOU_ATTR_MAX - 1)
a4b897
+
a4b897
+enum {
a4b897
+	FOU_CMD_UNSPEC,
a4b897
+	FOU_CMD_ADD,
a4b897
+	FOU_CMD_DEL,
a4b897
+	FOU_CMD_GET,
a4b897
+
a4b897
+	__FOU_CMD_MAX,
a4b897
+};
a4b897
+
a4b897
+enum {
a4b897
+	FOU_ENCAP_UNSPEC,
a4b897
+	FOU_ENCAP_DIRECT,
a4b897
+	FOU_ENCAP_GUE,
a4b897
+};
a4b897
+
a4b897
+#define FOU_CMD_MAX	(__FOU_CMD_MAX - 1)
a4b897
+
a4b897
+#endif /* _LINUX_FOU_H */
a4b897
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h
a4b897
index 552c8a0..6487317 100644
a4b897
--- a/include/linux/gen_stats.h
a4b897
+++ b/include/linux/gen_stats.h
a4b897
@@ -9,6 +9,7 @@ enum {
a4b897
 	TCA_STATS_RATE_EST,
a4b897
 	TCA_STATS_QUEUE,
a4b897
 	TCA_STATS_APP,
a4b897
+	TCA_STATS_RATE_EST64,
a4b897
 	__TCA_STATS_MAX,
a4b897
 };
a4b897
 #define TCA_STATS_MAX (__TCA_STATS_MAX - 1)
a4b897
@@ -38,6 +39,16 @@ struct gnet_stats_rate_est {
a4b897
 };
a4b897
 
a4b897
 /**
a4b897
+ * struct gnet_stats_rate_est64 - rate estimator
a4b897
+ * @bps: current byte rate
a4b897
+ * @pps: current packet rate
a4b897
+ */
a4b897
+struct gnet_stats_rate_est64 {
a4b897
+	__u64	bps;
a4b897
+	__u64	pps;
a4b897
+};
a4b897
+
a4b897
+/**
a4b897
  * struct gnet_stats_queue - queuing statistics
a4b897
  * @qlen: queue length
a4b897
  * @backlog: backlog size of queue
a4b897
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h
a4b897
index 1f85a27..8a1d500 100644
a4b897
--- a/include/linux/genetlink.h
a4b897
+++ b/include/linux/genetlink.h
a4b897
@@ -27,6 +27,8 @@ struct genlmsghdr {
a4b897
  */
a4b897
 #define GENL_ID_GENERATE	0
a4b897
 #define GENL_ID_CTRL		NLMSG_MIN_TYPE
a4b897
+#define GENL_ID_VFS_DQUOT	(NLMSG_MIN_TYPE + 1)
a4b897
+#define GENL_ID_PMCRAID		(NLMSG_MIN_TYPE + 2)
a4b897
 
a4b897
 /**************************************************************************
a4b897
  * Controller
a4b897
diff --git a/include/linux/if.h b/include/linux/if.h
a4b897
index 7f261c0..a55a9e0 100644
a4b897
--- a/include/linux/if.h
a4b897
+++ b/include/linux/if.h
a4b897
@@ -27,64 +27,91 @@
a4b897
 #define	IFALIASZ	256
a4b897
 #include <linux/hdlc/ioctl.h>
a4b897
 
a4b897
-/* Standard interface flags (netdevice->flags). */
a4b897
-#define	IFF_UP		0x1		/* interface is up		*/
a4b897
-#define	IFF_BROADCAST	0x2		/* broadcast address valid	*/
a4b897
-#define	IFF_DEBUG	0x4		/* turn on debugging		*/
a4b897
-#define	IFF_LOOPBACK	0x8		/* is a loopback net		*/
a4b897
-#define	IFF_POINTOPOINT	0x10		/* interface is has p-p link	*/
a4b897
-#define	IFF_NOTRAILERS	0x20		/* avoid use of trailers	*/
a4b897
-#define	IFF_RUNNING	0x40		/* interface RFC2863 OPER_UP	*/
a4b897
-#define	IFF_NOARP	0x80		/* no ARP protocol		*/
a4b897
-#define	IFF_PROMISC	0x100		/* receive all packets		*/
a4b897
-#define	IFF_ALLMULTI	0x200		/* receive all multicast packets*/
a4b897
-
a4b897
-#define IFF_MASTER	0x400		/* master of a load balancer 	*/
a4b897
-#define IFF_SLAVE	0x800		/* slave of a load balancer	*/
a4b897
-
a4b897
-#define IFF_MULTICAST	0x1000		/* Supports multicast		*/
a4b897
-
a4b897
-#define IFF_PORTSEL	0x2000          /* can set media type		*/
a4b897
-#define IFF_AUTOMEDIA	0x4000		/* auto media select active	*/
a4b897
-#define IFF_DYNAMIC	0x8000		/* dialup device with changing addresses*/
a4b897
-
a4b897
-#define IFF_LOWER_UP	0x10000		/* driver signals L1 up		*/
a4b897
-#define IFF_DORMANT	0x20000		/* driver signals dormant	*/
a4b897
+/**
a4b897
+ * enum net_device_flags - &struct net_device flags
a4b897
+ *
a4b897
+ * These are the &struct net_device flags, they can be set by drivers, the
a4b897
+ * kernel and some can be triggered by userspace. Userspace can query and
a4b897
+ * set these flags using userspace utilities but there is also a sysfs
a4b897
+ * entry available for all dev flags which can be queried and set. These flags
a4b897
+ * are shared for all types of net_devices. The sysfs entries are available
a4b897
+ * via /sys/class/net/<dev>/flags. Flags which can be toggled through sysfs
a4b897
+ * are annotated below, note that only a few flags can be toggled and some
a4b897
+ * other flags are always always preserved from the original net_device flags
a4b897
+ * even if you try to set them via sysfs. Flags which are always preserved
a4b897
+ * are kept under the flag grouping @IFF_VOLATILE. Flags which are __volatile__
a4b897
+ * are annotated below as such.
a4b897
+ *
a4b897
+ * You should have a pretty good reason to be extending these flags.
a4b897
+ *
a4b897
+ * @IFF_UP: interface is up. Can be toggled through sysfs.
a4b897
+ * @IFF_BROADCAST: broadcast address valid. Volatile.
a4b897
+ * @IFF_DEBUG: turn on debugging. Can be toggled through sysfs.
a4b897
+ * @IFF_LOOPBACK: is a loopback net. Volatile.
a4b897
+ * @IFF_POINTOPOINT: interface is has p-p link. Volatile.
a4b897
+ * @IFF_NOTRAILERS: avoid use of trailers. Can be toggled through sysfs.
a4b897
+ *	Volatile.
a4b897
+ * @IFF_RUNNING: interface RFC2863 OPER_UP. Volatile.
a4b897
+ * @IFF_NOARP: no ARP protocol. Can be toggled through sysfs. Volatile.
a4b897
+ * @IFF_PROMISC: receive all packets. Can be toggled through sysfs.
a4b897
+ * @IFF_ALLMULTI: receive all multicast packets. Can be toggled through
a4b897
+ *	sysfs.
a4b897
+ * @IFF_MASTER: master of a load balancer. Volatile.
a4b897
+ * @IFF_SLAVE: slave of a load balancer. Volatile.
a4b897
+ * @IFF_MULTICAST: Supports multicast. Can be toggled through sysfs.
a4b897
+ * @IFF_PORTSEL: can set media type. Can be toggled through sysfs.
a4b897
+ * @IFF_AUTOMEDIA: auto media select active. Can be toggled through sysfs.
a4b897
+ * @IFF_DYNAMIC: dialup device with changing addresses. Can be toggled
a4b897
+ *	through sysfs.
a4b897
+ * @IFF_LOWER_UP: driver signals L1 up. Volatile.
a4b897
+ * @IFF_DORMANT: driver signals dormant. Volatile.
a4b897
+ * @IFF_ECHO: echo sent packets. Volatile.
a4b897
+ */
a4b897
+enum net_device_flags {
a4b897
+	IFF_UP				= 1<<0,  /* sysfs */
a4b897
+	IFF_BROADCAST			= 1<<1,  /* __volatile__ */
a4b897
+	IFF_DEBUG			= 1<<2,  /* sysfs */
a4b897
+	IFF_LOOPBACK			= 1<<3,  /* __volatile__ */
a4b897
+	IFF_POINTOPOINT			= 1<<4,  /* __volatile__ */
a4b897
+	IFF_NOTRAILERS			= 1<<5,  /* sysfs */
a4b897
+	IFF_RUNNING			= 1<<6,  /* __volatile__ */
a4b897
+	IFF_NOARP			= 1<<7,  /* sysfs */
a4b897
+	IFF_PROMISC			= 1<<8,  /* sysfs */
a4b897
+	IFF_ALLMULTI			= 1<<9,  /* sysfs */
a4b897
+	IFF_MASTER			= 1<<10, /* __volatile__ */
a4b897
+	IFF_SLAVE			= 1<<11, /* __volatile__ */
a4b897
+	IFF_MULTICAST			= 1<<12, /* sysfs */
a4b897
+	IFF_PORTSEL			= 1<<13, /* sysfs */
a4b897
+	IFF_AUTOMEDIA			= 1<<14, /* sysfs */
a4b897
+	IFF_DYNAMIC			= 1<<15, /* sysfs */
a4b897
+	IFF_LOWER_UP			= 1<<16, /* __volatile__ */
a4b897
+	IFF_DORMANT			= 1<<17, /* __volatile__ */
a4b897
+	IFF_ECHO			= 1<<18, /* __volatile__ */
a4b897
+};
a4b897
 
a4b897
-#define IFF_ECHO	0x40000		/* echo sent packets		*/
a4b897
+#define IFF_UP				IFF_UP
a4b897
+#define IFF_BROADCAST			IFF_BROADCAST
a4b897
+#define IFF_DEBUG			IFF_DEBUG
a4b897
+#define IFF_LOOPBACK			IFF_LOOPBACK
a4b897
+#define IFF_POINTOPOINT			IFF_POINTOPOINT
a4b897
+#define IFF_NOTRAILERS			IFF_NOTRAILERS
a4b897
+#define IFF_RUNNING			IFF_RUNNING
a4b897
+#define IFF_NOARP			IFF_NOARP
a4b897
+#define IFF_PROMISC			IFF_PROMISC
a4b897
+#define IFF_ALLMULTI			IFF_ALLMULTI
a4b897
+#define IFF_MASTER			IFF_MASTER
a4b897
+#define IFF_SLAVE			IFF_SLAVE
a4b897
+#define IFF_MULTICAST			IFF_MULTICAST
a4b897
+#define IFF_PORTSEL			IFF_PORTSEL
a4b897
+#define IFF_AUTOMEDIA			IFF_AUTOMEDIA
a4b897
+#define IFF_DYNAMIC			IFF_DYNAMIC
a4b897
+#define IFF_LOWER_UP			IFF_LOWER_UP
a4b897
+#define IFF_DORMANT			IFF_DORMANT
a4b897
+#define IFF_ECHO			IFF_ECHO
a4b897
 
a4b897
 #define IFF_VOLATILE	(IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
a4b897
 		IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
a4b897
 
a4b897
-/* Private (from user) interface flags (netdevice->priv_flags). */
a4b897
-#define IFF_802_1Q_VLAN 0x1             /* 802.1Q VLAN device.          */
a4b897
-#define IFF_EBRIDGE	0x2		/* Ethernet bridging device.	*/
a4b897
-#define IFF_SLAVE_INACTIVE	0x4	/* bonding slave not the curr. active */
a4b897
-#define IFF_MASTER_8023AD	0x8	/* bonding master, 802.3ad. 	*/
a4b897
-#define IFF_MASTER_ALB	0x10		/* bonding master, balance-alb.	*/
a4b897
-#define IFF_BONDING	0x20		/* bonding master or slave	*/
a4b897
-#define IFF_SLAVE_NEEDARP 0x40		/* need ARPs for validation	*/
a4b897
-#define IFF_ISATAP	0x80		/* ISATAP interface (RFC4214)	*/
a4b897
-#define IFF_MASTER_ARPMON 0x100		/* bonding master, ARP mon in use */
a4b897
-#define IFF_WAN_HDLC	0x200		/* WAN HDLC device		*/
a4b897
-#define IFF_XMIT_DST_RELEASE 0x400	/* dev_hard_start_xmit() is allowed to
a4b897
-					 * release skb->dst
a4b897
-					 */
a4b897
-#define IFF_DONT_BRIDGE 0x800		/* disallow bridging this ether dev */
a4b897
-#define IFF_DISABLE_NETPOLL	0x1000	/* disable netpoll at run-time */
a4b897
-#define IFF_MACVLAN_PORT	0x2000	/* device used as macvlan port */
a4b897
-#define IFF_BRIDGE_PORT	0x4000		/* device used as bridge port */
a4b897
-#define IFF_OVS_DATAPATH	0x8000	/* device used as Open vSwitch
a4b897
-					 * datapath port */
a4b897
-#define IFF_TX_SKB_SHARING	0x10000	/* The interface supports sharing
a4b897
-					 * skbs on transmit */
a4b897
-#define IFF_UNICAST_FLT	0x20000		/* Supports unicast filtering	*/
a4b897
-#define IFF_TEAM_PORT	0x40000		/* device used as team port */
a4b897
-#define IFF_SUPP_NOFCS	0x80000		/* device supports sending custom FCS */
a4b897
-#define IFF_LIVE_ADDR_CHANGE 0x100000	/* device supports hardware address
a4b897
-					 * change when it's running */
a4b897
-
a4b897
-
a4b897
 #define IF_GET_IFACE	0x0001		/* for querying only */
a4b897
 #define IF_GET_PROTO	0x0002
a4b897
 
a4b897
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
a4b897
index 58b39f4..26f0ecf 100644
a4b897
--- a/include/linux/if_addr.h
a4b897
+++ b/include/linux/if_addr.h
a4b897
@@ -18,6 +18,9 @@ struct ifaddrmsg {
a4b897
  * It makes no difference for normally configured broadcast interfaces,
a4b897
  * but for point-to-point IFA_ADDRESS is DESTINATION address,
a4b897
  * local address is supplied in IFA_LOCAL attribute.
a4b897
+ *
a4b897
+ * IFA_FLAGS is a u32 attribute that extends the u8 field ifa_flags.
a4b897
+ * If present, the value from struct ifaddrmsg will be ignored.
a4b897
  */
a4b897
 enum {
a4b897
 	IFA_UNSPEC,
a4b897
@@ -28,6 +31,7 @@ enum {
a4b897
 	IFA_ANYCAST,
a4b897
 	IFA_CACHEINFO,
a4b897
 	IFA_MULTICAST,
a4b897
+	IFA_FLAGS,
a4b897
 	__IFA_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -44,6 +48,10 @@ enum {
a4b897
 #define IFA_F_DEPRECATED	0x20
a4b897
 #define IFA_F_TENTATIVE		0x40
a4b897
 #define IFA_F_PERMANENT		0x80
a4b897
+#define IFA_F_MANAGETEMPADDR	0x100
a4b897
+#define IFA_F_NOPREFIXROUTE	0x200
a4b897
+#define IFA_F_MCAUTOJOIN	0x400
a4b897
+#define IFA_F_STABLE_PRIVACY	0x800
a4b897
 
a4b897
 struct ifa_cacheinfo {
a4b897
 	__u32	ifa_prefered;
a4b897
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
a4b897
index 6a48d55..d001bdb 100644
a4b897
--- a/include/linux/if_arp.h
a4b897
+++ b/include/linux/if_arp.h
a4b897
@@ -93,6 +93,8 @@
a4b897
 #define ARPHRD_PHONET_PIPE 821		/* PhoNet pipe header		*/
a4b897
 #define ARPHRD_CAIF	822		/* CAIF media type		*/
a4b897
 #define ARPHRD_IP6GRE	823		/* GRE over IPv6		*/
a4b897
+#define ARPHRD_NETLINK	824		/* Netlink header		*/
a4b897
+#define ARPHRD_6LOWPAN	825		/* IPv6 over LoWPAN             */
a4b897
 
a4b897
 #define ARPHRD_VOID	  0xFFFF	/* Void type, nothing is known */
a4b897
 #define ARPHRD_NONE	  0xFFFE	/* zero header length */
a4b897
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
a4b897
index d37e53c..913bd8e 100644
a4b897
--- a/include/linux/if_bridge.h
a4b897
+++ b/include/linux/if_bridge.h
a4b897
@@ -14,6 +14,8 @@
a4b897
 #define _LINUX_IF_BRIDGE_H
a4b897
 
a4b897
 #include <linux/types.h>
a4b897
+#include <linux/if_ether.h>
a4b897
+#include <linux/in6.h>
a4b897
 
a4b897
 #define SYSFS_BRIDGE_ATTR	"bridge"
a4b897
 #define SYSFS_BRIDGE_FDB	"brforward"
a4b897
@@ -88,7 +90,7 @@ struct __port_info {
a4b897
 };
a4b897
 
a4b897
 struct __fdb_entry {
a4b897
-	__u8 mac_addr[6];
a4b897
+	__u8 mac_addr[ETH_ALEN];
a4b897
 	__u8 port_no;
a4b897
 	__u8 is_local;
a4b897
 	__u32 ageing_timer_value;
a4b897
@@ -103,6 +105,7 @@ struct __fdb_entry {
a4b897
 
a4b897
 #define BRIDGE_MODE_VEB		0	/* Default loopback mode */
a4b897
 #define BRIDGE_MODE_VEPA	1	/* 802.1Qbg defined VEPA mode */
a4b897
+#define BRIDGE_MODE_UNDEF	0xFFFF  /* mode undefined */
a4b897
 
a4b897
 /* Bridge management nested attributes
a4b897
  * [IFLA_AF_SPEC] = {
a4b897
@@ -122,6 +125,8 @@ enum {
a4b897
 #define BRIDGE_VLAN_INFO_MASTER	(1<<0)	/* Operate on Bridge device as well */
a4b897
 #define BRIDGE_VLAN_INFO_PVID	(1<<1)	/* VLAN is PVID, ingress untagged */
a4b897
 #define BRIDGE_VLAN_INFO_UNTAGGED	(1<<2)	/* VLAN egresses untagged */
a4b897
+#define BRIDGE_VLAN_INFO_RANGE_BEGIN	(1<<3) /* VLAN is start of vlan range */
a4b897
+#define BRIDGE_VLAN_INFO_RANGE_END	(1<<4) /* VLAN is end of vlan range */
a4b897
 
a4b897
 struct bridge_vlan_info {
a4b897
 	__u16 flags;
a4b897
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
a4b897
index 2fc760a..4678e49 100644
a4b897
--- a/include/linux/if_ether.h
a4b897
+++ b/include/linux/if_ether.h
a4b897
@@ -68,11 +68,11 @@
a4b897
 #define ETH_P_SLOW	0x8809		/* Slow Protocol. See 802.3ad 43B */
a4b897
 #define ETH_P_WCCP	0x883E		/* Web-cache coordination protocol
a4b897
 					 * defined in draft-wilson-wrec-wccp-v2-00.txt */
a4b897
-#define ETH_P_PPP_DISC	0x8863		/* PPPoE discovery messages     */
a4b897
-#define ETH_P_PPP_SES	0x8864		/* PPPoE session messages	*/
a4b897
 #define ETH_P_MPLS_UC	0x8847		/* MPLS Unicast traffic		*/
a4b897
 #define ETH_P_MPLS_MC	0x8848		/* MPLS Multicast traffic	*/
a4b897
 #define ETH_P_ATMMPOA	0x884c		/* MultiProtocol Over ATM	*/
a4b897
+#define ETH_P_PPP_DISC	0x8863		/* PPPoE discovery messages     */
a4b897
+#define ETH_P_PPP_SES	0x8864		/* PPPoE session messages	*/
a4b897
 #define ETH_P_LINK_CTL	0x886c		/* HPNA, wlan link local tunnel */
a4b897
 #define ETH_P_ATMFATE	0x8884		/* Frame-based ATM Transport
a4b897
 					 * over Ethernet
a4b897
@@ -85,9 +85,12 @@
a4b897
 #define ETH_P_8021AH	0x88E7          /* 802.1ah Backbone Service Tag */
a4b897
 #define ETH_P_MVRP	0x88F5          /* 802.1Q MVRP                  */
a4b897
 #define ETH_P_1588	0x88F7		/* IEEE 1588 Timesync */
a4b897
+#define ETH_P_PRP	0x88FB		/* IEC 62439-3 PRP/HSRv0	*/
a4b897
 #define ETH_P_FCOE	0x8906		/* Fibre Channel over Ethernet  */
a4b897
 #define ETH_P_TDLS	0x890D          /* TDLS */
a4b897
 #define ETH_P_FIP	0x8914		/* FCoE Initialization Protocol */
a4b897
+#define ETH_P_80221	0x8917		/* IEEE 802.21 Media Independent Handover Protocol */
a4b897
+#define ETH_P_LOOPBACK	0x9000		/* Ethernet loopback packet, per IEEE 802.3 */
a4b897
 #define ETH_P_QINQ1	0x9100		/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
a4b897
 #define ETH_P_QINQ2	0x9200		/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
a4b897
 #define ETH_P_QINQ3	0x9300		/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
a4b897
@@ -125,6 +128,7 @@
a4b897
 #define ETH_P_PHONET	0x00F5		/* Nokia Phonet frames          */
a4b897
 #define ETH_P_IEEE802154 0x00F6		/* IEEE802.15.4 frame		*/
a4b897
 #define ETH_P_CAIF	0x00F7		/* ST-Ericsson CAIF protocol	*/
a4b897
+#define ETH_P_XDSA	0x00F8		/* Multiplexed DSA protocol	*/
a4b897
 
a4b897
 /*
a4b897
  *	This is an Ethernet frame header.
a4b897
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
a4b897
index 965dc9f..3d0d613 100644
a4b897
--- a/include/linux/if_link.h
a4b897
+++ b/include/linux/if_link.h
a4b897
@@ -143,6 +143,11 @@ enum {
a4b897
 	IFLA_NUM_TX_QUEUES,
a4b897
 	IFLA_NUM_RX_QUEUES,
a4b897
 	IFLA_CARRIER,
a4b897
+	IFLA_PHYS_PORT_ID,
a4b897
+	IFLA_CARRIER_CHANGES,
a4b897
+	IFLA_PHYS_SWITCH_ID,
a4b897
+	IFLA_LINK_NETNSID,
a4b897
+	IFLA_PHYS_PORT_NAME,
a4b897
 	__IFLA_MAX
a4b897
 };
a4b897
 
a4b897
@@ -200,11 +205,33 @@ enum {
a4b897
 	IFLA_INET6_CACHEINFO,	/* time values and max reasm size */
a4b897
 	IFLA_INET6_ICMP6STATS,	/* statistics (icmpv6)		*/
a4b897
 	IFLA_INET6_TOKEN,	/* device token			*/
a4b897
+	IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */
a4b897
 	__IFLA_INET6_MAX
a4b897
 };
a4b897
 
a4b897
 #define IFLA_INET6_MAX	(__IFLA_INET6_MAX - 1)
a4b897
 
a4b897
+enum in6_addr_gen_mode {
a4b897
+	IN6_ADDR_GEN_MODE_EUI64,
a4b897
+	IN6_ADDR_GEN_MODE_NONE,
a4b897
+	IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
a4b897
+};
a4b897
+
a4b897
+/* Bridge section */
a4b897
+
a4b897
+enum {
a4b897
+	IFLA_BR_UNSPEC,
a4b897
+	IFLA_BR_FORWARD_DELAY,
a4b897
+	IFLA_BR_HELLO_TIME,
a4b897
+	IFLA_BR_MAX_AGE,
a4b897
+	IFLA_BR_AGEING_TIME,
a4b897
+	IFLA_BR_STP_STATE,
a4b897
+	IFLA_BR_PRIORITY,
a4b897
+	__IFLA_BR_MAX,
a4b897
+};
a4b897
+
a4b897
+#define IFLA_BR_MAX	(__IFLA_BR_MAX - 1)
a4b897
+
a4b897
 enum {
a4b897
 	BRIDGE_MODE_UNSPEC,
a4b897
 	BRIDGE_MODE_HAIRPIN,
a4b897
@@ -219,6 +246,11 @@ enum {
a4b897
 	IFLA_BRPORT_GUARD,	/* bpdu guard              */
a4b897
 	IFLA_BRPORT_PROTECT,	/* root port protection    */
a4b897
 	IFLA_BRPORT_FAST_LEAVE,	/* multicast fast leave    */
a4b897
+	IFLA_BRPORT_LEARNING,	/* mac learning */
a4b897
+	IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */
a4b897
+	IFLA_BRPORT_PROXYARP,	/* proxy ARP */
a4b897
+	IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */
a4b897
+	IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */
a4b897
 	__IFLA_BRPORT_MAX
a4b897
 };
a4b897
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
a4b897
@@ -235,6 +267,8 @@ enum {
a4b897
 	IFLA_INFO_KIND,
a4b897
 	IFLA_INFO_DATA,
a4b897
 	IFLA_INFO_XSTATS,
a4b897
+	IFLA_INFO_SLAVE_KIND,
a4b897
+	IFLA_INFO_SLAVE_DATA,
a4b897
 	__IFLA_INFO_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -277,6 +311,10 @@ enum {
a4b897
 	IFLA_MACVLAN_UNSPEC,
a4b897
 	IFLA_MACVLAN_MODE,
a4b897
 	IFLA_MACVLAN_FLAGS,
a4b897
+	IFLA_MACVLAN_MACADDR_MODE,
a4b897
+	IFLA_MACVLAN_MACADDR,
a4b897
+	IFLA_MACVLAN_MACADDR_DATA,
a4b897
+	IFLA_MACVLAN_MACADDR_COUNT,
a4b897
 	__IFLA_MACVLAN_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -287,10 +325,33 @@ enum macvlan_mode {
a4b897
 	MACVLAN_MODE_VEPA    = 2, /* talk to other ports through ext bridge */
a4b897
 	MACVLAN_MODE_BRIDGE  = 4, /* talk to bridge ports directly */
a4b897
 	MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */
a4b897
+	MACVLAN_MODE_SOURCE  = 16,/* use source MAC address list to assign */
a4b897
+};
a4b897
+
a4b897
+enum macvlan_macaddr_mode {
a4b897
+	MACVLAN_MACADDR_ADD,
a4b897
+	MACVLAN_MACADDR_DEL,
a4b897
+	MACVLAN_MACADDR_FLUSH,
a4b897
+	MACVLAN_MACADDR_SET,
a4b897
 };
a4b897
 
a4b897
 #define MACVLAN_FLAG_NOPROMISC	1
a4b897
 
a4b897
+/* IPVLAN section */
a4b897
+enum {
a4b897
+	IFLA_IPVLAN_UNSPEC,
a4b897
+	IFLA_IPVLAN_MODE,
a4b897
+	__IFLA_IPVLAN_MAX
a4b897
+};
a4b897
+
a4b897
+#define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)
a4b897
+
a4b897
+enum ipvlan_mode {
a4b897
+	IPVLAN_MODE_L2 = 0,
a4b897
+	IPVLAN_MODE_L3,
a4b897
+	IPVLAN_MODE_MAX
a4b897
+};
a4b897
+
a4b897
 /* VXLAN section */
a4b897
 enum {
a4b897
 	IFLA_VXLAN_UNSPEC,
a4b897
@@ -309,6 +370,15 @@ enum {
a4b897
 	IFLA_VXLAN_L2MISS,
a4b897
 	IFLA_VXLAN_L3MISS,
a4b897
 	IFLA_VXLAN_PORT,	/* destination port */
a4b897
+	IFLA_VXLAN_GROUP6,
a4b897
+	IFLA_VXLAN_LOCAL6,
a4b897
+	IFLA_VXLAN_UDP_CSUM,
a4b897
+	IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
a4b897
+	IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
a4b897
+	IFLA_VXLAN_REMCSUM_TX,
a4b897
+	IFLA_VXLAN_REMCSUM_RX,
a4b897
+	IFLA_VXLAN_GBP,
a4b897
+	IFLA_VXLAN_REMCSUM_NOPARTIAL,
a4b897
 	__IFLA_VXLAN_MAX
a4b897
 };
a4b897
 #define IFLA_VXLAN_MAX	(__IFLA_VXLAN_MAX - 1)
a4b897
@@ -318,6 +388,63 @@ struct ifla_vxlan_port_range {
a4b897
 	__be16	high;
a4b897
 };
a4b897
 
a4b897
+/* Bonding section */
a4b897
+
a4b897
+enum {
a4b897
+	IFLA_BOND_UNSPEC,
a4b897
+	IFLA_BOND_MODE,
a4b897
+	IFLA_BOND_ACTIVE_SLAVE,
a4b897
+	IFLA_BOND_MIIMON,
a4b897
+	IFLA_BOND_UPDELAY,
a4b897
+	IFLA_BOND_DOWNDELAY,
a4b897
+	IFLA_BOND_USE_CARRIER,
a4b897
+	IFLA_BOND_ARP_INTERVAL,
a4b897
+	IFLA_BOND_ARP_IP_TARGET,
a4b897
+	IFLA_BOND_ARP_VALIDATE,
a4b897
+	IFLA_BOND_ARP_ALL_TARGETS,
a4b897
+	IFLA_BOND_PRIMARY,
a4b897
+	IFLA_BOND_PRIMARY_RESELECT,
a4b897
+	IFLA_BOND_FAIL_OVER_MAC,
a4b897
+	IFLA_BOND_XMIT_HASH_POLICY,
a4b897
+	IFLA_BOND_RESEND_IGMP,
a4b897
+	IFLA_BOND_NUM_PEER_NOTIF,
a4b897
+	IFLA_BOND_ALL_SLAVES_ACTIVE,
a4b897
+	IFLA_BOND_MIN_LINKS,
a4b897
+	IFLA_BOND_LP_INTERVAL,
a4b897
+	IFLA_BOND_PACKETS_PER_SLAVE,
a4b897
+	IFLA_BOND_AD_LACP_RATE,
a4b897
+	IFLA_BOND_AD_SELECT,
a4b897
+	IFLA_BOND_AD_INFO,
a4b897
+	__IFLA_BOND_MAX,
a4b897
+};
a4b897
+
a4b897
+#define IFLA_BOND_MAX	(__IFLA_BOND_MAX - 1)
a4b897
+
a4b897
+enum {
a4b897
+	IFLA_BOND_AD_INFO_UNSPEC,
a4b897
+	IFLA_BOND_AD_INFO_AGGREGATOR,
a4b897
+	IFLA_BOND_AD_INFO_NUM_PORTS,
a4b897
+	IFLA_BOND_AD_INFO_ACTOR_KEY,
a4b897
+	IFLA_BOND_AD_INFO_PARTNER_KEY,
a4b897
+	IFLA_BOND_AD_INFO_PARTNER_MAC,
a4b897
+	__IFLA_BOND_AD_INFO_MAX,
a4b897
+};
a4b897
+
a4b897
+#define IFLA_BOND_AD_INFO_MAX	(__IFLA_BOND_AD_INFO_MAX - 1)
a4b897
+
a4b897
+enum {
a4b897
+	IFLA_BOND_SLAVE_UNSPEC,
a4b897
+	IFLA_BOND_SLAVE_STATE,
a4b897
+	IFLA_BOND_SLAVE_MII_STATUS,
a4b897
+	IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
a4b897
+	IFLA_BOND_SLAVE_PERM_HWADDR,
a4b897
+	IFLA_BOND_SLAVE_QUEUE_ID,
a4b897
+	IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
a4b897
+	__IFLA_BOND_SLAVE_MAX,
a4b897
+};
a4b897
+
a4b897
+#define IFLA_BOND_SLAVE_MAX	(__IFLA_BOND_SLAVE_MAX - 1)
a4b897
+
a4b897
 /* SR-IOV virtual function management section */
a4b897
 
a4b897
 enum {
a4b897
@@ -332,8 +459,13 @@ enum {
a4b897
 	IFLA_VF_UNSPEC,
a4b897
 	IFLA_VF_MAC,		/* Hardware queue specific attributes */
a4b897
 	IFLA_VF_VLAN,
a4b897
-	IFLA_VF_TX_RATE,	/* TX Bandwidth Allocation */
a4b897
+	IFLA_VF_TX_RATE,	/* Max TX Bandwidth Allocation */
a4b897
 	IFLA_VF_SPOOFCHK,	/* Spoof Checking on/off switch */
a4b897
+	IFLA_VF_LINK_STATE,	/* link state enable/disable/auto switch */
a4b897
+	IFLA_VF_RATE,		/* Min and Max TX Bandwidth Allocation */
a4b897
+	IFLA_VF_RSS_QUERY_EN,	/* RSS Redirection Table and Hash Key query
a4b897
+				 * on/off switch
a4b897
+				 */
a4b897
 	__IFLA_VF_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -355,11 +487,34 @@ struct ifla_vf_tx_rate {
a4b897
 	__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
a4b897
 };
a4b897
 
a4b897
+struct ifla_vf_rate {
a4b897
+	__u32 vf;
a4b897
+	__u32 min_tx_rate; /* Min Bandwidth in Mbps */
a4b897
+	__u32 max_tx_rate; /* Max Bandwidth in Mbps */
a4b897
+};
a4b897
+
a4b897
 struct ifla_vf_spoofchk {
a4b897
 	__u32 vf;
a4b897
 	__u32 setting;
a4b897
 };
a4b897
 
a4b897
+enum {
a4b897
+	IFLA_VF_LINK_STATE_AUTO,	/* link state of the uplink */
a4b897
+	IFLA_VF_LINK_STATE_ENABLE,	/* link always up */
a4b897
+	IFLA_VF_LINK_STATE_DISABLE,	/* link always down */
a4b897
+	__IFLA_VF_LINK_STATE_MAX,
a4b897
+};
a4b897
+
a4b897
+struct ifla_vf_link_state {
a4b897
+	__u32 vf;
a4b897
+	__u32 link_state;
a4b897
+};
a4b897
+
a4b897
+struct ifla_vf_rss_query_en {
a4b897
+	__u32 vf;
a4b897
+	__u32 setting;
a4b897
+};
a4b897
+
a4b897
 /* VF ports management section
a4b897
  *
a4b897
  *	Nested layout of set/get msg is:
a4b897
@@ -450,4 +605,19 @@ enum {
a4b897
 
a4b897
 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
a4b897
 
a4b897
+
a4b897
+/* HSR section */
a4b897
+
a4b897
+enum {
a4b897
+	IFLA_HSR_UNSPEC,
a4b897
+	IFLA_HSR_SLAVE1,
a4b897
+	IFLA_HSR_SLAVE2,
a4b897
+	IFLA_HSR_MULTICAST_SPEC,	/* Last byte of supervision addr */
a4b897
+	IFLA_HSR_SUPERVISION_ADDR,	/* Supervision frame multicast addr */
a4b897
+	IFLA_HSR_SEQ_NR,
a4b897
+	__IFLA_HSR_MAX,
a4b897
+};
a4b897
+
a4b897
+#define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
a4b897
+
a4b897
 #endif /* _LINUX_IF_LINK_H */
a4b897
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h
a4b897
index dffb192..ffee583 100644
a4b897
--- a/include/linux/if_tun.h
a4b897
+++ b/include/linux/if_tun.h
a4b897
@@ -22,21 +22,11 @@
a4b897
 
a4b897
 /* Read queue size */
a4b897
 #define TUN_READQ_SIZE	500
a4b897
-
a4b897
-/* TUN device flags */
a4b897
-#define TUN_TUN_DEV 	0x0001	
a4b897
-#define TUN_TAP_DEV	0x0002
a4b897
+/* TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead. */
a4b897
+#define TUN_TUN_DEV 	IFF_TUN
a4b897
+#define TUN_TAP_DEV	IFF_TAP
a4b897
 #define TUN_TYPE_MASK   0x000f
a4b897
 
a4b897
-#define TUN_FASYNC	0x0010
a4b897
-#define TUN_NOCHECKSUM	0x0020
a4b897
-#define TUN_NO_PI	0x0040
a4b897
-/* This flag has no real effect */
a4b897
-#define TUN_ONE_QUEUE	0x0080
a4b897
-#define TUN_PERSIST 	0x0100	
a4b897
-#define TUN_VNET_HDR 	0x0200
a4b897
-#define TUN_TAP_MQ      0x0400
a4b897
-
a4b897
 /* Ioctl defines */
a4b897
 #define TUNSETNOCSUM  _IOW('T', 200, int) 
a4b897
 #define TUNSETDEBUG   _IOW('T', 201, int) 
a4b897
@@ -56,6 +46,10 @@
a4b897
 #define TUNGETVNETHDRSZ _IOR('T', 215, int)
a4b897
 #define TUNSETVNETHDRSZ _IOW('T', 216, int)
a4b897
 #define TUNSETQUEUE  _IOW('T', 217, int)
a4b897
+#define TUNSETIFINDEX	_IOW('T', 218, unsigned int)
a4b897
+#define TUNGETFILTER _IOR('T', 219, struct sock_fprog)
a4b897
+#define TUNSETVNETLE _IOW('T', 220, int)
a4b897
+#define TUNGETVNETLE _IOR('T', 221, int)
a4b897
 
a4b897
 /* TUNSETIFF ifr flags */
a4b897
 #define IFF_TUN		0x0001
a4b897
@@ -68,6 +62,12 @@
a4b897
 #define IFF_MULTI_QUEUE 0x0100
a4b897
 #define IFF_ATTACH_QUEUE 0x0200
a4b897
 #define IFF_DETACH_QUEUE 0x0400
a4b897
+/* read-only flag */
a4b897
+#define IFF_PERSIST	0x0800
a4b897
+#define IFF_NOFILTER	0x1000
a4b897
+
a4b897
+/* Socket options */
a4b897
+#define TUN_TX_TIMESTAMP 1
a4b897
 
a4b897
 /* Features for GSO (TUNSETOFFLOAD). */
a4b897
 #define TUN_F_CSUM	0x01	/* You can hand me unchecksummed packets. */
a4b897
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
a4b897
index 9f471ca..102ce7a 100644
a4b897
--- a/include/linux/if_tunnel.h
a4b897
+++ b/include/linux/if_tunnel.h
a4b897
@@ -53,10 +53,24 @@ enum {
a4b897
 	IFLA_IPTUN_6RD_RELAY_PREFIX,
a4b897
 	IFLA_IPTUN_6RD_PREFIXLEN,
a4b897
 	IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
a4b897
+	IFLA_IPTUN_ENCAP_TYPE,
a4b897
+	IFLA_IPTUN_ENCAP_FLAGS,
a4b897
+	IFLA_IPTUN_ENCAP_SPORT,
a4b897
+	IFLA_IPTUN_ENCAP_DPORT,
a4b897
 	__IFLA_IPTUN_MAX,
a4b897
 };
a4b897
 #define IFLA_IPTUN_MAX	(__IFLA_IPTUN_MAX - 1)
a4b897
 
a4b897
+enum tunnel_encap_types {
a4b897
+	TUNNEL_ENCAP_NONE,
a4b897
+	TUNNEL_ENCAP_FOU,
a4b897
+	TUNNEL_ENCAP_GUE,
a4b897
+};
a4b897
+
a4b897
+#define TUNNEL_ENCAP_FLAG_CSUM		(1<<0)
a4b897
+#define TUNNEL_ENCAP_FLAG_CSUM6		(1<<1)
a4b897
+#define TUNNEL_ENCAP_FLAG_REMCSUM	(1<<2)
a4b897
+
a4b897
 /* SIT-mode i_flags */
a4b897
 #define	SIT_ISATAP	0x0001
a4b897
 
a4b897
@@ -94,13 +108,17 @@ enum {
a4b897
 	IFLA_GRE_ENCAP_LIMIT,
a4b897
 	IFLA_GRE_FLOWINFO,
a4b897
 	IFLA_GRE_FLAGS,
a4b897
+	IFLA_GRE_ENCAP_TYPE,
a4b897
+	IFLA_GRE_ENCAP_FLAGS,
a4b897
+	IFLA_GRE_ENCAP_SPORT,
a4b897
+	IFLA_GRE_ENCAP_DPORT,
a4b897
 	__IFLA_GRE_MAX,
a4b897
 };
a4b897
 
a4b897
 #define IFLA_GRE_MAX	(__IFLA_GRE_MAX - 1)
a4b897
 
a4b897
 /* VTI-mode i_flags */
a4b897
-#define VTI_ISVTI 0x0001
a4b897
+#define VTI_ISVTI ((__be16)0x0001)
a4b897
 
a4b897
 enum {
a4b897
 	IFLA_VTI_UNSPEC,
a4b897
diff --git a/include/linux/in6.h b/include/linux/in6.h
a4b897
new file mode 100644
a4b897
index 0000000..994f4c2
a4b897
--- /dev/null
a4b897
+++ b/include/linux/in6.h
a4b897
@@ -0,0 +1,293 @@
a4b897
+/*
a4b897
+ *	Types and definitions for AF_INET6 
a4b897
+ *	Linux INET6 implementation 
a4b897
+ *
a4b897
+ *	Authors:
a4b897
+ *	Pedro Roque		<roque@di.fc.ul.pt>	
a4b897
+ *
a4b897
+ *	Sources:
a4b897
+ *	IPv6 Program Interfaces for BSD Systems
a4b897
+ *      <draft-ietf-ipngwg-bsd-api-05.txt>
a4b897
+ *
a4b897
+ *	Advanced Sockets API for IPv6
a4b897
+ *	<draft-stevens-advanced-api-00.txt>
a4b897
+ *
a4b897
+ *	This program is free software; you can redistribute it and/or
a4b897
+ *      modify it under the terms of the GNU General Public License
a4b897
+ *      as published by the Free Software Foundation; either version
a4b897
+ *      2 of the License, or (at your option) any later version.
a4b897
+ */
a4b897
+
a4b897
+#ifndef _LINUX_IN6_H
a4b897
+#define _LINUX_IN6_H
a4b897
+
a4b897
+#include <linux/types.h>
a4b897
+#include <linux/libc-compat.h>
a4b897
+
a4b897
+/*
a4b897
+ *	IPv6 address structure
a4b897
+ */
a4b897
+
a4b897
+#if __UAPI_DEF_IN6_ADDR
a4b897
+struct in6_addr {
a4b897
+	union {
a4b897
+		__u8		u6_addr8[16];
a4b897
+#if __UAPI_DEF_IN6_ADDR_ALT
a4b897
+		__be16		u6_addr16[8];
a4b897
+		__be32		u6_addr32[4];
a4b897
+#endif
a4b897
+	} in6_u;
a4b897
+#define s6_addr			in6_u.u6_addr8
a4b897
+#if __UAPI_DEF_IN6_ADDR_ALT
a4b897
+#define s6_addr16		in6_u.u6_addr16
a4b897
+#define s6_addr32		in6_u.u6_addr32
a4b897
+#endif
a4b897
+};
a4b897
+#endif /* __UAPI_DEF_IN6_ADDR */
a4b897
+
a4b897
+#if __UAPI_DEF_SOCKADDR_IN6
a4b897
+struct sockaddr_in6 {
a4b897
+	unsigned short int	sin6_family;    /* AF_INET6 */
a4b897
+	__be16			sin6_port;      /* Transport layer port # */
a4b897
+	__be32			sin6_flowinfo;  /* IPv6 flow information */
a4b897
+	struct in6_addr		sin6_addr;      /* IPv6 address */
a4b897
+	__u32			sin6_scope_id;  /* scope id (new in RFC2553) */
a4b897
+};
a4b897
+#endif /* __UAPI_DEF_SOCKADDR_IN6 */
a4b897
+
a4b897
+#if __UAPI_DEF_IPV6_MREQ
a4b897
+struct ipv6_mreq {
a4b897
+	/* IPv6 multicast address of group */
a4b897
+	struct in6_addr ipv6mr_multiaddr;
a4b897
+
a4b897
+	/* local IPv6 address of interface */
a4b897
+	int		ipv6mr_ifindex;
a4b897
+};
a4b897
+#endif /* __UAPI_DEF_IVP6_MREQ */
a4b897
+
a4b897
+#define ipv6mr_acaddr	ipv6mr_multiaddr
a4b897
+
a4b897
+struct in6_flowlabel_req {
a4b897
+	struct in6_addr	flr_dst;
a4b897
+	__be32	flr_label;
a4b897
+	__u8	flr_action;
a4b897
+	__u8	flr_share;
a4b897
+	__u16	flr_flags;
a4b897
+	__u16 	flr_expires;
a4b897
+	__u16	flr_linger;
a4b897
+	__u32	__flr_pad;
a4b897
+	/* Options in format of IPV6_PKTOPTIONS */
a4b897
+};
a4b897
+
a4b897
+#define IPV6_FL_A_GET	0
a4b897
+#define IPV6_FL_A_PUT	1
a4b897
+#define IPV6_FL_A_RENEW	2
a4b897
+
a4b897
+#define IPV6_FL_F_CREATE	1
a4b897
+#define IPV6_FL_F_EXCL		2
a4b897
+#define IPV6_FL_F_REFLECT	4
a4b897
+#define IPV6_FL_F_REMOTE	8
a4b897
+
a4b897
+#define IPV6_FL_S_NONE		0
a4b897
+#define IPV6_FL_S_EXCL		1
a4b897
+#define IPV6_FL_S_PROCESS	2
a4b897
+#define IPV6_FL_S_USER		3
a4b897
+#define IPV6_FL_S_ANY		255
a4b897
+
a4b897
+
a4b897
+/*
a4b897
+ *	Bitmask constant declarations to help applications select out the 
a4b897
+ *	flow label and priority fields.
a4b897
+ *
a4b897
+ *	Note that this are in host byte order while the flowinfo field of
a4b897
+ *	sockaddr_in6 is in network byte order.
a4b897
+ */
a4b897
+
a4b897
+#define IPV6_FLOWINFO_FLOWLABEL		0x000fffff
a4b897
+#define IPV6_FLOWINFO_PRIORITY		0x0ff00000
a4b897
+
a4b897
+/* These definitions are obsolete */
a4b897
+#define IPV6_PRIORITY_UNCHARACTERIZED	0x0000
a4b897
+#define IPV6_PRIORITY_FILLER		0x0100
a4b897
+#define IPV6_PRIORITY_UNATTENDED	0x0200
a4b897
+#define IPV6_PRIORITY_RESERVED1		0x0300
a4b897
+#define IPV6_PRIORITY_BULK		0x0400
a4b897
+#define IPV6_PRIORITY_RESERVED2		0x0500
a4b897
+#define IPV6_PRIORITY_INTERACTIVE	0x0600
a4b897
+#define IPV6_PRIORITY_CONTROL		0x0700
a4b897
+#define IPV6_PRIORITY_8			0x0800
a4b897
+#define IPV6_PRIORITY_9			0x0900
a4b897
+#define IPV6_PRIORITY_10		0x0a00
a4b897
+#define IPV6_PRIORITY_11		0x0b00
a4b897
+#define IPV6_PRIORITY_12		0x0c00
a4b897
+#define IPV6_PRIORITY_13		0x0d00
a4b897
+#define IPV6_PRIORITY_14		0x0e00
a4b897
+#define IPV6_PRIORITY_15		0x0f00
a4b897
+
a4b897
+/*
a4b897
+ *	IPV6 extension headers
a4b897
+ */
a4b897
+#if __UAPI_DEF_IPPROTO_V6
a4b897
+#define IPPROTO_HOPOPTS		0	/* IPv6 hop-by-hop options	*/
a4b897
+#define IPPROTO_ROUTING		43	/* IPv6 routing header		*/
a4b897
+#define IPPROTO_FRAGMENT	44	/* IPv6 fragmentation header	*/
a4b897
+#define IPPROTO_ICMPV6		58	/* ICMPv6			*/
a4b897
+#define IPPROTO_NONE		59	/* IPv6 no next header		*/
a4b897
+#define IPPROTO_DSTOPTS		60	/* IPv6 destination options	*/
a4b897
+#define IPPROTO_MH		135	/* IPv6 mobility header		*/
a4b897
+#endif /* __UAPI_DEF_IPPROTO_V6 */
a4b897
+
a4b897
+/*
a4b897
+ *	IPv6 TLV options.
a4b897
+ */
a4b897
+#define IPV6_TLV_PAD1		0
a4b897
+#define IPV6_TLV_PADN		1
a4b897
+#define IPV6_TLV_ROUTERALERT	5
a4b897
+#define IPV6_TLV_JUMBO		194
a4b897
+#define IPV6_TLV_HAO		201	/* home address option */
a4b897
+
a4b897
+/*
a4b897
+ *	IPV6 socket options
a4b897
+ */
a4b897
+#if __UAPI_DEF_IPV6_OPTIONS
a4b897
+#define IPV6_ADDRFORM		1
a4b897
+#define IPV6_2292PKTINFO	2
a4b897
+#define IPV6_2292HOPOPTS	3
a4b897
+#define IPV6_2292DSTOPTS	4
a4b897
+#define IPV6_2292RTHDR		5
a4b897
+#define IPV6_2292PKTOPTIONS	6
a4b897
+#define IPV6_CHECKSUM		7
a4b897
+#define IPV6_2292HOPLIMIT	8
a4b897
+#define IPV6_NEXTHOP		9
a4b897
+#define IPV6_AUTHHDR		10	/* obsolete */
a4b897
+#define IPV6_FLOWINFO		11
a4b897
+
a4b897
+#define IPV6_UNICAST_HOPS	16
a4b897
+#define IPV6_MULTICAST_IF	17
a4b897
+#define IPV6_MULTICAST_HOPS	18
a4b897
+#define IPV6_MULTICAST_LOOP	19
a4b897
+#define IPV6_ADD_MEMBERSHIP	20
a4b897
+#define IPV6_DROP_MEMBERSHIP	21
a4b897
+#define IPV6_ROUTER_ALERT	22
a4b897
+#define IPV6_MTU_DISCOVER	23
a4b897
+#define IPV6_MTU		24
a4b897
+#define IPV6_RECVERR		25
a4b897
+#define IPV6_V6ONLY		26
a4b897
+#define IPV6_JOIN_ANYCAST	27
a4b897
+#define IPV6_LEAVE_ANYCAST	28
a4b897
+
a4b897
+/* IPV6_MTU_DISCOVER values */
a4b897
+#define IPV6_PMTUDISC_DONT		0
a4b897
+#define IPV6_PMTUDISC_WANT		1
a4b897
+#define IPV6_PMTUDISC_DO		2
a4b897
+#define IPV6_PMTUDISC_PROBE		3
a4b897
+/* same as IPV6_PMTUDISC_PROBE, provided for symetry with IPv4
a4b897
+ * also see comments on IP_PMTUDISC_INTERFACE
a4b897
+ */
a4b897
+#define IPV6_PMTUDISC_INTERFACE		4
a4b897
+/* weaker version of IPV6_PMTUDISC_INTERFACE, which allows packets to
a4b897
+ * get fragmented if they exceed the interface mtu
a4b897
+ */
a4b897
+#define IPV6_PMTUDISC_OMIT		5
a4b897
+
a4b897
+/* Flowlabel */
a4b897
+#define IPV6_FLOWLABEL_MGR	32
a4b897
+#define IPV6_FLOWINFO_SEND	33
a4b897
+
a4b897
+#define IPV6_IPSEC_POLICY	34
a4b897
+#define IPV6_XFRM_POLICY	35
a4b897
+#endif
a4b897
+
a4b897
+/*
a4b897
+ * Multicast:
a4b897
+ * Following socket options are shared between IPv4 and IPv6.
a4b897
+ *
a4b897
+ * MCAST_JOIN_GROUP		42
a4b897
+ * MCAST_BLOCK_SOURCE		43
a4b897
+ * MCAST_UNBLOCK_SOURCE		44
a4b897
+ * MCAST_LEAVE_GROUP		45
a4b897
+ * MCAST_JOIN_SOURCE_GROUP	46
a4b897
+ * MCAST_LEAVE_SOURCE_GROUP	47
a4b897
+ * MCAST_MSFILTER		48
a4b897
+ */
a4b897
+
a4b897
+/*
a4b897
+ * Advanced API (RFC3542) (1)
a4b897
+ *
a4b897
+ * Note: IPV6_RECVRTHDRDSTOPTS does not exist. see net/ipv6/datagram.c.
a4b897
+ */
a4b897
+
a4b897
+#define IPV6_RECVPKTINFO	49
a4b897
+#define IPV6_PKTINFO		50
a4b897
+#define IPV6_RECVHOPLIMIT	51
a4b897
+#define IPV6_HOPLIMIT		52
a4b897
+#define IPV6_RECVHOPOPTS	53
a4b897
+#define IPV6_HOPOPTS		54
a4b897
+#define IPV6_RTHDRDSTOPTS	55
a4b897
+#define IPV6_RECVRTHDR		56
a4b897
+#define IPV6_RTHDR		57
a4b897
+#define IPV6_RECVDSTOPTS	58
a4b897
+#define IPV6_DSTOPTS		59
a4b897
+#define IPV6_RECVPATHMTU	60
a4b897
+#define IPV6_PATHMTU		61
a4b897
+#define IPV6_DONTFRAG		62
a4b897
+#if 0	/* not yet */
a4b897
+#define IPV6_USE_MIN_MTU	63
a4b897
+#endif
a4b897
+
a4b897
+/*
a4b897
+ * Netfilter (1)
a4b897
+ *
a4b897
+ * Following socket options are used in ip6_tables;
a4b897
+ * see include/linux/netfilter_ipv6/ip6_tables.h.
a4b897
+ *
a4b897
+ * IP6T_SO_SET_REPLACE / IP6T_SO_GET_INFO		64
a4b897
+ * IP6T_SO_SET_ADD_COUNTERS / IP6T_SO_GET_ENTRIES	65
a4b897
+ */
a4b897
+
a4b897
+/*
a4b897
+ * Advanced API (RFC3542) (2)
a4b897
+ */
a4b897
+#define IPV6_RECVTCLASS		66
a4b897
+#define IPV6_TCLASS		67
a4b897
+
a4b897
+/*
a4b897
+ * Netfilter (2)
a4b897
+ *
a4b897
+ * Following socket options are used in ip6_tables;
a4b897
+ * see include/linux/netfilter_ipv6/ip6_tables.h.
a4b897
+ *
a4b897
+ * IP6T_SO_GET_REVISION_MATCH	68
a4b897
+ * IP6T_SO_GET_REVISION_TARGET	69
a4b897
+ * IP6T_SO_ORIGINAL_DST		80
a4b897
+ */
a4b897
+
a4b897
+#define IPV6_AUTOFLOWLABEL	70
a4b897
+/* RFC5014: Source address selection */
a4b897
+#define IPV6_ADDR_PREFERENCES	72
a4b897
+
a4b897
+#define IPV6_PREFER_SRC_TMP		0x0001
a4b897
+#define IPV6_PREFER_SRC_PUBLIC		0x0002
a4b897
+#define IPV6_PREFER_SRC_PUBTMP_DEFAULT	0x0100
a4b897
+#define IPV6_PREFER_SRC_COA		0x0004
a4b897
+#define IPV6_PREFER_SRC_HOME		0x0400
a4b897
+#define IPV6_PREFER_SRC_CGA		0x0008
a4b897
+#define IPV6_PREFER_SRC_NONCGA		0x0800
a4b897
+
a4b897
+/* RFC5082: Generalized Ttl Security Mechanism */
a4b897
+#define IPV6_MINHOPCOUNT		73
a4b897
+
a4b897
+#define IPV6_ORIGDSTADDR        74
a4b897
+#define IPV6_RECVORIGDSTADDR    IPV6_ORIGDSTADDR
a4b897
+#define IPV6_TRANSPARENT        75
a4b897
+#define IPV6_UNICAST_IF         76
a4b897
+
a4b897
+/*
a4b897
+ * Multicast Routing:
a4b897
+ * see include/uapi/linux/mroute6.h.
a4b897
+ *
a4b897
+ * MRT6_BASE			200
a4b897
+ * ...
a4b897
+ * MRT6_MAX
a4b897
+ */
a4b897
+#endif /* _LINUX_IN6_H */
a4b897
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
a4b897
index e34f247..7438dad 100644
a4b897
--- a/include/linux/inet_diag.h
a4b897
+++ b/include/linux/inet_diag.h
a4b897
@@ -110,10 +110,10 @@ enum {
a4b897
 	INET_DIAG_TCLASS,
a4b897
 	INET_DIAG_SKMEMINFO,
a4b897
 	INET_DIAG_SHUTDOWN,
a4b897
+	INET_DIAG_DCTCPINFO,
a4b897
 };
a4b897
 
a4b897
-#define INET_DIAG_MAX INET_DIAG_SHUTDOWN
a4b897
-
a4b897
+#define INET_DIAG_MAX INET_DIAG_DCTCPINFO
a4b897
 
a4b897
 /* INET_DIAG_MEM */
a4b897
 
a4b897
@@ -133,5 +133,14 @@ struct tcpvegas_info {
a4b897
 	__u32	tcpv_minrtt;
a4b897
 };
a4b897
 
a4b897
+/* INET_DIAG_DCTCPINFO */
a4b897
+
a4b897
+struct tcp_dctcp_info {
a4b897
+	__u16	dctcp_enabled;
a4b897
+	__u16	dctcp_ce_state;
a4b897
+	__u32	dctcp_alpha;
a4b897
+	__u32	dctcp_ab_ecn;
a4b897
+	__u32	dctcp_ab_tot;
a4b897
+};
a4b897
 
a4b897
 #endif /* _INET_DIAG_H_ */
a4b897
diff --git a/include/linux/l2tp.h b/include/linux/l2tp.h
a4b897
index c4bec82..5b0e36d 100644
a4b897
--- a/include/linux/l2tp.h
a4b897
+++ b/include/linux/l2tp.h
a4b897
@@ -122,6 +122,8 @@ enum {
a4b897
 	L2TP_ATTR_STATS,		/* nested */
a4b897
 	L2TP_ATTR_IP6_SADDR,		/* struct in6_addr */
a4b897
 	L2TP_ATTR_IP6_DADDR,		/* struct in6_addr */
a4b897
+	L2TP_ATTR_UDP_ZERO_CSUM6_TX,	/* u8 */
a4b897
+	L2TP_ATTR_UDP_ZERO_CSUM6_RX,	/* u8 */
a4b897
 	__L2TP_ATTR_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -174,5 +176,6 @@ enum l2tp_seqmode {
a4b897
  */
a4b897
 #define L2TP_GENL_NAME		"l2tp"
a4b897
 #define L2TP_GENL_VERSION	0x1
a4b897
+#define L2TP_GENL_MCGROUP       "l2tp"
a4b897
 
a4b897
 #endif /* _LINUX_L2TP_H_ */
a4b897
diff --git a/include/linux/libc-compat.h b/include/linux/libc-compat.h
a4b897
new file mode 100644
a4b897
index 0000000..990332e
a4b897
--- /dev/null
a4b897
+++ b/include/linux/libc-compat.h
a4b897
@@ -0,0 +1,121 @@
a4b897
+/*
a4b897
+ * Compatibility interface for userspace libc header coordination:
a4b897
+ *
a4b897
+ * Define compatibility macros that are used to control the inclusion or
a4b897
+ * exclusion of UAPI structures and definitions in coordination with another
a4b897
+ * userspace C library.
a4b897
+ *
a4b897
+ * This header is intended to solve the problem of UAPI definitions that
a4b897
+ * conflict with userspace definitions. If a UAPI header has such conflicting
a4b897
+ * definitions then the solution is as follows:
a4b897
+ *
a4b897
+ * * Synchronize the UAPI header and the libc headers so either one can be
a4b897
+ *   used and such that the ABI is preserved. If this is not possible then
a4b897
+ *   no simple compatibility interface exists (you need to write translating
a4b897
+ *   wrappers and rename things) and you can't use this interface.
a4b897
+ *
a4b897
+ * Then follow this process:
a4b897
+ *
a4b897
+ * (a) Include libc-compat.h in the UAPI header.
a4b897
+ *      e.g. #include <linux/libc-compat.h>
a4b897
+ *     This include must be as early as possible.
a4b897
+ *
a4b897
+ * (b) In libc-compat.h add enough code to detect that the comflicting
a4b897
+ *     userspace libc header has been included first.
a4b897
+ *
a4b897
+ * (c) If the userspace libc header has been included first define a set of
a4b897
+ *     guard macros of the form __UAPI_DEF_FOO and set their values to 1, else
a4b897
+ *     set their values to 0.
a4b897
+ *
a4b897
+ * (d) Back in the UAPI header with the conflicting definitions, guard the
a4b897
+ *     definitions with:
a4b897
+ *     #if __UAPI_DEF_FOO
a4b897
+ *       ...
a4b897
+ *     #endif
a4b897
+ *
a4b897
+ * This fixes the situation where the linux headers are included *after* the
a4b897
+ * libc headers. To fix the problem with the inclusion in the other order the
a4b897
+ * userspace libc headers must be fixed like this:
a4b897
+ *
a4b897
+ * * For all definitions that conflict with kernel definitions wrap those
a4b897
+ *   defines in the following:
a4b897
+ *   #if !__UAPI_DEF_FOO
a4b897
+ *     ...
a4b897
+ *   #endif
a4b897
+ *
a4b897
+ * This prevents the redefinition of a construct already defined by the kernel.
a4b897
+ */
a4b897
+#ifndef _LIBC_COMPAT_H
a4b897
+#define _LIBC_COMPAT_H
a4b897
+
a4b897
+/* We have included glibc headers... */
a4b897
+#if defined(__GLIBC__)
a4b897
+
a4b897
+/* Coordinate with glibc netinet/in.h header. */
a4b897
+#if defined(_NETINET_IN_H)
a4b897
+
a4b897
+/* GLIBC headers included first so don't define anything
a4b897
+ * that would already be defined. */
a4b897
+#define __UAPI_DEF_IN6_ADDR		0
a4b897
+/* The exception is the in6_addr macros which must be defined
a4b897
+ * if the glibc code didn't define them. This guard matches
a4b897
+ * the guard in glibc/inet/netinet/in.h which defines the
a4b897
+ * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
a4b897
+#if defined(__USE_MISC) || defined (__USE_GNU)
a4b897
+#define __UAPI_DEF_IN6_ADDR_ALT		0
a4b897
+#else
a4b897
+#define __UAPI_DEF_IN6_ADDR_ALT		1
a4b897
+#endif
a4b897
+#define __UAPI_DEF_SOCKADDR_IN6		0
a4b897
+#define __UAPI_DEF_IPV6_MREQ		0
a4b897
+#define __UAPI_DEF_IPPROTO_V6		0
a4b897
+#define __UAPI_DEF_IPV6_OPTIONS		0
a4b897
+#define __UAPI_DEF_IN6_PKTINFO		0
a4b897
+#define __UAPI_DEF_IP6_MTUINFO		0
a4b897
+
a4b897
+#else
a4b897
+
a4b897
+/* Linux headers included first, and we must define everything
a4b897
+ * we need. The expectation is that glibc will check the
a4b897
+ * __UAPI_DEF_* defines and adjust appropriately. */
a4b897
+#define __UAPI_DEF_IN6_ADDR		1
a4b897
+/* We unconditionally define the in6_addr macros and glibc must
a4b897
+ * coordinate. */
a4b897
+#define __UAPI_DEF_IN6_ADDR_ALT		1
a4b897
+#define __UAPI_DEF_SOCKADDR_IN6		1
a4b897
+#define __UAPI_DEF_IPV6_MREQ		1
a4b897
+#define __UAPI_DEF_IPPROTO_V6		1
a4b897
+#define __UAPI_DEF_IPV6_OPTIONS		1
a4b897
+#define __UAPI_DEF_IN6_PKTINFO		1
a4b897
+#define __UAPI_DEF_IP6_MTUINFO		1
a4b897
+
a4b897
+#endif /* _NETINET_IN_H */
a4b897
+
a4b897
+/* Definitions for xattr.h */
a4b897
+#if defined(_SYS_XATTR_H)
a4b897
+#define __UAPI_DEF_XATTR		0
a4b897
+#else
a4b897
+#define __UAPI_DEF_XATTR		1
a4b897
+#endif
a4b897
+
a4b897
+/* If we did not see any headers from any supported C libraries,
a4b897
+ * or we are being included in the kernel, then define everything
a4b897
+ * that we need. */
a4b897
+#else /* !defined(__GLIBC__) */
a4b897
+
a4b897
+/* Definitions for in6.h */
a4b897
+#define __UAPI_DEF_IN6_ADDR		1
a4b897
+#define __UAPI_DEF_IN6_ADDR_ALT		1
a4b897
+#define __UAPI_DEF_SOCKADDR_IN6		1
a4b897
+#define __UAPI_DEF_IPV6_MREQ		1
a4b897
+#define __UAPI_DEF_IPPROTO_V6		1
a4b897
+#define __UAPI_DEF_IPV6_OPTIONS		1
a4b897
+#define __UAPI_DEF_IN6_PKTINFO		1
a4b897
+#define __UAPI_DEF_IP6_MTUINFO		1
a4b897
+
a4b897
+/* Definitions for xattr.h */
a4b897
+#define __UAPI_DEF_XATTR		1
a4b897
+
a4b897
+#endif /* __GLIBC__ */
a4b897
+
a4b897
+#endif /* _LIBC_COMPAT_H */
a4b897
diff --git a/include/linux/mpls.h b/include/linux/mpls.h
a4b897
new file mode 100644
a4b897
index 0000000..0893902
a4b897
--- /dev/null
a4b897
+++ b/include/linux/mpls.h
a4b897
@@ -0,0 +1,34 @@
a4b897
+#ifndef _MPLS_H
a4b897
+#define _MPLS_H
a4b897
+
a4b897
+#include <linux/types.h>
a4b897
+#include <asm/byteorder.h>
a4b897
+
a4b897
+/* Reference: RFC 5462, RFC 3032
a4b897
+ *
a4b897
+ *  0                   1                   2                   3
a4b897
+ *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
a4b897
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
a4b897
+ * |                Label                  | TC  |S|       TTL     |
a4b897
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
a4b897
+ *
a4b897
+ *	Label:  Label Value, 20 bits
a4b897
+ *	TC:     Traffic Class field, 3 bits
a4b897
+ *	S:      Bottom of Stack, 1 bit
a4b897
+ *	TTL:    Time to Live, 8 bits
a4b897
+ */
a4b897
+
a4b897
+struct mpls_label {
a4b897
+	__be32 entry;
a4b897
+};
a4b897
+
a4b897
+#define MPLS_LS_LABEL_MASK      0xFFFFF000
a4b897
+#define MPLS_LS_LABEL_SHIFT     12
a4b897
+#define MPLS_LS_TC_MASK         0x00000E00
a4b897
+#define MPLS_LS_TC_SHIFT        9
a4b897
+#define MPLS_LS_S_MASK          0x00000100
a4b897
+#define MPLS_LS_S_SHIFT         8
a4b897
+#define MPLS_LS_TTL_MASK        0x000000FF
a4b897
+#define MPLS_LS_TTL_SHIFT       0
a4b897
+
a4b897
+#endif /* _MPLS_H */
a4b897
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h
a4b897
index f175212..2e35c61 100644
a4b897
--- a/include/linux/neighbour.h
a4b897
+++ b/include/linux/neighbour.h
a4b897
@@ -24,6 +24,8 @@ enum {
a4b897
 	NDA_PORT,
a4b897
 	NDA_VNI,
a4b897
 	NDA_IFINDEX,
a4b897
+	NDA_MASTER,
a4b897
+	NDA_LINK_NETNSID,
a4b897
 	__NDA_MAX
a4b897
 };
a4b897
 
a4b897
@@ -34,11 +36,11 @@ enum {
a4b897
  */
a4b897
 
a4b897
 #define NTF_USE		0x01
a4b897
-#define NTF_PROXY	0x08	/* == ATF_PUBL */
a4b897
-#define NTF_ROUTER	0x80
a4b897
-
a4b897
 #define NTF_SELF	0x02
a4b897
 #define NTF_MASTER	0x04
a4b897
+#define NTF_PROXY	0x08	/* == ATF_PUBL */
a4b897
+#define NTF_EXT_LEARNED	0x10
a4b897
+#define NTF_ROUTER	0x80
a4b897
 
a4b897
 /*
a4b897
  *	Neighbor Cache Entry States.
a4b897
@@ -58,7 +60,7 @@ enum {
a4b897
 
a4b897
 /* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change
a4b897
    and make no address resolution or NUD.
a4b897
-   NUD_PERMANENT is also cannot be deleted by garbage collectors.
a4b897
+   NUD_PERMANENT also cannot be deleted by garbage collectors.
a4b897
  */
a4b897
 
a4b897
 struct nda_cacheinfo {
a4b897
@@ -124,6 +126,7 @@ enum {
a4b897
 	NDTPA_PROXY_QLEN,		/* u32 */
a4b897
 	NDTPA_LOCKTIME,			/* u64, msecs */
a4b897
 	NDTPA_QUEUE_LENBYTES,		/* u32 */
a4b897
+	NDTPA_MCAST_REPROBES,		/* u32 */
a4b897
 	__NDTPA_MAX
a4b897
 };
a4b897
 #define NDTPA_MAX (__NDTPA_MAX - 1)
a4b897
diff --git a/include/linux/net_namespace.h b/include/linux/net_namespace.h
a4b897
new file mode 100644
a4b897
index 0000000..9a92b7e
a4b897
--- /dev/null
a4b897
+++ b/include/linux/net_namespace.h
a4b897
@@ -0,0 +1,23 @@
a4b897
+/* Copyright (c) 2015 6WIND S.A.
a4b897
+ * Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
a4b897
+ *
a4b897
+ * This program is free software; you can redistribute it and/or modify it
a4b897
+ * under the terms and conditions of the GNU General Public License,
a4b897
+ * version 2, as published by the Free Software Foundation.
a4b897
+ */
a4b897
+#ifndef _LINUX_NET_NAMESPACE_H_
a4b897
+#define _LINUX_NET_NAMESPACE_H_
a4b897
+
a4b897
+/* Attributes of RTM_NEWNSID/RTM_GETNSID messages */
a4b897
+enum {
a4b897
+	NETNSA_NONE,
a4b897
+#define NETNSA_NSID_NOT_ASSIGNED -1
a4b897
+	NETNSA_NSID,
a4b897
+	NETNSA_PID,
a4b897
+	NETNSA_FD,
a4b897
+	__NETNSA_MAX,
a4b897
+};
a4b897
+
a4b897
+#define NETNSA_MAX		(__NETNSA_MAX - 1)
a4b897
+
a4b897
+#endif /* _LINUX_NET_NAMESPACE_H_ */
a4b897
diff --git a/include/linux/netconf.h b/include/linux/netconf.h
a4b897
index 52c4424..6ceb170 100644
a4b897
--- a/include/linux/netconf.h
a4b897
+++ b/include/linux/netconf.h
a4b897
@@ -14,6 +14,7 @@ enum {
a4b897
 	NETCONFA_FORWARDING,
a4b897
 	NETCONFA_RP_FILTER,
a4b897
 	NETCONFA_MC_FORWARDING,
a4b897
+	NETCONFA_PROXY_NEIGH,
a4b897
 	__NETCONFA_MAX
a4b897
 };
a4b897
 #define NETCONFA_MAX	(__NETCONFA_MAX - 1)
a4b897
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
a4b897
index adc7260..66fceb4 100644
a4b897
--- a/include/linux/netdevice.h
a4b897
+++ b/include/linux/netdevice.h
a4b897
@@ -37,6 +37,12 @@
a4b897
 #define INIT_NETDEV_GROUP	0
a4b897
 
a4b897
 
a4b897
+/* interface name assignment types (sysfs name_assign_type attribute) */
a4b897
+#define NET_NAME_UNKNOWN	0	/* unknown origin (not exposed to userspace) */
a4b897
+#define NET_NAME_ENUM		1	/* enumerated by kernel */
a4b897
+#define NET_NAME_PREDICTABLE	2	/* predictably named by the kernel */
a4b897
+#define NET_NAME_USER		3	/* provided by user-space */
a4b897
+#define NET_NAME_RENAMED	4	/* renamed by user-space */
a4b897
 
a4b897
 /* Media selection options. */
a4b897
 enum {
a4b897
@@ -49,5 +55,11 @@ enum {
a4b897
         IF_PORT_100BASEFX
a4b897
 };
a4b897
 
a4b897
+/* hardware address assignment types */
a4b897
+#define NET_ADDR_PERM		0	/* address is permanent (default) */
a4b897
+#define NET_ADDR_RANDOM		1	/* address is generated randomly */
a4b897
+#define NET_ADDR_STOLEN		2	/* address is stolen from other device */
a4b897
+#define NET_ADDR_SET		3	/* address is set using
a4b897
+					 * dev_set_mac_address() */
a4b897
 
a4b897
 #endif /* _LINUX_NETDEVICE_H */
a4b897
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
a4b897
index f05c3d9..be0bc18 100644
a4b897
--- a/include/linux/netfilter.h
a4b897
+++ b/include/linux/netfilter.h
a4b897
@@ -51,6 +51,7 @@ enum nf_inet_hooks {
a4b897
 
a4b897
 enum {
a4b897
 	NFPROTO_UNSPEC =  0,
a4b897
+	NFPROTO_INET   =  1,
a4b897
 	NFPROTO_IPV4   =  2,
a4b897
 	NFPROTO_ARP    =  3,
a4b897
 	NFPROTO_BRIDGE =  7,
a4b897
diff --git a/include/linux/netlink_diag.h b/include/linux/netlink_diag.h
a4b897
index 4e31db4..f2159d3 100644
a4b897
--- a/include/linux/netlink_diag.h
a4b897
+++ b/include/linux/netlink_diag.h
a4b897
@@ -33,6 +33,7 @@ struct netlink_diag_ring {
a4b897
 };
a4b897
 
a4b897
 enum {
a4b897
+	/* NETLINK_DIAG_NONE, standard nl API requires this attribute!  */
a4b897
 	NETLINK_DIAG_MEMINFO,
a4b897
 	NETLINK_DIAG_GROUPS,
a4b897
 	NETLINK_DIAG_RX_RING,
a4b897
diff --git a/include/linux/packet_diag.h b/include/linux/packet_diag.h
a4b897
index b2cc0cd..d08c63f 100644
a4b897
--- a/include/linux/packet_diag.h
a4b897
+++ b/include/linux/packet_diag.h
a4b897
@@ -29,6 +29,7 @@ struct packet_diag_msg {
a4b897
 };
a4b897
 
a4b897
 enum {
a4b897
+	/* PACKET_DIAG_NONE, standard nl API requires this attribute!  */
a4b897
 	PACKET_DIAG_INFO,
a4b897
 	PACKET_DIAG_MCLIST,
a4b897
 	PACKET_DIAG_RX_RING,
a4b897
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
a4b897
index 082eafa..bf08e76 100644
a4b897
--- a/include/linux/pkt_cls.h
a4b897
+++ b/include/linux/pkt_cls.h
a4b897
@@ -388,6 +388,22 @@ enum {
a4b897
 
a4b897
 #define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1)
a4b897
 
a4b897
+/* BPF classifier */
a4b897
+
a4b897
+enum {
a4b897
+	TCA_BPF_UNSPEC,
a4b897
+	TCA_BPF_ACT,
a4b897
+	TCA_BPF_POLICE,
a4b897
+	TCA_BPF_CLASSID,
a4b897
+	TCA_BPF_OPS_LEN,
a4b897
+	TCA_BPF_OPS,
a4b897
+	TCA_BPF_FD,
a4b897
+	TCA_BPF_NAME,
a4b897
+	__TCA_BPF_MAX,
a4b897
+};
a4b897
+
a4b897
+#define TCA_BPF_MAX (__TCA_BPF_MAX - 1)
a4b897
+
a4b897
 /* Extended Matches */
a4b897
 
a4b897
 struct tcf_ematch_tree_hdr {
a4b897
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
a4b897
index dbd71b0..534b847 100644
a4b897
--- a/include/linux/pkt_sched.h
a4b897
+++ b/include/linux/pkt_sched.h
a4b897
@@ -73,9 +73,17 @@ struct tc_estimator {
a4b897
 #define TC_H_ROOT	(0xFFFFFFFFU)
a4b897
 #define TC_H_INGRESS    (0xFFFFFFF1U)
a4b897
 
a4b897
+/* Need to corrospond to iproute2 tc/tc_core.h "enum link_layer" */
a4b897
+enum tc_link_layer {
a4b897
+	TC_LINKLAYER_UNAWARE, /* Indicate unaware old iproute2 util */
a4b897
+	TC_LINKLAYER_ETHERNET,
a4b897
+	TC_LINKLAYER_ATM,
a4b897
+};
a4b897
+#define TC_LINKLAYER_MASK 0x0F /* limit use to lower 4 bits */
a4b897
+
a4b897
 struct tc_ratespec {
a4b897
 	unsigned char	cell_log;
a4b897
-	unsigned char	__reserved;
a4b897
+	__u8		linklayer; /* lower 4 bits */
a4b897
 	unsigned short	overhead;
a4b897
 	short		cell_align;
a4b897
 	unsigned short	mpu;
a4b897
@@ -163,6 +171,10 @@ enum {
a4b897
 	TCA_TBF_PARMS,
a4b897
 	TCA_TBF_RTAB,
a4b897
 	TCA_TBF_PTAB,
a4b897
+	TCA_TBF_RATE64,
a4b897
+	TCA_TBF_PRATE64,
a4b897
+	TCA_TBF_BURST,
a4b897
+	TCA_TBF_PBURST,
a4b897
 	__TCA_TBF_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -349,6 +361,8 @@ enum {
a4b897
 	TCA_HTB_CTAB,
a4b897
 	TCA_HTB_RTAB,
a4b897
 	TCA_HTB_DIRECT_QLEN,
a4b897
+	TCA_HTB_RATE64,
a4b897
+	TCA_HTB_CEIL64,
a4b897
 	__TCA_HTB_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -511,6 +525,7 @@ enum {
a4b897
 	TCA_NETEM_LOSS,
a4b897
 	TCA_NETEM_RATE,
a4b897
 	TCA_NETEM_ECN,
a4b897
+	TCA_NETEM_RATE64,
a4b897
 	__TCA_NETEM_MAX,
a4b897
 };
a4b897
 
a4b897
@@ -736,4 +751,98 @@ struct tc_fq_codel_xstats {
a4b897
 	};
a4b897
 };
a4b897
 
a4b897
+/* FQ */
a4b897
+
a4b897
+enum {
a4b897
+	TCA_FQ_UNSPEC,
a4b897
+
a4b897
+	TCA_FQ_PLIMIT,		/* limit of total number of packets in queue */
a4b897
+
a4b897
+	TCA_FQ_FLOW_PLIMIT,	/* limit of packets per flow */
a4b897
+
a4b897
+	TCA_FQ_QUANTUM,		/* RR quantum */
a4b897
+
a4b897
+	TCA_FQ_INITIAL_QUANTUM,		/* RR quantum for new flow */
a4b897
+
a4b897
+	TCA_FQ_RATE_ENABLE,	/* enable/disable rate limiting */
a4b897
+
a4b897
+	TCA_FQ_FLOW_DEFAULT_RATE,/* obsolete, do not use */
a4b897
+
a4b897
+	TCA_FQ_FLOW_MAX_RATE,	/* per flow max rate */
a4b897
+
a4b897
+	TCA_FQ_BUCKETS_LOG,	/* log2(number of buckets) */
a4b897
+
a4b897
+	TCA_FQ_FLOW_REFILL_DELAY,	/* flow credit refill delay in usec */
a4b897
+
a4b897
+	TCA_FQ_ORPHAN_MASK,	/* mask applied to orphaned skb hashes */
a4b897
+
a4b897
+	__TCA_FQ_MAX
a4b897
+};
a4b897
+
a4b897
+#define TCA_FQ_MAX	(__TCA_FQ_MAX - 1)
a4b897
+
a4b897
+struct tc_fq_qd_stats {
a4b897
+	__u64	gc_flows;
a4b897
+	__u64	highprio_packets;
a4b897
+	__u64	tcp_retrans;
a4b897
+	__u64	throttled;
a4b897
+	__u64	flows_plimit;
a4b897
+	__u64	pkts_too_long;
a4b897
+	__u64	allocation_errors;
a4b897
+	__s64	time_next_delayed_flow;
a4b897
+	__u32	flows;
a4b897
+	__u32	inactive_flows;
a4b897
+	__u32	throttled_flows;
a4b897
+	__u32	pad;
a4b897
+};
a4b897
+
a4b897
+/* Heavy-Hitter Filter */
a4b897
+
a4b897
+enum {
a4b897
+	TCA_HHF_UNSPEC,
a4b897
+	TCA_HHF_BACKLOG_LIMIT,
a4b897
+	TCA_HHF_QUANTUM,
a4b897
+	TCA_HHF_HH_FLOWS_LIMIT,
a4b897
+	TCA_HHF_RESET_TIMEOUT,
a4b897
+	TCA_HHF_ADMIT_BYTES,
a4b897
+	TCA_HHF_EVICT_TIMEOUT,
a4b897
+	TCA_HHF_NON_HH_WEIGHT,
a4b897
+	__TCA_HHF_MAX
a4b897
+};
a4b897
+
a4b897
+#define TCA_HHF_MAX	(__TCA_HHF_MAX - 1)
a4b897
+
a4b897
+struct tc_hhf_xstats {
a4b897
+	__u32	drop_overlimit; /* number of times max qdisc packet limit
a4b897
+				 * was hit
a4b897
+				 */
a4b897
+	__u32	hh_overlimit;   /* number of times max heavy-hitters was hit */
a4b897
+	__u32	hh_tot_count;   /* number of captured heavy-hitters so far */
a4b897
+	__u32	hh_cur_count;   /* number of current heavy-hitters */
a4b897
+};
a4b897
+
a4b897
+/* PIE */
a4b897
+enum {
a4b897
+	TCA_PIE_UNSPEC,
a4b897
+	TCA_PIE_TARGET,
a4b897
+	TCA_PIE_LIMIT,
a4b897
+	TCA_PIE_TUPDATE,
a4b897
+	TCA_PIE_ALPHA,
a4b897
+	TCA_PIE_BETA,
a4b897
+	TCA_PIE_ECN,
a4b897
+	TCA_PIE_BYTEMODE,
a4b897
+	__TCA_PIE_MAX
a4b897
+};
a4b897
+#define TCA_PIE_MAX   (__TCA_PIE_MAX - 1)
a4b897
+
a4b897
+struct tc_pie_xstats {
a4b897
+	__u32 prob;             /* current probability */
a4b897
+	__u32 delay;            /* current delay in ms */
a4b897
+	__u32 avg_dq_rate;      /* current average dq_rate in bits/pie_time */
a4b897
+	__u32 packets_in;       /* total number of packets enqueued */
a4b897
+	__u32 dropped;          /* packets dropped due to pie_action */
a4b897
+	__u32 overlimit;        /* dropped due to lack of space in queue */
a4b897
+	__u32 maxq;             /* maximum queue size */
a4b897
+	__u32 ecn_mark;         /* packets marked with ecn*/
a4b897
+};
a4b897
 #endif
a4b897
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
a4b897
index 93370bd..702b19b 100644
a4b897
--- a/include/linux/rtnetlink.h
a4b897
+++ b/include/linux/rtnetlink.h
a4b897
@@ -132,6 +132,13 @@ enum {
a4b897
 	RTM_GETMDB = 86,
a4b897
 #define RTM_GETMDB RTM_GETMDB
a4b897
 
a4b897
+	RTM_NEWNSID = 88,
a4b897
+#define RTM_NEWNSID RTM_NEWNSID
a4b897
+	RTM_DELNSID = 89,
a4b897
+#define RTM_DELNSID RTM_DELNSID
a4b897
+	RTM_GETNSID = 90,
a4b897
+#define RTM_GETNSID RTM_GETNSID
a4b897
+
a4b897
 	__RTM_MAX,
a4b897
 #define RTM_MAX		(((__RTM_MAX + 3) & ~3) - 1)
a4b897
 };
a4b897
@@ -235,6 +242,7 @@ enum {
a4b897
 #define RTPROT_NTK	15	/* Netsukuku */
a4b897
 #define RTPROT_DHCP	16      /* DHCP client */
a4b897
 #define RTPROT_MROUTED	17      /* Multicast daemon */
a4b897
+#define RTPROT_BABEL	42      /* Babel daemon */
a4b897
 
a4b897
 /* rtm_scope
a4b897
 
a4b897
@@ -297,6 +305,9 @@ enum rtattr_type_t {
a4b897
 	RTA_TABLE,
a4b897
 	RTA_MARK,
a4b897
 	RTA_MFC_STATS,
a4b897
+	RTA_VIA,
a4b897
+	RTA_NEWDST,
a4b897
+	RTA_PREF,
a4b897
 	__RTA_MAX
a4b897
 };
a4b897
 
a4b897
@@ -326,6 +337,7 @@ struct rtnexthop {
a4b897
 #define RTNH_F_DEAD		1	/* Nexthop is dead (used by multipath)	*/
a4b897
 #define RTNH_F_PERVASIVE	2	/* Do recursive gateway lookup	*/
a4b897
 #define RTNH_F_ONLINK		4	/* Gateway is forced on link	*/
a4b897
+#define RTNH_F_EXTERNAL		8	/* Route installed externally	*/
a4b897
 
a4b897
 /* Macros to handle hexthops */
a4b897
 
a4b897
@@ -338,6 +350,12 @@ struct rtnexthop {
a4b897
 #define RTNH_SPACE(len)	RTNH_ALIGN(RTNH_LENGTH(len))
a4b897
 #define RTNH_DATA(rtnh)   ((struct rtattr*)(((char*)(rtnh)) + RTNH_LENGTH(0)))
a4b897
 
a4b897
+/* RTA_VIA */
a4b897
+struct rtvia {
a4b897
+	__kernel_sa_family_t	rtvia_family;
a4b897
+	__u8			rtvia_addr[0];
a4b897
+};
a4b897
+
a4b897
 /* RTM_CACHEINFO */
a4b897
 
a4b897
 struct rta_cacheinfo {
a4b897
@@ -386,6 +404,10 @@ enum {
a4b897
 #define RTAX_RTO_MIN RTAX_RTO_MIN
a4b897
 	RTAX_INITRWND,
a4b897
 #define RTAX_INITRWND RTAX_INITRWND
a4b897
+	RTAX_QUICKACK,
a4b897
+#define RTAX_QUICKACK RTAX_QUICKACK
a4b897
+	RTAX_CC_ALGO,
a4b897
+#define RTAX_CC_ALGO RTAX_CC_ALGO
a4b897
 	__RTAX_MAX
a4b897
 };
a4b897
 
a4b897
@@ -611,6 +633,10 @@ enum rtnetlink_groups {
a4b897
 #define RTNLGRP_IPV6_NETCONF	RTNLGRP_IPV6_NETCONF
a4b897
 	RTNLGRP_MDB,
a4b897
 #define RTNLGRP_MDB		RTNLGRP_MDB
a4b897
+	RTNLGRP_MPLS_ROUTE,
a4b897
+#define RTNLGRP_MPLS_ROUTE	RTNLGRP_MPLS_ROUTE
a4b897
+	RTNLGRP_NSID,
a4b897
+#define RTNLGRP_NSID		RTNLGRP_NSID
a4b897
 	__RTNLGRP_MAX
a4b897
 };
a4b897
 #define RTNLGRP_MAX	(__RTNLGRP_MAX - 1)
a4b897
@@ -629,6 +655,7 @@ struct tcamsg {
a4b897
 /* New extended info filters for IFLA_EXT_MASK */
a4b897
 #define RTEXT_FILTER_VF		(1 << 0)
a4b897
 #define RTEXT_FILTER_BRVLAN	(1 << 1)
a4b897
+#define RTEXT_FILTER_BRVLAN_COMPRESSED	(1 << 2)
a4b897
 
a4b897
 /* End of information exported to user level */
a4b897
 
a4b897
diff --git a/include/linux/tc_act/tc_bpf.h b/include/linux/tc_act/tc_bpf.h
a4b897
new file mode 100644
a4b897
index 0000000..07f17cc
a4b897
--- /dev/null
a4b897
+++ b/include/linux/tc_act/tc_bpf.h
a4b897
@@ -0,0 +1,33 @@
a4b897
+/*
a4b897
+ * Copyright (c) 2015 Jiri Pirko <jiri@resnulli.us>
a4b897
+ *
a4b897
+ * This program is free software; you can redistribute it and/or modify
a4b897
+ * it under the terms of the GNU General Public License as published by
a4b897
+ * the Free Software Foundation; either version 2 of the License, or
a4b897
+ * (at your option) any later version.
a4b897
+ */
a4b897
+
a4b897
+#ifndef __LINUX_TC_BPF_H
a4b897
+#define __LINUX_TC_BPF_H
a4b897
+
a4b897
+#include <linux/pkt_cls.h>
a4b897
+
a4b897
+#define TCA_ACT_BPF 13
a4b897
+
a4b897
+struct tc_act_bpf {
a4b897
+	tc_gen;
a4b897
+};
a4b897
+
a4b897
+enum {
a4b897
+	TCA_ACT_BPF_UNSPEC,
a4b897
+	TCA_ACT_BPF_TM,
a4b897
+	TCA_ACT_BPF_PARMS,
a4b897
+	TCA_ACT_BPF_OPS_LEN,
a4b897
+	TCA_ACT_BPF_OPS,
a4b897
+	TCA_ACT_BPF_FD,
a4b897
+	TCA_ACT_BPF_NAME,
a4b897
+	__TCA_ACT_BPF_MAX,
a4b897
+};
a4b897
+#define TCA_ACT_BPF_MAX (__TCA_ACT_BPF_MAX - 1)
a4b897
+
a4b897
+#endif
a4b897
diff --git a/include/linux/tc_act/tc_connmark.h b/include/linux/tc_act/tc_connmark.h
a4b897
new file mode 100644
a4b897
index 0000000..994b097
a4b897
--- /dev/null
a4b897
+++ b/include/linux/tc_act/tc_connmark.h
a4b897
@@ -0,0 +1,22 @@
a4b897
+#ifndef __UAPI_TC_CONNMARK_H
a4b897
+#define __UAPI_TC_CONNMARK_H
a4b897
+
a4b897
+#include <linux/types.h>
a4b897
+#include <linux/pkt_cls.h>
a4b897
+
a4b897
+#define TCA_ACT_CONNMARK 14
a4b897
+
a4b897
+struct tc_connmark {
a4b897
+	tc_gen;
a4b897
+	__u16 zone;
a4b897
+};
a4b897
+
a4b897
+enum {
a4b897
+	TCA_CONNMARK_UNSPEC,
a4b897
+	TCA_CONNMARK_PARMS,
a4b897
+	TCA_CONNMARK_TM,
a4b897
+	__TCA_CONNMARK_MAX
a4b897
+};
a4b897
+#define TCA_CONNMARK_MAX (__TCA_CONNMARK_MAX - 1)
a4b897
+
a4b897
+#endif
a4b897
diff --git a/include/linux/tc_act/tc_defact.h b/include/linux/tc_act/tc_defact.h
a4b897
new file mode 100644
a4b897
index 0000000..17dddb4
a4b897
--- /dev/null
a4b897
+++ b/include/linux/tc_act/tc_defact.h
a4b897
@@ -0,0 +1,19 @@
a4b897
+#ifndef __LINUX_TC_DEF_H
a4b897
+#define __LINUX_TC_DEF_H
a4b897
+
a4b897
+#include <linux/pkt_cls.h>
a4b897
+
a4b897
+struct tc_defact {
a4b897
+	tc_gen;
a4b897
+};
a4b897
+
a4b897
+enum {
a4b897
+	TCA_DEF_UNSPEC,
a4b897
+	TCA_DEF_TM,
a4b897
+	TCA_DEF_PARMS,
a4b897
+	TCA_DEF_DATA,
a4b897
+	__TCA_DEF_MAX
a4b897
+};
a4b897
+#define TCA_DEF_MAX (__TCA_DEF_MAX - 1)
a4b897
+
a4b897
+#endif
a4b897
diff --git a/include/linux/tc_act/tc_ipt.h b/include/linux/tc_act/tc_ipt.h
a4b897
index a233556..130aaad 100644
a4b897
--- a/include/linux/tc_act/tc_ipt.h
a4b897
+++ b/include/linux/tc_act/tc_ipt.h
a4b897
@@ -4,6 +4,7 @@
a4b897
 #include <linux/pkt_cls.h>
a4b897
 
a4b897
 #define TCA_ACT_IPT 6
a4b897
+#define TCA_ACT_XT 10
a4b897
 
a4b897
 enum {
a4b897
 	TCA_IPT_UNSPEC,
a4b897
diff --git a/include/linux/tc_act/tc_vlan.h b/include/linux/tc_act/tc_vlan.h
a4b897
new file mode 100644
a4b897
index 0000000..f7b8d44
a4b897
--- /dev/null
a4b897
+++ b/include/linux/tc_act/tc_vlan.h
a4b897
@@ -0,0 +1,35 @@
a4b897
+/*
a4b897
+ * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
a4b897
+ *
a4b897
+ * This program is free software; you can redistribute it and/or modify
a4b897
+ * it under the terms of the GNU General Public License as published by
a4b897
+ * the Free Software Foundation; either version 2 of the License, or
a4b897
+ * (at your option) any later version.
a4b897
+ */
a4b897
+
a4b897
+#ifndef __LINUX_TC_VLAN_H
a4b897
+#define __LINUX_TC_VLAN_H
a4b897
+
a4b897
+#include <linux/pkt_cls.h>
a4b897
+
a4b897
+#define TCA_ACT_VLAN 12
a4b897
+
a4b897
+#define TCA_VLAN_ACT_POP	1
a4b897
+#define TCA_VLAN_ACT_PUSH	2
a4b897
+
a4b897
+struct tc_vlan {
a4b897
+	tc_gen;
a4b897
+	int v_action;
a4b897
+};
a4b897
+
a4b897
+enum {
a4b897
+	TCA_VLAN_UNSPEC,
a4b897
+	TCA_VLAN_TM,
a4b897
+	TCA_VLAN_PARMS,
a4b897
+	TCA_VLAN_PUSH_VLAN_ID,
a4b897
+	TCA_VLAN_PUSH_VLAN_PROTOCOL,
a4b897
+	__TCA_VLAN_MAX,
a4b897
+};
a4b897
+#define TCA_VLAN_MAX (__TCA_VLAN_MAX - 1)
a4b897
+
a4b897
+#endif
a4b897
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
a4b897
index 1eb04d3..f96e015 100644
a4b897
--- a/include/linux/tcp.h
a4b897
+++ b/include/linux/tcp.h
a4b897
@@ -111,6 +111,7 @@ enum {
a4b897
 #define TCP_REPAIR_OPTIONS	22
a4b897
 #define TCP_FASTOPEN		23	/* Enable FastOpen on listeners */
a4b897
 #define TCP_TIMESTAMP		24
a4b897
+#define TCP_NOTSENT_LOWAT	25	/* limit number of unsent bytes in write queue */
a4b897
 
a4b897
 struct tcp_repair_opt {
a4b897
 	__u32	opt_code;
a4b897
@@ -185,6 +186,9 @@ struct tcp_info {
a4b897
 	__u32	tcpi_rcv_space;
a4b897
 
a4b897
 	__u32	tcpi_total_retrans;
a4b897
+
a4b897
+	__u64	tcpi_pacing_rate;
a4b897
+	__u64	tcpi_max_pacing_rate;
a4b897
 };
a4b897
 
a4b897
 /* for TCP_MD5SIG socket option */
a4b897
diff --git a/include/linux/tcp_metrics.h b/include/linux/tcp_metrics.h
a4b897
index cb5157b..9353392 100644
a4b897
--- a/include/linux/tcp_metrics.h
a4b897
+++ b/include/linux/tcp_metrics.h
a4b897
@@ -11,12 +11,15 @@
a4b897
 #define TCP_METRICS_GENL_VERSION	0x1
a4b897
 
a4b897
 enum tcp_metric_index {
a4b897
-	TCP_METRIC_RTT,
a4b897
-	TCP_METRIC_RTTVAR,
a4b897
+	TCP_METRIC_RTT,		/* in ms units */
a4b897
+	TCP_METRIC_RTTVAR,	/* in ms units */
a4b897
 	TCP_METRIC_SSTHRESH,
a4b897
 	TCP_METRIC_CWND,
a4b897
 	TCP_METRIC_REORDERING,
a4b897
 
a4b897
+	TCP_METRIC_RTT_US,	/* in usec units */
a4b897
+	TCP_METRIC_RTTVAR_US,	/* in usec units */
a4b897
+
a4b897
 	/* Always last.  */
a4b897
 	__TCP_METRIC_MAX,
a4b897
 };
a4b897
@@ -35,6 +38,8 @@ enum {
a4b897
 	TCP_METRICS_ATTR_FOPEN_SYN_DROPS,	/* u16, count of drops */
a4b897
 	TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS,	/* msecs age */
a4b897
 	TCP_METRICS_ATTR_FOPEN_COOKIE,		/* binary */
a4b897
+	TCP_METRICS_ATTR_SADDR_IPV4,		/* u32 */
a4b897
+	TCP_METRICS_ATTR_SADDR_IPV6,		/* binary */
a4b897
 
a4b897
 	__TCP_METRICS_ATTR_MAX,
a4b897
 };
a4b897
diff --git a/include/linux/unix_diag.h b/include/linux/unix_diag.h
a4b897
index b9e2a6a..1eb0b8d 100644
a4b897
--- a/include/linux/unix_diag.h
a4b897
+++ b/include/linux/unix_diag.h
a4b897
@@ -31,6 +31,7 @@ struct unix_diag_msg {
a4b897
 };
a4b897
 
a4b897
 enum {
a4b897
+	/* UNIX_DIAG_NONE, standard nl API requires this attribute!  */
a4b897
 	UNIX_DIAG_NAME,
a4b897
 	UNIX_DIAG_VFS,
a4b897
 	UNIX_DIAG_PEER,
a4b897
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
a4b897
index 341c3c9..b8f5451 100644
a4b897
--- a/include/linux/xfrm.h
a4b897
+++ b/include/linux/xfrm.h
a4b897
@@ -1,6 +1,7 @@
a4b897
 #ifndef _LINUX_XFRM_H
a4b897
 #define _LINUX_XFRM_H
a4b897
 
a4b897
+#include <linux/in6.h>
a4b897
 #include <linux/types.h>
a4b897
 
a4b897
 /* All of the structures in this file may not change size as they are
a4b897
@@ -13,6 +14,7 @@
a4b897
 typedef union {
a4b897
 	__be32		a4;
a4b897
 	__be32		a6[4];
a4b897
+	struct in6_addr	in6;
a4b897
 } xfrm_address_t;
a4b897
 
a4b897
 /* Ident of a specific xfrm_state. It is used on input to lookup
a4b897
@@ -298,6 +300,8 @@ enum xfrm_attr_type_t {
a4b897
 	XFRMA_TFCPAD,		/* __u32 */
a4b897
 	XFRMA_REPLAY_ESN_VAL,	/* struct xfrm_replay_esn */
a4b897
 	XFRMA_SA_EXTRA_FLAGS,	/* __u32 */
a4b897
+	XFRMA_PROTO,		/* __u8 */
a4b897
+	XFRMA_ADDRESS_FILTER,	/* struct xfrm_address_filter */
a4b897
 	__XFRMA_MAX
a4b897
 
a4b897
 #define XFRMA_MAX (__XFRMA_MAX - 1)
a4b897
@@ -326,6 +330,8 @@ enum xfrm_spdattr_type_t {
a4b897
 	XFRMA_SPD_UNSPEC,
a4b897
 	XFRMA_SPD_INFO,
a4b897
 	XFRMA_SPD_HINFO,
a4b897
+	XFRMA_SPD_IPV4_HTHRESH,
a4b897
+	XFRMA_SPD_IPV6_HTHRESH,
a4b897
 	__XFRMA_SPD_MAX
a4b897
 
a4b897
 #define XFRMA_SPD_MAX (__XFRMA_SPD_MAX - 1)
a4b897
@@ -345,6 +351,11 @@ struct xfrmu_spdhinfo {
a4b897
 	__u32 spdhmcnt;
a4b897
 };
a4b897
 
a4b897
+struct xfrmu_spdhthresh {
a4b897
+	__u8 lbits;
a4b897
+	__u8 rbits;
a4b897
+};
a4b897
+
a4b897
 struct xfrm_usersa_info {
a4b897
 	struct xfrm_selector		sel;
a4b897
 	struct xfrm_id			id;
a4b897
@@ -474,6 +485,14 @@ struct xfrm_user_mapping {
a4b897
 	__be16				new_sport;
a4b897
 };
a4b897
 
a4b897
+struct xfrm_address_filter {
a4b897
+	xfrm_address_t			saddr;
a4b897
+	xfrm_address_t			daddr;
a4b897
+	__u16				family;
a4b897
+	__u8				splen;
a4b897
+	__u8				dplen;
a4b897
+};
a4b897
+
a4b897
 /* backwards compatibility for userspace */
a4b897
 #define XFRMGRP_ACQUIRE		1
a4b897
 #define XFRMGRP_EXPIRE		2
a4b897
diff --git a/ip/xfrm_monitor.c b/ip/xfrm_monitor.c
a4b897
index 50116a7..773b143 100644
a4b897
--- a/ip/xfrm_monitor.c
a4b897
+++ b/ip/xfrm_monitor.c
a4b897
@@ -27,7 +27,9 @@
a4b897
 #include <stdio.h>
a4b897
 #include <stdlib.h>
a4b897
 #include <string.h>
a4b897
+#include <netinet/in.h>
a4b897
 #include <linux/xfrm.h>
a4b897
+
a4b897
 #include "utils.h"
a4b897
 #include "xfrm.h"
a4b897
 #include "ip_common.h"