aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/Kbuild2
-rw-r--r--include/uapi/linux/auxvec.h1
-rw-r--r--include/uapi/linux/caif/caif_socket.h2
-rw-r--r--include/uapi/linux/caif/if_caif.h2
-rw-r--r--include/uapi/linux/cn_proc.h10
-rw-r--r--include/uapi/linux/connector.h5
-rw-r--r--include/uapi/linux/dvb/dmx.h2
-rw-r--r--include/uapi/linux/elf.h1
-rw-r--r--include/uapi/linux/filter.h3
-rw-r--r--include/uapi/linux/fs.h1
-rw-r--r--include/uapi/linux/fuse.h7
-rw-r--r--include/uapi/linux/if_cablemodem.h12
-rw-r--r--include/uapi/linux/if_ether.h3
-rw-r--r--include/uapi/linux/if_link.h7
-rw-r--r--include/uapi/linux/if_packet.h29
-rw-r--r--include/uapi/linux/input.h5
-rw-r--r--include/uapi/linux/ip_vs.h4
-rw-r--r--include/uapi/linux/kvm.h45
-rw-r--r--include/uapi/linux/magic.h2
-rw-r--r--include/uapi/linux/media.h2
-rw-r--r--include/uapi/linux/neighbour.h3
-rw-r--r--include/uapi/linux/netfilter/ipset/ip_set.h36
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_queue.h10
-rw-r--r--include/uapi/linux/netfilter/xt_NFQUEUE.h9
-rw-r--r--include/uapi/linux/netfilter/xt_set.h9
-rw-r--r--include/uapi/linux/netfilter_ipv6/ip6t_frag.h4
-rw-r--r--include/uapi/linux/netlink.h34
-rw-r--r--include/uapi/linux/netlink_diag.h52
-rw-r--r--include/uapi/linux/nfc.h19
-rw-r--r--include/uapi/linux/nl80211.h156
-rw-r--r--include/uapi/linux/openvswitch.h456
-rw-r--r--include/uapi/linux/packet_diag.h5
-rw-r--r--include/uapi/linux/pci_regs.h30
-rw-r--r--include/uapi/linux/perf_event.h71
-rw-r--r--include/uapi/linux/pkt_sched.h1
-rw-r--r--include/uapi/linux/ptrace.h12
-rw-r--r--include/uapi/linux/rfkill.h2
-rw-r--r--include/uapi/linux/sctp.h846
-rw-r--r--include/uapi/linux/snmp.h8
-rw-r--r--include/uapi/linux/tcp.h26
-rw-r--r--include/uapi/linux/time.h6
-rw-r--r--include/uapi/linux/usb/cdc-wdm.h21
-rw-r--r--include/uapi/linux/usb/ch9.h4
-rw-r--r--include/uapi/linux/v4l2-controls.h28
-rw-r--r--include/uapi/linux/v4l2-dv-timings.h18
-rw-r--r--include/uapi/linux/v4l2-mediabus.h6
-rw-r--r--include/uapi/linux/vfio.h1
-rw-r--r--include/uapi/linux/vhost.h28
-rw-r--r--include/uapi/linux/videodev2.h111
-rw-r--r--include/uapi/linux/virtio_balloon.h4
-rw-r--r--include/uapi/linux/virtio_ids.h1
-rw-r--r--include/uapi/linux/virtio_net.h2
-rw-r--r--include/uapi/linux/vm_sockets.h23
-rw-r--r--include/uapi/linux/xfrm.h3
54 files changed, 1986 insertions, 204 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 5c8a1d25e21c..ab5d4992e568 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -285,6 +285,7 @@ header-y += nvram.h
285header-y += omap3isp.h 285header-y += omap3isp.h
286header-y += omapfb.h 286header-y += omapfb.h
287header-y += oom.h 287header-y += oom.h
288header-y += openvswitch.h
288header-y += packet_diag.h 289header-y += packet_diag.h
289header-y += param.h 290header-y += param.h
290header-y += parport.h 291header-y += parport.h
@@ -331,6 +332,7 @@ header-y += rtnetlink.h
331header-y += scc.h 332header-y += scc.h
332header-y += sched.h 333header-y += sched.h
333header-y += screen_info.h 334header-y += screen_info.h
335header-y += sctp.h
334header-y += sdla.h 336header-y += sdla.h
335header-y += seccomp.h 337header-y += seccomp.h
336header-y += securebits.h 338header-y += securebits.h
diff --git a/include/uapi/linux/auxvec.h b/include/uapi/linux/auxvec.h
index 61594d598e7b..835c065cc7e1 100644
--- a/include/uapi/linux/auxvec.h
+++ b/include/uapi/linux/auxvec.h
@@ -28,6 +28,7 @@
28#define AT_BASE_PLATFORM 24 /* string identifying real platform, may 28#define AT_BASE_PLATFORM 24 /* string identifying real platform, may
29 * differ from AT_PLATFORM. */ 29 * differ from AT_PLATFORM. */
30#define AT_RANDOM 25 /* address of 16 random bytes */ 30#define AT_RANDOM 25 /* address of 16 random bytes */
31#define AT_HWCAP2 26 /* extension of AT_HWCAP */
31 32
32#define AT_EXECFN 31 /* filename of program */ 33#define AT_EXECFN 31 /* filename of program */
33 34
diff --git a/include/uapi/linux/caif/caif_socket.h b/include/uapi/linux/caif/caif_socket.h
index 3f3bac6af7bc..586e9f98184f 100644
--- a/include/uapi/linux/caif/caif_socket.h
+++ b/include/uapi/linux/caif/caif_socket.h
@@ -1,7 +1,7 @@
1/* linux/caif_socket.h 1/* linux/caif_socket.h
2 * CAIF Definitions for CAIF socket and network layer 2 * CAIF Definitions for CAIF socket and network layer
3 * Copyright (C) ST-Ericsson AB 2010 3 * Copyright (C) ST-Ericsson AB 2010
4 * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com 4 * Author: Sjur Brendeland
5 * License terms: GNU General Public License (GPL) version 2 5 * License terms: GNU General Public License (GPL) version 2
6 */ 6 */
7 7
diff --git a/include/uapi/linux/caif/if_caif.h b/include/uapi/linux/caif/if_caif.h
index 5e7eed4edf51..7618aabe8c6b 100644
--- a/include/uapi/linux/caif/if_caif.h
+++ b/include/uapi/linux/caif/if_caif.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (C) ST-Ericsson AB 2010 2 * Copyright (C) ST-Ericsson AB 2010
3 * Author: Sjur Brendeland/ sjur.brandeland@stericsson.com 3 * Author: Sjur Brendeland
4 * License terms: GNU General Public License (GPL) version 2 4 * License terms: GNU General Public License (GPL) version 2
5 */ 5 */
6 6
diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h
index 0d7b49973bb3..f6c271035bbd 100644
--- a/include/uapi/linux/cn_proc.h
+++ b/include/uapi/linux/cn_proc.h
@@ -56,7 +56,9 @@ struct proc_event {
56 PROC_EVENT_PTRACE = 0x00000100, 56 PROC_EVENT_PTRACE = 0x00000100,
57 PROC_EVENT_COMM = 0x00000200, 57 PROC_EVENT_COMM = 0x00000200,
58 /* "next" should be 0x00000400 */ 58 /* "next" should be 0x00000400 */
59 /* "last" is the last process event: exit */ 59 /* "last" is the last process event: exit,
60 * while "next to last" is coredumping event */
61 PROC_EVENT_COREDUMP = 0x40000000,
60 PROC_EVENT_EXIT = 0x80000000 62 PROC_EVENT_EXIT = 0x80000000
61 } what; 63 } what;
62 __u32 cpu; 64 __u32 cpu;
@@ -110,11 +112,17 @@ struct proc_event {
110 char comm[16]; 112 char comm[16];
111 } comm; 113 } comm;
112 114
115 struct coredump_proc_event {
116 __kernel_pid_t process_pid;
117 __kernel_pid_t process_tgid;
118 } coredump;
119
113 struct exit_proc_event { 120 struct exit_proc_event {
114 __kernel_pid_t process_pid; 121 __kernel_pid_t process_pid;
115 __kernel_pid_t process_tgid; 122 __kernel_pid_t process_tgid;
116 __u32 exit_code, exit_signal; 123 __u32 exit_code, exit_signal;
117 } exit; 124 } exit;
125
118 } event_data; 126 } event_data;
119}; 127};
120 128
diff --git a/include/uapi/linux/connector.h b/include/uapi/linux/connector.h
index 8761a0349c74..4cb283505e45 100644
--- a/include/uapi/linux/connector.h
+++ b/include/uapi/linux/connector.h
@@ -44,8 +44,11 @@
44#define CN_VAL_DRBD 0x1 44#define CN_VAL_DRBD 0x1
45#define CN_KVP_IDX 0x9 /* HyperV KVP */ 45#define CN_KVP_IDX 0x9 /* HyperV KVP */
46#define CN_KVP_VAL 0x1 /* queries from the kernel */ 46#define CN_KVP_VAL 0x1 /* queries from the kernel */
47#define CN_VSS_IDX 0xA /* HyperV VSS */
48#define CN_VSS_VAL 0x1 /* queries from the kernel */
47 49
48#define CN_NETLINK_USERS 10 /* Highest index + 1 */ 50
51#define CN_NETLINK_USERS 11 /* Highest index + 1 */
49 52
50/* 53/*
51 * Maximum connector's message size. 54 * Maximum connector's message size.
diff --git a/include/uapi/linux/dvb/dmx.h b/include/uapi/linux/dvb/dmx.h
index b2a9ad8cafdc..b4fb650d9d4f 100644
--- a/include/uapi/linux/dvb/dmx.h
+++ b/include/uapi/linux/dvb/dmx.h
@@ -51,7 +51,7 @@ typedef enum
51} dmx_input_t; 51} dmx_input_t;
52 52
53 53
54typedef enum 54typedef enum dmx_ts_pes
55{ 55{
56 DMX_PES_AUDIO0, 56 DMX_PES_AUDIO0,
57 DMX_PES_VIDEO0, 57 DMX_PES_VIDEO0,
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index 8072d352b98f..ef6103bf1f9b 100644
--- a/include/uapi/linux/elf.h
+++ b/include/uapi/linux/elf.h
@@ -397,6 +397,7 @@ typedef struct elf64_shdr {
397#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ 397#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */
398#define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ 398#define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */
399#define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ 399#define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */
400#define NT_METAG_TLS 0x502 /* Metag TLS pointer */
400 401
401 402
402/* Note header in a PT_NOTE section */ 403/* Note header in a PT_NOTE section */
diff --git a/include/uapi/linux/filter.h b/include/uapi/linux/filter.h
index 9cfde6941099..8eb9ccaa5b48 100644
--- a/include/uapi/linux/filter.h
+++ b/include/uapi/linux/filter.h
@@ -129,7 +129,8 @@ struct sock_fprog { /* Required for SO_ATTACH_FILTER. */
129#define SKF_AD_ALU_XOR_X 40 129#define SKF_AD_ALU_XOR_X 40
130#define SKF_AD_VLAN_TAG 44 130#define SKF_AD_VLAN_TAG 44
131#define SKF_AD_VLAN_TAG_PRESENT 48 131#define SKF_AD_VLAN_TAG_PRESENT 48
132#define SKF_AD_MAX 52 132#define SKF_AD_PAY_OFFSET 52
133#define SKF_AD_MAX 56
133#define SKF_NET_OFF (-0x100000) 134#define SKF_NET_OFF (-0x100000)
134#define SKF_LL_OFF (-0x200000) 135#define SKF_LL_OFF (-0x200000)
135 136
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index c7fc1e6517c3..a4ed56cf0eac 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -88,7 +88,6 @@ struct inodes_stat_t {
88#define MS_STRICTATIME (1<<24) /* Always perform atime updates */ 88#define MS_STRICTATIME (1<<24) /* Always perform atime updates */
89 89
90/* These sb flags are internal to the kernel */ 90/* These sb flags are internal to the kernel */
91#define MS_SNAP_STABLE (1<<27) /* Snapshot pages during writeback, if needed */
92#define MS_NOSEC (1<<28) 91#define MS_NOSEC (1<<28)
93#define MS_BORN (1<<29) 92#define MS_BORN (1<<29)
94#define MS_ACTIVE (1<<30) 93#define MS_ACTIVE (1<<30)
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h
index 706d035fa748..60bb2f9f7b74 100644
--- a/include/uapi/linux/fuse.h
+++ b/include/uapi/linux/fuse.h
@@ -90,6 +90,9 @@
90 * 7.21 90 * 7.21
91 * - add FUSE_READDIRPLUS 91 * - add FUSE_READDIRPLUS
92 * - send the requested events in POLL request 92 * - send the requested events in POLL request
93 *
94 * 7.22
95 * - add FUSE_ASYNC_DIO
93 */ 96 */
94 97
95#ifndef _LINUX_FUSE_H 98#ifndef _LINUX_FUSE_H
@@ -125,7 +128,7 @@
125#define FUSE_KERNEL_VERSION 7 128#define FUSE_KERNEL_VERSION 7
126 129
127/** Minor version number of this interface */ 130/** Minor version number of this interface */
128#define FUSE_KERNEL_MINOR_VERSION 21 131#define FUSE_KERNEL_MINOR_VERSION 22
129 132
130/** The node ID of the root inode */ 133/** The node ID of the root inode */
131#define FUSE_ROOT_ID 1 134#define FUSE_ROOT_ID 1
@@ -215,6 +218,7 @@ struct fuse_file_lock {
215 * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages 218 * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages
216 * FUSE_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one) 219 * FUSE_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one)
217 * FUSE_READDIRPLUS_AUTO: adaptive readdirplus 220 * FUSE_READDIRPLUS_AUTO: adaptive readdirplus
221 * FUSE_ASYNC_DIO: asynchronous direct I/O submission
218 */ 222 */
219#define FUSE_ASYNC_READ (1 << 0) 223#define FUSE_ASYNC_READ (1 << 0)
220#define FUSE_POSIX_LOCKS (1 << 1) 224#define FUSE_POSIX_LOCKS (1 << 1)
@@ -231,6 +235,7 @@ struct fuse_file_lock {
231#define FUSE_AUTO_INVAL_DATA (1 << 12) 235#define FUSE_AUTO_INVAL_DATA (1 << 12)
232#define FUSE_DO_READDIRPLUS (1 << 13) 236#define FUSE_DO_READDIRPLUS (1 << 13)
233#define FUSE_READDIRPLUS_AUTO (1 << 14) 237#define FUSE_READDIRPLUS_AUTO (1 << 14)
238#define FUSE_ASYNC_DIO (1 << 15)
234 239
235/** 240/**
236 * CUSE INIT request/reply flags 241 * CUSE INIT request/reply flags
diff --git a/include/uapi/linux/if_cablemodem.h b/include/uapi/linux/if_cablemodem.h
index 9ca1007edd93..ee6b3c442baf 100644
--- a/include/uapi/linux/if_cablemodem.h
+++ b/include/uapi/linux/if_cablemodem.h
@@ -12,11 +12,11 @@
12 */ 12 */
13 13
14/* some useful defines for sb1000.c e cmconfig.c - fv */ 14/* some useful defines for sb1000.c e cmconfig.c - fv */
15#define SIOCGCMSTATS SIOCDEVPRIVATE+0 /* get cable modem stats */ 15#define SIOCGCMSTATS (SIOCDEVPRIVATE+0) /* get cable modem stats */
16#define SIOCGCMFIRMWARE SIOCDEVPRIVATE+1 /* get cm firmware version */ 16#define SIOCGCMFIRMWARE (SIOCDEVPRIVATE+1) /* get cm firmware version */
17#define SIOCGCMFREQUENCY SIOCDEVPRIVATE+2 /* get cable modem frequency */ 17#define SIOCGCMFREQUENCY (SIOCDEVPRIVATE+2) /* get cable modem frequency */
18#define SIOCSCMFREQUENCY SIOCDEVPRIVATE+3 /* set cable modem frequency */ 18#define SIOCSCMFREQUENCY (SIOCDEVPRIVATE+3) /* set cable modem frequency */
19#define SIOCGCMPIDS SIOCDEVPRIVATE+4 /* get cable modem PIDs */ 19#define SIOCGCMPIDS (SIOCDEVPRIVATE+4) /* get cable modem PIDs */
20#define SIOCSCMPIDS SIOCDEVPRIVATE+5 /* set cable modem PIDs */ 20#define SIOCSCMPIDS (SIOCDEVPRIVATE+5) /* set cable modem PIDs */
21 21
22#endif 22#endif
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
index 798032d01112..ade07f1c491a 100644
--- a/include/uapi/linux/if_ether.h
+++ b/include/uapi/linux/if_ether.h
@@ -94,6 +94,9 @@
94#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ 94#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
95#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ 95#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
96 96
97#define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value
98 * then the frame is Ethernet II. Else it is 802.3 */
99
97/* 100/*
98 * Non DIX types. Won't clash for 1500 types. 101 * Non DIX types. Won't clash for 1500 types.
99 */ 102 */
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index c4edfe11f1f7..b05823cae784 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -201,6 +201,7 @@ enum {
201 IFLA_INET6_MCAST, /* MC things. What of them? */ 201 IFLA_INET6_MCAST, /* MC things. What of them? */
202 IFLA_INET6_CACHEINFO, /* time values and max reasm size */ 202 IFLA_INET6_CACHEINFO, /* time values and max reasm size */
203 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */ 203 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */
204 IFLA_INET6_TOKEN, /* device token */
204 __IFLA_INET6_MAX 205 __IFLA_INET6_MAX
205}; 206};
206 207
@@ -249,6 +250,7 @@ enum {
249 IFLA_VLAN_FLAGS, 250 IFLA_VLAN_FLAGS,
250 IFLA_VLAN_EGRESS_QOS, 251 IFLA_VLAN_EGRESS_QOS,
251 IFLA_VLAN_INGRESS_QOS, 252 IFLA_VLAN_INGRESS_QOS,
253 IFLA_VLAN_PROTOCOL,
252 __IFLA_VLAN_MAX, 254 __IFLA_VLAN_MAX,
253}; 255};
254 256
@@ -295,7 +297,7 @@ enum macvlan_mode {
295enum { 297enum {
296 IFLA_VXLAN_UNSPEC, 298 IFLA_VXLAN_UNSPEC,
297 IFLA_VXLAN_ID, 299 IFLA_VXLAN_ID,
298 IFLA_VXLAN_GROUP, 300 IFLA_VXLAN_GROUP, /* group or remote address */
299 IFLA_VXLAN_LINK, 301 IFLA_VXLAN_LINK,
300 IFLA_VXLAN_LOCAL, 302 IFLA_VXLAN_LOCAL,
301 IFLA_VXLAN_TTL, 303 IFLA_VXLAN_TTL,
@@ -303,11 +305,12 @@ enum {
303 IFLA_VXLAN_LEARNING, 305 IFLA_VXLAN_LEARNING,
304 IFLA_VXLAN_AGEING, 306 IFLA_VXLAN_AGEING,
305 IFLA_VXLAN_LIMIT, 307 IFLA_VXLAN_LIMIT,
306 IFLA_VXLAN_PORT_RANGE, 308 IFLA_VXLAN_PORT_RANGE, /* source port */
307 IFLA_VXLAN_PROXY, 309 IFLA_VXLAN_PROXY,
308 IFLA_VXLAN_RSC, 310 IFLA_VXLAN_RSC,
309 IFLA_VXLAN_L2MISS, 311 IFLA_VXLAN_L2MISS,
310 IFLA_VXLAN_L3MISS, 312 IFLA_VXLAN_L3MISS,
313 IFLA_VXLAN_PORT, /* destination port */
311 __IFLA_VXLAN_MAX 314 __IFLA_VXLAN_MAX
312}; 315};
313#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) 316#define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
index f9a60375f0d0..b950c02030c0 100644
--- a/include/uapi/linux/if_packet.h
+++ b/include/uapi/linux/if_packet.h
@@ -55,6 +55,8 @@ struct sockaddr_ll {
55#define PACKET_FANOUT_HASH 0 55#define PACKET_FANOUT_HASH 0
56#define PACKET_FANOUT_LB 1 56#define PACKET_FANOUT_LB 1
57#define PACKET_FANOUT_CPU 2 57#define PACKET_FANOUT_CPU 2
58#define PACKET_FANOUT_ROLLOVER 3
59#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000
58#define PACKET_FANOUT_FLAG_DEFRAG 0x8000 60#define PACKET_FANOUT_FLAG_DEFRAG 0x8000
59 61
60struct tpacket_stats { 62struct tpacket_stats {
@@ -84,19 +86,24 @@ struct tpacket_auxdata {
84}; 86};
85 87
86/* Rx ring - header status */ 88/* Rx ring - header status */
87#define TP_STATUS_KERNEL 0x0 89#define TP_STATUS_KERNEL 0
88#define TP_STATUS_USER 0x1 90#define TP_STATUS_USER (1 << 0)
89#define TP_STATUS_COPY 0x2 91#define TP_STATUS_COPY (1 << 1)
90#define TP_STATUS_LOSING 0x4 92#define TP_STATUS_LOSING (1 << 2)
91#define TP_STATUS_CSUMNOTREADY 0x8 93#define TP_STATUS_CSUMNOTREADY (1 << 3)
92#define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */ 94#define TP_STATUS_VLAN_VALID (1 << 4) /* auxdata has valid tp_vlan_tci */
93#define TP_STATUS_BLK_TMO 0x20 95#define TP_STATUS_BLK_TMO (1 << 5)
94 96
95/* Tx ring - header status */ 97/* Tx ring - header status */
96#define TP_STATUS_AVAILABLE 0x0 98#define TP_STATUS_AVAILABLE 0
97#define TP_STATUS_SEND_REQUEST 0x1 99#define TP_STATUS_SEND_REQUEST (1 << 0)
98#define TP_STATUS_SENDING 0x2 100#define TP_STATUS_SENDING (1 << 1)
99#define TP_STATUS_WRONG_FORMAT 0x4 101#define TP_STATUS_WRONG_FORMAT (1 << 2)
102
103/* Rx and Tx ring - header status */
104#define TP_STATUS_TS_SOFTWARE (1 << 29)
105#define TP_STATUS_TS_SYS_HARDWARE (1 << 30)
106#define TP_STATUS_TS_RAW_HARDWARE (1 << 31)
100 107
101/* Rx ring - feature request bits */ 108/* Rx ring - feature request bits */
102#define TP_FT_REQ_FILL_RXHASH 0x1 109#define TP_FT_REQ_FILL_RXHASH 0x1
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
index 935119c698ac..4649ee35b605 100644
--- a/include/uapi/linux/input.h
+++ b/include/uapi/linux/input.h
@@ -702,6 +702,11 @@ struct input_keymap_entry {
702#define KEY_CAMERA_LEFT 0x219 702#define KEY_CAMERA_LEFT 0x219
703#define KEY_CAMERA_RIGHT 0x21a 703#define KEY_CAMERA_RIGHT 0x21a
704 704
705#define KEY_ATTENDANT_ON 0x21b
706#define KEY_ATTENDANT_OFF 0x21c
707#define KEY_ATTENDANT_TOGGLE 0x21d /* Attendant call on or off */
708#define KEY_LIGHTS_TOGGLE 0x21e /* Reading light on or off */
709
705#define BTN_TRIGGER_HAPPY 0x2c0 710#define BTN_TRIGGER_HAPPY 0x2c0
706#define BTN_TRIGGER_HAPPY1 0x2c0 711#define BTN_TRIGGER_HAPPY1 0x2c0
707#define BTN_TRIGGER_HAPPY2 0x2c1 712#define BTN_TRIGGER_HAPPY2 0x2c1
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h
index 8a2d438dc499..a24537725e80 100644
--- a/include/uapi/linux/ip_vs.h
+++ b/include/uapi/linux/ip_vs.h
@@ -280,8 +280,8 @@ struct ip_vs_daemon_user {
280#define IPVS_GENL_VERSION 0x1 280#define IPVS_GENL_VERSION 0x1
281 281
282struct ip_vs_flags { 282struct ip_vs_flags {
283 __be32 flags; 283 __u32 flags;
284 __be32 mask; 284 __u32 mask;
285}; 285};
286 286
287/* Generic Netlink command attributes */ 287/* Generic Netlink command attributes */
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 3c56ba3d80c1..a5c86fc34a37 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -449,12 +449,15 @@ enum {
449 kvm_ioeventfd_flag_nr_datamatch, 449 kvm_ioeventfd_flag_nr_datamatch,
450 kvm_ioeventfd_flag_nr_pio, 450 kvm_ioeventfd_flag_nr_pio,
451 kvm_ioeventfd_flag_nr_deassign, 451 kvm_ioeventfd_flag_nr_deassign,
452 kvm_ioeventfd_flag_nr_virtio_ccw_notify,
452 kvm_ioeventfd_flag_nr_max, 453 kvm_ioeventfd_flag_nr_max,
453}; 454};
454 455
455#define KVM_IOEVENTFD_FLAG_DATAMATCH (1 << kvm_ioeventfd_flag_nr_datamatch) 456#define KVM_IOEVENTFD_FLAG_DATAMATCH (1 << kvm_ioeventfd_flag_nr_datamatch)
456#define KVM_IOEVENTFD_FLAG_PIO (1 << kvm_ioeventfd_flag_nr_pio) 457#define KVM_IOEVENTFD_FLAG_PIO (1 << kvm_ioeventfd_flag_nr_pio)
457#define KVM_IOEVENTFD_FLAG_DEASSIGN (1 << kvm_ioeventfd_flag_nr_deassign) 458#define KVM_IOEVENTFD_FLAG_DEASSIGN (1 << kvm_ioeventfd_flag_nr_deassign)
459#define KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY \
460 (1 << kvm_ioeventfd_flag_nr_virtio_ccw_notify)
458 461
459#define KVM_IOEVENTFD_VALID_FLAG_MASK ((1 << kvm_ioeventfd_flag_nr_max) - 1) 462#define KVM_IOEVENTFD_VALID_FLAG_MASK ((1 << kvm_ioeventfd_flag_nr_max) - 1)
460 463
@@ -558,9 +561,7 @@ struct kvm_ppc_smmu_info {
558#define KVM_CAP_MP_STATE 14 561#define KVM_CAP_MP_STATE 14
559#define KVM_CAP_COALESCED_MMIO 15 562#define KVM_CAP_COALESCED_MMIO 15
560#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ 563#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */
561#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
562#define KVM_CAP_DEVICE_ASSIGNMENT 17 564#define KVM_CAP_DEVICE_ASSIGNMENT 17
563#endif
564#define KVM_CAP_IOMMU 18 565#define KVM_CAP_IOMMU 18
565#ifdef __KVM_HAVE_MSI 566#ifdef __KVM_HAVE_MSI
566#define KVM_CAP_DEVICE_MSI 20 567#define KVM_CAP_DEVICE_MSI 20
@@ -576,13 +577,9 @@ struct kvm_ppc_smmu_info {
576#ifdef __KVM_HAVE_PIT 577#ifdef __KVM_HAVE_PIT
577#define KVM_CAP_REINJECT_CONTROL 24 578#define KVM_CAP_REINJECT_CONTROL 24
578#endif 579#endif
579#ifdef __KVM_HAVE_IOAPIC
580#define KVM_CAP_IRQ_ROUTING 25 580#define KVM_CAP_IRQ_ROUTING 25
581#endif
582#define KVM_CAP_IRQ_INJECT_STATUS 26 581#define KVM_CAP_IRQ_INJECT_STATUS 26
583#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
584#define KVM_CAP_DEVICE_DEASSIGNMENT 27 582#define KVM_CAP_DEVICE_DEASSIGNMENT 27
585#endif
586#ifdef __KVM_HAVE_MSIX 583#ifdef __KVM_HAVE_MSIX
587#define KVM_CAP_DEVICE_MSIX 28 584#define KVM_CAP_DEVICE_MSIX 28
588#endif 585#endif
@@ -665,6 +662,10 @@ struct kvm_ppc_smmu_info {
665#define KVM_CAP_PPC_EPR 86 662#define KVM_CAP_PPC_EPR 86
666#define KVM_CAP_ARM_PSCI 87 663#define KVM_CAP_ARM_PSCI 87
667#define KVM_CAP_ARM_SET_DEVICE_ADDR 88 664#define KVM_CAP_ARM_SET_DEVICE_ADDR 88
665#define KVM_CAP_DEVICE_CTRL 89
666#define KVM_CAP_IRQ_MPIC 90
667#define KVM_CAP_PPC_RTAS 91
668#define KVM_CAP_IRQ_XICS 92
668 669
669#ifdef KVM_CAP_IRQ_ROUTING 670#ifdef KVM_CAP_IRQ_ROUTING
670 671
@@ -818,6 +819,28 @@ struct kvm_arm_device_addr {
818}; 819};
819 820
820/* 821/*
822 * Device control API, available with KVM_CAP_DEVICE_CTRL
823 */
824#define KVM_CREATE_DEVICE_TEST 1
825
826struct kvm_create_device {
827 __u32 type; /* in: KVM_DEV_TYPE_xxx */
828 __u32 fd; /* out: device handle */
829 __u32 flags; /* in: KVM_CREATE_DEVICE_xxx */
830};
831
832struct kvm_device_attr {
833 __u32 flags; /* no flags currently defined */
834 __u32 group; /* device-defined */
835 __u64 attr; /* group-defined */
836 __u64 addr; /* userspace address of attr data */
837};
838
839#define KVM_DEV_TYPE_FSL_MPIC_20 1
840#define KVM_DEV_TYPE_FSL_MPIC_42 2
841#define KVM_DEV_TYPE_XICS 3
842
843/*
821 * ioctls for VM fds 844 * ioctls for VM fds
822 */ 845 */
823#define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region) 846#define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region)
@@ -904,6 +927,16 @@ struct kvm_s390_ucas_mapping {
904#define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd) 927#define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd)
905/* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */ 928/* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */
906#define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr) 929#define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr)
930/* Available with KVM_CAP_PPC_RTAS */
931#define KVM_PPC_RTAS_DEFINE_TOKEN _IOW(KVMIO, 0xac, struct kvm_rtas_token_args)
932
933/* ioctl for vm fd */
934#define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)
935
936/* ioctls for fds returned by KVM_CREATE_DEVICE */
937#define KVM_SET_DEVICE_ATTR _IOW(KVMIO, 0xe1, struct kvm_device_attr)
938#define KVM_GET_DEVICE_ATTR _IOW(KVMIO, 0xe2, struct kvm_device_attr)
939#define KVM_HAS_DEVICE_ATTR _IOW(KVMIO, 0xe3, struct kvm_device_attr)
907 940
908/* 941/*
909 * ioctls for vcpu fds 942 * ioctls for vcpu fds
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index 873e086ce3a1..2944278a8ba7 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -11,6 +11,7 @@
11#define DEBUGFS_MAGIC 0x64626720 11#define DEBUGFS_MAGIC 0x64626720
12#define SECURITYFS_MAGIC 0x73636673 12#define SECURITYFS_MAGIC 0x73636673
13#define SELINUX_MAGIC 0xf97cff8c 13#define SELINUX_MAGIC 0xf97cff8c
14#define SMACK_MAGIC 0x43415d53 /* "SMAC" */
14#define RAMFS_MAGIC 0x858458f6 /* some random number */ 15#define RAMFS_MAGIC 0x858458f6 /* some random number */
15#define TMPFS_MAGIC 0x01021994 16#define TMPFS_MAGIC 0x01021994
16#define HUGETLBFS_MAGIC 0x958458f6 /* some random number */ 17#define HUGETLBFS_MAGIC 0x958458f6 /* some random number */
@@ -29,6 +30,7 @@
29#define JFFS2_SUPER_MAGIC 0x72b6 30#define JFFS2_SUPER_MAGIC 0x72b6
30#define PSTOREFS_MAGIC 0x6165676C 31#define PSTOREFS_MAGIC 0x6165676C
31#define EFIVARFS_MAGIC 0xde5e81e4 32#define EFIVARFS_MAGIC 0xde5e81e4
33#define HOSTFS_SUPER_MAGIC 0x00c0ffee
32 34
33#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */ 35#define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */
34#define MINIX_SUPER_MAGIC2 0x138F /* minix v1 fs, 30 char names */ 36#define MINIX_SUPER_MAGIC2 0x138F /* minix v1 fs, 30 char names */
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 0ef883327de2..ed49574ad757 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -56,6 +56,8 @@ struct media_device_info {
56#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1) 56#define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1)
57#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2) 57#define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2)
58#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3) 58#define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3)
59/* A converter of analogue video to its digital representation. */
60#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER (MEDIA_ENT_T_V4L2_SUBDEV + 4)
59 61
60#define MEDIA_ENT_FL_DEFAULT (1 << 0) 62#define MEDIA_ENT_FL_DEFAULT (1 << 0)
61 63
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
index adb068c53c4e..f175212420ab 100644
--- a/include/uapi/linux/neighbour.h
+++ b/include/uapi/linux/neighbour.h
@@ -21,6 +21,9 @@ enum {
21 NDA_CACHEINFO, 21 NDA_CACHEINFO,
22 NDA_PROBES, 22 NDA_PROBES,
23 NDA_VLAN, 23 NDA_VLAN,
24 NDA_PORT,
25 NDA_VNI,
26 NDA_IFINDEX,
24 __NDA_MAX 27 __NDA_MAX
25}; 28};
26 29
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h
index fbee42807a11..8024cdf13b70 100644
--- a/include/uapi/linux/netfilter/ipset/ip_set.h
+++ b/include/uapi/linux/netfilter/ipset/ip_set.h
@@ -108,6 +108,8 @@ enum {
108 IPSET_ATTR_CIDR2, 108 IPSET_ATTR_CIDR2,
109 IPSET_ATTR_IP2_TO, 109 IPSET_ATTR_IP2_TO,
110 IPSET_ATTR_IFACE, 110 IPSET_ATTR_IFACE,
111 IPSET_ATTR_BYTES,
112 IPSET_ATTR_PACKETS,
111 __IPSET_ATTR_ADT_MAX, 113 __IPSET_ATTR_ADT_MAX,
112}; 114};
113#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) 115#define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1)
@@ -137,12 +139,13 @@ enum ipset_errno {
137 IPSET_ERR_REFERENCED, 139 IPSET_ERR_REFERENCED,
138 IPSET_ERR_IPADDR_IPV4, 140 IPSET_ERR_IPADDR_IPV4,
139 IPSET_ERR_IPADDR_IPV6, 141 IPSET_ERR_IPADDR_IPV6,
142 IPSET_ERR_COUNTER,
140 143
141 /* Type specific error codes */ 144 /* Type specific error codes */
142 IPSET_ERR_TYPE_SPECIFIC = 4352, 145 IPSET_ERR_TYPE_SPECIFIC = 4352,
143}; 146};
144 147
145/* Flags at command level */ 148/* Flags at command level or match/target flags, lower half of cmdattrs*/
146enum ipset_cmd_flags { 149enum ipset_cmd_flags {
147 IPSET_FLAG_BIT_EXIST = 0, 150 IPSET_FLAG_BIT_EXIST = 0,
148 IPSET_FLAG_EXIST = (1 << IPSET_FLAG_BIT_EXIST), 151 IPSET_FLAG_EXIST = (1 << IPSET_FLAG_BIT_EXIST),
@@ -150,10 +153,20 @@ enum ipset_cmd_flags {
150 IPSET_FLAG_LIST_SETNAME = (1 << IPSET_FLAG_BIT_LIST_SETNAME), 153 IPSET_FLAG_LIST_SETNAME = (1 << IPSET_FLAG_BIT_LIST_SETNAME),
151 IPSET_FLAG_BIT_LIST_HEADER = 2, 154 IPSET_FLAG_BIT_LIST_HEADER = 2,
152 IPSET_FLAG_LIST_HEADER = (1 << IPSET_FLAG_BIT_LIST_HEADER), 155 IPSET_FLAG_LIST_HEADER = (1 << IPSET_FLAG_BIT_LIST_HEADER),
153 IPSET_FLAG_CMD_MAX = 15, /* Lower half */ 156 IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE = 3,
157 IPSET_FLAG_SKIP_COUNTER_UPDATE =
158 (1 << IPSET_FLAG_BIT_SKIP_COUNTER_UPDATE),
159 IPSET_FLAG_BIT_SKIP_SUBCOUNTER_UPDATE = 4,
160 IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE =
161 (1 << IPSET_FLAG_BIT_SKIP_SUBCOUNTER_UPDATE),
162 IPSET_FLAG_BIT_MATCH_COUNTERS = 5,
163 IPSET_FLAG_MATCH_COUNTERS = (1 << IPSET_FLAG_BIT_MATCH_COUNTERS),
164 IPSET_FLAG_BIT_RETURN_NOMATCH = 7,
165 IPSET_FLAG_RETURN_NOMATCH = (1 << IPSET_FLAG_BIT_RETURN_NOMATCH),
166 IPSET_FLAG_CMD_MAX = 15,
154}; 167};
155 168
156/* Flags at CADT attribute level */ 169/* Flags at CADT attribute level, upper half of cmdattrs */
157enum ipset_cadt_flags { 170enum ipset_cadt_flags {
158 IPSET_FLAG_BIT_BEFORE = 0, 171 IPSET_FLAG_BIT_BEFORE = 0,
159 IPSET_FLAG_BEFORE = (1 << IPSET_FLAG_BIT_BEFORE), 172 IPSET_FLAG_BEFORE = (1 << IPSET_FLAG_BIT_BEFORE),
@@ -161,7 +174,9 @@ enum ipset_cadt_flags {
161 IPSET_FLAG_PHYSDEV = (1 << IPSET_FLAG_BIT_PHYSDEV), 174 IPSET_FLAG_PHYSDEV = (1 << IPSET_FLAG_BIT_PHYSDEV),
162 IPSET_FLAG_BIT_NOMATCH = 2, 175 IPSET_FLAG_BIT_NOMATCH = 2,
163 IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH), 176 IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH),
164 IPSET_FLAG_CADT_MAX = 15, /* Upper half */ 177 IPSET_FLAG_BIT_WITH_COUNTERS = 3,
178 IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS),
179 IPSET_FLAG_CADT_MAX = 15,
165}; 180};
166 181
167/* Commands with settype-specific attributes */ 182/* Commands with settype-specific attributes */
@@ -190,6 +205,7 @@ enum ip_set_dim {
190 * If changed, new revision of iptables match/target is required. 205 * If changed, new revision of iptables match/target is required.
191 */ 206 */
192 IPSET_DIM_MAX = 6, 207 IPSET_DIM_MAX = 6,
208 /* Backward compatibility: set match revision 2 */
193 IPSET_BIT_RETURN_NOMATCH = 7, 209 IPSET_BIT_RETURN_NOMATCH = 7,
194}; 210};
195 211
@@ -202,6 +218,18 @@ enum ip_set_kopt {
202 IPSET_RETURN_NOMATCH = (1 << IPSET_BIT_RETURN_NOMATCH), 218 IPSET_RETURN_NOMATCH = (1 << IPSET_BIT_RETURN_NOMATCH),
203}; 219};
204 220
221enum {
222 IPSET_COUNTER_NONE = 0,
223 IPSET_COUNTER_EQ,
224 IPSET_COUNTER_NE,
225 IPSET_COUNTER_LT,
226 IPSET_COUNTER_GT,
227};
228
229struct ip_set_counter_match {
230 __u8 op;
231 __u64 value;
232};
205 233
206/* Interface to iptables/ip6tables */ 234/* Interface to iptables/ip6tables */
207 235
diff --git a/include/uapi/linux/netfilter/nfnetlink_queue.h b/include/uapi/linux/netfilter/nfnetlink_queue.h
index 70ec8c2bc11a..a2308ae5a73d 100644
--- a/include/uapi/linux/netfilter/nfnetlink_queue.h
+++ b/include/uapi/linux/netfilter/nfnetlink_queue.h
@@ -45,6 +45,7 @@ enum nfqnl_attr_type {
45 NFQA_CT, /* nf_conntrack_netlink.h */ 45 NFQA_CT, /* nf_conntrack_netlink.h */
46 NFQA_CT_INFO, /* enum ip_conntrack_info */ 46 NFQA_CT_INFO, /* enum ip_conntrack_info */
47 NFQA_CAP_LEN, /* __u32 length of captured packet */ 47 NFQA_CAP_LEN, /* __u32 length of captured packet */
48 NFQA_SKB_INFO, /* __u32 skb meta information */
48 49
49 __NFQA_MAX 50 __NFQA_MAX
50}; 51};
@@ -96,6 +97,13 @@ enum nfqnl_attr_config {
96/* Flags for NFQA_CFG_FLAGS */ 97/* Flags for NFQA_CFG_FLAGS */
97#define NFQA_CFG_F_FAIL_OPEN (1 << 0) 98#define NFQA_CFG_F_FAIL_OPEN (1 << 0)
98#define NFQA_CFG_F_CONNTRACK (1 << 1) 99#define NFQA_CFG_F_CONNTRACK (1 << 1)
99#define NFQA_CFG_F_MAX (1 << 2) 100#define NFQA_CFG_F_GSO (1 << 2)
101#define NFQA_CFG_F_MAX (1 << 3)
102
103/* flags for NFQA_SKB_INFO */
104/* packet appears to have wrong checksums, but they are ok */
105#define NFQA_SKB_CSUMNOTREADY (1 << 0)
106/* packet is GSO (i.e., exceeds device mtu) */
107#define NFQA_SKB_GSO (1 << 1)
100 108
101#endif /* _NFNETLINK_QUEUE_H */ 109#endif /* _NFNETLINK_QUEUE_H */
diff --git a/include/uapi/linux/netfilter/xt_NFQUEUE.h b/include/uapi/linux/netfilter/xt_NFQUEUE.h
index 9eafdbbb401c..8bb5fe657d34 100644
--- a/include/uapi/linux/netfilter/xt_NFQUEUE.h
+++ b/include/uapi/linux/netfilter/xt_NFQUEUE.h
@@ -26,4 +26,13 @@ struct xt_NFQ_info_v2 {
26 __u16 bypass; 26 __u16 bypass;
27}; 27};
28 28
29struct xt_NFQ_info_v3 {
30 __u16 queuenum;
31 __u16 queues_total;
32 __u16 flags;
33#define NFQ_FLAG_BYPASS 0x01 /* for compatibility with v2 */
34#define NFQ_FLAG_CPU_FANOUT 0x02 /* use current CPU (no hashing) */
35#define NFQ_FLAG_MASK 0x03
36};
37
29#endif /* _XT_NFQ_TARGET_H */ 38#endif /* _XT_NFQ_TARGET_H */
diff --git a/include/uapi/linux/netfilter/xt_set.h b/include/uapi/linux/netfilter/xt_set.h
index e3a9978f259f..964d3d42f874 100644
--- a/include/uapi/linux/netfilter/xt_set.h
+++ b/include/uapi/linux/netfilter/xt_set.h
@@ -62,4 +62,13 @@ struct xt_set_info_target_v2 {
62 __u32 timeout; 62 __u32 timeout;
63}; 63};
64 64
65/* Revision 3 match */
66
67struct xt_set_info_match_v3 {
68 struct xt_set_info match_set;
69 struct ip_set_counter_match packets;
70 struct ip_set_counter_match bytes;
71 __u32 flags;
72};
73
65#endif /*_XT_SET_H*/ 74#endif /*_XT_SET_H*/
diff --git a/include/uapi/linux/netfilter_ipv6/ip6t_frag.h b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h
index b47f61b9e082..dfd8bc2268cf 100644
--- a/include/uapi/linux/netfilter_ipv6/ip6t_frag.h
+++ b/include/uapi/linux/netfilter_ipv6/ip6t_frag.h
@@ -4,9 +4,9 @@
4#include <linux/types.h> 4#include <linux/types.h>
5 5
6struct ip6t_frag { 6struct ip6t_frag {
7 __u32 ids[2]; /* Security Parameter Index */ 7 __u32 ids[2]; /* Identification range */
8 __u32 hdrlen; /* Header Length */ 8 __u32 hdrlen; /* Header Length */
9 __u8 flags; /* */ 9 __u8 flags; /* Flags */
10 __u8 invflags; /* Inverse flags */ 10 __u8 invflags; /* Inverse flags */
11}; 11};
12 12
diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
index 78d5b8a546d6..1a85940f8ab7 100644
--- a/include/uapi/linux/netlink.h
+++ b/include/uapi/linux/netlink.h
@@ -1,6 +1,7 @@
1#ifndef _UAPI__LINUX_NETLINK_H 1#ifndef _UAPI__LINUX_NETLINK_H
2#define _UAPI__LINUX_NETLINK_H 2#define _UAPI__LINUX_NETLINK_H
3 3
4#include <linux/kernel.h>
4#include <linux/socket.h> /* for __kernel_sa_family_t */ 5#include <linux/socket.h> /* for __kernel_sa_family_t */
5#include <linux/types.h> 6#include <linux/types.h>
6 7
@@ -78,7 +79,7 @@ struct nlmsghdr {
78#define NLMSG_ALIGNTO 4U 79#define NLMSG_ALIGNTO 4U
79#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) 80#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
80#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) 81#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
81#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) 82#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
82#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) 83#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))
83#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0))) 84#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
84#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ 85#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
@@ -105,11 +106,42 @@ struct nlmsgerr {
105#define NETLINK_PKTINFO 3 106#define NETLINK_PKTINFO 3
106#define NETLINK_BROADCAST_ERROR 4 107#define NETLINK_BROADCAST_ERROR 4
107#define NETLINK_NO_ENOBUFS 5 108#define NETLINK_NO_ENOBUFS 5
109#define NETLINK_RX_RING 6
110#define NETLINK_TX_RING 7
108 111
109struct nl_pktinfo { 112struct nl_pktinfo {
110 __u32 group; 113 __u32 group;
111}; 114};
112 115
116struct nl_mmap_req {
117 unsigned int nm_block_size;
118 unsigned int nm_block_nr;
119 unsigned int nm_frame_size;
120 unsigned int nm_frame_nr;
121};
122
123struct nl_mmap_hdr {
124 unsigned int nm_status;
125 unsigned int nm_len;
126 __u32 nm_group;
127 /* credentials */
128 __u32 nm_pid;
129 __u32 nm_uid;
130 __u32 nm_gid;
131};
132
133enum nl_mmap_status {
134 NL_MMAP_STATUS_UNUSED,
135 NL_MMAP_STATUS_RESERVED,
136 NL_MMAP_STATUS_VALID,
137 NL_MMAP_STATUS_COPY,
138 NL_MMAP_STATUS_SKIP,
139};
140
141#define NL_MMAP_MSG_ALIGNMENT NLMSG_ALIGNTO
142#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
143#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
144
113#define NET_MAJOR 36 /* Major 36 is reserved for networking */ 145#define NET_MAJOR 36 /* Major 36 is reserved for networking */
114 146
115enum { 147enum {
diff --git a/include/uapi/linux/netlink_diag.h b/include/uapi/linux/netlink_diag.h
new file mode 100644
index 000000000000..4e31db4eea41
--- /dev/null
+++ b/include/uapi/linux/netlink_diag.h
@@ -0,0 +1,52 @@
1#ifndef __NETLINK_DIAG_H__
2#define __NETLINK_DIAG_H__
3
4#include <linux/types.h>
5
6struct netlink_diag_req {
7 __u8 sdiag_family;
8 __u8 sdiag_protocol;
9 __u16 pad;
10 __u32 ndiag_ino;
11 __u32 ndiag_show;
12 __u32 ndiag_cookie[2];
13};
14
15struct netlink_diag_msg {
16 __u8 ndiag_family;
17 __u8 ndiag_type;
18 __u8 ndiag_protocol;
19 __u8 ndiag_state;
20
21 __u32 ndiag_portid;
22 __u32 ndiag_dst_portid;
23 __u32 ndiag_dst_group;
24 __u32 ndiag_ino;
25 __u32 ndiag_cookie[2];
26};
27
28struct netlink_diag_ring {
29 __u32 ndr_block_size;
30 __u32 ndr_block_nr;
31 __u32 ndr_frame_size;
32 __u32 ndr_frame_nr;
33};
34
35enum {
36 NETLINK_DIAG_MEMINFO,
37 NETLINK_DIAG_GROUPS,
38 NETLINK_DIAG_RX_RING,
39 NETLINK_DIAG_TX_RING,
40
41 __NETLINK_DIAG_MAX,
42};
43
44#define NETLINK_DIAG_MAX (__NETLINK_DIAG_MAX - 1)
45
46#define NDIAG_PROTO_ALL ((__u8) ~0)
47
48#define NDIAG_SHOW_MEMINFO 0x00000001 /* show memory info of a socket */
49#define NDIAG_SHOW_GROUPS 0x00000002 /* show groups of a netlink socket */
50#define NDIAG_SHOW_RING_CFG 0x00000004 /* show ring configuration */
51
52#endif
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index 7969f46f1bb3..7c6f627a717d 100644
--- a/include/uapi/linux/nfc.h
+++ b/include/uapi/linux/nfc.h
@@ -90,6 +90,8 @@ enum nfc_commands {
90 NFC_CMD_LLC_SET_PARAMS, 90 NFC_CMD_LLC_SET_PARAMS,
91 NFC_CMD_ENABLE_SE, 91 NFC_CMD_ENABLE_SE,
92 NFC_CMD_DISABLE_SE, 92 NFC_CMD_DISABLE_SE,
93 NFC_CMD_LLC_SDREQ,
94 NFC_EVENT_LLC_SDRES,
93/* private: internal use only */ 95/* private: internal use only */
94 __NFC_CMD_AFTER_LAST 96 __NFC_CMD_AFTER_LAST
95}; 97};
@@ -140,11 +142,21 @@ enum nfc_attrs {
140 NFC_ATTR_LLC_PARAM_RW, 142 NFC_ATTR_LLC_PARAM_RW,
141 NFC_ATTR_LLC_PARAM_MIUX, 143 NFC_ATTR_LLC_PARAM_MIUX,
142 NFC_ATTR_SE, 144 NFC_ATTR_SE,
145 NFC_ATTR_LLC_SDP,
143/* private: internal use only */ 146/* private: internal use only */
144 __NFC_ATTR_AFTER_LAST 147 __NFC_ATTR_AFTER_LAST
145}; 148};
146#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1) 149#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1)
147 150
151enum nfc_sdp_attr {
152 NFC_SDP_ATTR_UNSPEC,
153 NFC_SDP_ATTR_URI,
154 NFC_SDP_ATTR_SAP,
155/* private: internal use only */
156 __NFC_SDP_ATTR_AFTER_LAST
157};
158#define NFC_SDP_ATTR_MAX (__NFC_SDP_ATTR_AFTER_LAST - 1)
159
148#define NFC_DEVICE_NAME_MAXSIZE 8 160#define NFC_DEVICE_NAME_MAXSIZE 8
149#define NFC_NFCID1_MAXSIZE 10 161#define NFC_NFCID1_MAXSIZE 10
150#define NFC_SENSB_RES_MAXSIZE 12 162#define NFC_SENSB_RES_MAXSIZE 12
@@ -220,4 +232,11 @@ struct sockaddr_nfc_llcp {
220#define NFC_LLCP_DIRECTION_RX 0x00 232#define NFC_LLCP_DIRECTION_RX 0x00
221#define NFC_LLCP_DIRECTION_TX 0x01 233#define NFC_LLCP_DIRECTION_TX 0x01
222 234
235/* socket option names */
236#define NFC_LLCP_RW 0
237#define NFC_LLCP_MIUX 1
238#define NFC_LLCP_REMOTE_MIU 2
239#define NFC_LLCP_REMOTE_LTO 3
240#define NFC_LLCP_REMOTE_RW 4
241
223#endif /*__LINUX_NFC_H */ 242#endif /*__LINUX_NFC_H */
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index c46bb016f4e4..d1e48b5e348f 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -36,7 +36,21 @@
36 * The station is still assumed to belong to the AP interface it was added 36 * The station is still assumed to belong to the AP interface it was added
37 * to. 37 * to.
38 * 38 *
39 * TODO: need more info? 39 * Station handling varies per interface type and depending on the driver's
40 * capabilities.
41 *
42 * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS
43 * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows:
44 * - a setup station entry is added, not yet authorized, without any rate
45 * or capability information, this just exists to avoid race conditions
46 * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid
47 * to add rate and capability information to the station and at the same
48 * time mark it authorized.
49 * - %NL80211_TDLS_ENABLE_LINK is then used
50 * - after this, the only valid operation is to remove it by tearing down
51 * the TDLS link (%NL80211_TDLS_DISABLE_LINK)
52 *
53 * TODO: need more info for other interface types
40 */ 54 */
41 55
42/** 56/**
@@ -499,9 +513,11 @@
499 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a 513 * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a
500 * beacon or probe response from a compatible mesh peer. This is only 514 * beacon or probe response from a compatible mesh peer. This is only
501 * sent while no station information (sta_info) exists for the new peer 515 * sent while no station information (sta_info) exists for the new peer
502 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On 516 * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH,
503 * reception of this notification, userspace may decide to create a new 517 * @NL80211_MESH_SETUP_USERSPACE_AMPE, or
504 * station (@NL80211_CMD_NEW_STATION). To stop this notification from 518 * @NL80211_MESH_SETUP_USERSPACE_MPM is set. On reception of this
519 * notification, userspace may decide to create a new station
520 * (@NL80211_CMD_NEW_STATION). To stop this notification from
505 * reoccurring, the userspace authentication daemon may want to create the 521 * reoccurring, the userspace authentication daemon may want to create the
506 * new station with the AUTHENTICATED flag unset and maybe change it later 522 * new station with the AUTHENTICATED flag unset and maybe change it later
507 * depending on the authentication result. 523 * depending on the authentication result.
@@ -611,6 +627,25 @@
611 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the 627 * %NL80211_ATTR_RADAR_EVENT is used to inform about the type of the
612 * event. 628 * event.
613 * 629 *
630 * @NL80211_CMD_GET_PROTOCOL_FEATURES: Get global nl80211 protocol features,
631 * i.e. features for the nl80211 protocol rather than device features.
632 * Returns the features in the %NL80211_ATTR_PROTOCOL_FEATURES bitmap.
633 *
634 * @NL80211_CMD_UPDATE_FT_IES: Pass down the most up-to-date Fast Transition
635 * Information Element to the WLAN driver
636 *
637 * @NL80211_CMD_FT_EVENT: Send a Fast transition event from the WLAN driver
638 * to the supplicant. This will carry the target AP's MAC address along
639 * with the relevant Information Elements. This event is used to report
640 * received FT IEs (MDIE, FTIE, RSN IE, TIE, RICIE).
641 *
642 * @NL80211_CMD_CRIT_PROTOCOL_START: Indicates user-space will start running
643 * a critical protocol that needs more reliability in the connection to
644 * complete.
645 *
646 * @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can
647 * return back to normal.
648 *
614 * @NL80211_CMD_MAX: highest used command number 649 * @NL80211_CMD_MAX: highest used command number
615 * @__NL80211_CMD_AFTER_LAST: internal use 650 * @__NL80211_CMD_AFTER_LAST: internal use
616 */ 651 */
@@ -765,6 +800,14 @@ enum nl80211_commands {
765 800
766 NL80211_CMD_RADAR_DETECT, 801 NL80211_CMD_RADAR_DETECT,
767 802
803 NL80211_CMD_GET_PROTOCOL_FEATURES,
804
805 NL80211_CMD_UPDATE_FT_IES,
806 NL80211_CMD_FT_EVENT,
807
808 NL80211_CMD_CRIT_PROTOCOL_START,
809 NL80211_CMD_CRIT_PROTOCOL_STOP,
810
768 /* add new commands above here */ 811 /* add new commands above here */
769 812
770 /* used to define NL80211_CMD_MAX below */ 813 /* used to define NL80211_CMD_MAX below */
@@ -884,7 +927,8 @@ enum nl80211_commands {
884 * consisting of a nested array. 927 * consisting of a nested array.
885 * 928 *
886 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes). 929 * @NL80211_ATTR_MESH_ID: mesh id (1-32 bytes).
887 * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link. 930 * @NL80211_ATTR_STA_PLINK_ACTION: action to perform on the mesh peer link
931 * (see &enum nl80211_plink_action).
888 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path. 932 * @NL80211_ATTR_MPATH_NEXT_HOP: MAC address of the next hop for a mesh path.
889 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path 933 * @NL80211_ATTR_MPATH_INFO: information about a mesh_path, part of mesh path
890 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at 934 * info given for %NL80211_CMD_GET_MPATH, nested attribute described at
@@ -1167,10 +1211,10 @@ enum nl80211_commands {
1167 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver 1211 * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver
1168 * allows auth frames in a mesh to be passed to userspace for processing via 1212 * allows auth frames in a mesh to be passed to userspace for processing via
1169 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag. 1213 * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag.
1170 * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as 1214 * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as defined in
1171 * defined in &enum nl80211_plink_state. Used when userspace is 1215 * &enum nl80211_plink_state. Used when userspace is driving the peer link
1172 * driving the peer link management state machine. 1216 * management state machine. @NL80211_MESH_SETUP_USERSPACE_AMPE or
1173 * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. 1217 * @NL80211_MESH_SETUP_USERSPACE_MPM must be enabled.
1174 * 1218 *
1175 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy 1219 * @NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED: indicates, as part of the wiphy
1176 * capabilities, the supported WoWLAN triggers 1220 * capabilities, the supported WoWLAN triggers
@@ -1368,6 +1412,23 @@ enum nl80211_commands {
1368 * advertised to the driver, e.g., to enable TDLS off channel operations 1412 * advertised to the driver, e.g., to enable TDLS off channel operations
1369 * and PU-APSD. 1413 * and PU-APSD.
1370 * 1414 *
1415 * @NL80211_ATTR_PROTOCOL_FEATURES: global nl80211 feature flags, see
1416 * &enum nl80211_protocol_features, the attribute is a u32.
1417 *
1418 * @NL80211_ATTR_SPLIT_WIPHY_DUMP: flag attribute, userspace supports
1419 * receiving the data for a single wiphy split across multiple
1420 * messages, given with wiphy dump message
1421 *
1422 * @NL80211_ATTR_MDID: Mobility Domain Identifier
1423 *
1424 * @NL80211_ATTR_IE_RIC: Resource Information Container Information
1425 * Element
1426 *
1427 * @NL80211_ATTR_CRIT_PROT_ID: critical protocol identifier requiring increased
1428 * reliability, see &enum nl80211_crit_proto_id (u16).
1429 * @NL80211_ATTR_MAX_CRIT_PROT_DURATION: duration in milliseconds in which
1430 * the connection should have increased reliability (u16).
1431 *
1371 * @NL80211_ATTR_MAX: highest attribute number currently defined 1432 * @NL80211_ATTR_MAX: highest attribute number currently defined
1372 * @__NL80211_ATTR_AFTER_LAST: internal use 1433 * @__NL80211_ATTR_AFTER_LAST: internal use
1373 */ 1434 */
@@ -1654,6 +1715,18 @@ enum nl80211_attrs {
1654 NL80211_ATTR_STA_CAPABILITY, 1715 NL80211_ATTR_STA_CAPABILITY,
1655 NL80211_ATTR_STA_EXT_CAPABILITY, 1716 NL80211_ATTR_STA_EXT_CAPABILITY,
1656 1717
1718 NL80211_ATTR_PROTOCOL_FEATURES,
1719 NL80211_ATTR_SPLIT_WIPHY_DUMP,
1720
1721 NL80211_ATTR_DISABLE_VHT,
1722 NL80211_ATTR_VHT_CAPABILITY_MASK,
1723
1724 NL80211_ATTR_MDID,
1725 NL80211_ATTR_IE_RIC,
1726
1727 NL80211_ATTR_CRIT_PROT_ID,
1728 NL80211_ATTR_MAX_CRIT_PROT_DURATION,
1729
1657 /* add attributes here, update the policy in nl80211.c */ 1730 /* add attributes here, update the policy in nl80211.c */
1658 1731
1659 __NL80211_ATTR_AFTER_LAST, 1732 __NL80211_ATTR_AFTER_LAST,
@@ -2412,8 +2485,10 @@ enum nl80211_mesh_power_mode {
2412 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh 2485 * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh
2413 * point. 2486 * point.
2414 * 2487 *
2415 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically 2488 * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically open
2416 * open peer links when we detect compatible mesh peers. 2489 * peer links when we detect compatible mesh peers. Disabled if
2490 * @NL80211_MESH_SETUP_USERSPACE_MPM or @NL80211_MESH_SETUP_USERSPACE_AMPE are
2491 * set.
2417 * 2492 *
2418 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames 2493 * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames
2419 * containing a PREQ that an MP can send to a particular destination (path 2494 * containing a PREQ that an MP can send to a particular destination (path
@@ -2559,6 +2634,9 @@ enum nl80211_meshconf_params {
2559 * vendor specific synchronization method or disable it to use the default 2634 * vendor specific synchronization method or disable it to use the default
2560 * neighbor offset synchronization 2635 * neighbor offset synchronization
2561 * 2636 *
2637 * @NL80211_MESH_SETUP_USERSPACE_MPM: Enable this option if userspace will
2638 * implement an MPM which handles peer allocation and state.
2639 *
2562 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number 2640 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
2563 * 2641 *
2564 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use 2642 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
@@ -2571,6 +2649,7 @@ enum nl80211_mesh_setup_params {
2571 NL80211_MESH_SETUP_USERSPACE_AUTH, 2649 NL80211_MESH_SETUP_USERSPACE_AUTH,
2572 NL80211_MESH_SETUP_USERSPACE_AMPE, 2650 NL80211_MESH_SETUP_USERSPACE_AMPE,
2573 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC, 2651 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
2652 NL80211_MESH_SETUP_USERSPACE_MPM,
2574 2653
2575 /* keep last */ 2654 /* keep last */
2576 __NL80211_MESH_SETUP_ATTR_AFTER_LAST, 2655 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
@@ -3307,6 +3386,23 @@ enum nl80211_plink_state {
3307 MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 3386 MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1
3308}; 3387};
3309 3388
3389/**
3390 * enum nl80211_plink_action - actions to perform in mesh peers
3391 *
3392 * @NL80211_PLINK_ACTION_NO_ACTION: perform no action
3393 * @NL80211_PLINK_ACTION_OPEN: start mesh peer link establishment
3394 * @NL80211_PLINK_ACTION_BLOCK: block traffic from this mesh peer
3395 * @NUM_NL80211_PLINK_ACTIONS: number of possible actions
3396 */
3397enum plink_actions {
3398 NL80211_PLINK_ACTION_NO_ACTION,
3399 NL80211_PLINK_ACTION_OPEN,
3400 NL80211_PLINK_ACTION_BLOCK,
3401
3402 NUM_NL80211_PLINK_ACTIONS,
3403};
3404
3405
3310#define NL80211_KCK_LEN 16 3406#define NL80211_KCK_LEN 16
3311#define NL80211_KEK_LEN 16 3407#define NL80211_KEK_LEN 16
3312#define NL80211_REPLAY_CTR_LEN 8 3408#define NL80211_REPLAY_CTR_LEN 8
@@ -3456,6 +3552,10 @@ enum nl80211_ap_sme_features {
3456 * stations the authenticated/associated bits have to be set in the mask. 3552 * stations the authenticated/associated bits have to be set in the mask.
3457 * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits 3553 * @NL80211_FEATURE_ADVERTISE_CHAN_LIMITS: cfg80211 advertises channel limits
3458 * (HT40, VHT 80/160 MHz) if this flag is set 3554 * (HT40, VHT 80/160 MHz) if this flag is set
3555 * @NL80211_FEATURE_USERSPACE_MPM: This driver supports a userspace Mesh
3556 * Peering Management entity which may be implemented by registering for
3557 * beacons or NL80211_CMD_NEW_PEER_CANDIDATE events. The mesh beacon is
3558 * still generated by the driver.
3459 */ 3559 */
3460enum nl80211_feature_flags { 3560enum nl80211_feature_flags {
3461 NL80211_FEATURE_SK_TX_STATUS = 1 << 0, 3561 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3474,6 +3574,7 @@ enum nl80211_feature_flags {
3474 /* bit 13 is reserved */ 3574 /* bit 13 is reserved */
3475 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14, 3575 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 1 << 14,
3476 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15, 3576 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
3577 NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
3477}; 3578};
3478 3579
3479/** 3580/**
@@ -3587,4 +3688,37 @@ enum nl80211_dfs_state {
3587 NL80211_DFS_AVAILABLE, 3688 NL80211_DFS_AVAILABLE,
3588}; 3689};
3589 3690
3691/**
3692 * enum enum nl80211_protocol_features - nl80211 protocol features
3693 * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
3694 * wiphy dumps (if requested by the application with the attribute
3695 * %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
3696 * wiphy dump by %NL80211_ATTR_WIPHY, %NL80211_ATTR_IFINDEX or
3697 * %NL80211_ATTR_WDEV.
3698 */
3699enum nl80211_protocol_features {
3700 NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 1 << 0,
3701};
3702
3703/**
3704 * enum nl80211_crit_proto_id - nl80211 critical protocol identifiers
3705 *
3706 * @NL80211_CRIT_PROTO_UNSPEC: protocol unspecified.
3707 * @NL80211_CRIT_PROTO_DHCP: BOOTP or DHCPv6 protocol.
3708 * @NL80211_CRIT_PROTO_EAPOL: EAPOL protocol.
3709 * @NL80211_CRIT_PROTO_APIPA: APIPA protocol.
3710 * @NUM_NL80211_CRIT_PROTO: must be kept last.
3711 */
3712enum nl80211_crit_proto_id {
3713 NL80211_CRIT_PROTO_UNSPEC,
3714 NL80211_CRIT_PROTO_DHCP,
3715 NL80211_CRIT_PROTO_EAPOL,
3716 NL80211_CRIT_PROTO_APIPA,
3717 /* add other protocols before this one */
3718 NUM_NL80211_CRIT_PROTO
3719};
3720
3721/* maximum duration for critical protocol measures */
3722#define NL80211_CRIT_PROTO_MAX_DURATION 5000 /* msec */
3723
3590#endif /* __LINUX_NL80211_H */ 3724#endif /* __LINUX_NL80211_H */
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
new file mode 100644
index 000000000000..405918dd7b3f
--- /dev/null
+++ b/include/uapi/linux/openvswitch.h
@@ -0,0 +1,456 @@
1
2/*
3 * Copyright (c) 2007-2011 Nicira Networks.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301, USA
18 */
19
20#ifndef _UAPI__LINUX_OPENVSWITCH_H
21#define _UAPI__LINUX_OPENVSWITCH_H 1
22
23#include <linux/types.h>
24#include <linux/if_ether.h>
25
26/**
27 * struct ovs_header - header for OVS Generic Netlink messages.
28 * @dp_ifindex: ifindex of local port for datapath (0 to make a request not
29 * specific to a datapath).
30 *
31 * Attributes following the header are specific to a particular OVS Generic
32 * Netlink family, but all of the OVS families use this header.
33 */
34
35struct ovs_header {
36 int dp_ifindex;
37};
38
39/* Datapaths. */
40
41#define OVS_DATAPATH_FAMILY "ovs_datapath"
42#define OVS_DATAPATH_MCGROUP "ovs_datapath"
43#define OVS_DATAPATH_VERSION 0x1
44
45enum ovs_datapath_cmd {
46 OVS_DP_CMD_UNSPEC,
47 OVS_DP_CMD_NEW,
48 OVS_DP_CMD_DEL,
49 OVS_DP_CMD_GET,
50 OVS_DP_CMD_SET
51};
52
53/**
54 * enum ovs_datapath_attr - attributes for %OVS_DP_* commands.
55 * @OVS_DP_ATTR_NAME: Name of the network device that serves as the "local
56 * port". This is the name of the network device whose dp_ifindex is given in
57 * the &struct ovs_header. Always present in notifications. Required in
58 * %OVS_DP_NEW requests. May be used as an alternative to specifying
59 * dp_ifindex in other requests (with a dp_ifindex of 0).
60 * @OVS_DP_ATTR_UPCALL_PID: The Netlink socket in userspace that is initially
61 * set on the datapath port (for OVS_ACTION_ATTR_MISS). Only valid on
62 * %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should
63 * not be sent.
64 * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the
65 * datapath. Always present in notifications.
66 *
67 * These attributes follow the &struct ovs_header within the Generic Netlink
68 * payload for %OVS_DP_* commands.
69 */
70enum ovs_datapath_attr {
71 OVS_DP_ATTR_UNSPEC,
72 OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */
73 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
74 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
75 __OVS_DP_ATTR_MAX
76};
77
78#define OVS_DP_ATTR_MAX (__OVS_DP_ATTR_MAX - 1)
79
80struct ovs_dp_stats {
81 __u64 n_hit; /* Number of flow table matches. */
82 __u64 n_missed; /* Number of flow table misses. */
83 __u64 n_lost; /* Number of misses not sent to userspace. */
84 __u64 n_flows; /* Number of flows present */
85};
86
87struct ovs_vport_stats {
88 __u64 rx_packets; /* total packets received */
89 __u64 tx_packets; /* total packets transmitted */
90 __u64 rx_bytes; /* total bytes received */
91 __u64 tx_bytes; /* total bytes transmitted */
92 __u64 rx_errors; /* bad packets received */
93 __u64 tx_errors; /* packet transmit problems */
94 __u64 rx_dropped; /* no space in linux buffers */
95 __u64 tx_dropped; /* no space available in linux */
96};
97
98/* Fixed logical ports. */
99#define OVSP_LOCAL ((__u32)0)
100
101/* Packet transfer. */
102
103#define OVS_PACKET_FAMILY "ovs_packet"
104#define OVS_PACKET_VERSION 0x1
105
106enum ovs_packet_cmd {
107 OVS_PACKET_CMD_UNSPEC,
108
109 /* Kernel-to-user notifications. */
110 OVS_PACKET_CMD_MISS, /* Flow table miss. */
111 OVS_PACKET_CMD_ACTION, /* OVS_ACTION_ATTR_USERSPACE action. */
112
113 /* Userspace commands. */
114 OVS_PACKET_CMD_EXECUTE /* Apply actions to a packet. */
115};
116
117/**
118 * enum ovs_packet_attr - attributes for %OVS_PACKET_* commands.
119 * @OVS_PACKET_ATTR_PACKET: Present for all notifications. Contains the entire
120 * packet as received, from the start of the Ethernet header onward. For
121 * %OVS_PACKET_CMD_ACTION, %OVS_PACKET_ATTR_PACKET reflects changes made by
122 * actions preceding %OVS_ACTION_ATTR_USERSPACE, but %OVS_PACKET_ATTR_KEY is
123 * the flow key extracted from the packet as originally received.
124 * @OVS_PACKET_ATTR_KEY: Present for all notifications. Contains the flow key
125 * extracted from the packet as nested %OVS_KEY_ATTR_* attributes. This allows
126 * userspace to adapt its flow setup strategy by comparing its notion of the
127 * flow key against the kernel's.
128 * @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet. Used
129 * for %OVS_PACKET_CMD_EXECUTE. It has nested %OVS_ACTION_ATTR_* attributes.
130 * @OVS_PACKET_ATTR_USERDATA: Present for an %OVS_PACKET_CMD_ACTION
131 * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
132 * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content
133 * specified there.
134 *
135 * These attributes follow the &struct ovs_header within the Generic Netlink
136 * payload for %OVS_PACKET_* commands.
137 */
138enum ovs_packet_attr {
139 OVS_PACKET_ATTR_UNSPEC,
140 OVS_PACKET_ATTR_PACKET, /* Packet data. */
141 OVS_PACKET_ATTR_KEY, /* Nested OVS_KEY_ATTR_* attributes. */
142 OVS_PACKET_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
143 OVS_PACKET_ATTR_USERDATA, /* OVS_ACTION_ATTR_USERSPACE arg. */
144 __OVS_PACKET_ATTR_MAX
145};
146
147#define OVS_PACKET_ATTR_MAX (__OVS_PACKET_ATTR_MAX - 1)
148
149/* Virtual ports. */
150
151#define OVS_VPORT_FAMILY "ovs_vport"
152#define OVS_VPORT_MCGROUP "ovs_vport"
153#define OVS_VPORT_VERSION 0x1
154
155enum ovs_vport_cmd {
156 OVS_VPORT_CMD_UNSPEC,
157 OVS_VPORT_CMD_NEW,
158 OVS_VPORT_CMD_DEL,
159 OVS_VPORT_CMD_GET,
160 OVS_VPORT_CMD_SET
161};
162
163enum ovs_vport_type {
164 OVS_VPORT_TYPE_UNSPEC,
165 OVS_VPORT_TYPE_NETDEV, /* network device */
166 OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */
167 __OVS_VPORT_TYPE_MAX
168};
169
170#define OVS_VPORT_TYPE_MAX (__OVS_VPORT_TYPE_MAX - 1)
171
172/**
173 * enum ovs_vport_attr - attributes for %OVS_VPORT_* commands.
174 * @OVS_VPORT_ATTR_PORT_NO: 32-bit port number within datapath.
175 * @OVS_VPORT_ATTR_TYPE: 32-bit %OVS_VPORT_TYPE_* constant describing the type
176 * of vport.
177 * @OVS_VPORT_ATTR_NAME: Name of vport. For a vport based on a network device
178 * this is the name of the network device. Maximum length %IFNAMSIZ-1 bytes
179 * plus a null terminator.
180 * @OVS_VPORT_ATTR_OPTIONS: Vport-specific configuration information.
181 * @OVS_VPORT_ATTR_UPCALL_PID: The Netlink socket in userspace that
182 * OVS_PACKET_CMD_MISS upcalls will be directed to for packets received on
183 * this port. A value of zero indicates that upcalls should not be sent.
184 * @OVS_VPORT_ATTR_STATS: A &struct ovs_vport_stats giving statistics for
185 * packets sent or received through the vport.
186 *
187 * These attributes follow the &struct ovs_header within the Generic Netlink
188 * payload for %OVS_VPORT_* commands.
189 *
190 * For %OVS_VPORT_CMD_NEW requests, the %OVS_VPORT_ATTR_TYPE and
191 * %OVS_VPORT_ATTR_NAME attributes are required. %OVS_VPORT_ATTR_PORT_NO is
192 * optional; if not specified a free port number is automatically selected.
193 * Whether %OVS_VPORT_ATTR_OPTIONS is required or optional depends on the type
194 * of vport.
195 * and other attributes are ignored.
196 *
197 * For other requests, if %OVS_VPORT_ATTR_NAME is specified then it is used to
198 * look up the vport to operate on; otherwise dp_idx from the &struct
199 * ovs_header plus %OVS_VPORT_ATTR_PORT_NO determine the vport.
200 */
201enum ovs_vport_attr {
202 OVS_VPORT_ATTR_UNSPEC,
203 OVS_VPORT_ATTR_PORT_NO, /* u32 port number within datapath */
204 OVS_VPORT_ATTR_TYPE, /* u32 OVS_VPORT_TYPE_* constant. */
205 OVS_VPORT_ATTR_NAME, /* string name, up to IFNAMSIZ bytes long */
206 OVS_VPORT_ATTR_OPTIONS, /* nested attributes, varies by vport type */
207 OVS_VPORT_ATTR_UPCALL_PID, /* u32 Netlink PID to receive upcalls */
208 OVS_VPORT_ATTR_STATS, /* struct ovs_vport_stats */
209 __OVS_VPORT_ATTR_MAX
210};
211
212#define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1)
213
214/* Flows. */
215
216#define OVS_FLOW_FAMILY "ovs_flow"
217#define OVS_FLOW_MCGROUP "ovs_flow"
218#define OVS_FLOW_VERSION 0x1
219
220enum ovs_flow_cmd {
221 OVS_FLOW_CMD_UNSPEC,
222 OVS_FLOW_CMD_NEW,
223 OVS_FLOW_CMD_DEL,
224 OVS_FLOW_CMD_GET,
225 OVS_FLOW_CMD_SET
226};
227
228struct ovs_flow_stats {
229 __u64 n_packets; /* Number of matched packets. */
230 __u64 n_bytes; /* Number of matched bytes. */
231};
232
233enum ovs_key_attr {
234 OVS_KEY_ATTR_UNSPEC,
235 OVS_KEY_ATTR_ENCAP, /* Nested set of encapsulated attributes. */
236 OVS_KEY_ATTR_PRIORITY, /* u32 skb->priority */
237 OVS_KEY_ATTR_IN_PORT, /* u32 OVS dp port number */
238 OVS_KEY_ATTR_ETHERNET, /* struct ovs_key_ethernet */
239 OVS_KEY_ATTR_VLAN, /* be16 VLAN TCI */
240 OVS_KEY_ATTR_ETHERTYPE, /* be16 Ethernet type */
241 OVS_KEY_ATTR_IPV4, /* struct ovs_key_ipv4 */
242 OVS_KEY_ATTR_IPV6, /* struct ovs_key_ipv6 */
243 OVS_KEY_ATTR_TCP, /* struct ovs_key_tcp */
244 OVS_KEY_ATTR_UDP, /* struct ovs_key_udp */
245 OVS_KEY_ATTR_ICMP, /* struct ovs_key_icmp */
246 OVS_KEY_ATTR_ICMPV6, /* struct ovs_key_icmpv6 */
247 OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */
248 OVS_KEY_ATTR_ND, /* struct ovs_key_nd */
249 OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */
250 __OVS_KEY_ATTR_MAX
251};
252
253#define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
254
255/**
256 * enum ovs_frag_type - IPv4 and IPv6 fragment type
257 * @OVS_FRAG_TYPE_NONE: Packet is not a fragment.
258 * @OVS_FRAG_TYPE_FIRST: Packet is a fragment with offset 0.
259 * @OVS_FRAG_TYPE_LATER: Packet is a fragment with nonzero offset.
260 *
261 * Used as the @ipv4_frag in &struct ovs_key_ipv4 and as @ipv6_frag &struct
262 * ovs_key_ipv6.
263 */
264enum ovs_frag_type {
265 OVS_FRAG_TYPE_NONE,
266 OVS_FRAG_TYPE_FIRST,
267 OVS_FRAG_TYPE_LATER,
268 __OVS_FRAG_TYPE_MAX
269};
270
271#define OVS_FRAG_TYPE_MAX (__OVS_FRAG_TYPE_MAX - 1)
272
273struct ovs_key_ethernet {
274 __u8 eth_src[ETH_ALEN];
275 __u8 eth_dst[ETH_ALEN];
276};
277
278struct ovs_key_ipv4 {
279 __be32 ipv4_src;
280 __be32 ipv4_dst;
281 __u8 ipv4_proto;
282 __u8 ipv4_tos;
283 __u8 ipv4_ttl;
284 __u8 ipv4_frag; /* One of OVS_FRAG_TYPE_*. */
285};
286
287struct ovs_key_ipv6 {
288 __be32 ipv6_src[4];
289 __be32 ipv6_dst[4];
290 __be32 ipv6_label; /* 20-bits in least-significant bits. */
291 __u8 ipv6_proto;
292 __u8 ipv6_tclass;
293 __u8 ipv6_hlimit;
294 __u8 ipv6_frag; /* One of OVS_FRAG_TYPE_*. */
295};
296
297struct ovs_key_tcp {
298 __be16 tcp_src;
299 __be16 tcp_dst;
300};
301
302struct ovs_key_udp {
303 __be16 udp_src;
304 __be16 udp_dst;
305};
306
307struct ovs_key_icmp {
308 __u8 icmp_type;
309 __u8 icmp_code;
310};
311
312struct ovs_key_icmpv6 {
313 __u8 icmpv6_type;
314 __u8 icmpv6_code;
315};
316
317struct ovs_key_arp {
318 __be32 arp_sip;
319 __be32 arp_tip;
320 __be16 arp_op;
321 __u8 arp_sha[ETH_ALEN];
322 __u8 arp_tha[ETH_ALEN];
323};
324
325struct ovs_key_nd {
326 __u32 nd_target[4];
327 __u8 nd_sll[ETH_ALEN];
328 __u8 nd_tll[ETH_ALEN];
329};
330
331/**
332 * enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
333 * @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow
334 * key. Always present in notifications. Required for all requests (except
335 * dumps).
336 * @OVS_FLOW_ATTR_ACTIONS: Nested %OVS_ACTION_ATTR_* attributes specifying
337 * the actions to take for packets that match the key. Always present in
338 * notifications. Required for %OVS_FLOW_CMD_NEW requests, optional for
339 * %OVS_FLOW_CMD_SET requests.
340 * @OVS_FLOW_ATTR_STATS: &struct ovs_flow_stats giving statistics for this
341 * flow. Present in notifications if the stats would be nonzero. Ignored in
342 * requests.
343 * @OVS_FLOW_ATTR_TCP_FLAGS: An 8-bit value giving the OR'd value of all of the
344 * TCP flags seen on packets in this flow. Only present in notifications for
345 * TCP flows, and only if it would be nonzero. Ignored in requests.
346 * @OVS_FLOW_ATTR_USED: A 64-bit integer giving the time, in milliseconds on
347 * the system monotonic clock, at which a packet was last processed for this
348 * flow. Only present in notifications if a packet has been processed for this
349 * flow. Ignored in requests.
350 * @OVS_FLOW_ATTR_CLEAR: If present in a %OVS_FLOW_CMD_SET request, clears the
351 * last-used time, accumulated TCP flags, and statistics for this flow.
352 * Otherwise ignored in requests. Never present in notifications.
353 *
354 * These attributes follow the &struct ovs_header within the Generic Netlink
355 * payload for %OVS_FLOW_* commands.
356 */
357enum ovs_flow_attr {
358 OVS_FLOW_ATTR_UNSPEC,
359 OVS_FLOW_ATTR_KEY, /* Sequence of OVS_KEY_ATTR_* attributes. */
360 OVS_FLOW_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
361 OVS_FLOW_ATTR_STATS, /* struct ovs_flow_stats. */
362 OVS_FLOW_ATTR_TCP_FLAGS, /* 8-bit OR'd TCP flags. */
363 OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */
364 OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */
365 __OVS_FLOW_ATTR_MAX
366};
367
368#define OVS_FLOW_ATTR_MAX (__OVS_FLOW_ATTR_MAX - 1)
369
370/**
371 * enum ovs_sample_attr - Attributes for %OVS_ACTION_ATTR_SAMPLE action.
372 * @OVS_SAMPLE_ATTR_PROBABILITY: 32-bit fraction of packets to sample with
373 * @OVS_ACTION_ATTR_SAMPLE. A value of 0 samples no packets, a value of
374 * %UINT32_MAX samples all packets and intermediate values sample intermediate
375 * fractions of packets.
376 * @OVS_SAMPLE_ATTR_ACTIONS: Set of actions to execute in sampling event.
377 * Actions are passed as nested attributes.
378 *
379 * Executes the specified actions with the given probability on a per-packet
380 * basis.
381 */
382enum ovs_sample_attr {
383 OVS_SAMPLE_ATTR_UNSPEC,
384 OVS_SAMPLE_ATTR_PROBABILITY, /* u32 number */
385 OVS_SAMPLE_ATTR_ACTIONS, /* Nested OVS_ACTION_ATTR_* attributes. */
386 __OVS_SAMPLE_ATTR_MAX,
387};
388
389#define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
390
391/**
392 * enum ovs_userspace_attr - Attributes for %OVS_ACTION_ATTR_USERSPACE action.
393 * @OVS_USERSPACE_ATTR_PID: u32 Netlink PID to which the %OVS_PACKET_CMD_ACTION
394 * message should be sent. Required.
395 * @OVS_USERSPACE_ATTR_USERDATA: If present, its variable-length argument is
396 * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA.
397 */
398enum ovs_userspace_attr {
399 OVS_USERSPACE_ATTR_UNSPEC,
400 OVS_USERSPACE_ATTR_PID, /* u32 Netlink PID to receive upcalls. */
401 OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */
402 __OVS_USERSPACE_ATTR_MAX
403};
404
405#define OVS_USERSPACE_ATTR_MAX (__OVS_USERSPACE_ATTR_MAX - 1)
406
407/**
408 * struct ovs_action_push_vlan - %OVS_ACTION_ATTR_PUSH_VLAN action argument.
409 * @vlan_tpid: Tag protocol identifier (TPID) to push.
410 * @vlan_tci: Tag control identifier (TCI) to push. The CFI bit must be set
411 * (but it will not be set in the 802.1Q header that is pushed).
412 *
413 * The @vlan_tpid value is typically %ETH_P_8021Q. The only acceptable TPID
414 * values are those that the kernel module also parses as 802.1Q headers, to
415 * prevent %OVS_ACTION_ATTR_PUSH_VLAN followed by %OVS_ACTION_ATTR_POP_VLAN
416 * from having surprising results.
417 */
418struct ovs_action_push_vlan {
419 __be16 vlan_tpid; /* 802.1Q TPID. */
420 __be16 vlan_tci; /* 802.1Q TCI (VLAN ID and priority). */
421};
422
423/**
424 * enum ovs_action_attr - Action types.
425 *
426 * @OVS_ACTION_ATTR_OUTPUT: Output packet to port.
427 * @OVS_ACTION_ATTR_USERSPACE: Send packet to userspace according to nested
428 * %OVS_USERSPACE_ATTR_* attributes.
429 * @OVS_ACTION_ATTR_SET: Replaces the contents of an existing header. The
430 * single nested %OVS_KEY_ATTR_* attribute specifies a header to modify and its
431 * value.
432 * @OVS_ACTION_ATTR_PUSH_VLAN: Push a new outermost 802.1Q header onto the
433 * packet.
434 * @OVS_ACTION_ATTR_POP_VLAN: Pop the outermost 802.1Q header off the packet.
435 * @OVS_ACTION_ATTR_SAMPLE: Probabilitically executes actions, as specified in
436 * the nested %OVS_SAMPLE_ATTR_* attributes.
437 *
438 * Only a single header can be set with a single %OVS_ACTION_ATTR_SET. Not all
439 * fields within a header are modifiable, e.g. the IPv4 protocol and fragment
440 * type may not be changed.
441 */
442
443enum ovs_action_attr {
444 OVS_ACTION_ATTR_UNSPEC,
445 OVS_ACTION_ATTR_OUTPUT, /* u32 port number. */
446 OVS_ACTION_ATTR_USERSPACE, /* Nested OVS_USERSPACE_ATTR_*. */
447 OVS_ACTION_ATTR_SET, /* One nested OVS_KEY_ATTR_*. */
448 OVS_ACTION_ATTR_PUSH_VLAN, /* struct ovs_action_push_vlan. */
449 OVS_ACTION_ATTR_POP_VLAN, /* No argument. */
450 OVS_ACTION_ATTR_SAMPLE, /* Nested OVS_SAMPLE_ATTR_*. */
451 __OVS_ACTION_ATTR_MAX
452};
453
454#define OVS_ACTION_ATTR_MAX (__OVS_ACTION_ATTR_MAX - 1)
455
456#endif /* _LINUX_OPENVSWITCH_H */
diff --git a/include/uapi/linux/packet_diag.h b/include/uapi/linux/packet_diag.h
index afafd703ad92..b2cc0cd9c4d9 100644
--- a/include/uapi/linux/packet_diag.h
+++ b/include/uapi/linux/packet_diag.h
@@ -16,6 +16,8 @@ struct packet_diag_req {
16#define PACKET_SHOW_MCLIST 0x00000002 /* A set of packet_diag_mclist-s */ 16#define PACKET_SHOW_MCLIST 0x00000002 /* A set of packet_diag_mclist-s */
17#define PACKET_SHOW_RING_CFG 0x00000004 /* Rings configuration parameters */ 17#define PACKET_SHOW_RING_CFG 0x00000004 /* Rings configuration parameters */
18#define PACKET_SHOW_FANOUT 0x00000008 18#define PACKET_SHOW_FANOUT 0x00000008
19#define PACKET_SHOW_MEMINFO 0x00000010
20#define PACKET_SHOW_FILTER 0x00000020
19 21
20struct packet_diag_msg { 22struct packet_diag_msg {
21 __u8 pdiag_family; 23 __u8 pdiag_family;
@@ -32,6 +34,9 @@ enum {
32 PACKET_DIAG_RX_RING, 34 PACKET_DIAG_RX_RING,
33 PACKET_DIAG_TX_RING, 35 PACKET_DIAG_TX_RING,
34 PACKET_DIAG_FANOUT, 36 PACKET_DIAG_FANOUT,
37 PACKET_DIAG_UID,
38 PACKET_DIAG_MEMINFO,
39 PACKET_DIAG_FILTER,
35 40
36 __PACKET_DIAG_MAX, 41 __PACKET_DIAG_MAX,
37}; 42};
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index ebfadc56d1b4..864e324da80d 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -292,12 +292,12 @@
292 292
293/* Message Signalled Interrupts registers */ 293/* Message Signalled Interrupts registers */
294 294
295#define PCI_MSI_FLAGS 2 /* Various flags */ 295#define PCI_MSI_FLAGS 2 /* Message Control */
296#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ 296#define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */
297#define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ 297#define PCI_MSI_FLAGS_QMASK 0x000e /* Maximum queue size available */
298#define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ 298#define PCI_MSI_FLAGS_QSIZE 0x0070 /* Message queue size configured */
299#define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ 299#define PCI_MSI_FLAGS_64BIT 0x0080 /* 64-bit addresses allowed */
300#define PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */ 300#define PCI_MSI_FLAGS_MASKBIT 0x0100 /* Per-vector masking capable */
301#define PCI_MSI_RFU 3 /* Rest of capability flags */ 301#define PCI_MSI_RFU 3 /* Rest of capability flags */
302#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ 302#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */
303#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ 303#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
@@ -309,13 +309,17 @@
309#define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ 309#define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */
310 310
311/* MSI-X registers */ 311/* MSI-X registers */
312#define PCI_MSIX_FLAGS 2 312#define PCI_MSIX_FLAGS 2 /* Message Control */
313#define PCI_MSIX_FLAGS_QSIZE 0x7FF 313#define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */
314#define PCI_MSIX_FLAGS_ENABLE (1 << 15) 314#define PCI_MSIX_FLAGS_MASKALL 0x4000 /* Mask all vectors for this function */
315#define PCI_MSIX_FLAGS_MASKALL (1 << 14) 315#define PCI_MSIX_FLAGS_ENABLE 0x8000 /* MSI-X enable */
316#define PCI_MSIX_TABLE 4 316#define PCI_MSIX_TABLE 4 /* Table offset */
317#define PCI_MSIX_PBA 8 317#define PCI_MSIX_TABLE_BIR 0x00000007 /* BAR index */
318#define PCI_MSIX_FLAGS_BIRMASK (7 << 0) 318#define PCI_MSIX_TABLE_OFFSET 0xfffffff8 /* Offset into specified BAR */
319#define PCI_MSIX_PBA 8 /* Pending Bit Array offset */
320#define PCI_MSIX_PBA_BIR 0x00000007 /* BAR index */
321#define PCI_MSIX_PBA_OFFSET 0xfffffff8 /* Offset into specified BAR */
322#define PCI_MSIX_FLAGS_BIRMASK (7 << 0) /* deprecated */
319#define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ 323#define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */
320 324
321/* MSI-X entry's format */ 325/* MSI-X entry's format */
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index 9fa9c622a7f4..fb104e51496e 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -132,8 +132,10 @@ enum perf_event_sample_format {
132 PERF_SAMPLE_BRANCH_STACK = 1U << 11, 132 PERF_SAMPLE_BRANCH_STACK = 1U << 11,
133 PERF_SAMPLE_REGS_USER = 1U << 12, 133 PERF_SAMPLE_REGS_USER = 1U << 12,
134 PERF_SAMPLE_STACK_USER = 1U << 13, 134 PERF_SAMPLE_STACK_USER = 1U << 13,
135 PERF_SAMPLE_WEIGHT = 1U << 14,
136 PERF_SAMPLE_DATA_SRC = 1U << 15,
135 137
136 PERF_SAMPLE_MAX = 1U << 14, /* non-ABI */ 138 PERF_SAMPLE_MAX = 1U << 16, /* non-ABI */
137}; 139};
138 140
139/* 141/*
@@ -443,6 +445,7 @@ struct perf_event_mmap_page {
443#define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) 445#define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0)
444#define PERF_RECORD_MISC_GUEST_USER (5 << 0) 446#define PERF_RECORD_MISC_GUEST_USER (5 << 0)
445 447
448#define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
446/* 449/*
447 * Indicates that the content of PERF_SAMPLE_IP points to 450 * Indicates that the content of PERF_SAMPLE_IP points to
448 * the actual instruction that triggered the event. See also 451 * the actual instruction that triggered the event. See also
@@ -588,6 +591,9 @@ enum perf_event_type {
588 * { u64 size; 591 * { u64 size;
589 * char data[size]; 592 * char data[size];
590 * u64 dyn_size; } && PERF_SAMPLE_STACK_USER 593 * u64 dyn_size; } && PERF_SAMPLE_STACK_USER
594 *
595 * { u64 weight; } && PERF_SAMPLE_WEIGHT
596 * { u64 data_src; } && PERF_SAMPLE_DATA_SRC
591 * }; 597 * };
592 */ 598 */
593 PERF_RECORD_SAMPLE = 9, 599 PERF_RECORD_SAMPLE = 9,
@@ -613,4 +619,67 @@ enum perf_callchain_context {
613#define PERF_FLAG_FD_OUTPUT (1U << 1) 619#define PERF_FLAG_FD_OUTPUT (1U << 1)
614#define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ 620#define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */
615 621
622union perf_mem_data_src {
623 __u64 val;
624 struct {
625 __u64 mem_op:5, /* type of opcode */
626 mem_lvl:14, /* memory hierarchy level */
627 mem_snoop:5, /* snoop mode */
628 mem_lock:2, /* lock instr */
629 mem_dtlb:7, /* tlb access */
630 mem_rsvd:31;
631 };
632};
633
634/* type of opcode (load/store/prefetch,code) */
635#define PERF_MEM_OP_NA 0x01 /* not available */
636#define PERF_MEM_OP_LOAD 0x02 /* load instruction */
637#define PERF_MEM_OP_STORE 0x04 /* store instruction */
638#define PERF_MEM_OP_PFETCH 0x08 /* prefetch */
639#define PERF_MEM_OP_EXEC 0x10 /* code (execution) */
640#define PERF_MEM_OP_SHIFT 0
641
642/* memory hierarchy (memory level, hit or miss) */
643#define PERF_MEM_LVL_NA 0x01 /* not available */
644#define PERF_MEM_LVL_HIT 0x02 /* hit level */
645#define PERF_MEM_LVL_MISS 0x04 /* miss level */
646#define PERF_MEM_LVL_L1 0x08 /* L1 */
647#define PERF_MEM_LVL_LFB 0x10 /* Line Fill Buffer */
648#define PERF_MEM_LVL_L2 0x20 /* L2 */
649#define PERF_MEM_LVL_L3 0x40 /* L3 */
650#define PERF_MEM_LVL_LOC_RAM 0x80 /* Local DRAM */
651#define PERF_MEM_LVL_REM_RAM1 0x100 /* Remote DRAM (1 hop) */
652#define PERF_MEM_LVL_REM_RAM2 0x200 /* Remote DRAM (2 hops) */
653#define PERF_MEM_LVL_REM_CCE1 0x400 /* Remote Cache (1 hop) */
654#define PERF_MEM_LVL_REM_CCE2 0x800 /* Remote Cache (2 hops) */
655#define PERF_MEM_LVL_IO 0x1000 /* I/O memory */
656#define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */
657#define PERF_MEM_LVL_SHIFT 5
658
659/* snoop mode */
660#define PERF_MEM_SNOOP_NA 0x01 /* not available */
661#define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */
662#define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */
663#define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */
664#define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */
665#define PERF_MEM_SNOOP_SHIFT 19
666
667/* locked instruction */
668#define PERF_MEM_LOCK_NA 0x01 /* not available */
669#define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */
670#define PERF_MEM_LOCK_SHIFT 24
671
672/* TLB access */
673#define PERF_MEM_TLB_NA 0x01 /* not available */
674#define PERF_MEM_TLB_HIT 0x02 /* hit level */
675#define PERF_MEM_TLB_MISS 0x04 /* miss level */
676#define PERF_MEM_TLB_L1 0x08 /* L1 */
677#define PERF_MEM_TLB_L2 0x10 /* L2 */
678#define PERF_MEM_TLB_WK 0x20 /* Hardware Walker*/
679#define PERF_MEM_TLB_OS 0x40 /* OS fault handler */
680#define PERF_MEM_TLB_SHIFT 26
681
682#define PERF_MEM_S(a, s) \
683 (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
684
616#endif /* _UAPI_LINUX_PERF_EVENT_H */ 685#endif /* _UAPI_LINUX_PERF_EVENT_H */
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index 32aef0a439ef..dbd71b0c7d8c 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -348,6 +348,7 @@ enum {
348 TCA_HTB_INIT, 348 TCA_HTB_INIT,
349 TCA_HTB_CTAB, 349 TCA_HTB_CTAB,
350 TCA_HTB_RTAB, 350 TCA_HTB_RTAB,
351 TCA_HTB_DIRECT_QLEN,
351 __TCA_HTB_MAX, 352 __TCA_HTB_MAX,
352}; 353};
353 354
diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h
index 022ab186a812..52ebcc89f306 100644
--- a/include/uapi/linux/ptrace.h
+++ b/include/uapi/linux/ptrace.h
@@ -5,6 +5,7 @@
5 5
6/* has the defines to get at the registers. */ 6/* has the defines to get at the registers. */
7 7
8#include <linux/types.h>
8 9
9#define PTRACE_TRACEME 0 10#define PTRACE_TRACEME 0
10#define PTRACE_PEEKTEXT 1 11#define PTRACE_PEEKTEXT 1
@@ -52,6 +53,17 @@
52#define PTRACE_INTERRUPT 0x4207 53#define PTRACE_INTERRUPT 0x4207
53#define PTRACE_LISTEN 0x4208 54#define PTRACE_LISTEN 0x4208
54 55
56#define PTRACE_PEEKSIGINFO 0x4209
57
58struct ptrace_peeksiginfo_args {
59 __u64 off; /* from which siginfo to start */
60 __u32 flags;
61 __s32 nr; /* how may siginfos to take */
62};
63
64/* Read signals from a shared (process wide) queue */
65#define PTRACE_PEEKSIGINFO_SHARED (1 << 0)
66
55/* Wait extended result codes for the above trace options. */ 67/* Wait extended result codes for the above trace options. */
56#define PTRACE_EVENT_FORK 1 68#define PTRACE_EVENT_FORK 1
57#define PTRACE_EVENT_VFORK 2 69#define PTRACE_EVENT_VFORK 2
diff --git a/include/uapi/linux/rfkill.h b/include/uapi/linux/rfkill.h
index 2753c6cc9740..058757f7a733 100644
--- a/include/uapi/linux/rfkill.h
+++ b/include/uapi/linux/rfkill.h
@@ -37,6 +37,7 @@
37 * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device. 37 * @RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
38 * @RFKILL_TYPE_GPS: switch is on a GPS device. 38 * @RFKILL_TYPE_GPS: switch is on a GPS device.
39 * @RFKILL_TYPE_FM: switch is on a FM radio device. 39 * @RFKILL_TYPE_FM: switch is on a FM radio device.
40 * @RFKILL_TYPE_NFC: switch is on an NFC device.
40 * @NUM_RFKILL_TYPES: number of defined rfkill types 41 * @NUM_RFKILL_TYPES: number of defined rfkill types
41 */ 42 */
42enum rfkill_type { 43enum rfkill_type {
@@ -48,6 +49,7 @@ enum rfkill_type {
48 RFKILL_TYPE_WWAN, 49 RFKILL_TYPE_WWAN,
49 RFKILL_TYPE_GPS, 50 RFKILL_TYPE_GPS,
50 RFKILL_TYPE_FM, 51 RFKILL_TYPE_FM,
52 RFKILL_TYPE_NFC,
51 NUM_RFKILL_TYPES, 53 NUM_RFKILL_TYPES,
52}; 54};
53 55
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
new file mode 100644
index 000000000000..66b466e4ca08
--- /dev/null
+++ b/include/uapi/linux/sctp.h
@@ -0,0 +1,846 @@
1/* SCTP kernel implementation
2 * (C) Copyright IBM Corp. 2001, 2004
3 * Copyright (c) 1999-2000 Cisco, Inc.
4 * Copyright (c) 1999-2001 Motorola, Inc.
5 * Copyright (c) 2002 Intel Corp.
6 *
7 * This file is part of the SCTP kernel implementation
8 *
9 * This header represents the structures and constants needed to support
10 * the SCTP Extension to the Sockets API.
11 *
12 * This SCTP implementation is free software;
13 * you can redistribute it and/or modify it under the terms of
14 * the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
16 * any later version.
17 *
18 * This SCTP implementation is distributed in the hope that it
19 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
20 * ************************
21 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 * See the GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with GNU CC; see the file COPYING. If not, write to
26 * the Free Software Foundation, 59 Temple Place - Suite 330,
27 * Boston, MA 02111-1307, USA.
28 *
29 * Please send any bug reports or fixes you make to the
30 * email address(es):
31 * lksctp developers <lksctp-developers@lists.sourceforge.net>
32 *
33 * Or submit a bug report through the following website:
34 * http://www.sf.net/projects/lksctp
35 *
36 * Written or modified by:
37 * La Monte H.P. Yarroll <piggy@acm.org>
38 * R. Stewart <randall@sctp.chicago.il.us>
39 * K. Morneau <kmorneau@cisco.com>
40 * Q. Xie <qxie1@email.mot.com>
41 * Karl Knutson <karl@athena.chicago.il.us>
42 * Jon Grimm <jgrimm@us.ibm.com>
43 * Daisy Chang <daisyc@us.ibm.com>
44 * Ryan Layer <rmlayer@us.ibm.com>
45 * Ardelle Fan <ardelle.fan@intel.com>
46 * Sridhar Samudrala <sri@us.ibm.com>
47 * Inaky Perez-Gonzalez <inaky.gonzalez@intel.com>
48 * Vlad Yasevich <vladislav.yasevich@hp.com>
49 *
50 * Any bugs reported given to us we will try to fix... any fixes shared will
51 * be incorporated into the next SCTP release.
52 */
53
54#ifndef _UAPI_SCTP_H
55#define _UAPI_SCTP_H
56
57#include <linux/types.h>
58#include <linux/socket.h>
59
60typedef __s32 sctp_assoc_t;
61
62/* The following symbols come from the Sockets API Extensions for
63 * SCTP <draft-ietf-tsvwg-sctpsocket-07.txt>.
64 */
65#define SCTP_RTOINFO 0
66#define SCTP_ASSOCINFO 1
67#define SCTP_INITMSG 2
68#define SCTP_NODELAY 3 /* Get/set nodelay option. */
69#define SCTP_AUTOCLOSE 4
70#define SCTP_SET_PEER_PRIMARY_ADDR 5
71#define SCTP_PRIMARY_ADDR 6
72#define SCTP_ADAPTATION_LAYER 7
73#define SCTP_DISABLE_FRAGMENTS 8
74#define SCTP_PEER_ADDR_PARAMS 9
75#define SCTP_DEFAULT_SEND_PARAM 10
76#define SCTP_EVENTS 11
77#define SCTP_I_WANT_MAPPED_V4_ADDR 12 /* Turn on/off mapped v4 addresses */
78#define SCTP_MAXSEG 13 /* Get/set maximum fragment. */
79#define SCTP_STATUS 14
80#define SCTP_GET_PEER_ADDR_INFO 15
81#define SCTP_DELAYED_ACK_TIME 16
82#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK_TIME
83#define SCTP_DELAYED_SACK SCTP_DELAYED_ACK_TIME
84#define SCTP_CONTEXT 17
85#define SCTP_FRAGMENT_INTERLEAVE 18
86#define SCTP_PARTIAL_DELIVERY_POINT 19 /* Set/Get partial delivery point */
87#define SCTP_MAX_BURST 20 /* Set/Get max burst */
88#define SCTP_AUTH_CHUNK 21 /* Set only: add a chunk type to authenticate */
89#define SCTP_HMAC_IDENT 22
90#define SCTP_AUTH_KEY 23
91#define SCTP_AUTH_ACTIVE_KEY 24
92#define SCTP_AUTH_DELETE_KEY 25
93#define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */
94#define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */
95#define SCTP_GET_ASSOC_NUMBER 28 /* Read only */
96#define SCTP_GET_ASSOC_ID_LIST 29 /* Read only */
97#define SCTP_AUTO_ASCONF 30
98#define SCTP_PEER_ADDR_THLDS 31
99
100/* Internal Socket Options. Some of the sctp library functions are
101 * implemented using these socket options.
102 */
103#define SCTP_SOCKOPT_BINDX_ADD 100 /* BINDX requests for adding addrs */
104#define SCTP_SOCKOPT_BINDX_REM 101 /* BINDX requests for removing addrs. */
105#define SCTP_SOCKOPT_PEELOFF 102 /* peel off association. */
106/* Options 104-106 are deprecated and removed. Do not use this space */
107#define SCTP_SOCKOPT_CONNECTX_OLD 107 /* CONNECTX old requests. */
108#define SCTP_GET_PEER_ADDRS 108 /* Get all peer address. */
109#define SCTP_GET_LOCAL_ADDRS 109 /* Get all local address. */
110#define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */
111#define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */
112#define SCTP_GET_ASSOC_STATS 112 /* Read only */
113
114/*
115 * 5.2.1 SCTP Initiation Structure (SCTP_INIT)
116 *
117 * This cmsghdr structure provides information for initializing new
118 * SCTP associations with sendmsg(). The SCTP_INITMSG socket option
119 * uses this same data structure. This structure is not used for
120 * recvmsg().
121 *
122 * cmsg_level cmsg_type cmsg_data[]
123 * ------------ ------------ ----------------------
124 * IPPROTO_SCTP SCTP_INIT struct sctp_initmsg
125 *
126 */
127struct sctp_initmsg {
128 __u16 sinit_num_ostreams;
129 __u16 sinit_max_instreams;
130 __u16 sinit_max_attempts;
131 __u16 sinit_max_init_timeo;
132};
133
134/*
135 * 5.2.2 SCTP Header Information Structure (SCTP_SNDRCV)
136 *
137 * This cmsghdr structure specifies SCTP options for sendmsg() and
138 * describes SCTP header information about a received message through
139 * recvmsg().
140 *
141 * cmsg_level cmsg_type cmsg_data[]
142 * ------------ ------------ ----------------------
143 * IPPROTO_SCTP SCTP_SNDRCV struct sctp_sndrcvinfo
144 *
145 */
146struct sctp_sndrcvinfo {
147 __u16 sinfo_stream;
148 __u16 sinfo_ssn;
149 __u16 sinfo_flags;
150 __u32 sinfo_ppid;
151 __u32 sinfo_context;
152 __u32 sinfo_timetolive;
153 __u32 sinfo_tsn;
154 __u32 sinfo_cumtsn;
155 sctp_assoc_t sinfo_assoc_id;
156};
157
158/*
159 * sinfo_flags: 16 bits (unsigned integer)
160 *
161 * This field may contain any of the following flags and is composed of
162 * a bitwise OR of these values.
163 */
164
165enum sctp_sinfo_flags {
166 SCTP_UNORDERED = 1, /* Send/receive message unordered. */
167 SCTP_ADDR_OVER = 2, /* Override the primary destination. */
168 SCTP_ABORT=4, /* Send an ABORT message to the peer. */
169 SCTP_SACK_IMMEDIATELY = 8, /* SACK should be sent without delay */
170 SCTP_EOF=MSG_FIN, /* Initiate graceful shutdown process. */
171};
172
173typedef union {
174 __u8 raw;
175 struct sctp_initmsg init;
176 struct sctp_sndrcvinfo sndrcv;
177} sctp_cmsg_data_t;
178
179/* These are cmsg_types. */
180typedef enum sctp_cmsg_type {
181 SCTP_INIT, /* 5.2.1 SCTP Initiation Structure */
182#define SCTP_INIT SCTP_INIT
183 SCTP_SNDRCV, /* 5.2.2 SCTP Header Information Structure */
184#define SCTP_SNDRCV SCTP_SNDRCV
185} sctp_cmsg_t;
186
187/*
188 * 5.3.1.1 SCTP_ASSOC_CHANGE
189 *
190 * Communication notifications inform the ULP that an SCTP association
191 * has either begun or ended. The identifier for a new association is
192 * provided by this notificaion. The notification information has the
193 * following format:
194 *
195 */
196struct sctp_assoc_change {
197 __u16 sac_type;
198 __u16 sac_flags;
199 __u32 sac_length;
200 __u16 sac_state;
201 __u16 sac_error;
202 __u16 sac_outbound_streams;
203 __u16 sac_inbound_streams;
204 sctp_assoc_t sac_assoc_id;
205 __u8 sac_info[0];
206};
207
208/*
209 * sac_state: 32 bits (signed integer)
210 *
211 * This field holds one of a number of values that communicate the
212 * event that happened to the association. They include:
213 *
214 * Note: The following state names deviate from the API draft as
215 * the names clash too easily with other kernel symbols.
216 */
217enum sctp_sac_state {
218 SCTP_COMM_UP,
219 SCTP_COMM_LOST,
220 SCTP_RESTART,
221 SCTP_SHUTDOWN_COMP,
222 SCTP_CANT_STR_ASSOC,
223};
224
225/*
226 * 5.3.1.2 SCTP_PEER_ADDR_CHANGE
227 *
228 * When a destination address on a multi-homed peer encounters a change
229 * an interface details event is sent. The information has the
230 * following structure:
231 */
232struct sctp_paddr_change {
233 __u16 spc_type;
234 __u16 spc_flags;
235 __u32 spc_length;
236 struct sockaddr_storage spc_aaddr;
237 int spc_state;
238 int spc_error;
239 sctp_assoc_t spc_assoc_id;
240} __attribute__((packed, aligned(4)));
241
242/*
243 * spc_state: 32 bits (signed integer)
244 *
245 * This field holds one of a number of values that communicate the
246 * event that happened to the address. They include:
247 */
248enum sctp_spc_state {
249 SCTP_ADDR_AVAILABLE,
250 SCTP_ADDR_UNREACHABLE,
251 SCTP_ADDR_REMOVED,
252 SCTP_ADDR_ADDED,
253 SCTP_ADDR_MADE_PRIM,
254 SCTP_ADDR_CONFIRMED,
255};
256
257
258/*
259 * 5.3.1.3 SCTP_REMOTE_ERROR
260 *
261 * A remote peer may send an Operational Error message to its peer.
262 * This message indicates a variety of error conditions on an
263 * association. The entire error TLV as it appears on the wire is
264 * included in a SCTP_REMOTE_ERROR event. Please refer to the SCTP
265 * specification [SCTP] and any extensions for a list of possible
266 * error formats. SCTP error TLVs have the format:
267 */
268struct sctp_remote_error {
269 __u16 sre_type;
270 __u16 sre_flags;
271 __u32 sre_length;
272 __u16 sre_error;
273 sctp_assoc_t sre_assoc_id;
274 __u8 sre_data[0];
275};
276
277
278/*
279 * 5.3.1.4 SCTP_SEND_FAILED
280 *
281 * If SCTP cannot deliver a message it may return the message as a
282 * notification.
283 */
284struct sctp_send_failed {
285 __u16 ssf_type;
286 __u16 ssf_flags;
287 __u32 ssf_length;
288 __u32 ssf_error;
289 struct sctp_sndrcvinfo ssf_info;
290 sctp_assoc_t ssf_assoc_id;
291 __u8 ssf_data[0];
292};
293
294/*
295 * ssf_flags: 16 bits (unsigned integer)
296 *
297 * The flag value will take one of the following values
298 *
299 * SCTP_DATA_UNSENT - Indicates that the data was never put on
300 * the wire.
301 *
302 * SCTP_DATA_SENT - Indicates that the data was put on the wire.
303 * Note that this does not necessarily mean that the
304 * data was (or was not) successfully delivered.
305 */
306enum sctp_ssf_flags {
307 SCTP_DATA_UNSENT,
308 SCTP_DATA_SENT,
309};
310
311/*
312 * 5.3.1.5 SCTP_SHUTDOWN_EVENT
313 *
314 * When a peer sends a SHUTDOWN, SCTP delivers this notification to
315 * inform the application that it should cease sending data.
316 */
317struct sctp_shutdown_event {
318 __u16 sse_type;
319 __u16 sse_flags;
320 __u32 sse_length;
321 sctp_assoc_t sse_assoc_id;
322};
323
324/*
325 * 5.3.1.6 SCTP_ADAPTATION_INDICATION
326 *
327 * When a peer sends a Adaptation Layer Indication parameter , SCTP
328 * delivers this notification to inform the application
329 * that of the peers requested adaptation layer.
330 */
331struct sctp_adaptation_event {
332 __u16 sai_type;
333 __u16 sai_flags;
334 __u32 sai_length;
335 __u32 sai_adaptation_ind;
336 sctp_assoc_t sai_assoc_id;
337};
338
339/*
340 * 5.3.1.7 SCTP_PARTIAL_DELIVERY_EVENT
341 *
342 * When a receiver is engaged in a partial delivery of a
343 * message this notification will be used to indicate
344 * various events.
345 */
346struct sctp_pdapi_event {
347 __u16 pdapi_type;
348 __u16 pdapi_flags;
349 __u32 pdapi_length;
350 __u32 pdapi_indication;
351 sctp_assoc_t pdapi_assoc_id;
352};
353
354enum { SCTP_PARTIAL_DELIVERY_ABORTED=0, };
355
356/*
357 * 5.3.1.8. SCTP_AUTHENTICATION_EVENT
358 *
359 * When a receiver is using authentication this message will provide
360 * notifications regarding new keys being made active as well as errors.
361 */
362struct sctp_authkey_event {
363 __u16 auth_type;
364 __u16 auth_flags;
365 __u32 auth_length;
366 __u16 auth_keynumber;
367 __u16 auth_altkeynumber;
368 __u32 auth_indication;
369 sctp_assoc_t auth_assoc_id;
370};
371
372enum { SCTP_AUTH_NEWKEY = 0, };
373
374/*
375 * 6.1.9. SCTP_SENDER_DRY_EVENT
376 *
377 * When the SCTP stack has no more user data to send or retransmit, this
378 * notification is given to the user. Also, at the time when a user app
379 * subscribes to this event, if there is no data to be sent or
380 * retransmit, the stack will immediately send up this notification.
381 */
382struct sctp_sender_dry_event {
383 __u16 sender_dry_type;
384 __u16 sender_dry_flags;
385 __u32 sender_dry_length;
386 sctp_assoc_t sender_dry_assoc_id;
387};
388
389/*
390 * Described in Section 7.3
391 * Ancillary Data and Notification Interest Options
392 */
393struct sctp_event_subscribe {
394 __u8 sctp_data_io_event;
395 __u8 sctp_association_event;
396 __u8 sctp_address_event;
397 __u8 sctp_send_failure_event;
398 __u8 sctp_peer_error_event;
399 __u8 sctp_shutdown_event;
400 __u8 sctp_partial_delivery_event;
401 __u8 sctp_adaptation_layer_event;
402 __u8 sctp_authentication_event;
403 __u8 sctp_sender_dry_event;
404};
405
406/*
407 * 5.3.1 SCTP Notification Structure
408 *
409 * The notification structure is defined as the union of all
410 * notification types.
411 *
412 */
413union sctp_notification {
414 struct {
415 __u16 sn_type; /* Notification type. */
416 __u16 sn_flags;
417 __u32 sn_length;
418 } sn_header;
419 struct sctp_assoc_change sn_assoc_change;
420 struct sctp_paddr_change sn_paddr_change;
421 struct sctp_remote_error sn_remote_error;
422 struct sctp_send_failed sn_send_failed;
423 struct sctp_shutdown_event sn_shutdown_event;
424 struct sctp_adaptation_event sn_adaptation_event;
425 struct sctp_pdapi_event sn_pdapi_event;
426 struct sctp_authkey_event sn_authkey_event;
427 struct sctp_sender_dry_event sn_sender_dry_event;
428};
429
430/* Section 5.3.1
431 * All standard values for sn_type flags are greater than 2^15.
432 * Values from 2^15 and down are reserved.
433 */
434
435enum sctp_sn_type {
436 SCTP_SN_TYPE_BASE = (1<<15),
437 SCTP_ASSOC_CHANGE,
438#define SCTP_ASSOC_CHANGE SCTP_ASSOC_CHANGE
439 SCTP_PEER_ADDR_CHANGE,
440#define SCTP_PEER_ADDR_CHANGE SCTP_PEER_ADDR_CHANGE
441 SCTP_SEND_FAILED,
442#define SCTP_SEND_FAILED SCTP_SEND_FAILED
443 SCTP_REMOTE_ERROR,
444#define SCTP_REMOTE_ERROR SCTP_REMOTE_ERROR
445 SCTP_SHUTDOWN_EVENT,
446#define SCTP_SHUTDOWN_EVENT SCTP_SHUTDOWN_EVENT
447 SCTP_PARTIAL_DELIVERY_EVENT,
448#define SCTP_PARTIAL_DELIVERY_EVENT SCTP_PARTIAL_DELIVERY_EVENT
449 SCTP_ADAPTATION_INDICATION,
450#define SCTP_ADAPTATION_INDICATION SCTP_ADAPTATION_INDICATION
451 SCTP_AUTHENTICATION_EVENT,
452#define SCTP_AUTHENTICATION_INDICATION SCTP_AUTHENTICATION_EVENT
453 SCTP_SENDER_DRY_EVENT,
454#define SCTP_SENDER_DRY_EVENT SCTP_SENDER_DRY_EVENT
455};
456
457/* Notification error codes used to fill up the error fields in some
458 * notifications.
459 * SCTP_PEER_ADDRESS_CHAGE : spc_error
460 * SCTP_ASSOC_CHANGE : sac_error
461 * These names should be potentially included in the draft 04 of the SCTP
462 * sockets API specification.
463 */
464typedef enum sctp_sn_error {
465 SCTP_FAILED_THRESHOLD,
466 SCTP_RECEIVED_SACK,
467 SCTP_HEARTBEAT_SUCCESS,
468 SCTP_RESPONSE_TO_USER_REQ,
469 SCTP_INTERNAL_ERROR,
470 SCTP_SHUTDOWN_GUARD_EXPIRES,
471 SCTP_PEER_FAULTY,
472} sctp_sn_error_t;
473
474/*
475 * 7.1.1 Retransmission Timeout Parameters (SCTP_RTOINFO)
476 *
477 * The protocol parameters used to initialize and bound retransmission
478 * timeout (RTO) are tunable. See [SCTP] for more information on how
479 * these parameters are used in RTO calculation.
480 */
481struct sctp_rtoinfo {
482 sctp_assoc_t srto_assoc_id;
483 __u32 srto_initial;
484 __u32 srto_max;
485 __u32 srto_min;
486};
487
488/*
489 * 7.1.2 Association Parameters (SCTP_ASSOCINFO)
490 *
491 * This option is used to both examine and set various association and
492 * endpoint parameters.
493 */
494struct sctp_assocparams {
495 sctp_assoc_t sasoc_assoc_id;
496 __u16 sasoc_asocmaxrxt;
497 __u16 sasoc_number_peer_destinations;
498 __u32 sasoc_peer_rwnd;
499 __u32 sasoc_local_rwnd;
500 __u32 sasoc_cookie_life;
501};
502
503/*
504 * 7.1.9 Set Peer Primary Address (SCTP_SET_PEER_PRIMARY_ADDR)
505 *
506 * Requests that the peer mark the enclosed address as the association
507 * primary. The enclosed address must be one of the association's
508 * locally bound addresses. The following structure is used to make a
509 * set primary request:
510 */
511struct sctp_setpeerprim {
512 sctp_assoc_t sspp_assoc_id;
513 struct sockaddr_storage sspp_addr;
514} __attribute__((packed, aligned(4)));
515
516/*
517 * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR)
518 *
519 * Requests that the local SCTP stack use the enclosed peer address as
520 * the association primary. The enclosed address must be one of the
521 * association peer's addresses. The following structure is used to
522 * make a set peer primary request:
523 */
524struct sctp_prim {
525 sctp_assoc_t ssp_assoc_id;
526 struct sockaddr_storage ssp_addr;
527} __attribute__((packed, aligned(4)));
528
529/* For backward compatibility use, define the old name too */
530#define sctp_setprim sctp_prim
531
532/*
533 * 7.1.11 Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER)
534 *
535 * Requests that the local endpoint set the specified Adaptation Layer
536 * Indication parameter for all future INIT and INIT-ACK exchanges.
537 */
538struct sctp_setadaptation {
539 __u32 ssb_adaptation_ind;
540};
541
542/*
543 * 7.1.13 Peer Address Parameters (SCTP_PEER_ADDR_PARAMS)
544 *
545 * Applications can enable or disable heartbeats for any peer address
546 * of an association, modify an address's heartbeat interval, force a
547 * heartbeat to be sent immediately, and adjust the address's maximum
548 * number of retransmissions sent before an address is considered
549 * unreachable. The following structure is used to access and modify an
550 * address's parameters:
551 */
552enum sctp_spp_flags {
553 SPP_HB_ENABLE = 1<<0, /*Enable heartbeats*/
554 SPP_HB_DISABLE = 1<<1, /*Disable heartbeats*/
555 SPP_HB = SPP_HB_ENABLE | SPP_HB_DISABLE,
556 SPP_HB_DEMAND = 1<<2, /*Send heartbeat immediately*/
557 SPP_PMTUD_ENABLE = 1<<3, /*Enable PMTU discovery*/
558 SPP_PMTUD_DISABLE = 1<<4, /*Disable PMTU discovery*/
559 SPP_PMTUD = SPP_PMTUD_ENABLE | SPP_PMTUD_DISABLE,
560 SPP_SACKDELAY_ENABLE = 1<<5, /*Enable SACK*/
561 SPP_SACKDELAY_DISABLE = 1<<6, /*Disable SACK*/
562 SPP_SACKDELAY = SPP_SACKDELAY_ENABLE | SPP_SACKDELAY_DISABLE,
563 SPP_HB_TIME_IS_ZERO = 1<<7, /* Set HB delay to 0 */
564};
565
566struct sctp_paddrparams {
567 sctp_assoc_t spp_assoc_id;
568 struct sockaddr_storage spp_address;
569 __u32 spp_hbinterval;
570 __u16 spp_pathmaxrxt;
571 __u32 spp_pathmtu;
572 __u32 spp_sackdelay;
573 __u32 spp_flags;
574} __attribute__((packed, aligned(4)));
575
576/*
577 * 7.1.18. Add a chunk that must be authenticated (SCTP_AUTH_CHUNK)
578 *
579 * This set option adds a chunk type that the user is requesting to be
580 * received only in an authenticated way. Changes to the list of chunks
581 * will only effect future associations on the socket.
582 */
583struct sctp_authchunk {
584 __u8 sauth_chunk;
585};
586
587/*
588 * 7.1.19. Get or set the list of supported HMAC Identifiers (SCTP_HMAC_IDENT)
589 *
590 * This option gets or sets the list of HMAC algorithms that the local
591 * endpoint requires the peer to use.
592 */
593#ifndef __KERNEL__
594/* This here is only used by user space as is. It might not be a good idea
595 * to export/reveal the whole structure with reserved fields etc.
596 */
597enum {
598 SCTP_AUTH_HMAC_ID_SHA1 = 1,
599 SCTP_AUTH_HMAC_ID_SHA256 = 3,
600};
601#endif
602
603struct sctp_hmacalgo {
604 __u32 shmac_num_idents;
605 __u16 shmac_idents[];
606};
607
608/* Sadly, user and kernel space have different names for
609 * this structure member, so this is to not break anything.
610 */
611#define shmac_number_of_idents shmac_num_idents
612
613/*
614 * 7.1.20. Set a shared key (SCTP_AUTH_KEY)
615 *
616 * This option will set a shared secret key which is used to build an
617 * association shared key.
618 */
619struct sctp_authkey {
620 sctp_assoc_t sca_assoc_id;
621 __u16 sca_keynumber;
622 __u16 sca_keylength;
623 __u8 sca_key[];
624};
625
626/*
627 * 7.1.21. Get or set the active shared key (SCTP_AUTH_ACTIVE_KEY)
628 *
629 * This option will get or set the active shared key to be used to build
630 * the association shared key.
631 */
632
633struct sctp_authkeyid {
634 sctp_assoc_t scact_assoc_id;
635 __u16 scact_keynumber;
636};
637
638
639/*
640 * 7.1.23. Get or set delayed ack timer (SCTP_DELAYED_SACK)
641 *
642 * This option will effect the way delayed acks are performed. This
643 * option allows you to get or set the delayed ack time, in
644 * milliseconds. It also allows changing the delayed ack frequency.
645 * Changing the frequency to 1 disables the delayed sack algorithm. If
646 * the assoc_id is 0, then this sets or gets the endpoints default
647 * values. If the assoc_id field is non-zero, then the set or get
648 * effects the specified association for the one to many model (the
649 * assoc_id field is ignored by the one to one model). Note that if
650 * sack_delay or sack_freq are 0 when setting this option, then the
651 * current values will remain unchanged.
652 */
653struct sctp_sack_info {
654 sctp_assoc_t sack_assoc_id;
655 uint32_t sack_delay;
656 uint32_t sack_freq;
657};
658
659struct sctp_assoc_value {
660 sctp_assoc_t assoc_id;
661 uint32_t assoc_value;
662};
663
664/*
665 * 7.2.2 Peer Address Information
666 *
667 * Applications can retrieve information about a specific peer address
668 * of an association, including its reachability state, congestion
669 * window, and retransmission timer values. This information is
670 * read-only. The following structure is used to access this
671 * information:
672 */
673struct sctp_paddrinfo {
674 sctp_assoc_t spinfo_assoc_id;
675 struct sockaddr_storage spinfo_address;
676 __s32 spinfo_state;
677 __u32 spinfo_cwnd;
678 __u32 spinfo_srtt;
679 __u32 spinfo_rto;
680 __u32 spinfo_mtu;
681} __attribute__((packed, aligned(4)));
682
683/* Peer addresses's state. */
684/* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x]
685 * calls.
686 * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters.
687 * Not yet confirmed by a heartbeat and not available for data
688 * transfers.
689 * ACTIVE : Peer address confirmed, active and available for data transfers.
690 * INACTIVE: Peer address inactive and not available for data transfers.
691 */
692enum sctp_spinfo_state {
693 SCTP_INACTIVE,
694 SCTP_PF,
695 SCTP_ACTIVE,
696 SCTP_UNCONFIRMED,
697 SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */
698};
699
700/*
701 * 7.2.1 Association Status (SCTP_STATUS)
702 *
703 * Applications can retrieve current status information about an
704 * association, including association state, peer receiver window size,
705 * number of unacked data chunks, and number of data chunks pending
706 * receipt. This information is read-only. The following structure is
707 * used to access this information:
708 */
709struct sctp_status {
710 sctp_assoc_t sstat_assoc_id;
711 __s32 sstat_state;
712 __u32 sstat_rwnd;
713 __u16 sstat_unackdata;
714 __u16 sstat_penddata;
715 __u16 sstat_instrms;
716 __u16 sstat_outstrms;
717 __u32 sstat_fragmentation_point;
718 struct sctp_paddrinfo sstat_primary;
719};
720
721/*
722 * 7.2.3. Get the list of chunks the peer requires to be authenticated
723 * (SCTP_PEER_AUTH_CHUNKS)
724 *
725 * This option gets a list of chunks for a specified association that
726 * the peer requires to be received authenticated only.
727 */
728struct sctp_authchunks {
729 sctp_assoc_t gauth_assoc_id;
730 __u32 gauth_number_of_chunks;
731 uint8_t gauth_chunks[];
732};
733
734/* The broken spelling has been released already in lksctp-tools header,
735 * so don't break anyone, now that it's fixed.
736 */
737#define guth_number_of_chunks gauth_number_of_chunks
738
739/* Association states. */
740enum sctp_sstat_state {
741 SCTP_EMPTY = 0,
742 SCTP_CLOSED = 1,
743 SCTP_COOKIE_WAIT = 2,
744 SCTP_COOKIE_ECHOED = 3,
745 SCTP_ESTABLISHED = 4,
746 SCTP_SHUTDOWN_PENDING = 5,
747 SCTP_SHUTDOWN_SENT = 6,
748 SCTP_SHUTDOWN_RECEIVED = 7,
749 SCTP_SHUTDOWN_ACK_SENT = 8,
750};
751
752/*
753 * 8.2.6. Get the Current Identifiers of Associations
754 * (SCTP_GET_ASSOC_ID_LIST)
755 *
756 * This option gets the current list of SCTP association identifiers of
757 * the SCTP associations handled by a one-to-many style socket.
758 */
759struct sctp_assoc_ids {
760 __u32 gaids_number_of_ids;
761 sctp_assoc_t gaids_assoc_id[];
762};
763
764/*
765 * 8.3, 8.5 get all peer/local addresses in an association.
766 * This parameter struct is used by SCTP_GET_PEER_ADDRS and
767 * SCTP_GET_LOCAL_ADDRS socket options used internally to implement
768 * sctp_getpaddrs() and sctp_getladdrs() API.
769 */
770struct sctp_getaddrs_old {
771 sctp_assoc_t assoc_id;
772 int addr_num;
773#ifdef __KERNEL__
774 struct sockaddr __user *addrs;
775#else
776 struct sockaddr *addrs;
777#endif
778};
779
780struct sctp_getaddrs {
781 sctp_assoc_t assoc_id; /*input*/
782 __u32 addr_num; /*output*/
783 __u8 addrs[0]; /*output, variable size*/
784};
785
786/* A socket user request obtained via SCTP_GET_ASSOC_STATS that retrieves
787 * association stats. All stats are counts except sas_maxrto and
788 * sas_obs_rto_ipaddr. maxrto is the max observed rto + transport since
789 * the last call. Will return 0 when RTO was not update since last call
790 */
791struct sctp_assoc_stats {
792 sctp_assoc_t sas_assoc_id; /* Input */
793 /* Transport of observed max RTO */
794 struct sockaddr_storage sas_obs_rto_ipaddr;
795 __u64 sas_maxrto; /* Maximum Observed RTO for period */
796 __u64 sas_isacks; /* SACKs received */
797 __u64 sas_osacks; /* SACKs sent */
798 __u64 sas_opackets; /* Packets sent */
799 __u64 sas_ipackets; /* Packets received */
800 __u64 sas_rtxchunks; /* Retransmitted Chunks */
801 __u64 sas_outofseqtsns;/* TSN received > next expected */
802 __u64 sas_idupchunks; /* Dups received (ordered+unordered) */
803 __u64 sas_gapcnt; /* Gap Acknowledgements Received */
804 __u64 sas_ouodchunks; /* Unordered data chunks sent */
805 __u64 sas_iuodchunks; /* Unordered data chunks received */
806 __u64 sas_oodchunks; /* Ordered data chunks sent */
807 __u64 sas_iodchunks; /* Ordered data chunks received */
808 __u64 sas_octrlchunks; /* Control chunks sent */
809 __u64 sas_ictrlchunks; /* Control chunks received */
810};
811
812/* These are bit fields for msghdr->msg_flags. See section 5.1. */
813/* On user space Linux, these live in <bits/socket.h> as an enum. */
814enum sctp_msg_flags {
815 MSG_NOTIFICATION = 0x8000,
816#define MSG_NOTIFICATION MSG_NOTIFICATION
817};
818
819/*
820 * 8.1 sctp_bindx()
821 *
822 * The flags parameter is formed from the bitwise OR of zero or more of the
823 * following currently defined flags:
824 */
825#define SCTP_BINDX_ADD_ADDR 0x01
826#define SCTP_BINDX_REM_ADDR 0x02
827
828/* This is the structure that is passed as an argument(optval) to
829 * getsockopt(SCTP_SOCKOPT_PEELOFF).
830 */
831typedef struct {
832 sctp_assoc_t associd;
833 int sd;
834} sctp_peeloff_arg_t;
835
836/*
837 * Peer Address Thresholds socket option
838 */
839struct sctp_paddrthlds {
840 sctp_assoc_t spt_assoc_id;
841 struct sockaddr_storage spt_address;
842 __u16 spt_pathmaxrxt;
843 __u16 spt_pathpfthld;
844};
845
846#endif /* _UAPI_SCTP_H */
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h
index b49eab89c9fd..df2e8b4f9c03 100644
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -50,6 +50,7 @@ enum
50 IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */ 50 IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */
51 IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */ 51 IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */
52 IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */ 52 IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */
53 IPSTATS_MIB_CSUMERRORS, /* InCsumErrors */
53 __IPSTATS_MIB_MAX 54 __IPSTATS_MIB_MAX
54}; 55};
55 56
@@ -87,6 +88,7 @@ enum
87 ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */ 88 ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */
88 ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */ 89 ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */
89 ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */ 90 ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */
91 ICMP_MIB_CSUMERRORS, /* InCsumErrors */
90 __ICMP_MIB_MAX 92 __ICMP_MIB_MAX
91}; 93};
92 94
@@ -103,6 +105,7 @@ enum
103 ICMP6_MIB_INERRORS, /* InErrors */ 105 ICMP6_MIB_INERRORS, /* InErrors */
104 ICMP6_MIB_OUTMSGS, /* OutMsgs */ 106 ICMP6_MIB_OUTMSGS, /* OutMsgs */
105 ICMP6_MIB_OUTERRORS, /* OutErrors */ 107 ICMP6_MIB_OUTERRORS, /* OutErrors */
108 ICMP6_MIB_CSUMERRORS, /* InCsumErrors */
106 __ICMP6_MIB_MAX 109 __ICMP6_MIB_MAX
107}; 110};
108 111
@@ -130,6 +133,7 @@ enum
130 TCP_MIB_RETRANSSEGS, /* RetransSegs */ 133 TCP_MIB_RETRANSSEGS, /* RetransSegs */
131 TCP_MIB_INERRS, /* InErrs */ 134 TCP_MIB_INERRS, /* InErrs */
132 TCP_MIB_OUTRSTS, /* OutRsts */ 135 TCP_MIB_OUTRSTS, /* OutRsts */
136 TCP_MIB_CSUMERRORS, /* InCsumErrors */
133 __TCP_MIB_MAX 137 __TCP_MIB_MAX
134}; 138};
135 139
@@ -147,6 +151,7 @@ enum
147 UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */ 151 UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */
148 UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */ 152 UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */
149 UDP_MIB_SNDBUFERRORS, /* SndbufErrors */ 153 UDP_MIB_SNDBUFERRORS, /* SndbufErrors */
154 UDP_MIB_CSUMERRORS, /* InCsumErrors */
150 __UDP_MIB_MAX 155 __UDP_MIB_MAX
151}; 156};
152 157
@@ -202,6 +207,8 @@ enum
202 LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */ 207 LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */
203 LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */ 208 LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */
204 LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */ 209 LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */
210 LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */
211 LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */
205 LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */ 212 LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */
206 LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */ 213 LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */
207 LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */ 214 LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */
@@ -245,6 +252,7 @@ enum
245 LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */ 252 LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */
246 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */ 253 LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */
247 LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ 254 LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */
255 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
248 __LINUX_MIB_MAX 256 __LINUX_MIB_MAX
249}; 257};
250 258
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index 6b1ead0b0c9d..8d776ebc4829 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -102,7 +102,6 @@ enum {
102#define TCP_QUICKACK 12 /* Block/reenable quick acks */ 102#define TCP_QUICKACK 12 /* Block/reenable quick acks */
103#define TCP_CONGESTION 13 /* Congestion control algorithm */ 103#define TCP_CONGESTION 13 /* Congestion control algorithm */
104#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ 104#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
105#define TCP_COOKIE_TRANSACTIONS 15 /* TCP Cookie Transactions */
106#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/ 105#define TCP_THIN_LINEAR_TIMEOUTS 16 /* Use linear timeouts for thin streams*/
107#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */ 106#define TCP_THIN_DUPACK 17 /* Fast retrans. after 1 dupack */
108#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */ 107#define TCP_USER_TIMEOUT 18 /* How long for loss retry before timeout */
@@ -199,29 +198,4 @@ struct tcp_md5sig {
199 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ 198 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */
200}; 199};
201 200
202/* for TCP_COOKIE_TRANSACTIONS (TCPCT) socket option */
203#define TCP_COOKIE_MIN 8 /* 64-bits */
204#define TCP_COOKIE_MAX 16 /* 128-bits */
205#define TCP_COOKIE_PAIR_SIZE (2*TCP_COOKIE_MAX)
206
207/* Flags for both getsockopt and setsockopt */
208#define TCP_COOKIE_IN_ALWAYS (1 << 0) /* Discard SYN without cookie */
209#define TCP_COOKIE_OUT_NEVER (1 << 1) /* Prohibit outgoing cookies,
210 * supercedes everything. */
211
212/* Flags for getsockopt */
213#define TCP_S_DATA_IN (1 << 2) /* Was data received? */
214#define TCP_S_DATA_OUT (1 << 3) /* Was data sent? */
215
216/* TCP_COOKIE_TRANSACTIONS data */
217struct tcp_cookie_transactions {
218 __u16 tcpct_flags; /* see above */
219 __u8 __tcpct_pad1; /* zero */
220 __u8 tcpct_cookie_desired; /* bytes */
221 __u16 tcpct_s_data_desired; /* bytes of variable data */
222 __u16 tcpct_used; /* bytes in value */
223 __u8 tcpct_value[TCP_MSS_DEFAULT];
224};
225
226
227#endif /* _UAPI_LINUX_TCP_H */ 201#endif /* _UAPI_LINUX_TCP_H */
diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h
index 0d3c0edc3eda..e75e1b6ff27f 100644
--- a/include/uapi/linux/time.h
+++ b/include/uapi/linux/time.h
@@ -54,11 +54,9 @@ struct itimerval {
54#define CLOCK_BOOTTIME 7 54#define CLOCK_BOOTTIME 7
55#define CLOCK_REALTIME_ALARM 8 55#define CLOCK_REALTIME_ALARM 8
56#define CLOCK_BOOTTIME_ALARM 9 56#define CLOCK_BOOTTIME_ALARM 9
57#define CLOCK_SGI_CYCLE 10 /* Hardware specific */
58#define CLOCK_TAI 11
57 59
58/*
59 * The IDs of various hardware clocks:
60 */
61#define CLOCK_SGI_CYCLE 10
62#define MAX_CLOCKS 16 60#define MAX_CLOCKS 16
63#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) 61#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC)
64#define CLOCKS_MONO CLOCK_MONOTONIC 62#define CLOCKS_MONO CLOCK_MONOTONIC
diff --git a/include/uapi/linux/usb/cdc-wdm.h b/include/uapi/linux/usb/cdc-wdm.h
new file mode 100644
index 000000000000..f03134feebd6
--- /dev/null
+++ b/include/uapi/linux/usb/cdc-wdm.h
@@ -0,0 +1,21 @@
1/*
2 * USB CDC Device Management userspace API definitions
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * version 2 as published by the Free Software Foundation.
7 */
8
9#ifndef _UAPI__LINUX_USB_CDC_WDM_H
10#define _UAPI__LINUX_USB_CDC_WDM_H
11
12/*
13 * This IOCTL is used to retrieve the wMaxCommand for the device,
14 * defining the message limit for both reading and writing.
15 *
16 * For CDC WDM functions this will be the wMaxCommand field of the
17 * Device Management Functional Descriptor.
18 */
19#define IOCTL_WDM_MAX_COMMAND _IOR('H', 0xA0, __u16)
20
21#endif /* _UAPI__LINUX_USB_CDC_WDM_H */
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h
index f738e25377ff..aa33fd1b2d4f 100644
--- a/include/uapi/linux/usb/ch9.h
+++ b/include/uapi/linux/usb/ch9.h
@@ -138,7 +138,7 @@
138 138
139/* 139/*
140 * New Feature Selectors as added by USB 3.0 140 * New Feature Selectors as added by USB 3.0
141 * See USB 3.0 spec Table 9-6 141 * See USB 3.0 spec Table 9-7
142 */ 142 */
143#define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */ 143#define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */
144#define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */ 144#define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */
@@ -147,7 +147,7 @@
147 147
148#define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 148#define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00
149/* 149/*
150 * Suspend Options, Table 9-7 USB 3.0 spec 150 * Suspend Options, Table 9-8 USB 3.0 spec
151 */ 151 */
152#define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) 152#define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0))
153#define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) 153#define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1))
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index dcd63745e83a..69bd5bb0d5af 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -59,6 +59,7 @@
59#define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */ 59#define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */
60#define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */ 60#define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */
61#define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */ 61#define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */
62#define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* Digital Video controls */
62 63
63/* User-class control IDs */ 64/* User-class control IDs */
64 65
@@ -146,6 +147,19 @@ enum v4l2_colorfx {
146 * of controls. We reserve 16 controls for this driver. */ 147 * of controls. We reserve 16 controls for this driver. */
147#define V4L2_CID_USER_MEYE_BASE (V4L2_CID_USER_BASE + 0x1000) 148#define V4L2_CID_USER_MEYE_BASE (V4L2_CID_USER_BASE + 0x1000)
148 149
150/* The base for the bttv driver controls.
151 * We reserve 32 controls for this driver. */
152#define V4L2_CID_USER_BTTV_BASE (V4L2_CID_USER_BASE + 0x1010)
153
154
155/* The base for the s2255 driver controls.
156 * We reserve 16 controls for this driver. */
157#define V4L2_CID_USER_S2255_BASE (V4L2_CID_USER_BASE + 0x1030)
158
159/* The base for the si476x driver controls. See include/media/si476x.h for the list
160 * of controls. Total of 16 controls is reserved for this driver */
161#define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040)
162
149/* MPEG-class control IDs */ 163/* MPEG-class control IDs */
150 164
151#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) 165#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
@@ -351,6 +365,7 @@ enum v4l2_mpeg_video_multi_slice_mode {
351#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) 365#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223)
352#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) 366#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
353#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225) 367#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225)
368#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226)
354 369
355#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) 370#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
356#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) 371#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
@@ -643,6 +658,7 @@ enum v4l2_exposure_metering {
643 V4L2_EXPOSURE_METERING_AVERAGE = 0, 658 V4L2_EXPOSURE_METERING_AVERAGE = 0,
644 V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1, 659 V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1,
645 V4L2_EXPOSURE_METERING_SPOT = 2, 660 V4L2_EXPOSURE_METERING_SPOT = 2,
661 V4L2_EXPOSURE_METERING_MATRIX = 3,
646}; 662};
647 663
648#define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26) 664#define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26)
@@ -825,4 +841,16 @@ enum v4l2_dv_rgb_range {
825#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100) 841#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100)
826#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101) 842#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101)
827 843
844#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900)
845#define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1)
846
847#define V4L2_CID_TUNE_DEEMPHASIS (V4L2_CID_FM_RX_CLASS_BASE + 1)
848enum v4l2_deemphasis {
849 V4L2_DEEMPHASIS_DISABLED = V4L2_PREEMPHASIS_DISABLED,
850 V4L2_DEEMPHASIS_50_uS = V4L2_PREEMPHASIS_50_uS,
851 V4L2_DEEMPHASIS_75_uS = V4L2_PREEMPHASIS_75_uS,
852};
853
854#define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2)
855
828#endif 856#endif
diff --git a/include/uapi/linux/v4l2-dv-timings.h b/include/uapi/linux/v4l2-dv-timings.h
index 9ef8172e5ed0..4e0c58d25ff0 100644
--- a/include/uapi/linux/v4l2-dv-timings.h
+++ b/include/uapi/linux/v4l2-dv-timings.h
@@ -42,6 +42,15 @@
42 V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CEA861, 0) \ 42 V4L2_DV_BT_STD_DMT | V4L2_DV_BT_STD_CEA861, 0) \
43} 43}
44 44
45/* Note: these are the nominal timings, for HDMI links this format is typically
46 * double-clocked to meet the minimum pixelclock requirements. */
47#define V4L2_DV_BT_CEA_720X480I59_94 { \
48 .type = V4L2_DV_BT_656_1120, \
49 V4L2_INIT_BT_TIMINGS(720, 480, 1, 0, \
50 13500000, 19, 62, 57, 4, 3, 15, 4, 3, 16, \
51 V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_HALF_LINE) \
52}
53
45#define V4L2_DV_BT_CEA_720X480P59_94 { \ 54#define V4L2_DV_BT_CEA_720X480P59_94 { \
46 .type = V4L2_DV_BT_656_1120, \ 55 .type = V4L2_DV_BT_656_1120, \
47 V4L2_INIT_BT_TIMINGS(720, 480, 0, 0, \ 56 V4L2_INIT_BT_TIMINGS(720, 480, 0, 0, \
@@ -49,6 +58,15 @@
49 V4L2_DV_BT_STD_CEA861, 0) \ 58 V4L2_DV_BT_STD_CEA861, 0) \
50} 59}
51 60
61/* Note: these are the nominal timings, for HDMI links this format is typically
62 * double-clocked to meet the minimum pixelclock requirements. */
63#define V4L2_DV_BT_CEA_720X576I50 { \
64 .type = V4L2_DV_BT_656_1120, \
65 V4L2_INIT_BT_TIMINGS(720, 576, 1, 0, \
66 13500000, 12, 63, 69, 2, 3, 19, 2, 3, 20, \
67 V4L2_DV_BT_STD_CEA861, V4L2_DV_FL_HALF_LINE) \
68}
69
52#define V4L2_DV_BT_CEA_720X576P50 { \ 70#define V4L2_DV_BT_CEA_720X576P50 { \
53 .type = V4L2_DV_BT_656_1120, \ 71 .type = V4L2_DV_BT_656_1120, \
54 V4L2_INIT_BT_TIMINGS(720, 576, 0, 0, \ 72 V4L2_INIT_BT_TIMINGS(720, 576, 0, 0, \
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
index b9b7bea04537..6ee63d09b32d 100644
--- a/include/uapi/linux/v4l2-mediabus.h
+++ b/include/uapi/linux/v4l2-mediabus.h
@@ -37,7 +37,7 @@
37enum v4l2_mbus_pixelcode { 37enum v4l2_mbus_pixelcode {
38 V4L2_MBUS_FMT_FIXED = 0x0001, 38 V4L2_MBUS_FMT_FIXED = 0x0001,
39 39
40 /* RGB - next is 0x1009 */ 40 /* RGB - next is 0x100d */
41 V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, 41 V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001,
42 V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, 42 V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002,
43 V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, 43 V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003,
@@ -46,6 +46,10 @@ enum v4l2_mbus_pixelcode {
46 V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, 46 V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006,
47 V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, 47 V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007,
48 V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, 48 V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008,
49 V4L2_MBUS_FMT_RGB666_1X18 = 0x1009,
50 V4L2_MBUS_FMT_RGB888_1X24 = 0x100a,
51 V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b,
52 V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c,
49 53
50 /* YUV (including grey) - next is 0x2017 */ 54 /* YUV (including grey) - next is 0x2017 */
51 V4L2_MBUS_FMT_Y8_1X8 = 0x2001, 55 V4L2_MBUS_FMT_Y8_1X8 = 0x2001,
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 4f41f309911e..284ff2436829 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -319,6 +319,7 @@ enum {
319 VFIO_PCI_INTX_IRQ_INDEX, 319 VFIO_PCI_INTX_IRQ_INDEX,
320 VFIO_PCI_MSI_IRQ_INDEX, 320 VFIO_PCI_MSI_IRQ_INDEX,
321 VFIO_PCI_MSIX_IRQ_INDEX, 321 VFIO_PCI_MSIX_IRQ_INDEX,
322 VFIO_PCI_ERR_IRQ_INDEX,
322 VFIO_PCI_NUM_IRQS 323 VFIO_PCI_NUM_IRQS
323}; 324};
324 325
diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h
index e847f1e30756..bb6a5b4cb3c5 100644
--- a/include/uapi/linux/vhost.h
+++ b/include/uapi/linux/vhost.h
@@ -127,4 +127,32 @@ struct vhost_memory {
127/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */ 127/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
128#define VHOST_NET_F_VIRTIO_NET_HDR 27 128#define VHOST_NET_F_VIRTIO_NET_HDR 27
129 129
130/* VHOST_SCSI specific definitions */
131
132/*
133 * Used by QEMU userspace to ensure a consistent vhost-scsi ABI.
134 *
135 * ABI Rev 0: July 2012 version starting point for v3.6-rc merge candidate +
136 * RFC-v2 vhost-scsi userspace. Add GET_ABI_VERSION ioctl usage
137 * ABI Rev 1: January 2013. Ignore vhost_tpgt filed in struct vhost_scsi_target.
138 * All the targets under vhost_wwpn can be seen and used by guset.
139 */
140
141#define VHOST_SCSI_ABI_VERSION 1
142
143struct vhost_scsi_target {
144 int abi_version;
145 char vhost_wwpn[224]; /* TRANSPORT_IQN_LEN */
146 unsigned short vhost_tpgt;
147 unsigned short reserved;
148};
149
150#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_scsi_target)
151#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhost_scsi_target)
152/* Changing this breaks userspace. */
153#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHOST_VIRTIO, 0x42, int)
154/* Set and get the events missed flag */
155#define VHOST_SCSI_SET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x43, __u32)
156#define VHOST_SCSI_GET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x44, __u32)
157
130#endif 158#endif
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 234d1d870914..f40b41c7e108 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -72,27 +72,6 @@
72#define VIDEO_MAX_FRAME 32 72#define VIDEO_MAX_FRAME 32
73#define VIDEO_MAX_PLANES 8 73#define VIDEO_MAX_PLANES 8
74 74
75#ifndef __KERNEL__
76
77/* These defines are V4L1 specific and should not be used with the V4L2 API!
78 They will be removed from this header in the future. */
79
80#define VID_TYPE_CAPTURE 1 /* Can capture */
81#define VID_TYPE_TUNER 2 /* Can tune */
82#define VID_TYPE_TELETEXT 4 /* Does teletext */
83#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */
84#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */
85#define VID_TYPE_CLIPPING 32 /* Can clip */
86#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */
87#define VID_TYPE_SCALES 128 /* Scalable */
88#define VID_TYPE_MONOCHROME 256 /* Monochrome only */
89#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */
90#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */
91#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */
92#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */
93#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */
94#endif
95
96/* 75/*
97 * M I S C E L L A N E O U S 76 * M I S C E L L A N E O U S
98 */ 77 */
@@ -705,6 +684,7 @@ struct v4l2_buffer {
705#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0xe000 684#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0xe000
706#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000 685#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000
707#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000 686#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000
687#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000
708 688
709/** 689/**
710 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor 690 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor
@@ -980,52 +960,6 @@ struct v4l2_standard {
980 __u32 reserved[4]; 960 __u32 reserved[4];
981}; 961};
982 962
983/* The DV Preset API is deprecated in favor of the DV Timings API.
984 New drivers shouldn't use this anymore! */
985
986/*
987 * V I D E O T I M I N G S D V P R E S E T
988 */
989struct v4l2_dv_preset {
990 __u32 preset;
991 __u32 reserved[4];
992};
993
994/*
995 * D V P R E S E T S E N U M E R A T I O N
996 */
997struct v4l2_dv_enum_preset {
998 __u32 index;
999 __u32 preset;
1000 __u8 name[32]; /* Name of the preset timing */
1001 __u32 width;
1002 __u32 height;
1003 __u32 reserved[4];
1004};
1005
1006/*
1007 * D V P R E S E T V A L U E S
1008 */
1009#define V4L2_DV_INVALID 0
1010#define V4L2_DV_480P59_94 1 /* BT.1362 */
1011#define V4L2_DV_576P50 2 /* BT.1362 */
1012#define V4L2_DV_720P24 3 /* SMPTE 296M */
1013#define V4L2_DV_720P25 4 /* SMPTE 296M */
1014#define V4L2_DV_720P30 5 /* SMPTE 296M */
1015#define V4L2_DV_720P50 6 /* SMPTE 296M */
1016#define V4L2_DV_720P59_94 7 /* SMPTE 274M */
1017#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */
1018#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */
1019#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */
1020#define V4L2_DV_1080I25 11 /* BT.1120 */
1021#define V4L2_DV_1080I50 12 /* SMPTE 296M */
1022#define V4L2_DV_1080I60 13 /* SMPTE 296M */
1023#define V4L2_DV_1080P24 14 /* SMPTE 296M */
1024#define V4L2_DV_1080P25 15 /* SMPTE 296M */
1025#define V4L2_DV_1080P30 16 /* SMPTE 296M */
1026#define V4L2_DV_1080P50 17 /* BT.1120 */
1027#define V4L2_DV_1080P60 18 /* BT.1120 */
1028
1029/* 963/*
1030 * D V B T T I M I N G S 964 * D V B T T I M I N G S
1031 */ 965 */
@@ -1119,7 +1053,7 @@ struct v4l2_bt_timings {
1119 longer and field 2 is really one half-line shorter, so each field has 1053 longer and field 2 is really one half-line shorter, so each field has
1120 exactly the same number of half-lines. Whether half-lines can be detected 1054 exactly the same number of half-lines. Whether half-lines can be detected
1121 or used depends on the hardware. */ 1055 or used depends on the hardware. */
1122#define V4L2_DV_FL_HALF_LINE (1 << 0) 1056#define V4L2_DV_FL_HALF_LINE (1 << 3)
1123 1057
1124 1058
1125/** struct v4l2_dv_timings - DV timings 1059/** struct v4l2_dv_timings - DV timings
@@ -1239,7 +1173,6 @@ struct v4l2_input {
1239#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ 1173#define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */
1240 1174
1241/* capabilities flags */ 1175/* capabilities flags */
1242#define V4L2_IN_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
1243#define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ 1176#define V4L2_IN_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
1244#define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */ 1177#define V4L2_IN_CAP_CUSTOM_TIMINGS V4L2_IN_CAP_DV_TIMINGS /* For compatibility */
1245#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */ 1178#define V4L2_IN_CAP_STD 0x00000004 /* Supports S_STD */
@@ -1263,7 +1196,6 @@ struct v4l2_output {
1263#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 1196#define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3
1264 1197
1265/* capabilities flags */ 1198/* capabilities flags */
1266#define V4L2_OUT_CAP_PRESETS 0x00000001 /* Supports S_DV_PRESET */
1267#define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */ 1199#define V4L2_OUT_CAP_DV_TIMINGS 0x00000002 /* Supports S_DV_TIMINGS */
1268#define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */ 1200#define V4L2_OUT_CAP_CUSTOM_TIMINGS V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */
1269#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */ 1201#define V4L2_OUT_CAP_STD 0x00000004 /* Supports S_STD */
@@ -1854,10 +1786,12 @@ struct v4l2_event_subscription {
1854 1786
1855/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ 1787/* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */
1856 1788
1857#define V4L2_CHIP_MATCH_HOST 0 /* Match against chip ID on host (0 for the host) */ 1789#define V4L2_CHIP_MATCH_BRIDGE 0 /* Match against chip ID on the bridge (0 for the bridge) */
1858#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */ 1790#define V4L2_CHIP_MATCH_HOST V4L2_CHIP_MATCH_BRIDGE
1859#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */ 1791#define V4L2_CHIP_MATCH_I2C_DRIVER 1 /* Match against I2C driver name */
1860#define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */ 1792#define V4L2_CHIP_MATCH_I2C_ADDR 2 /* Match against I2C 7-bit address */
1793#define V4L2_CHIP_MATCH_AC97 3 /* Match against anciliary AC97 chip */
1794#define V4L2_CHIP_MATCH_SUBDEV 4 /* Match against subdev index */
1861 1795
1862struct v4l2_dbg_match { 1796struct v4l2_dbg_match {
1863 __u32 type; /* Match type */ 1797 __u32 type; /* Match type */
@@ -1881,6 +1815,17 @@ struct v4l2_dbg_chip_ident {
1881 __u32 revision; /* chip revision, chip specific */ 1815 __u32 revision; /* chip revision, chip specific */
1882} __attribute__ ((packed)); 1816} __attribute__ ((packed));
1883 1817
1818#define V4L2_CHIP_FL_READABLE (1 << 0)
1819#define V4L2_CHIP_FL_WRITABLE (1 << 1)
1820
1821/* VIDIOC_DBG_G_CHIP_INFO */
1822struct v4l2_dbg_chip_info {
1823 struct v4l2_dbg_match match;
1824 char name[32];
1825 __u32 flags;
1826 __u32 reserved[32];
1827} __attribute__ ((packed));
1828
1884/** 1829/**
1885 * struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument 1830 * struct v4l2_create_buffers - VIDIOC_CREATE_BUFS argument
1886 * @index: on return, index of the first created buffer 1831 * @index: on return, index of the first created buffer
@@ -1958,15 +1903,12 @@ struct v4l2_create_buffers {
1958#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls) 1903#define VIDIOC_G_EXT_CTRLS _IOWR('V', 71, struct v4l2_ext_controls)
1959#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls) 1904#define VIDIOC_S_EXT_CTRLS _IOWR('V', 72, struct v4l2_ext_controls)
1960#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls) 1905#define VIDIOC_TRY_EXT_CTRLS _IOWR('V', 73, struct v4l2_ext_controls)
1961#if 1
1962#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum) 1906#define VIDIOC_ENUM_FRAMESIZES _IOWR('V', 74, struct v4l2_frmsizeenum)
1963#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum) 1907#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR('V', 75, struct v4l2_frmivalenum)
1964#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx) 1908#define VIDIOC_G_ENC_INDEX _IOR('V', 76, struct v4l2_enc_idx)
1965#define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd) 1909#define VIDIOC_ENCODER_CMD _IOWR('V', 77, struct v4l2_encoder_cmd)
1966#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd) 1910#define VIDIOC_TRY_ENCODER_CMD _IOWR('V', 78, struct v4l2_encoder_cmd)
1967#endif
1968 1911
1969#if 1
1970/* Experimental, meant for debugging, testing and internal use. 1912/* Experimental, meant for debugging, testing and internal use.
1971 Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined. 1913 Only implemented if CONFIG_VIDEO_ADV_DEBUG is defined.
1972 You must be root to use these ioctls. Never use these in applications! */ 1914 You must be root to use these ioctls. Never use these in applications! */
@@ -1974,18 +1916,13 @@ struct v4l2_create_buffers {
1974#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register) 1916#define VIDIOC_DBG_G_REGISTER _IOWR('V', 80, struct v4l2_dbg_register)
1975 1917
1976/* Experimental, meant for debugging, testing and internal use. 1918/* Experimental, meant for debugging, testing and internal use.
1977 Never use this ioctl in applications! */ 1919 Never use this ioctl in applications!
1920 Note: this ioctl is deprecated in favor of VIDIOC_DBG_G_CHIP_INFO and
1921 will go away in the future. */
1978#define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident) 1922#define VIDIOC_DBG_G_CHIP_IDENT _IOWR('V', 81, struct v4l2_dbg_chip_ident)
1979#endif
1980 1923
1981#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek) 1924#define VIDIOC_S_HW_FREQ_SEEK _IOW('V', 82, struct v4l2_hw_freq_seek)
1982 1925
1983/* These four DV Preset ioctls are deprecated in favor of the DV Timings
1984 ioctls. */
1985#define VIDIOC_ENUM_DV_PRESETS _IOWR('V', 83, struct v4l2_dv_enum_preset)
1986#define VIDIOC_S_DV_PRESET _IOWR('V', 84, struct v4l2_dv_preset)
1987#define VIDIOC_G_DV_PRESET _IOWR('V', 85, struct v4l2_dv_preset)
1988#define VIDIOC_QUERY_DV_PRESET _IOR('V', 86, struct v4l2_dv_preset)
1989#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings) 1926#define VIDIOC_S_DV_TIMINGS _IOWR('V', 87, struct v4l2_dv_timings)
1990#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings) 1927#define VIDIOC_G_DV_TIMINGS _IOWR('V', 88, struct v4l2_dv_timings)
1991#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event) 1928#define VIDIOC_DQEVENT _IOR('V', 89, struct v4l2_event)
@@ -2016,6 +1953,10 @@ struct v4l2_create_buffers {
2016 versions. */ 1953 versions. */
2017#define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band) 1954#define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band)
2018 1955
1956/* Experimental, meant for debugging, testing and internal use.
1957 Never use these in applications! */
1958#define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)
1959
2019/* Reminder: when adding new ioctls please add support for them to 1960/* Reminder: when adding new ioctls please add support for them to
2020 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 1961 drivers/media/video/v4l2-compat-ioctl32.c as well! */
2021 1962
diff --git a/include/uapi/linux/virtio_balloon.h b/include/uapi/linux/virtio_balloon.h
index 652dc8bea921..5e26f61b5df5 100644
--- a/include/uapi/linux/virtio_balloon.h
+++ b/include/uapi/linux/virtio_balloon.h
@@ -52,8 +52,8 @@ struct virtio_balloon_config
52#define VIRTIO_BALLOON_S_NR 6 52#define VIRTIO_BALLOON_S_NR 6
53 53
54struct virtio_balloon_stat { 54struct virtio_balloon_stat {
55 u16 tag; 55 __u16 tag;
56 u64 val; 56 __u64 val;
57} __attribute__((packed)); 57} __attribute__((packed));
58 58
59#endif /* _LINUX_VIRTIO_BALLOON_H */ 59#endif /* _LINUX_VIRTIO_BALLOON_H */
diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h
index a7630d04029f..284fc3a05f7b 100644
--- a/include/uapi/linux/virtio_ids.h
+++ b/include/uapi/linux/virtio_ids.h
@@ -38,5 +38,6 @@
38#define VIRTIO_ID_SCSI 8 /* virtio scsi */ 38#define VIRTIO_ID_SCSI 8 /* virtio scsi */
39#define VIRTIO_ID_9P 9 /* 9p virtio console */ 39#define VIRTIO_ID_9P 9 /* 9p virtio console */
40#define VIRTIO_ID_RPROC_SERIAL 11 /* virtio remoteproc serial link */ 40#define VIRTIO_ID_RPROC_SERIAL 11 /* virtio remoteproc serial link */
41#define VIRTIO_ID_CAIF 12 /* Virtio caif */
41 42
42#endif /* _LINUX_VIRTIO_IDS_H */ 43#endif /* _LINUX_VIRTIO_IDS_H */
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index a5a8c88753b9..c520203fac2f 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/include/uapi/linux/virtio_net.h
@@ -191,7 +191,7 @@ struct virtio_net_ctrl_mac {
191 * specified. 191 * specified.
192 */ 192 */
193struct virtio_net_ctrl_mq { 193struct virtio_net_ctrl_mq {
194 u16 virtqueue_pairs; 194 __u16 virtqueue_pairs;
195}; 195};
196 196
197#define VIRTIO_NET_CTRL_MQ 4 197#define VIRTIO_NET_CTRL_MQ 4
diff --git a/include/uapi/linux/vm_sockets.h b/include/uapi/linux/vm_sockets.h
index df91301847ec..b4ed5d895699 100644
--- a/include/uapi/linux/vm_sockets.h
+++ b/include/uapi/linux/vm_sockets.h
@@ -13,12 +13,10 @@
13 * more details. 13 * more details.
14 */ 14 */
15 15
16#ifndef _VM_SOCKETS_H_ 16#ifndef _UAPI_VM_SOCKETS_H
17#define _VM_SOCKETS_H_ 17#define _UAPI_VM_SOCKETS_H
18 18
19#if !defined(__KERNEL__) 19#include <linux/socket.h>
20#include <sys/socket.h>
21#endif
22 20
23/* Option name for STREAM socket buffer size. Use as the option name in 21/* Option name for STREAM socket buffer size. Use as the option name in
24 * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that 22 * setsockopt(3) or getsockopt(3) to set or get an unsigned long long that
@@ -137,14 +135,13 @@
137#define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF)) 135#define VM_SOCKETS_VERSION_MINOR(_v) (((_v) & 0x0000FFFF))
138 136
139/* Address structure for vSockets. The address family should be set to 137/* Address structure for vSockets. The address family should be set to
140 * whatever vmci_sock_get_af_value_fd() returns. The structure members should 138 * AF_VSOCK. The structure members should all align on their natural
141 * all align on their natural boundaries without resorting to compiler packing 139 * boundaries without resorting to compiler packing directives. The total size
142 * directives. The total size of this structure should be exactly the same as 140 * of this structure should be exactly the same as that of struct sockaddr.
143 * that of struct sockaddr.
144 */ 141 */
145 142
146struct sockaddr_vm { 143struct sockaddr_vm {
147 sa_family_t svm_family; 144 __kernel_sa_family_t svm_family;
148 unsigned short svm_reserved1; 145 unsigned short svm_reserved1;
149 unsigned int svm_port; 146 unsigned int svm_port;
150 unsigned int svm_cid; 147 unsigned int svm_cid;
@@ -156,8 +153,4 @@ struct sockaddr_vm {
156 153
157#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9) 154#define IOCTL_VM_SOCKETS_GET_LOCAL_CID _IO(7, 0xb9)
158 155
159#if defined(__KERNEL__) 156#endif /* _UAPI_VM_SOCKETS_H */
160int vm_sockets_get_local_cid(void);
161#endif
162
163#endif
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
index 28e493b5b94c..a8cd6a4a2970 100644
--- a/include/uapi/linux/xfrm.h
+++ b/include/uapi/linux/xfrm.h
@@ -297,6 +297,7 @@ enum xfrm_attr_type_t {
297 XFRMA_MARK, /* struct xfrm_mark */ 297 XFRMA_MARK, /* struct xfrm_mark */
298 XFRMA_TFCPAD, /* __u32 */ 298 XFRMA_TFCPAD, /* __u32 */
299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */ 299 XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */
300 XFRMA_SA_EXTRA_FLAGS, /* __u32 */
300 __XFRMA_MAX 301 __XFRMA_MAX
301 302
302#define XFRMA_MAX (__XFRMA_MAX - 1) 303#define XFRMA_MAX (__XFRMA_MAX - 1)
@@ -367,6 +368,8 @@ struct xfrm_usersa_info {
367#define XFRM_STATE_ESN 128 368#define XFRM_STATE_ESN 128
368}; 369};
369 370
371#define XFRM_SA_XFLAG_DONT_ENCAP_DSCP 1
372
370struct xfrm_usersa_id { 373struct xfrm_usersa_id {
371 xfrm_address_t daddr; 374 xfrm_address_t daddr;
372 __be32 spi; 375 __be32 spi;