aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-08 21:40:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-08 21:40:54 -0400
commit35a9ad8af0bb0fa3525e6d0d20e32551d226f38e (patch)
tree15b4b33206818886d9cff371fd2163e073b70568 /include/uapi/linux
parentd5935b07da53f74726e2a65dd4281d0f2c70e5d4 (diff)
parent64b1f00a0830e1c53874067273a096b228d83d36 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Most notable changes in here: 1) By far the biggest accomplishment, thanks to a large range of contributors, is the addition of multi-send for transmit. This is the result of discussions back in Chicago, and the hard work of several individuals. Now, when the ->ndo_start_xmit() method of a driver sees skb->xmit_more as true, it can choose to defer the doorbell telling the driver to start processing the new TX queue entires. skb->xmit_more means that the generic networking is guaranteed to call the driver immediately with another SKB to send. There is logic added to the qdisc layer to dequeue multiple packets at a time, and the handling mis-predicted offloads in software is now done with no locks held. Finally, pktgen is extended to have a "burst" parameter that can be used to test a multi-send implementation. Several drivers have xmit_more support: i40e, igb, ixgbe, mlx4, virtio_net Adding support is almost trivial, so export more drivers to support this optimization soon. I want to thank, in no particular or implied order, Jesper Dangaard Brouer, Eric Dumazet, Alexander Duyck, Tom Herbert, Jamal Hadi Salim, John Fastabend, Florian Westphal, Daniel Borkmann, David Tat, Hannes Frederic Sowa, and Rusty Russell. 2) PTP and timestamping support in bnx2x, from Michal Kalderon. 3) Allow adjusting the rx_copybreak threshold for a driver via ethtool, and add rx_copybreak support to enic driver. From Govindarajulu Varadarajan. 4) Significant enhancements to the generic PHY layer and the bcm7xxx driver in particular (EEE support, auto power down, etc.) from Florian Fainelli. 5) Allow raw buffers to be used for flow dissection, allowing drivers to determine the optimal "linear pull" size for devices that DMA into pools of pages. The objective is to get exactly the necessary amount of headers into the linear SKB area pre-pulled, but no more. The new interface drivers use is eth_get_headlen(). From WANG Cong, with driver conversions (several had their own by-hand duplicated implementations) by Alexander Duyck and Eric Dumazet. 6) Support checksumming more smoothly and efficiently for encapsulations, and add "foo over UDP" facility. From Tom Herbert. 7) Add Broadcom SF2 switch driver to DSA layer, from Florian Fainelli. 8) eBPF now can load programs via a system call and has an extensive testsuite. Alexei Starovoitov and Daniel Borkmann. 9) Major overhaul of the packet scheduler to use RCU in several major areas such as the classifiers and rate estimators. From John Fastabend. 10) Add driver for Intel FM10000 Ethernet Switch, from Alexander Duyck. 11) Rearrange TCP_SKB_CB() to reduce cache line misses, from Eric Dumazet. 12) Add Datacenter TCP congestion control algorithm support, From Florian Westphal. 13) Reorganize sk_buff so that __copy_skb_header() is significantly faster. From Eric Dumazet" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1558 commits) netlabel: directly return netlbl_unlabel_genl_init() net: add netdev_txq_bql_{enqueue, complete}_prefetchw() helpers net: description of dma_cookie cause make xmldocs warning cxgb4: clean up a type issue cxgb4: potential shift wrapping bug i40e: skb->xmit_more support net: fs_enet: Add NAPI TX net: fs_enet: Remove non NAPI RX r8169:add support for RTL8168EP net_sched: copy exts->type in tcf_exts_change() wimax: convert printk to pr_foo() af_unix: remove 0 assignment on static ipv6: Do not warn for informational ICMP messages, regardless of type. Update Intel Ethernet Driver maintainers list bridge: Save frag_max_size between PRE_ROUTING and POST_ROUTING tipc: fix bug in multicast congestion handling net: better IFF_XMIT_DST_RELEASE support net/mlx4_en: remove NETDEV_TX_BUSY 3c59x: fix bad split of cpu_to_le32(pci_map_single()) net: bcmgenet: fix Tx ring priority programming ...
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/bpf.h155
-rw-r--r--include/uapi/linux/ethtool.h29
-rw-r--r--include/uapi/linux/fou.h39
-rw-r--r--include/uapi/linux/if_ether.h1
-rw-r--r--include/uapi/linux/if_link.h24
-rw-r--r--include/uapi/linux/if_tunnel.h17
-rw-r--r--include/uapi/linux/inet_diag.h13
-rw-r--r--include/uapi/linux/ip_vs.h3
-rw-r--r--include/uapi/linux/netfilter/ipset/ip_set.h12
-rw-r--r--include/uapi/linux/netfilter/nf_nat.h5
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h59
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_acct.h8
-rw-r--r--include/uapi/linux/netfilter/xt_set.h10
-rw-r--r--include/uapi/linux/netfilter_arp/arpt_mangle.h2
-rw-r--r--include/uapi/linux/nl80211.h116
-rw-r--r--include/uapi/linux/openvswitch.h31
-rw-r--r--include/uapi/linux/wil6210_uapi.h87
-rw-r--r--include/uapi/linux/xfrm.h7
19 files changed, 613 insertions, 6 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index be88166349a1..70e150ebc6c9 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -67,6 +67,7 @@ header-y += bfs_fs.h
67header-y += binfmts.h 67header-y += binfmts.h
68header-y += blkpg.h 68header-y += blkpg.h
69header-y += blktrace_api.h 69header-y += blktrace_api.h
70header-y += bpf.h
70header-y += bpqether.h 71header-y += bpqether.h
71header-y += bsg.h 72header-y += bsg.h
72header-y += btrfs.h 73header-y += btrfs.h
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
new file mode 100644
index 000000000000..31b0ac208a52
--- /dev/null
+++ b/include/uapi/linux/bpf.h
@@ -0,0 +1,155 @@
1/* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com
2 *
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of version 2 of the GNU General Public
5 * License as published by the Free Software Foundation.
6 */
7#ifndef _UAPI__LINUX_BPF_H__
8#define _UAPI__LINUX_BPF_H__
9
10#include <linux/types.h>
11
12/* Extended instruction set based on top of classic BPF */
13
14/* instruction classes */
15#define BPF_ALU64 0x07 /* alu mode in double word width */
16
17/* ld/ldx fields */
18#define BPF_DW 0x18 /* double word */
19#define BPF_XADD 0xc0 /* exclusive add */
20
21/* alu/jmp fields */
22#define BPF_MOV 0xb0 /* mov reg to reg */
23#define BPF_ARSH 0xc0 /* sign extending arithmetic shift right */
24
25/* change endianness of a register */
26#define BPF_END 0xd0 /* flags for endianness conversion: */
27#define BPF_TO_LE 0x00 /* convert to little-endian */
28#define BPF_TO_BE 0x08 /* convert to big-endian */
29#define BPF_FROM_LE BPF_TO_LE
30#define BPF_FROM_BE BPF_TO_BE
31
32#define BPF_JNE 0x50 /* jump != */
33#define BPF_JSGT 0x60 /* SGT is signed '>', GT in x86 */
34#define BPF_JSGE 0x70 /* SGE is signed '>=', GE in x86 */
35#define BPF_CALL 0x80 /* function call */
36#define BPF_EXIT 0x90 /* function return */
37
38/* Register numbers */
39enum {
40 BPF_REG_0 = 0,
41 BPF_REG_1,
42 BPF_REG_2,
43 BPF_REG_3,
44 BPF_REG_4,
45 BPF_REG_5,
46 BPF_REG_6,
47 BPF_REG_7,
48 BPF_REG_8,
49 BPF_REG_9,
50 BPF_REG_10,
51 __MAX_BPF_REG,
52};
53
54/* BPF has 10 general purpose 64-bit registers and stack frame. */
55#define MAX_BPF_REG __MAX_BPF_REG
56
57struct bpf_insn {
58 __u8 code; /* opcode */
59 __u8 dst_reg:4; /* dest register */
60 __u8 src_reg:4; /* source register */
61 __s16 off; /* signed offset */
62 __s32 imm; /* signed immediate constant */
63};
64
65/* BPF syscall commands */
66enum bpf_cmd {
67 /* create a map with given type and attributes
68 * fd = bpf(BPF_MAP_CREATE, union bpf_attr *, u32 size)
69 * returns fd or negative error
70 * map is deleted when fd is closed
71 */
72 BPF_MAP_CREATE,
73
74 /* lookup key in a given map
75 * err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size)
76 * Using attr->map_fd, attr->key, attr->value
77 * returns zero and stores found elem into value
78 * or negative error
79 */
80 BPF_MAP_LOOKUP_ELEM,
81
82 /* create or update key/value pair in a given map
83 * err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size)
84 * Using attr->map_fd, attr->key, attr->value
85 * returns zero or negative error
86 */
87 BPF_MAP_UPDATE_ELEM,
88
89 /* find and delete elem by key in a given map
90 * err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size)
91 * Using attr->map_fd, attr->key
92 * returns zero or negative error
93 */
94 BPF_MAP_DELETE_ELEM,
95
96 /* lookup key in a given map and return next key
97 * err = bpf(BPF_MAP_GET_NEXT_KEY, union bpf_attr *attr, u32 size)
98 * Using attr->map_fd, attr->key, attr->next_key
99 * returns zero and stores next key or negative error
100 */
101 BPF_MAP_GET_NEXT_KEY,
102
103 /* verify and load eBPF program
104 * prog_fd = bpf(BPF_PROG_LOAD, union bpf_attr *attr, u32 size)
105 * Using attr->prog_type, attr->insns, attr->license
106 * returns fd or negative error
107 */
108 BPF_PROG_LOAD,
109};
110
111enum bpf_map_type {
112 BPF_MAP_TYPE_UNSPEC,
113};
114
115enum bpf_prog_type {
116 BPF_PROG_TYPE_UNSPEC,
117};
118
119union bpf_attr {
120 struct { /* anonymous struct used by BPF_MAP_CREATE command */
121 __u32 map_type; /* one of enum bpf_map_type */
122 __u32 key_size; /* size of key in bytes */
123 __u32 value_size; /* size of value in bytes */
124 __u32 max_entries; /* max number of entries in a map */
125 };
126
127 struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
128 __u32 map_fd;
129 __aligned_u64 key;
130 union {
131 __aligned_u64 value;
132 __aligned_u64 next_key;
133 };
134 };
135
136 struct { /* anonymous struct used by BPF_PROG_LOAD command */
137 __u32 prog_type; /* one of enum bpf_prog_type */
138 __u32 insn_cnt;
139 __aligned_u64 insns;
140 __aligned_u64 license;
141 __u32 log_level; /* verbosity level of verifier */
142 __u32 log_size; /* size of user buffer */
143 __aligned_u64 log_buf; /* user supplied buffer */
144 };
145} __attribute__((aligned(8)));
146
147/* integer value in 'imm' field of BPF_CALL instruction selects which helper
148 * function eBPF program intends to call
149 */
150enum bpf_func_id {
151 BPF_FUNC_unspec,
152 __BPF_FUNC_MAX_ID,
153};
154
155#endif /* _UAPI__LINUX_BPF_H__ */
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index e3c7a719c76b..99b43056a6fe 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -209,6 +209,33 @@ struct ethtool_value {
209 __u32 data; 209 __u32 data;
210}; 210};
211 211
212enum tunable_id {
213 ETHTOOL_ID_UNSPEC,
214 ETHTOOL_RX_COPYBREAK,
215 ETHTOOL_TX_COPYBREAK,
216};
217
218enum tunable_type_id {
219 ETHTOOL_TUNABLE_UNSPEC,
220 ETHTOOL_TUNABLE_U8,
221 ETHTOOL_TUNABLE_U16,
222 ETHTOOL_TUNABLE_U32,
223 ETHTOOL_TUNABLE_U64,
224 ETHTOOL_TUNABLE_STRING,
225 ETHTOOL_TUNABLE_S8,
226 ETHTOOL_TUNABLE_S16,
227 ETHTOOL_TUNABLE_S32,
228 ETHTOOL_TUNABLE_S64,
229};
230
231struct ethtool_tunable {
232 __u32 cmd;
233 __u32 id;
234 __u32 type_id;
235 __u32 len;
236 void *data[0];
237};
238
212/** 239/**
213 * struct ethtool_regs - hardware register dump 240 * struct ethtool_regs - hardware register dump
214 * @cmd: Command number = %ETHTOOL_GREGS 241 * @cmd: Command number = %ETHTOOL_GREGS
@@ -1152,6 +1179,8 @@ enum ethtool_sfeatures_retval_bits {
1152 1179
1153#define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */ 1180#define ETHTOOL_GRSSH 0x00000046 /* Get RX flow hash configuration */
1154#define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */ 1181#define ETHTOOL_SRSSH 0x00000047 /* Set RX flow hash configuration */
1182#define ETHTOOL_GTUNABLE 0x00000048 /* Get tunable configuration */
1183#define ETHTOOL_STUNABLE 0x00000049 /* Set tunable configuration */
1155 1184
1156/* compatibility with older code */ 1185/* compatibility with older code */
1157#define SPARC_ETH_GSET ETHTOOL_GSET 1186#define SPARC_ETH_GSET ETHTOOL_GSET
diff --git a/include/uapi/linux/fou.h b/include/uapi/linux/fou.h
new file mode 100644
index 000000000000..8df06894da23
--- /dev/null
+++ b/include/uapi/linux/fou.h
@@ -0,0 +1,39 @@
1/* fou.h - FOU Interface */
2
3#ifndef _UAPI_LINUX_FOU_H
4#define _UAPI_LINUX_FOU_H
5
6/* NETLINK_GENERIC related info
7 */
8#define FOU_GENL_NAME "fou"
9#define FOU_GENL_VERSION 0x1
10
11enum {
12 FOU_ATTR_UNSPEC,
13 FOU_ATTR_PORT, /* u16 */
14 FOU_ATTR_AF, /* u8 */
15 FOU_ATTR_IPPROTO, /* u8 */
16 FOU_ATTR_TYPE, /* u8 */
17
18 __FOU_ATTR_MAX,
19};
20
21#define FOU_ATTR_MAX (__FOU_ATTR_MAX - 1)
22
23enum {
24 FOU_CMD_UNSPEC,
25 FOU_CMD_ADD,
26 FOU_CMD_DEL,
27
28 __FOU_CMD_MAX,
29};
30
31enum {
32 FOU_ENCAP_UNSPEC,
33 FOU_ENCAP_DIRECT,
34 FOU_ENCAP_GUE,
35};
36
37#define FOU_CMD_MAX (__FOU_CMD_MAX - 1)
38
39#endif /* _UAPI_LINUX_FOU_H */
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index 0f8210b8e0bc..aa63ed023c2b 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -128,6 +128,7 @@
128#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */ 128#define ETH_P_PHONET 0x00F5 /* Nokia Phonet frames */
129#define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ 129#define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */
130#define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */ 130#define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */
131#define ETH_P_XDSA 0x00F8 /* Multiplexed DSA protocol */
131 132
132/* 133/*
133 * This is an Ethernet frame header. 134 * This is an Ethernet frame header.
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index ff957604a721..0bdb77e16875 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -215,6 +215,18 @@ enum in6_addr_gen_mode {
215 IN6_ADDR_GEN_MODE_NONE, 215 IN6_ADDR_GEN_MODE_NONE,
216}; 216};
217 217
218/* Bridge section */
219
220enum {
221 IFLA_BR_UNSPEC,
222 IFLA_BR_FORWARD_DELAY,
223 IFLA_BR_HELLO_TIME,
224 IFLA_BR_MAX_AGE,
225 __IFLA_BR_MAX,
226};
227
228#define IFLA_BR_MAX (__IFLA_BR_MAX - 1)
229
218enum { 230enum {
219 BRIDGE_MODE_UNSPEC, 231 BRIDGE_MODE_UNSPEC,
220 BRIDGE_MODE_HAIRPIN, 232 BRIDGE_MODE_HAIRPIN,
@@ -291,6 +303,10 @@ enum {
291 IFLA_MACVLAN_UNSPEC, 303 IFLA_MACVLAN_UNSPEC,
292 IFLA_MACVLAN_MODE, 304 IFLA_MACVLAN_MODE,
293 IFLA_MACVLAN_FLAGS, 305 IFLA_MACVLAN_FLAGS,
306 IFLA_MACVLAN_MACADDR_MODE,
307 IFLA_MACVLAN_MACADDR,
308 IFLA_MACVLAN_MACADDR_DATA,
309 IFLA_MACVLAN_MACADDR_COUNT,
294 __IFLA_MACVLAN_MAX, 310 __IFLA_MACVLAN_MAX,
295}; 311};
296 312
@@ -301,6 +317,14 @@ enum macvlan_mode {
301 MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */ 317 MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */
302 MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */ 318 MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
303 MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */ 319 MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */
320 MACVLAN_MODE_SOURCE = 16,/* use source MAC address list to assign */
321};
322
323enum macvlan_macaddr_mode {
324 MACVLAN_MACADDR_ADD,
325 MACVLAN_MACADDR_DEL,
326 MACVLAN_MACADDR_FLUSH,
327 MACVLAN_MACADDR_SET,
304}; 328};
305 329
306#define MACVLAN_FLAG_NOPROMISC 1 330#define MACVLAN_FLAG_NOPROMISC 1
diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index 3bce9e9d9f7c..280d9e092283 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -53,10 +53,23 @@ enum {
53 IFLA_IPTUN_6RD_RELAY_PREFIX, 53 IFLA_IPTUN_6RD_RELAY_PREFIX,
54 IFLA_IPTUN_6RD_PREFIXLEN, 54 IFLA_IPTUN_6RD_PREFIXLEN,
55 IFLA_IPTUN_6RD_RELAY_PREFIXLEN, 55 IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
56 IFLA_IPTUN_ENCAP_TYPE,
57 IFLA_IPTUN_ENCAP_FLAGS,
58 IFLA_IPTUN_ENCAP_SPORT,
59 IFLA_IPTUN_ENCAP_DPORT,
56 __IFLA_IPTUN_MAX, 60 __IFLA_IPTUN_MAX,
57}; 61};
58#define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1) 62#define IFLA_IPTUN_MAX (__IFLA_IPTUN_MAX - 1)
59 63
64enum tunnel_encap_types {
65 TUNNEL_ENCAP_NONE,
66 TUNNEL_ENCAP_FOU,
67 TUNNEL_ENCAP_GUE,
68};
69
70#define TUNNEL_ENCAP_FLAG_CSUM (1<<0)
71#define TUNNEL_ENCAP_FLAG_CSUM6 (1<<1)
72
60/* SIT-mode i_flags */ 73/* SIT-mode i_flags */
61#define SIT_ISATAP 0x0001 74#define SIT_ISATAP 0x0001
62 75
@@ -94,6 +107,10 @@ enum {
94 IFLA_GRE_ENCAP_LIMIT, 107 IFLA_GRE_ENCAP_LIMIT,
95 IFLA_GRE_FLOWINFO, 108 IFLA_GRE_FLOWINFO,
96 IFLA_GRE_FLAGS, 109 IFLA_GRE_FLAGS,
110 IFLA_GRE_ENCAP_TYPE,
111 IFLA_GRE_ENCAP_FLAGS,
112 IFLA_GRE_ENCAP_SPORT,
113 IFLA_GRE_ENCAP_DPORT,
97 __IFLA_GRE_MAX, 114 __IFLA_GRE_MAX,
98}; 115};
99 116
diff --git a/include/uapi/linux/inet_diag.h b/include/uapi/linux/inet_diag.h
index bbde90fa5838..d65c0a09efd3 100644
--- a/include/uapi/linux/inet_diag.h
+++ b/include/uapi/linux/inet_diag.h
@@ -110,10 +110,10 @@ enum {
110 INET_DIAG_TCLASS, 110 INET_DIAG_TCLASS,
111 INET_DIAG_SKMEMINFO, 111 INET_DIAG_SKMEMINFO,
112 INET_DIAG_SHUTDOWN, 112 INET_DIAG_SHUTDOWN,
113 INET_DIAG_DCTCPINFO,
113}; 114};
114 115
115#define INET_DIAG_MAX INET_DIAG_SHUTDOWN 116#define INET_DIAG_MAX INET_DIAG_DCTCPINFO
116
117 117
118/* INET_DIAG_MEM */ 118/* INET_DIAG_MEM */
119 119
@@ -133,5 +133,14 @@ struct tcpvegas_info {
133 __u32 tcpv_minrtt; 133 __u32 tcpv_minrtt;
134}; 134};
135 135
136/* INET_DIAG_DCTCPINFO */
137
138struct tcp_dctcp_info {
139 __u16 dctcp_enabled;
140 __u16 dctcp_ce_state;
141 __u32 dctcp_alpha;
142 __u32 dctcp_ab_ecn;
143 __u32 dctcp_ab_tot;
144};
136 145
137#endif /* _UAPI_INET_DIAG_H_ */ 146#endif /* _UAPI_INET_DIAG_H_ */
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index fbcffe8041f7..cabe95d5b461 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -384,6 +384,9 @@ enum {
384 IPVS_DEST_ATTR_PERSIST_CONNS, /* persistent connections */ 384 IPVS_DEST_ATTR_PERSIST_CONNS, /* persistent connections */
385 385
386 IPVS_DEST_ATTR_STATS, /* nested attribute for dest stats */ 386 IPVS_DEST_ATTR_STATS, /* nested attribute for dest stats */
387
388 IPVS_DEST_ATTR_ADDR_FAMILY, /* Address family of address */
389
387 __IPVS_DEST_ATTR_MAX, 390 __IPVS_DEST_ATTR_MAX,
388}; 391};
389 392
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h
index 78c2f2e79920..ca03119111a2 100644
--- a/include/uapi/linux/netfilter/ipset/ip_set.h
+++ b/include/uapi/linux/netfilter/ipset/ip_set.h
@@ -115,6 +115,9 @@ enum {
115 IPSET_ATTR_BYTES, 115 IPSET_ATTR_BYTES,
116 IPSET_ATTR_PACKETS, 116 IPSET_ATTR_PACKETS,
117 IPSET_ATTR_COMMENT, 117 IPSET_ATTR_COMMENT,
118 IPSET_ATTR_SKBMARK,
119 IPSET_ATTR_SKBPRIO,
120 IPSET_ATTR_SKBQUEUE,
118 __IPSET_ATTR_ADT_MAX, 121 __IPSET_ATTR_ADT_MAX,
119}; 122};
120#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) 123#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
@@ -147,6 +150,7 @@ enum ipset_errno {
147 IPSET_ERR_COUNTER, 150 IPSET_ERR_COUNTER,
148 IPSET_ERR_COMMENT, 151 IPSET_ERR_COMMENT,
149 IPSET_ERR_INVALID_MARKMASK, 152 IPSET_ERR_INVALID_MARKMASK,
153 IPSET_ERR_SKBINFO,
150 154
151 /* Type specific error codes */ 155 /* Type specific error codes */
152 IPSET_ERR_TYPE_SPECIFIC = 4352, 156 IPSET_ERR_TYPE_SPECIFIC = 4352,
@@ -170,6 +174,12 @@ enum ipset_cmd_flags {
170 IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS), 174 IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS),
171 IPSET_FLAG_BIT_RETURN_NOMATCH = 7, 175 IPSET_FLAG_BIT_RETURN_NOMATCH = 7,
172 IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH), 176 IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH),
177 IPSET_FLAG_BIT_MAP_SKBMARK = 8,
178 IPSET_FLAG_MAP_SKBMARK = (1 << IPSET_FLAG_BIT_MAP_SKBMARK),
179 IPSET_FLAG_BIT_MAP_SKBPRIO = 9,
180 IPSET_FLAG_MAP_SKBPRIO = (1 << IPSET_FLAG_BIT_MAP_SKBPRIO),
181 IPSET_FLAG_BIT_MAP_SKBQUEUE = 10,
182 IPSET_FLAG_MAP_SKBQUEUE = (1 << IPSET_FLAG_BIT_MAP_SKBQUEUE),
173 IPSET_FLAG_CMD_MAX = 15, 183 IPSET_FLAG_CMD_MAX = 15,
174}; 184};
175 185
@@ -187,6 +197,8 @@ enum ipset_cadt_flags {
187 IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT), 197 IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT),
188 IPSET_FLAG_BIT_WITH_FORCEADD = 5, 198 IPSET_FLAG_BIT_WITH_FORCEADD = 5,
189 IPSET_FLAG_WITH_FORCEADD = (1 << IPSET_FLAG_BIT_WITH_FORCEADD), 199 IPSET_FLAG_WITH_FORCEADD = (1 << IPSET_FLAG_BIT_WITH_FORCEADD),
200 IPSET_FLAG_BIT_WITH_SKBINFO = 6,
201 IPSET_FLAG_WITH_SKBINFO = (1 << IPSET_FLAG_BIT_WITH_SKBINFO),
190 IPSET_FLAG_CADT_MAX = 15, 202 IPSET_FLAG_CADT_MAX = 15,
191}; 203};
192 204
diff --git a/include/uapi/linux/netfilter/nf_nat.h b/include/uapi/linux/netfilter/nf_nat.h
index 1ad3659102b6..0880781ad7b6 100644
--- a/include/uapi/linux/netfilter/nf_nat.h
+++ b/include/uapi/linux/netfilter/nf_nat.h
@@ -13,6 +13,11 @@
13#define NF_NAT_RANGE_PROTO_RANDOM_ALL \ 13#define NF_NAT_RANGE_PROTO_RANDOM_ALL \
14 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) 14 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
15 15
16#define NF_NAT_RANGE_MASK \
17 (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \
18 NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \
19 NF_NAT_RANGE_PROTO_RANDOM_FULLY)
20
16struct nf_nat_ipv4_range { 21struct nf_nat_ipv4_range {
17 unsigned int flags; 22 unsigned int flags;
18 __be32 min_ip; 23 __be32 min_ip;
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 801bdd1e56e3..c26df6787fb0 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -51,6 +51,8 @@ enum nft_verdicts {
51 * @NFT_MSG_NEWSETELEM: create a new set element (enum nft_set_elem_attributes) 51 * @NFT_MSG_NEWSETELEM: create a new set element (enum nft_set_elem_attributes)
52 * @NFT_MSG_GETSETELEM: get a set element (enum nft_set_elem_attributes) 52 * @NFT_MSG_GETSETELEM: get a set element (enum nft_set_elem_attributes)
53 * @NFT_MSG_DELSETELEM: delete a set element (enum nft_set_elem_attributes) 53 * @NFT_MSG_DELSETELEM: delete a set element (enum nft_set_elem_attributes)
54 * @NFT_MSG_NEWGEN: announce a new generation, only for events (enum nft_gen_attributes)
55 * @NFT_MSG_GETGEN: get the rule-set generation (enum nft_gen_attributes)
54 */ 56 */
55enum nf_tables_msg_types { 57enum nf_tables_msg_types {
56 NFT_MSG_NEWTABLE, 58 NFT_MSG_NEWTABLE,
@@ -68,6 +70,8 @@ enum nf_tables_msg_types {
68 NFT_MSG_NEWSETELEM, 70 NFT_MSG_NEWSETELEM,
69 NFT_MSG_GETSETELEM, 71 NFT_MSG_GETSETELEM,
70 NFT_MSG_DELSETELEM, 72 NFT_MSG_DELSETELEM,
73 NFT_MSG_NEWGEN,
74 NFT_MSG_GETGEN,
71 NFT_MSG_MAX, 75 NFT_MSG_MAX,
72}; 76};
73 77
@@ -571,6 +575,10 @@ enum nft_exthdr_attributes {
571 * @NFT_META_L4PROTO: layer 4 protocol number 575 * @NFT_META_L4PROTO: layer 4 protocol number
572 * @NFT_META_BRI_IIFNAME: packet input bridge interface name 576 * @NFT_META_BRI_IIFNAME: packet input bridge interface name
573 * @NFT_META_BRI_OIFNAME: packet output bridge interface name 577 * @NFT_META_BRI_OIFNAME: packet output bridge interface name
578 * @NFT_META_PKTTYPE: packet type (skb->pkt_type), special handling for loopback
579 * @NFT_META_CPU: cpu id through smp_processor_id()
580 * @NFT_META_IIFGROUP: packet input interface group
581 * @NFT_META_OIFGROUP: packet output interface group
574 */ 582 */
575enum nft_meta_keys { 583enum nft_meta_keys {
576 NFT_META_LEN, 584 NFT_META_LEN,
@@ -592,6 +600,10 @@ enum nft_meta_keys {
592 NFT_META_L4PROTO, 600 NFT_META_L4PROTO,
593 NFT_META_BRI_IIFNAME, 601 NFT_META_BRI_IIFNAME,
594 NFT_META_BRI_OIFNAME, 602 NFT_META_BRI_OIFNAME,
603 NFT_META_PKTTYPE,
604 NFT_META_CPU,
605 NFT_META_IIFGROUP,
606 NFT_META_OIFGROUP,
595}; 607};
596 608
597/** 609/**
@@ -737,13 +749,34 @@ enum nft_queue_attributes {
737 * 749 *
738 * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable 750 * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable
739 * @NFT_REJECT_TCP_RST: reject using TCP RST 751 * @NFT_REJECT_TCP_RST: reject using TCP RST
752 * @NFT_REJECT_ICMPX_UNREACH: abstracted ICMP unreachable for bridge and inet
740 */ 753 */
741enum nft_reject_types { 754enum nft_reject_types {
742 NFT_REJECT_ICMP_UNREACH, 755 NFT_REJECT_ICMP_UNREACH,
743 NFT_REJECT_TCP_RST, 756 NFT_REJECT_TCP_RST,
757 NFT_REJECT_ICMPX_UNREACH,
744}; 758};
745 759
746/** 760/**
761 * enum nft_reject_code - Generic reject codes for IPv4/IPv6
762 *
763 * @NFT_REJECT_ICMPX_NO_ROUTE: no route to host / network unreachable
764 * @NFT_REJECT_ICMPX_PORT_UNREACH: port unreachable
765 * @NFT_REJECT_ICMPX_HOST_UNREACH: host unreachable
766 * @NFT_REJECT_ICMPX_ADMIN_PROHIBITED: administratively prohibited
767 *
768 * These codes are mapped to real ICMP and ICMPv6 codes.
769 */
770enum nft_reject_inet_code {
771 NFT_REJECT_ICMPX_NO_ROUTE = 0,
772 NFT_REJECT_ICMPX_PORT_UNREACH,
773 NFT_REJECT_ICMPX_HOST_UNREACH,
774 NFT_REJECT_ICMPX_ADMIN_PROHIBITED,
775 __NFT_REJECT_ICMPX_MAX
776};
777#define NFT_REJECT_ICMPX_MAX (__NFT_REJECT_ICMPX_MAX + 1)
778
779/**
747 * enum nft_reject_attributes - nf_tables reject expression netlink attributes 780 * enum nft_reject_attributes - nf_tables reject expression netlink attributes
748 * 781 *
749 * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types) 782 * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types)
@@ -777,6 +810,7 @@ enum nft_nat_types {
777 * @NFTA_NAT_REG_ADDR_MAX: source register of address range end (NLA_U32: nft_registers) 810 * @NFTA_NAT_REG_ADDR_MAX: source register of address range end (NLA_U32: nft_registers)
778 * @NFTA_NAT_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers) 811 * @NFTA_NAT_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers)
779 * @NFTA_NAT_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers) 812 * @NFTA_NAT_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers)
813 * @NFTA_NAT_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
780 */ 814 */
781enum nft_nat_attributes { 815enum nft_nat_attributes {
782 NFTA_NAT_UNSPEC, 816 NFTA_NAT_UNSPEC,
@@ -786,8 +820,33 @@ enum nft_nat_attributes {
786 NFTA_NAT_REG_ADDR_MAX, 820 NFTA_NAT_REG_ADDR_MAX,
787 NFTA_NAT_REG_PROTO_MIN, 821 NFTA_NAT_REG_PROTO_MIN,
788 NFTA_NAT_REG_PROTO_MAX, 822 NFTA_NAT_REG_PROTO_MAX,
823 NFTA_NAT_FLAGS,
789 __NFTA_NAT_MAX 824 __NFTA_NAT_MAX
790}; 825};
791#define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1) 826#define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1)
792 827
828/**
829 * enum nft_masq_attributes - nf_tables masquerade expression attributes
830 *
831 * @NFTA_MASQ_FLAGS: NAT flags (see NF_NAT_RANGE_* in linux/netfilter/nf_nat.h) (NLA_U32)
832 */
833enum nft_masq_attributes {
834 NFTA_MASQ_UNSPEC,
835 NFTA_MASQ_FLAGS,
836 __NFTA_MASQ_MAX
837};
838#define NFTA_MASQ_MAX (__NFTA_MASQ_MAX - 1)
839
840/**
841 * enum nft_gen_attributes - nf_tables ruleset generation attributes
842 *
843 * @NFTA_GEN_ID: Ruleset generation ID (NLA_U32)
844 */
845enum nft_gen_attributes {
846 NFTA_GEN_UNSPEC,
847 NFTA_GEN_ID,
848 __NFTA_GEN_MAX
849};
850#define NFTA_GEN_MAX (__NFTA_GEN_MAX - 1)
851
793#endif /* _LINUX_NF_TABLES_H */ 852#endif /* _LINUX_NF_TABLES_H */
diff --git a/include/uapi/linux/netfilter/nfnetlink_acct.h b/include/uapi/linux/netfilter/nfnetlink_acct.h
index 51404ec19022..f3e34dbbf966 100644
--- a/include/uapi/linux/netfilter/nfnetlink_acct.h
+++ b/include/uapi/linux/netfilter/nfnetlink_acct.h
@@ -28,9 +28,17 @@ enum nfnl_acct_type {
28 NFACCT_USE, 28 NFACCT_USE,
29 NFACCT_FLAGS, 29 NFACCT_FLAGS,
30 NFACCT_QUOTA, 30 NFACCT_QUOTA,
31 NFACCT_FILTER,
31 __NFACCT_MAX 32 __NFACCT_MAX
32}; 33};
33#define NFACCT_MAX (__NFACCT_MAX - 1) 34#define NFACCT_MAX (__NFACCT_MAX - 1)
34 35
36enum nfnl_attr_filter_type {
37 NFACCT_FILTER_UNSPEC,
38 NFACCT_FILTER_MASK,
39 NFACCT_FILTER_VALUE,
40 __NFACCT_FILTER_MAX
41};
42#define NFACCT_FILTER_MAX (__NFACCT_FILTER_MAX - 1)
35 43
36#endif /* _UAPI_NFNL_ACCT_H_ */ 44#endif /* _UAPI_NFNL_ACCT_H_ */
diff --git a/include/uapi/linux/netfilter/xt_set.h b/include/uapi/linux/netfilter/xt_set.h
index 964d3d42f874..d6a1df1f2947 100644
--- a/include/uapi/linux/netfilter/xt_set.h
+++ b/include/uapi/linux/netfilter/xt_set.h
@@ -71,4 +71,14 @@ struct xt_set_info_match_v3 {
71 __u32 flags; 71 __u32 flags;
72}; 72};
73 73
74/* Revision 3 target */
75
76struct xt_set_info_target_v3 {
77 struct xt_set_info add_set;
78 struct xt_set_info del_set;
79 struct xt_set_info map_set;
80 __u32 flags;
81 __u32 timeout;
82};
83
74#endif /*_XT_SET_H*/ 84#endif /*_XT_SET_H*/
diff --git a/include/uapi/linux/netfilter_arp/arpt_mangle.h b/include/uapi/linux/netfilter_arp/arpt_mangle.h
index 250f502902bb..8c2b16a1f5a0 100644
--- a/include/uapi/linux/netfilter_arp/arpt_mangle.h
+++ b/include/uapi/linux/netfilter_arp/arpt_mangle.h
@@ -13,7 +13,7 @@ struct arpt_mangle
13 union { 13 union {
14 struct in_addr tgt_ip; 14 struct in_addr tgt_ip;
15 } u_t; 15 } u_t;
16 u_int8_t flags; 16 __u8 flags;
17 int target; 17 int target;
18}; 18};
19 19
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f1db15b9c041..4b28dc07bcb1 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -722,6 +722,22 @@
722 * QoS mapping is relevant for IP packets, it is only valid during an 722 * QoS mapping is relevant for IP packets, it is only valid during an
723 * association. This is cleared on disassociation and AP restart. 723 * association. This is cleared on disassociation and AP restart.
724 * 724 *
725 * @NL80211_CMD_ADD_TX_TS: Ask the kernel to add a traffic stream for the given
726 * %NL80211_ATTR_TSID and %NL80211_ATTR_MAC with %NL80211_ATTR_USER_PRIO
727 * and %NL80211_ATTR_ADMITTED_TIME parameters.
728 * Note that the action frame handshake with the AP shall be handled by
729 * userspace via the normal management RX/TX framework, this only sets
730 * up the TX TS in the driver/device.
731 * If the admitted time attribute is not added then the request just checks
732 * if a subsequent setup could be successful, the intent is to use this to
733 * avoid setting up a session with the AP when local restrictions would
734 * make that impossible. However, the subsequent "real" setup may still
735 * fail even if the check was successful.
736 * @NL80211_CMD_DEL_TX_TS: Remove an existing TS with the %NL80211_ATTR_TSID
737 * and %NL80211_ATTR_MAC parameters. It isn't necessary to call this
738 * before removing a station entry entirely, or before disassociating
739 * or similar, cleanup will happen in the driver/device in this case.
740 *
725 * @NL80211_CMD_MAX: highest used command number 741 * @NL80211_CMD_MAX: highest used command number
726 * @__NL80211_CMD_AFTER_LAST: internal use 742 * @__NL80211_CMD_AFTER_LAST: internal use
727 */ 743 */
@@ -893,6 +909,9 @@ enum nl80211_commands {
893 909
894 NL80211_CMD_SET_QOS_MAP, 910 NL80211_CMD_SET_QOS_MAP,
895 911
912 NL80211_CMD_ADD_TX_TS,
913 NL80211_CMD_DEL_TX_TS,
914
896 /* add new commands above here */ 915 /* add new commands above here */
897 916
898 /* used to define NL80211_CMD_MAX below */ 917 /* used to define NL80211_CMD_MAX below */
@@ -1594,6 +1613,31 @@ enum nl80211_commands {
1594 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is 1613 * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
1595 * the TDLS link initiator. 1614 * the TDLS link initiator.
1596 * 1615 *
1616 * @NL80211_ATTR_USE_RRM: flag for indicating whether the current connection
1617 * shall support Radio Resource Measurements (11k). This attribute can be
1618 * used with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests.
1619 * User space applications are expected to use this flag only if the
1620 * underlying device supports these minimal RRM features:
1621 * %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES,
1622 * %NL80211_FEATURE_QUIET,
1623 * If this flag is used, driver must add the Power Capabilities IE to the
1624 * association request. In addition, it must also set the RRM capability
1625 * flag in the association request's Capability Info field.
1626 *
1627 * @NL80211_ATTR_WIPHY_DYN_ACK: flag attribute used to enable ACK timeout
1628 * estimation algorithm (dynack). In order to activate dynack
1629 * %NL80211_FEATURE_ACKTO_ESTIMATION feature flag must be set by lower
1630 * drivers to indicate dynack capability. Dynack is automatically disabled
1631 * setting valid value for coverage class.
1632 *
1633 * @NL80211_ATTR_TSID: a TSID value (u8 attribute)
1634 * @NL80211_ATTR_USER_PRIO: user priority value (u8 attribute)
1635 * @NL80211_ATTR_ADMITTED_TIME: admitted time in units of 32 microseconds
1636 * (per second) (u16 attribute)
1637 *
1638 * @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see
1639 * &enum nl80211_smps_mode.
1640 *
1597 * @NL80211_ATTR_MAX: highest attribute number currently defined 1641 * @NL80211_ATTR_MAX: highest attribute number currently defined
1598 * @__NL80211_ATTR_AFTER_LAST: internal use 1642 * @__NL80211_ATTR_AFTER_LAST: internal use
1599 */ 1643 */
@@ -1936,6 +1980,16 @@ enum nl80211_attrs {
1936 1980
1937 NL80211_ATTR_TDLS_INITIATOR, 1981 NL80211_ATTR_TDLS_INITIATOR,
1938 1982
1983 NL80211_ATTR_USE_RRM,
1984
1985 NL80211_ATTR_WIPHY_DYN_ACK,
1986
1987 NL80211_ATTR_TSID,
1988 NL80211_ATTR_USER_PRIO,
1989 NL80211_ATTR_ADMITTED_TIME,
1990
1991 NL80211_ATTR_SMPS_MODE,
1992
1939 /* add attributes here, update the policy in nl80211.c */ 1993 /* add attributes here, update the policy in nl80211.c */
1940 1994
1941 __NL80211_ATTR_AFTER_LAST, 1995 __NL80211_ATTR_AFTER_LAST,
@@ -3055,14 +3109,20 @@ enum nl80211_bss_scan_width {
3055 * @NL80211_BSS_BSSID: BSSID of the BSS (6 octets) 3109 * @NL80211_BSS_BSSID: BSSID of the BSS (6 octets)
3056 * @NL80211_BSS_FREQUENCY: frequency in MHz (u32) 3110 * @NL80211_BSS_FREQUENCY: frequency in MHz (u32)
3057 * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64) 3111 * @NL80211_BSS_TSF: TSF of the received probe response/beacon (u64)
3112 * (if @NL80211_BSS_PRESP_DATA is present then this is known to be
3113 * from a probe response, otherwise it may be from the same beacon
3114 * that the NL80211_BSS_BEACON_TSF will be from)
3058 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) 3115 * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16)
3059 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) 3116 * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16)
3060 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the 3117 * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the
3061 * raw information elements from the probe response/beacon (bin); 3118 * raw information elements from the probe response/beacon (bin);
3062 * if the %NL80211_BSS_BEACON_IES attribute is present, the IEs here are 3119 * if the %NL80211_BSS_BEACON_IES attribute is present and the data is
3063 * from a Probe Response frame; otherwise they are from a Beacon frame. 3120 * different then the IEs here are from a Probe Response frame; otherwise
3121 * they are from a Beacon frame.
3064 * However, if the driver does not indicate the source of the IEs, these 3122 * However, if the driver does not indicate the source of the IEs, these
3065 * IEs may be from either frame subtype. 3123 * IEs may be from either frame subtype.
3124 * If present, the @NL80211_BSS_PRESP_DATA attribute indicates that the
3125 * data here is known to be from a probe response, without any heuristics.
3066 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon 3126 * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon
3067 * in mBm (100 * dBm) (s32) 3127 * in mBm (100 * dBm) (s32)
3068 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon 3128 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
@@ -3074,6 +3134,10 @@ enum nl80211_bss_scan_width {
3074 * yet been received 3134 * yet been received
3075 * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel 3135 * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel
3076 * (u32, enum nl80211_bss_scan_width) 3136 * (u32, enum nl80211_bss_scan_width)
3137 * @NL80211_BSS_BEACON_TSF: TSF of the last received beacon (u64)
3138 * (not present if no beacon frame has been received yet)
3139 * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and
3140 * @NL80211_BSS_TSF is known to be from a probe response (flag attribute)
3077 * @__NL80211_BSS_AFTER_LAST: internal 3141 * @__NL80211_BSS_AFTER_LAST: internal
3078 * @NL80211_BSS_MAX: highest BSS attribute 3142 * @NL80211_BSS_MAX: highest BSS attribute
3079 */ 3143 */
@@ -3091,6 +3155,8 @@ enum nl80211_bss {
3091 NL80211_BSS_SEEN_MS_AGO, 3155 NL80211_BSS_SEEN_MS_AGO,
3092 NL80211_BSS_BEACON_IES, 3156 NL80211_BSS_BEACON_IES,
3093 NL80211_BSS_CHAN_WIDTH, 3157 NL80211_BSS_CHAN_WIDTH,
3158 NL80211_BSS_BEACON_TSF,
3159 NL80211_BSS_PRESP_DATA,
3094 3160
3095 /* keep last */ 3161 /* keep last */
3096 __NL80211_BSS_AFTER_LAST, 3162 __NL80211_BSS_AFTER_LAST,
@@ -3956,6 +4022,26 @@ enum nl80211_ap_sme_features {
3956 * @NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE: This driver supports dynamic 4022 * @NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE: This driver supports dynamic
3957 * channel bandwidth change (e.g., HT 20 <-> 40 MHz channel) during the 4023 * channel bandwidth change (e.g., HT 20 <-> 40 MHz channel) during the
3958 * lifetime of a BSS. 4024 * lifetime of a BSS.
4025 * @NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES: This device adds a DS Parameter
4026 * Set IE to probe requests.
4027 * @NL80211_FEATURE_WFA_TPC_IE_IN_PROBES: This device adds a WFA TPC Report IE
4028 * to probe requests.
4029 * @NL80211_FEATURE_QUIET: This device, in client mode, supports Quiet Period
4030 * requests sent to it by an AP.
4031 * @NL80211_FEATURE_TX_POWER_INSERTION: This device is capable of inserting the
4032 * current tx power value into the TPC Report IE in the spectrum
4033 * management TPC Report action frame, and in the Radio Measurement Link
4034 * Measurement Report action frame.
4035 * @NL80211_FEATURE_ACKTO_ESTIMATION: This driver supports dynamic ACK timeout
4036 * estimation (dynack). %NL80211_ATTR_WIPHY_DYN_ACK flag attribute is used
4037 * to enable dynack.
4038 * @NL80211_FEATURE_STATIC_SMPS: Device supports static spatial
4039 * multiplexing powersave, ie. can turn off all but one chain
4040 * even on HT connections that should be using more chains.
4041 * @NL80211_FEATURE_DYNAMIC_SMPS: Device supports dynamic spatial
4042 * multiplexing powersave, ie. can turn off all but one chain
4043 * and then wake the rest up as required after, for example,
4044 * rts/cts handshake.
3959 */ 4045 */
3960enum nl80211_feature_flags { 4046enum nl80211_feature_flags {
3961 NL80211_FEATURE_SK_TX_STATUS = 1 << 0, 4047 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3977,6 +4063,13 @@ enum nl80211_feature_flags {
3977 NL80211_FEATURE_USERSPACE_MPM = 1 << 16, 4063 NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
3978 NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17, 4064 NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17,
3979 NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 1 << 18, 4065 NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 1 << 18,
4066 NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES = 1 << 19,
4067 NL80211_FEATURE_WFA_TPC_IE_IN_PROBES = 1 << 20,
4068 NL80211_FEATURE_QUIET = 1 << 21,
4069 NL80211_FEATURE_TX_POWER_INSERTION = 1 << 22,
4070 NL80211_FEATURE_ACKTO_ESTIMATION = 1 << 23,
4071 NL80211_FEATURE_STATIC_SMPS = 1 << 24,
4072 NL80211_FEATURE_DYNAMIC_SMPS = 1 << 25,
3980}; 4073};
3981 4074
3982/** 4075/**
@@ -4051,6 +4144,25 @@ enum nl80211_acl_policy {
4051}; 4144};
4052 4145
4053/** 4146/**
4147 * enum nl80211_smps_mode - SMPS mode
4148 *
4149 * Requested SMPS mode (for AP mode)
4150 *
4151 * @NL80211_SMPS_OFF: SMPS off (use all antennas).
4152 * @NL80211_SMPS_STATIC: static SMPS (use a single antenna)
4153 * @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and
4154 * turn on other antennas after CTS/RTS).
4155 */
4156enum nl80211_smps_mode {
4157 NL80211_SMPS_OFF,
4158 NL80211_SMPS_STATIC,
4159 NL80211_SMPS_DYNAMIC,
4160
4161 __NL80211_SMPS_AFTER_LAST,
4162 NL80211_SMPS_MAX = __NL80211_SMPS_AFTER_LAST - 1
4163};
4164
4165/**
4054 * enum nl80211_radar_event - type of radar event for DFS operation 4166 * enum nl80211_radar_event - type of radar event for DFS operation
4055 * 4167 *
4056 * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace 4168 * Type of event to be used with NL80211_ATTR_RADAR_EVENT to inform userspace
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index a794d1dd7b40..435eabc5ffaa 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -192,6 +192,7 @@ enum ovs_vport_type {
192 OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ 192 OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */
193 OVS_VPORT_TYPE_GRE, /* GRE tunnel. */ 193 OVS_VPORT_TYPE_GRE, /* GRE tunnel. */
194 OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */ 194 OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */
195 OVS_VPORT_TYPE_GENEVE, /* Geneve tunnel. */
195 __OVS_VPORT_TYPE_MAX 196 __OVS_VPORT_TYPE_MAX
196}; 197};
197 198
@@ -289,9 +290,12 @@ enum ovs_key_attr {
289 OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ 290 OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */
290 OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ 291 OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */
291 OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */ 292 OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */
293 OVS_KEY_ATTR_DP_HASH, /* u32 hash value. Value 0 indicates the hash
294 is not computed by the datapath. */
295 OVS_KEY_ATTR_RECIRC_ID, /* u32 recirc id */
292 296
293#ifdef __KERNEL__ 297#ifdef __KERNEL__
294 OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ 298 OVS_KEY_ATTR_TUNNEL_INFO, /* struct ovs_tunnel_info */
295#endif 299#endif
296 __OVS_KEY_ATTR_MAX 300 __OVS_KEY_ATTR_MAX
297}; 301};
@@ -306,6 +310,8 @@ enum ovs_tunnel_key_attr {
306 OVS_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */ 310 OVS_TUNNEL_KEY_ATTR_TTL, /* u8 Tunnel IP TTL. */
307 OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */ 311 OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT, /* No argument, set DF. */
308 OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */ 312 OVS_TUNNEL_KEY_ATTR_CSUM, /* No argument. CSUM packet. */
313 OVS_TUNNEL_KEY_ATTR_OAM, /* No argument. OAM frame. */
314 OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS, /* Array of Geneve options. */
309 __OVS_TUNNEL_KEY_ATTR_MAX 315 __OVS_TUNNEL_KEY_ATTR_MAX
310}; 316};
311 317
@@ -493,6 +499,27 @@ struct ovs_action_push_vlan {
493 __be16 vlan_tci; /* 802.1Q TCI (VLAN ID and priority). */ 499 __be16 vlan_tci; /* 802.1Q TCI (VLAN ID and priority). */
494}; 500};
495 501
502/* Data path hash algorithm for computing Datapath hash.
503 *
504 * The algorithm type only specifies the fields in a flow
505 * will be used as part of the hash. Each datapath is free
506 * to use its own hash algorithm. The hash value will be
507 * opaque to the user space daemon.
508 */
509enum ovs_hash_alg {
510 OVS_HASH_ALG_L4,
511};
512
513/*
514 * struct ovs_action_hash - %OVS_ACTION_ATTR_HASH action argument.
515 * @hash_alg: Algorithm used to compute hash prior to recirculation.
516 * @hash_basis: basis used for computing hash.
517 */
518struct ovs_action_hash {
519 uint32_t hash_alg; /* One of ovs_hash_alg. */
520 uint32_t hash_basis;
521};
522
496/** 523/**
497 * enum ovs_action_attr - Action types. 524 * enum ovs_action_attr - Action types.
498 * 525 *
@@ -521,6 +548,8 @@ enum ovs_action_attr {
521 OVS_ACTION_ATTR_PUSH_VLAN, /* struct ovs_action_push_vlan. */ 548 OVS_ACTION_ATTR_PUSH_VLAN, /* struct ovs_action_push_vlan. */
522 OVS_ACTION_ATTR_POP_VLAN, /* No argument. */ 549 OVS_ACTION_ATTR_POP_VLAN, /* No argument. */
523 OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */ 550 OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */
551 OVS_ACTION_ATTR_RECIRC, /* u32 recirc_id. */
552 OVS_ACTION_ATTR_HASH, /* struct ovs_action_hash. */
524 __OVS_ACTION_ATTR_MAX 553 __OVS_ACTION_ATTR_MAX
525}; 554};
526 555
diff --git a/include/uapi/linux/wil6210_uapi.h b/include/uapi/linux/wil6210_uapi.h
new file mode 100644
index 000000000000..6a3cddd156c4
--- /dev/null
+++ b/include/uapi/linux/wil6210_uapi.h
@@ -0,0 +1,87 @@
1/*
2 * Copyright (c) 2014 Qualcomm Atheros, Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#ifndef __WIL6210_UAPI_H__
18#define __WIL6210_UAPI_H__
19
20#if !defined(__KERNEL__)
21#define __user
22#endif
23
24#include <linux/sockios.h>
25
26/* Numbers SIOCDEVPRIVATE and SIOCDEVPRIVATE + 1
27 * are used by Android devices to implement PNO (preferred network offload).
28 * Albeit it is temporary solution, use different numbers to avoid conflicts
29 */
30
31/**
32 * Perform 32-bit I/O operation to the card memory
33 *
34 * User code should arrange data in memory like this:
35 *
36 * struct wil_memio io;
37 * struct ifreq ifr = {
38 * .ifr_data = &io,
39 * };
40 */
41#define WIL_IOCTL_MEMIO (SIOCDEVPRIVATE + 2)
42
43/**
44 * Perform block I/O operation to the card memory
45 *
46 * User code should arrange data in memory like this:
47 *
48 * void *buf;
49 * struct wil_memio_block io = {
50 * .block = buf,
51 * };
52 * struct ifreq ifr = {
53 * .ifr_data = &io,
54 * };
55 */
56#define WIL_IOCTL_MEMIO_BLOCK (SIOCDEVPRIVATE + 3)
57
58/**
59 * operation to perform
60 *
61 * @wil_mmio_op_mask - bits defining operation,
62 * @wil_mmio_addr_mask - bits defining addressing mode
63 */
64enum wil_memio_op {
65 wil_mmio_read = 0,
66 wil_mmio_write = 1,
67 wil_mmio_op_mask = 0xff,
68 wil_mmio_addr_linker = 0 << 8,
69 wil_mmio_addr_ahb = 1 << 8,
70 wil_mmio_addr_bar = 2 << 8,
71 wil_mmio_addr_mask = 0xff00,
72};
73
74struct wil_memio {
75 uint32_t op; /* enum wil_memio_op */
76 uint32_t addr; /* should be 32-bit aligned */
77 uint32_t val;
78};
79
80struct wil_memio_block {
81 uint32_t op; /* enum wil_memio_op */
82 uint32_t addr; /* should be 32-bit aligned */
83 uint32_t size; /* should be multiple of 4 */
84 void __user *block; /* block address */
85};
86
87#endif /* __WIL6210_UAPI_H__ */
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index 25e5dd916ba4..02d5125a5ee8 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -328,6 +328,8 @@ enum xfrm_spdattr_type_t {
328 XFRMA_SPD_UNSPEC, 328 XFRMA_SPD_UNSPEC,
329 XFRMA_SPD_INFO, 329 XFRMA_SPD_INFO,
330 XFRMA_SPD_HINFO, 330 XFRMA_SPD_HINFO,
331 XFRMA_SPD_IPV4_HTHRESH,
332 XFRMA_SPD_IPV6_HTHRESH,
331 __XFRMA_SPD_MAX 333 __XFRMA_SPD_MAX
332 334
333#define XFRMA_SPD_MAX (__XFRMA_SPD_MAX - 1) 335#define XFRMA_SPD_MAX (__XFRMA_SPD_MAX - 1)
@@ -347,6 +349,11 @@ struct xfrmu_spdhinfo {
347 __u32 spdhmcnt; 349 __u32 spdhmcnt;
348}; 350};
349 351
352struct xfrmu_spdhthresh {
353 __u8 lbits;
354 __u8 rbits;
355};
356
350struct xfrm_usersa_info { 357struct xfrm_usersa_info {
351 struct xfrm_selector sel; 358 struct xfrm_selector sel;
352 struct xfrm_id id; 359 struct xfrm_id id;