aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/apm_bios.h2
-rw-r--r--include/uapi/linux/audit.h8
-rw-r--r--include/uapi/linux/bcache.h3
-rw-r--r--include/uapi/linux/btrfs.h13
-rw-r--r--include/uapi/linux/dm-log-userspace.h20
-rw-r--r--include/uapi/linux/dn.h1
-rw-r--r--include/uapi/linux/fd.h3
-rw-r--r--include/uapi/linux/genwqe/genwqe_card.h500
-rw-r--r--include/uapi/linux/gfs2_ondisk.h11
-rw-r--r--include/uapi/linux/if_addr.h6
-rw-r--r--include/uapi/linux/if_arp.h1
-rw-r--r--include/uapi/linux/if_link.h48
-rw-r--r--include/uapi/linux/if_packet.h29
-rw-r--r--include/uapi/linux/in6.h6
-rw-r--r--include/uapi/linux/kvm.h2
-rw-r--r--include/uapi/linux/media.h1
-rw-r--r--include/uapi/linux/mqueue.h10
-rw-r--r--include/uapi/linux/msg.h4
-rw-r--r--include/uapi/linux/neighbour.h2
-rw-r--r--include/uapi/linux/net_tstamp.h16
-rw-r--r--include/uapi/linux/netconf.h1
-rw-r--r--include/uapi/linux/netfilter.h1
-rw-r--r--include/uapi/linux/netfilter/Kbuild3
-rw-r--r--include/uapi/linux/netfilter/nf_nat.h12
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h30
-rw-r--r--include/uapi/linux/netfilter/nfnetlink_queue.h5
-rw-r--r--include/uapi/linux/netfilter/xt_cgroup.h11
-rw-r--r--include/uapi/linux/netfilter/xt_ipcomp.h16
-rw-r--r--include/uapi/linux/netfilter/xt_l2tp.h27
-rw-r--r--include/uapi/linux/netfilter/xt_osf.h3
-rw-r--r--include/uapi/linux/nfs4.h2
-rw-r--r--include/uapi/linux/nl80211.h129
-rw-r--r--include/uapi/linux/openvswitch.h14
-rw-r--r--include/uapi/linux/pci_regs.h42
-rw-r--r--include/uapi/linux/perf_event.h2
-rw-r--r--include/uapi/linux/pkt_sched.h53
-rw-r--r--include/uapi/linux/ppp-ioctl.h1
-rw-r--r--include/uapi/linux/raid/md_p.h6
-rw-r--r--include/uapi/linux/resource.h32
-rw-r--r--include/uapi/linux/sctp.h5
-rw-r--r--include/uapi/linux/shm.h10
-rw-r--r--include/uapi/linux/snmp.h1
-rw-r--r--include/uapi/linux/sockios.h3
-rw-r--r--include/uapi/linux/tc_act/tc_ipt.h1
-rw-r--r--include/uapi/linux/tcp_metrics.h2
-rw-r--r--include/uapi/linux/timex.h34
-rw-r--r--include/uapi/linux/v4l2-controls.h9
-rw-r--r--include/uapi/linux/v4l2-mediabus.h3
-rw-r--r--include/uapi/linux/videodev2.h4
-rw-r--r--include/uapi/linux/vsp1.h34
-rw-r--r--include/uapi/linux/xattr.h3
51 files changed, 1079 insertions, 106 deletions
diff --git a/include/uapi/linux/apm_bios.h b/include/uapi/linux/apm_bios.h
index 724f409adae0..df79bca1b898 100644
--- a/include/uapi/linux/apm_bios.h
+++ b/include/uapi/linux/apm_bios.h
@@ -67,6 +67,8 @@ struct apm_bios_info {
67#define APM_USER_SUSPEND 0x000a 67#define APM_USER_SUSPEND 0x000a
68#define APM_STANDBY_RESUME 0x000b 68#define APM_STANDBY_RESUME 0x000b
69#define APM_CAPABILITY_CHANGE 0x000c 69#define APM_CAPABILITY_CHANGE 0x000c
70#define APM_USER_HIBERNATION 0x000d
71#define APM_HIBERNATION_RESUME 0x000e
70 72
71/* 73/*
72 * Error codes 74 * Error codes
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 44b05a09f193..2d48fe1274ca 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -319,6 +319,12 @@ enum {
319#define AUDIT_STATUS_PID 0x0004 319#define AUDIT_STATUS_PID 0x0004
320#define AUDIT_STATUS_RATE_LIMIT 0x0008 320#define AUDIT_STATUS_RATE_LIMIT 0x0008
321#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010 321#define AUDIT_STATUS_BACKLOG_LIMIT 0x0010
322#define AUDIT_STATUS_BACKLOG_WAIT_TIME 0x0020
323
324#define AUDIT_VERSION_BACKLOG_LIMIT 1
325#define AUDIT_VERSION_BACKLOG_WAIT_TIME 2
326#define AUDIT_VERSION_LATEST AUDIT_VERSION_BACKLOG_WAIT_TIME
327
322 /* Failure-to-log actions */ 328 /* Failure-to-log actions */
323#define AUDIT_FAIL_SILENT 0 329#define AUDIT_FAIL_SILENT 0
324#define AUDIT_FAIL_PRINTK 1 330#define AUDIT_FAIL_PRINTK 1
@@ -375,6 +381,8 @@ struct audit_status {
375 __u32 backlog_limit; /* waiting messages limit */ 381 __u32 backlog_limit; /* waiting messages limit */
376 __u32 lost; /* messages lost */ 382 __u32 lost; /* messages lost */
377 __u32 backlog; /* messages waiting in queue */ 383 __u32 backlog; /* messages waiting in queue */
384 __u32 version; /* audit api version number */
385 __u32 backlog_wait_time;/* message queue wait timeout */
378}; 386};
379 387
380struct audit_features { 388struct audit_features {
diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h
index 164a7e263988..22b6ad31c706 100644
--- a/include/uapi/linux/bcache.h
+++ b/include/uapi/linux/bcache.h
@@ -39,6 +39,7 @@ static inline void SET_##name(struct bkey *k, unsigned i, __u64 v) \
39} 39}
40 40
41#define KEY_SIZE_BITS 16 41#define KEY_SIZE_BITS 16
42#define KEY_MAX_U64S 8
42 43
43KEY_FIELD(KEY_PTRS, high, 60, 3) 44KEY_FIELD(KEY_PTRS, high, 60, 3)
44KEY_FIELD(HEADER_SIZE, high, 58, 2) 45KEY_FIELD(HEADER_SIZE, high, 58, 2)
@@ -118,7 +119,7 @@ static inline struct bkey *bkey_next(const struct bkey *k)
118 return (struct bkey *) (d + bkey_u64s(k)); 119 return (struct bkey *) (d + bkey_u64s(k));
119} 120}
120 121
121static inline struct bkey *bkey_last(const struct bkey *k, unsigned nr_keys) 122static inline struct bkey *bkey_idx(const struct bkey *k, unsigned nr_keys)
122{ 123{
123 __u64 *d = (void *) k; 124 __u64 *d = (void *) k;
124 return (struct bkey *) (d + nr_keys); 125 return (struct bkey *) (d + nr_keys);
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 45e618921c61..1b8a0f4c9590 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -184,6 +184,12 @@ struct btrfs_ioctl_fs_info_args {
184 __u64 reserved[124]; /* pad to 1k */ 184 __u64 reserved[124]; /* pad to 1k */
185}; 185};
186 186
187struct btrfs_ioctl_feature_flags {
188 __u64 compat_flags;
189 __u64 compat_ro_flags;
190 __u64 incompat_flags;
191};
192
187/* balance control ioctl modes */ 193/* balance control ioctl modes */
188#define BTRFS_BALANCE_CTL_PAUSE 1 194#define BTRFS_BALANCE_CTL_PAUSE 1
189#define BTRFS_BALANCE_CTL_CANCEL 2 195#define BTRFS_BALANCE_CTL_CANCEL 2
@@ -552,6 +558,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
552#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64) 558#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64)
553#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \ 559#define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
554 struct btrfs_ioctl_space_args) 560 struct btrfs_ioctl_space_args)
561#define BTRFS_IOC_GLOBAL_RSV _IOR(BTRFS_IOCTL_MAGIC, 20, __u64)
555#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64) 562#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64)
556#define BTRFS_IOC_WAIT_SYNC _IOW(BTRFS_IOCTL_MAGIC, 22, __u64) 563#define BTRFS_IOC_WAIT_SYNC _IOW(BTRFS_IOCTL_MAGIC, 22, __u64)
557#define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \ 564#define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
@@ -606,5 +613,11 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
606 struct btrfs_ioctl_dev_replace_args) 613 struct btrfs_ioctl_dev_replace_args)
607#define BTRFS_IOC_FILE_EXTENT_SAME _IOWR(BTRFS_IOCTL_MAGIC, 54, \ 614#define BTRFS_IOC_FILE_EXTENT_SAME _IOWR(BTRFS_IOCTL_MAGIC, 54, \
608 struct btrfs_ioctl_same_args) 615 struct btrfs_ioctl_same_args)
616#define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
617 struct btrfs_ioctl_feature_flags)
618#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
619 struct btrfs_ioctl_feature_flags[2])
620#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
621 struct btrfs_ioctl_feature_flags[3])
609 622
610#endif /* _UAPI_LINUX_BTRFS_H */ 623#endif /* _UAPI_LINUX_BTRFS_H */
diff --git a/include/uapi/linux/dm-log-userspace.h b/include/uapi/linux/dm-log-userspace.h
index 0678c2adc421..0fa0d9ef06a5 100644
--- a/include/uapi/linux/dm-log-userspace.h
+++ b/include/uapi/linux/dm-log-userspace.h
@@ -201,11 +201,18 @@
201 * int (*flush)(struct dm_dirty_log *log); 201 * int (*flush)(struct dm_dirty_log *log);
202 * 202 *
203 * Payload-to-userspace: 203 * Payload-to-userspace:
204 * None. 204 * If the 'integrated_flush' directive is present in the constructor
205 * table, the payload is as same as DM_ULOG_MARK_REGION:
206 * uint64_t [] - region(s) to mark
207 * else
208 * None
205 * Payload-to-kernel: 209 * Payload-to-kernel:
206 * None. 210 * None.
207 * 211 *
208 * No incoming or outgoing payload. Simply flush log state to disk. 212 * If the 'integrated_flush' option was used during the creation of the
213 * log, mark region requests are carried as payload in the flush request.
214 * Piggybacking the mark requests in this way allows for fewer communications
215 * between kernel and userspace.
209 * 216 *
210 * When the request has been processed, user-space must return the 217 * When the request has been processed, user-space must return the
211 * dm_ulog_request to the kernel - setting the 'error' field and clearing 218 * dm_ulog_request to the kernel - setting the 'error' field and clearing
@@ -385,8 +392,15 @@
385 * version 2: DM_ULOG_CTR allowed to return a string containing a 392 * version 2: DM_ULOG_CTR allowed to return a string containing a
386 * device name that is to be registered with DM via 393 * device name that is to be registered with DM via
387 * 'dm_get_device'. 394 * 'dm_get_device'.
395 * version 3: DM_ULOG_FLUSH is capable of carrying payload for marking
396 * regions. This "integrated flush" reduces the number of
397 * requests between the kernel and userspace by effectively
398 * merging 'mark' and 'flush' requests. A constructor table
399 * argument ('integrated_flush') is required to turn this
400 * feature on, so it is backwards compatible with older
401 * userspace versions.
388 */ 402 */
389#define DM_ULOG_REQUEST_VERSION 2 403#define DM_ULOG_REQUEST_VERSION 3
390 404
391struct dm_ulog_request { 405struct dm_ulog_request {
392 /* 406 /*
diff --git a/include/uapi/linux/dn.h b/include/uapi/linux/dn.h
index 5fbdd3d49eba..4295c745f342 100644
--- a/include/uapi/linux/dn.h
+++ b/include/uapi/linux/dn.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_DN_H 1#ifndef _LINUX_DN_H
2#define _LINUX_DN_H 2#define _LINUX_DN_H
3 3
4#include <linux/ioctl.h>
4#include <linux/types.h> 5#include <linux/types.h>
5#include <linux/if_ether.h> 6#include <linux/if_ether.h>
6 7
diff --git a/include/uapi/linux/fd.h b/include/uapi/linux/fd.h
index f1f3dd5981b2..84c517cbce90 100644
--- a/include/uapi/linux/fd.h
+++ b/include/uapi/linux/fd.h
@@ -185,7 +185,8 @@ enum {
185 * to clear media change status */ 185 * to clear media change status */
186 FD_UNUSED_BIT, 186 FD_UNUSED_BIT,
187 FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */ 187 FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */
188 FD_DISK_WRITABLE_BIT /* disk is writable */ 188 FD_DISK_WRITABLE_BIT, /* disk is writable */
189 FD_OPEN_SHOULD_FAIL_BIT
189}; 190};
190 191
191#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params) 192#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params)
diff --git a/include/uapi/linux/genwqe/genwqe_card.h b/include/uapi/linux/genwqe/genwqe_card.h
new file mode 100644
index 000000000000..795e957bb840
--- /dev/null
+++ b/include/uapi/linux/genwqe/genwqe_card.h
@@ -0,0 +1,500 @@
1#ifndef __GENWQE_CARD_H__
2#define __GENWQE_CARD_H__
3
4/**
5 * IBM Accelerator Family 'GenWQE'
6 *
7 * (C) Copyright IBM Corp. 2013
8 *
9 * Author: Frank Haverkamp <haver@linux.vnet.ibm.com>
10 * Author: Joerg-Stephan Vogt <jsvogt@de.ibm.com>
11 * Author: Michael Jung <mijung@de.ibm.com>
12 * Author: Michael Ruettger <michael@ibmra.de>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License (version 2 only)
16 * as published by the Free Software Foundation.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 */
23
24/*
25 * User-space API for the GenWQE card. For debugging and test purposes
26 * the register addresses are included here too.
27 */
28
29#include <linux/types.h>
30#include <linux/ioctl.h>
31
32/* Basename of sysfs, debugfs and /dev interfaces */
33#define GENWQE_DEVNAME "genwqe"
34
35#define GENWQE_TYPE_ALTERA_230 0x00 /* GenWQE4 Stratix-IV-230 */
36#define GENWQE_TYPE_ALTERA_530 0x01 /* GenWQE4 Stratix-IV-530 */
37#define GENWQE_TYPE_ALTERA_A4 0x02 /* GenWQE5 A4 Stratix-V-A4 */
38#define GENWQE_TYPE_ALTERA_A7 0x03 /* GenWQE5 A7 Stratix-V-A7 */
39
40/* MMIO Unit offsets: Each UnitID occupies a defined address range */
41#define GENWQE_UID_OFFS(uid) ((uid) << 24)
42#define GENWQE_SLU_OFFS GENWQE_UID_OFFS(0)
43#define GENWQE_HSU_OFFS GENWQE_UID_OFFS(1)
44#define GENWQE_APP_OFFS GENWQE_UID_OFFS(2)
45#define GENWQE_MAX_UNITS 3
46
47/* Common offsets per UnitID */
48#define IO_EXTENDED_ERROR_POINTER 0x00000048
49#define IO_ERROR_INJECT_SELECTOR 0x00000060
50#define IO_EXTENDED_DIAG_SELECTOR 0x00000070
51#define IO_EXTENDED_DIAG_READ_MBX 0x00000078
52#define IO_EXTENDED_DIAG_MAP(ring) (0x00000500 | ((ring) << 3))
53
54#define GENWQE_EXTENDED_DIAG_SELECTOR(ring, trace) (((ring) << 8) | (trace))
55
56/* UnitID 0: Service Layer Unit (SLU) */
57
58/* SLU: Unit Configuration Register */
59#define IO_SLU_UNITCFG 0x00000000
60#define IO_SLU_UNITCFG_TYPE_MASK 0x000000000ff00000 /* 27:20 */
61
62/* SLU: Fault Isolation Register (FIR) (ac_slu_fir) */
63#define IO_SLU_FIR 0x00000008 /* read only, wr direct */
64#define IO_SLU_FIR_CLR 0x00000010 /* read and clear */
65
66/* SLU: First Error Capture Register (FEC/WOF) */
67#define IO_SLU_FEC 0x00000018
68
69#define IO_SLU_ERR_ACT_MASK 0x00000020
70#define IO_SLU_ERR_ATTN_MASK 0x00000028
71#define IO_SLU_FIRX1_ACT_MASK 0x00000030
72#define IO_SLU_FIRX0_ACT_MASK 0x00000038
73#define IO_SLU_SEC_LEM_DEBUG_OVR 0x00000040
74#define IO_SLU_EXTENDED_ERR_PTR 0x00000048
75#define IO_SLU_COMMON_CONFIG 0x00000060
76
77#define IO_SLU_FLASH_FIR 0x00000108
78#define IO_SLU_SLC_FIR 0x00000110
79#define IO_SLU_RIU_TRAP 0x00000280
80#define IO_SLU_FLASH_FEC 0x00000308
81#define IO_SLU_SLC_FEC 0x00000310
82
83/*
84 * The Virtual Function's Access is from offset 0x00010000
85 * The Physical Function's Access is from offset 0x00050000
86 * Single Shared Registers exists only at offset 0x00060000
87 *
88 * SLC: Queue Virtual Window Window for accessing into a specific VF
89 * queue. When accessing the 0x10000 space using the 0x50000 address
90 * segment, the value indicated here is used to specify which VF
91 * register is decoded. This register, and the 0x50000 register space
92 * can only be accessed by the PF. Example, if this register is set to
93 * 0x2, then a read from 0x50000 is the same as a read from 0x10000
94 * from VF=2.
95 */
96
97/* SLC: Queue Segment */
98#define IO_SLC_QUEUE_SEGMENT 0x00010000
99#define IO_SLC_VF_QUEUE_SEGMENT 0x00050000
100
101/* SLC: Queue Offset */
102#define IO_SLC_QUEUE_OFFSET 0x00010008
103#define IO_SLC_VF_QUEUE_OFFSET 0x00050008
104
105/* SLC: Queue Configuration */
106#define IO_SLC_QUEUE_CONFIG 0x00010010
107#define IO_SLC_VF_QUEUE_CONFIG 0x00050010
108
109/* SLC: Job Timout/Only accessible for the PF */
110#define IO_SLC_APPJOB_TIMEOUT 0x00010018
111#define IO_SLC_VF_APPJOB_TIMEOUT 0x00050018
112#define TIMEOUT_250MS 0x0000000f
113#define HEARTBEAT_DISABLE 0x0000ff00
114
115/* SLC: Queue InitSequence Register */
116#define IO_SLC_QUEUE_INITSQN 0x00010020
117#define IO_SLC_VF_QUEUE_INITSQN 0x00050020
118
119/* SLC: Queue Wrap */
120#define IO_SLC_QUEUE_WRAP 0x00010028
121#define IO_SLC_VF_QUEUE_WRAP 0x00050028
122
123/* SLC: Queue Status */
124#define IO_SLC_QUEUE_STATUS 0x00010100
125#define IO_SLC_VF_QUEUE_STATUS 0x00050100
126
127/* SLC: Queue Working Time */
128#define IO_SLC_QUEUE_WTIME 0x00010030
129#define IO_SLC_VF_QUEUE_WTIME 0x00050030
130
131/* SLC: Queue Error Counts */
132#define IO_SLC_QUEUE_ERRCNTS 0x00010038
133#define IO_SLC_VF_QUEUE_ERRCNTS 0x00050038
134
135/* SLC: Queue Loast Response Word */
136#define IO_SLC_QUEUE_LRW 0x00010040
137#define IO_SLC_VF_QUEUE_LRW 0x00050040
138
139/* SLC: Freerunning Timer */
140#define IO_SLC_FREE_RUNNING_TIMER 0x00010108
141#define IO_SLC_VF_FREE_RUNNING_TIMER 0x00050108
142
143/* SLC: Queue Virtual Access Region */
144#define IO_PF_SLC_VIRTUAL_REGION 0x00050000
145
146/* SLC: Queue Virtual Window */
147#define IO_PF_SLC_VIRTUAL_WINDOW 0x00060000
148
149/* SLC: DDCB Application Job Pending [n] (n=0:63) */
150#define IO_PF_SLC_JOBPEND(n) (0x00061000 + 8*(n))
151#define IO_SLC_JOBPEND(n) IO_PF_SLC_JOBPEND(n)
152
153/* SLC: Parser Trap RAM [n] (n=0:31) */
154#define IO_SLU_SLC_PARSE_TRAP(n) (0x00011000 + 8*(n))
155
156/* SLC: Dispatcher Trap RAM [n] (n=0:31) */
157#define IO_SLU_SLC_DISP_TRAP(n) (0x00011200 + 8*(n))
158
159/* Global Fault Isolation Register (GFIR) */
160#define IO_SLC_CFGREG_GFIR 0x00020000
161#define GFIR_ERR_TRIGGER 0x0000ffff
162
163/* SLU: Soft Reset Register */
164#define IO_SLC_CFGREG_SOFTRESET 0x00020018
165
166/* SLU: Misc Debug Register */
167#define IO_SLC_MISC_DEBUG 0x00020060
168#define IO_SLC_MISC_DEBUG_CLR 0x00020068
169#define IO_SLC_MISC_DEBUG_SET 0x00020070
170
171/* Temperature Sensor Reading */
172#define IO_SLU_TEMPERATURE_SENSOR 0x00030000
173#define IO_SLU_TEMPERATURE_CONFIG 0x00030008
174
175/* Voltage Margining Control */
176#define IO_SLU_VOLTAGE_CONTROL 0x00030080
177#define IO_SLU_VOLTAGE_NOMINAL 0x00000000
178#define IO_SLU_VOLTAGE_DOWN5 0x00000006
179#define IO_SLU_VOLTAGE_UP5 0x00000007
180
181/* Direct LED Control Register */
182#define IO_SLU_LEDCONTROL 0x00030100
183
184/* SLU: Flashbus Direct Access -A5 */
185#define IO_SLU_FLASH_DIRECTACCESS 0x00040010
186
187/* SLU: Flashbus Direct Access2 -A5 */
188#define IO_SLU_FLASH_DIRECTACCESS2 0x00040020
189
190/* SLU: Flashbus Command Interface -A5 */
191#define IO_SLU_FLASH_CMDINTF 0x00040030
192
193/* SLU: BitStream Loaded */
194#define IO_SLU_BITSTREAM 0x00040040
195
196/* This Register has a switch which will change the CAs to UR */
197#define IO_HSU_ERR_BEHAVIOR 0x01001010
198
199#define IO_SLC2_SQB_TRAP 0x00062000
200#define IO_SLC2_QUEUE_MANAGER_TRAP 0x00062008
201#define IO_SLC2_FLS_MASTER_TRAP 0x00062010
202
203/* UnitID 1: HSU Registers */
204#define IO_HSU_UNITCFG 0x01000000
205#define IO_HSU_FIR 0x01000008
206#define IO_HSU_FIR_CLR 0x01000010
207#define IO_HSU_FEC 0x01000018
208#define IO_HSU_ERR_ACT_MASK 0x01000020
209#define IO_HSU_ERR_ATTN_MASK 0x01000028
210#define IO_HSU_FIRX1_ACT_MASK 0x01000030
211#define IO_HSU_FIRX0_ACT_MASK 0x01000038
212#define IO_HSU_SEC_LEM_DEBUG_OVR 0x01000040
213#define IO_HSU_EXTENDED_ERR_PTR 0x01000048
214#define IO_HSU_COMMON_CONFIG 0x01000060
215
216/* UnitID 2: Application Unit (APP) */
217#define IO_APP_UNITCFG 0x02000000
218#define IO_APP_FIR 0x02000008
219#define IO_APP_FIR_CLR 0x02000010
220#define IO_APP_FEC 0x02000018
221#define IO_APP_ERR_ACT_MASK 0x02000020
222#define IO_APP_ERR_ATTN_MASK 0x02000028
223#define IO_APP_FIRX1_ACT_MASK 0x02000030
224#define IO_APP_FIRX0_ACT_MASK 0x02000038
225#define IO_APP_SEC_LEM_DEBUG_OVR 0x02000040
226#define IO_APP_EXTENDED_ERR_PTR 0x02000048
227#define IO_APP_COMMON_CONFIG 0x02000060
228
229#define IO_APP_DEBUG_REG_01 0x02010000
230#define IO_APP_DEBUG_REG_02 0x02010008
231#define IO_APP_DEBUG_REG_03 0x02010010
232#define IO_APP_DEBUG_REG_04 0x02010018
233#define IO_APP_DEBUG_REG_05 0x02010020
234#define IO_APP_DEBUG_REG_06 0x02010028
235#define IO_APP_DEBUG_REG_07 0x02010030
236#define IO_APP_DEBUG_REG_08 0x02010038
237#define IO_APP_DEBUG_REG_09 0x02010040
238#define IO_APP_DEBUG_REG_10 0x02010048
239#define IO_APP_DEBUG_REG_11 0x02010050
240#define IO_APP_DEBUG_REG_12 0x02010058
241#define IO_APP_DEBUG_REG_13 0x02010060
242#define IO_APP_DEBUG_REG_14 0x02010068
243#define IO_APP_DEBUG_REG_15 0x02010070
244#define IO_APP_DEBUG_REG_16 0x02010078
245#define IO_APP_DEBUG_REG_17 0x02010080
246#define IO_APP_DEBUG_REG_18 0x02010088
247
248/* Read/write from/to registers */
249struct genwqe_reg_io {
250 __u64 num; /* register offset/address */
251 __u64 val64;
252};
253
254/*
255 * All registers of our card will return values not equal this values.
256 * If we see IO_ILLEGAL_VALUE on any of our MMIO register reads, the
257 * card can be considered as unusable. It will need recovery.
258 */
259#define IO_ILLEGAL_VALUE 0xffffffffffffffffull
260
261/*
262 * Generic DDCB execution interface.
263 *
264 * This interface is a first prototype resulting from discussions we
265 * had with other teams which wanted to use the Genwqe card. It allows
266 * to issue a DDCB request in a generic way. The request will block
267 * until it finishes or time out with error.
268 *
269 * Some DDCBs require DMA addresses to be specified in the ASIV
270 * block. The interface provies the capability to let the kernel
271 * driver know where those addresses are by specifying the ATS field,
272 * such that it can replace the user-space addresses with appropriate
273 * DMA addresses or DMA addresses of a scatter gather list which is
274 * dynamically created.
275 *
276 * Our hardware will refuse DDCB execution if the ATS field is not as
277 * expected. That means the DDCB execution engine in the chip knows
278 * where it expects DMA addresses within the ASIV part of the DDCB and
279 * will check that against the ATS field definition. Any invalid or
280 * unknown ATS content will lead to DDCB refusal.
281 */
282
283/* Genwqe chip Units */
284#define DDCB_ACFUNC_SLU 0x00 /* chip service layer unit */
285#define DDCB_ACFUNC_APP 0x01 /* chip application */
286
287/* DDCB return codes (RETC) */
288#define DDCB_RETC_IDLE 0x0000 /* Unexecuted/DDCB created */
289#define DDCB_RETC_PENDING 0x0101 /* Pending Execution */
290#define DDCB_RETC_COMPLETE 0x0102 /* Cmd complete. No error */
291#define DDCB_RETC_FAULT 0x0104 /* App Err, recoverable */
292#define DDCB_RETC_ERROR 0x0108 /* App Err, non-recoverable */
293#define DDCB_RETC_FORCED_ERROR 0x01ff /* overwritten by driver */
294
295#define DDCB_RETC_UNEXEC 0x0110 /* Unexe/Removed from queue */
296#define DDCB_RETC_TERM 0x0120 /* Terminated */
297#define DDCB_RETC_RES0 0x0140 /* Reserved */
298#define DDCB_RETC_RES1 0x0180 /* Reserved */
299
300/* DDCB Command Options (CMDOPT) */
301#define DDCB_OPT_ECHO_FORCE_NO 0x0000 /* ECHO DDCB */
302#define DDCB_OPT_ECHO_FORCE_102 0x0001 /* force return code */
303#define DDCB_OPT_ECHO_FORCE_104 0x0002
304#define DDCB_OPT_ECHO_FORCE_108 0x0003
305
306#define DDCB_OPT_ECHO_FORCE_110 0x0004 /* only on PF ! */
307#define DDCB_OPT_ECHO_FORCE_120 0x0005
308#define DDCB_OPT_ECHO_FORCE_140 0x0006
309#define DDCB_OPT_ECHO_FORCE_180 0x0007
310
311#define DDCB_OPT_ECHO_COPY_NONE (0 << 5)
312#define DDCB_OPT_ECHO_COPY_ALL (1 << 5)
313
314/* Definitions of Service Layer Commands */
315#define SLCMD_ECHO_SYNC 0x00 /* PF/VF */
316#define SLCMD_MOVE_FLASH 0x06 /* PF only */
317#define SLCMD_MOVE_FLASH_FLAGS_MODE 0x03 /* bit 0 and 1 used for mode */
318#define SLCMD_MOVE_FLASH_FLAGS_DLOAD 0 /* mode: download */
319#define SLCMD_MOVE_FLASH_FLAGS_EMUL 1 /* mode: emulation */
320#define SLCMD_MOVE_FLASH_FLAGS_UPLOAD 2 /* mode: upload */
321#define SLCMD_MOVE_FLASH_FLAGS_VERIFY 3 /* mode: verify */
322#define SLCMD_MOVE_FLASH_FLAG_NOTAP (1 << 2)/* just dump DDCB and exit */
323#define SLCMD_MOVE_FLASH_FLAG_POLL (1 << 3)/* wait for RETC >= 0102 */
324#define SLCMD_MOVE_FLASH_FLAG_PARTITION (1 << 4)
325#define SLCMD_MOVE_FLASH_FLAG_ERASE (1 << 5)
326
327enum genwqe_card_state {
328 GENWQE_CARD_UNUSED = 0,
329 GENWQE_CARD_USED = 1,
330 GENWQE_CARD_FATAL_ERROR = 2,
331 GENWQE_CARD_STATE_MAX,
332};
333
334/* common struct for chip image exchange */
335struct genwqe_bitstream {
336 __u64 data_addr; /* pointer to image data */
337 __u32 size; /* size of image file */
338 __u32 crc; /* crc of this image */
339 __u64 target_addr; /* starting address in Flash */
340 __u32 partition; /* '0', '1', or 'v' */
341 __u32 uid; /* 1=host/x=dram */
342
343 __u64 slu_id; /* informational/sim: SluID */
344 __u64 app_id; /* informational/sim: AppID */
345
346 __u16 retc; /* returned from processing */
347 __u16 attn; /* attention code from processing */
348 __u32 progress; /* progress code from processing */
349};
350
351/* Issuing a specific DDCB command */
352#define DDCB_LENGTH 256 /* for debug data */
353#define DDCB_ASIV_LENGTH 104 /* len of the DDCB ASIV array */
354#define DDCB_ASIV_LENGTH_ATS 96 /* ASIV in ATS architecture */
355#define DDCB_ASV_LENGTH 64 /* len of the DDCB ASV array */
356#define DDCB_FIXUPS 12 /* maximum number of fixups */
357
358struct genwqe_debug_data {
359 char driver_version[64];
360 __u64 slu_unitcfg;
361 __u64 app_unitcfg;
362
363 __u8 ddcb_before[DDCB_LENGTH];
364 __u8 ddcb_prev[DDCB_LENGTH];
365 __u8 ddcb_finished[DDCB_LENGTH];
366};
367
368/*
369 * Address Translation Specification (ATS) definitions
370 *
371 * Each 4 bit within the ATS 64-bit word specify the required address
372 * translation at the defined offset.
373 *
374 * 63 LSB
375 * 6666.5555.5555.5544.4444.4443.3333.3333 ... 11
376 * 3210.9876.5432.1098.7654.3210.9876.5432 ... 1098.7654.3210
377 *
378 * offset: 0x00 0x08 0x10 0x18 0x20 0x28 0x30 0x38 ... 0x68 0x70 0x78
379 * res res res res ASIV ...
380 * The first 4 entries in the ATS word are reserved. The following nibbles
381 * each describe at an 8 byte offset the format of the required data.
382 */
383#define ATS_TYPE_DATA 0x0ull /* data */
384#define ATS_TYPE_FLAT_RD 0x4ull /* flat buffer read only */
385#define ATS_TYPE_FLAT_RDWR 0x5ull /* flat buffer read/write */
386#define ATS_TYPE_SGL_RD 0x6ull /* sgl read only */
387#define ATS_TYPE_SGL_RDWR 0x7ull /* sgl read/write */
388
389#define ATS_SET_FLAGS(_struct, _field, _flags) \
390 (((_flags) & 0xf) << (44 - (4 * (offsetof(_struct, _field) / 8))))
391
392#define ATS_GET_FLAGS(_ats, _byte_offs) \
393 (((_ats) >> (44 - (4 * ((_byte_offs) / 8)))) & 0xf)
394
395/**
396 * struct genwqe_ddcb_cmd - User parameter for generic DDCB commands
397 *
398 * On the way into the kernel the driver will read the whole data
399 * structure. On the way out the driver will not copy the ASIV data
400 * back to user-space.
401 */
402struct genwqe_ddcb_cmd {
403 /* START of data copied to/from driver */
404 __u64 next_addr; /* chaining genwqe_ddcb_cmd */
405 __u64 flags; /* reserved */
406
407 __u8 acfunc; /* accelerators functional unit */
408 __u8 cmd; /* command to execute */
409 __u8 asiv_length; /* used parameter length */
410 __u8 asv_length; /* length of valid return values */
411 __u16 cmdopts; /* command options */
412 __u16 retc; /* return code from processing */
413
414 __u16 attn; /* attention code from processing */
415 __u16 vcrc; /* variant crc16 */
416 __u32 progress; /* progress code from processing */
417
418 __u64 deque_ts; /* dequeue time stamp */
419 __u64 cmplt_ts; /* completion time stamp */
420 __u64 disp_ts; /* SW processing start */
421
422 /* move to end and avoid copy-back */
423 __u64 ddata_addr; /* collect debug data */
424
425 /* command specific values */
426 __u8 asv[DDCB_ASV_LENGTH];
427
428 /* END of data copied from driver */
429 union {
430 struct {
431 __u64 ats;
432 __u8 asiv[DDCB_ASIV_LENGTH_ATS];
433 };
434 /* used for flash update to keep it backward compatible */
435 __u8 __asiv[DDCB_ASIV_LENGTH];
436 };
437 /* END of data copied to driver */
438};
439
440#define GENWQE_IOC_CODE 0xa5
441
442/* Access functions */
443#define GENWQE_READ_REG64 _IOR(GENWQE_IOC_CODE, 30, struct genwqe_reg_io)
444#define GENWQE_WRITE_REG64 _IOW(GENWQE_IOC_CODE, 31, struct genwqe_reg_io)
445#define GENWQE_READ_REG32 _IOR(GENWQE_IOC_CODE, 32, struct genwqe_reg_io)
446#define GENWQE_WRITE_REG32 _IOW(GENWQE_IOC_CODE, 33, struct genwqe_reg_io)
447#define GENWQE_READ_REG16 _IOR(GENWQE_IOC_CODE, 34, struct genwqe_reg_io)
448#define GENWQE_WRITE_REG16 _IOW(GENWQE_IOC_CODE, 35, struct genwqe_reg_io)
449
450#define GENWQE_GET_CARD_STATE _IOR(GENWQE_IOC_CODE, 36, enum genwqe_card_state)
451
452/**
453 * struct genwqe_mem - Memory pinning/unpinning information
454 * @addr: virtual user space address
455 * @size: size of the area pin/dma-map/unmap
456 * direction: 0: read/1: read and write
457 *
458 * Avoid pinning and unpinning of memory pages dynamically. Instead
459 * the idea is to pin the whole buffer space required for DDCB
460 * opertionas in advance. The driver will reuse this pinning and the
461 * memory associated with it to setup the sglists for the DDCB
462 * requests without the need to allocate and free memory or map and
463 * unmap to get the DMA addresses.
464 *
465 * The inverse operation needs to be called after the pinning is not
466 * needed anymore. The pinnings else the pinnings will get removed
467 * after the device is closed. Note that pinnings will required
468 * memory.
469 */
470struct genwqe_mem {
471 __u64 addr;
472 __u64 size;
473 __u64 direction;
474 __u64 flags;
475};
476
477#define GENWQE_PIN_MEM _IOWR(GENWQE_IOC_CODE, 40, struct genwqe_mem)
478#define GENWQE_UNPIN_MEM _IOWR(GENWQE_IOC_CODE, 41, struct genwqe_mem)
479
480/*
481 * Generic synchronous DDCB execution interface.
482 * Synchronously execute a DDCB.
483 *
484 * Return: 0 on success or negative error code.
485 * -EINVAL: Invalid parameters (ASIV_LEN, ASV_LEN, illegal fixups
486 * no mappings found/could not create mappings
487 * -EFAULT: illegal addresses in fixups, purging failed
488 * -EBADMSG: enqueing failed, retc != DDCB_RETC_COMPLETE
489 */
490#define GENWQE_EXECUTE_DDCB \
491 _IOWR(GENWQE_IOC_CODE, 50, struct genwqe_ddcb_cmd)
492
493#define GENWQE_EXECUTE_RAW_DDCB \
494 _IOWR(GENWQE_IOC_CODE, 51, struct genwqe_ddcb_cmd)
495
496/* Service Layer functions (PF only) */
497#define GENWQE_SLU_UPDATE _IOWR(GENWQE_IOC_CODE, 80, struct genwqe_bitstream)
498#define GENWQE_SLU_READ _IOWR(GENWQE_IOC_CODE, 81, struct genwqe_bitstream)
499
500#endif /* __GENWQE_CARD_H__ */
diff --git a/include/uapi/linux/gfs2_ondisk.h b/include/uapi/linux/gfs2_ondisk.h
index b2de1f9a88d6..0f24c07aed51 100644
--- a/include/uapi/linux/gfs2_ondisk.h
+++ b/include/uapi/linux/gfs2_ondisk.h
@@ -319,7 +319,16 @@ struct gfs2_leaf {
319 __be32 lf_dirent_format; /* Format of the dirents */ 319 __be32 lf_dirent_format; /* Format of the dirents */
320 __be64 lf_next; /* Next leaf, if overflow */ 320 __be64 lf_next; /* Next leaf, if overflow */
321 321
322 __u8 lf_reserved[64]; 322 union {
323 __u8 lf_reserved[64];
324 struct {
325 __be64 lf_inode; /* Dir inode number */
326 __be32 lf_dist; /* Dist from inode on chain */
327 __be32 lf_nsec; /* Last ins/del usecs */
328 __be64 lf_sec; /* Last ins/del in secs */
329 __u8 lf_reserved2[40];
330 };
331 };
323}; 332};
324 333
325/* 334/*
diff --git a/include/uapi/linux/if_addr.h b/include/uapi/linux/if_addr.h
index 23357ab81a77..dea10a87dfd1 100644
--- a/include/uapi/linux/if_addr.h
+++ b/include/uapi/linux/if_addr.h
@@ -18,6 +18,9 @@ struct ifaddrmsg {
18 * It makes no difference for normally configured broadcast interfaces, 18 * It makes no difference for normally configured broadcast interfaces,
19 * but for point-to-point IFA_ADDRESS is DESTINATION address, 19 * but for point-to-point IFA_ADDRESS is DESTINATION address,
20 * local address is supplied in IFA_LOCAL attribute. 20 * local address is supplied in IFA_LOCAL attribute.
21 *
22 * IFA_FLAGS is a u32 attribute that extends the u8 field ifa_flags.
23 * If present, the value from struct ifaddrmsg will be ignored.
21 */ 24 */
22enum { 25enum {
23 IFA_UNSPEC, 26 IFA_UNSPEC,
@@ -28,6 +31,7 @@ enum {
28 IFA_ANYCAST, 31 IFA_ANYCAST,
29 IFA_CACHEINFO, 32 IFA_CACHEINFO,
30 IFA_MULTICAST, 33 IFA_MULTICAST,
34 IFA_FLAGS,
31 __IFA_MAX, 35 __IFA_MAX,
32}; 36};
33 37
@@ -44,6 +48,8 @@ enum {
44#define IFA_F_DEPRECATED 0x20 48#define IFA_F_DEPRECATED 0x20
45#define IFA_F_TENTATIVE 0x40 49#define IFA_F_TENTATIVE 0x40
46#define IFA_F_PERMANENT 0x80 50#define IFA_F_PERMANENT 0x80
51#define IFA_F_MANAGETEMPADDR 0x100
52#define IFA_F_NOPREFIXROUTE 0x200
47 53
48struct ifa_cacheinfo { 54struct ifa_cacheinfo {
49 __u32 ifa_prefered; 55 __u32 ifa_prefered;
diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h
index d7fea3496f32..4d024d75d64b 100644
--- a/include/uapi/linux/if_arp.h
+++ b/include/uapi/linux/if_arp.h
@@ -94,6 +94,7 @@
94#define ARPHRD_CAIF 822 /* CAIF media type */ 94#define ARPHRD_CAIF 822 /* CAIF media type */
95#define ARPHRD_IP6GRE 823 /* GRE over IPv6 */ 95#define ARPHRD_IP6GRE 823 /* GRE over IPv6 */
96#define ARPHRD_NETLINK 824 /* Netlink header */ 96#define ARPHRD_NETLINK 824 /* Netlink header */
97#define ARPHRD_6LOWPAN 825 /* IPv6 over LoWPAN */
97 98
98#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */ 99#define ARPHRD_VOID 0xFFFF /* Void type, nothing is known */
99#define ARPHRD_NONE 0xFFFE /* zero header length */ 100#define ARPHRD_NONE 0xFFFE /* zero header length */
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 6db460121f84..16410b6e7819 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -240,6 +240,8 @@ enum {
240 IFLA_INFO_KIND, 240 IFLA_INFO_KIND,
241 IFLA_INFO_DATA, 241 IFLA_INFO_DATA,
242 IFLA_INFO_XSTATS, 242 IFLA_INFO_XSTATS,
243 IFLA_INFO_SLAVE_KIND,
244 IFLA_INFO_SLAVE_DATA,
243 __IFLA_INFO_MAX, 245 __IFLA_INFO_MAX,
244}; 246};
245 247
@@ -331,11 +333,57 @@ enum {
331 IFLA_BOND_UNSPEC, 333 IFLA_BOND_UNSPEC,
332 IFLA_BOND_MODE, 334 IFLA_BOND_MODE,
333 IFLA_BOND_ACTIVE_SLAVE, 335 IFLA_BOND_ACTIVE_SLAVE,
336 IFLA_BOND_MIIMON,
337 IFLA_BOND_UPDELAY,
338 IFLA_BOND_DOWNDELAY,
339 IFLA_BOND_USE_CARRIER,
340 IFLA_BOND_ARP_INTERVAL,
341 IFLA_BOND_ARP_IP_TARGET,
342 IFLA_BOND_ARP_VALIDATE,
343 IFLA_BOND_ARP_ALL_TARGETS,
344 IFLA_BOND_PRIMARY,
345 IFLA_BOND_PRIMARY_RESELECT,
346 IFLA_BOND_FAIL_OVER_MAC,
347 IFLA_BOND_XMIT_HASH_POLICY,
348 IFLA_BOND_RESEND_IGMP,
349 IFLA_BOND_NUM_PEER_NOTIF,
350 IFLA_BOND_ALL_SLAVES_ACTIVE,
351 IFLA_BOND_MIN_LINKS,
352 IFLA_BOND_LP_INTERVAL,
353 IFLA_BOND_PACKETS_PER_SLAVE,
354 IFLA_BOND_AD_LACP_RATE,
355 IFLA_BOND_AD_SELECT,
356 IFLA_BOND_AD_INFO,
334 __IFLA_BOND_MAX, 357 __IFLA_BOND_MAX,
335}; 358};
336 359
337#define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) 360#define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
338 361
362enum {
363 IFLA_BOND_AD_INFO_UNSPEC,
364 IFLA_BOND_AD_INFO_AGGREGATOR,
365 IFLA_BOND_AD_INFO_NUM_PORTS,
366 IFLA_BOND_AD_INFO_ACTOR_KEY,
367 IFLA_BOND_AD_INFO_PARTNER_KEY,
368 IFLA_BOND_AD_INFO_PARTNER_MAC,
369 __IFLA_BOND_AD_INFO_MAX,
370};
371
372#define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
373
374enum {
375 IFLA_BOND_SLAVE_UNSPEC,
376 IFLA_BOND_SLAVE_STATE,
377 IFLA_BOND_SLAVE_MII_STATUS,
378 IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
379 IFLA_BOND_SLAVE_PERM_HWADDR,
380 IFLA_BOND_SLAVE_QUEUE_ID,
381 IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
382 __IFLA_BOND_SLAVE_MAX,
383};
384
385#define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1)
386
339/* SR-IOV virtual function management section */ 387/* SR-IOV virtual function management section */
340 388
341enum { 389enum {
diff --git a/include/uapi/linux/if_packet.h b/include/uapi/linux/if_packet.h
index dbf06667394b..bac27fa05f5b 100644
--- a/include/uapi/linux/if_packet.h
+++ b/include/uapi/linux/if_packet.h
@@ -26,8 +26,10 @@ struct sockaddr_ll {
26#define PACKET_MULTICAST 2 /* To group */ 26#define PACKET_MULTICAST 2 /* To group */
27#define PACKET_OTHERHOST 3 /* To someone else */ 27#define PACKET_OTHERHOST 3 /* To someone else */
28#define PACKET_OUTGOING 4 /* Outgoing of any type */ 28#define PACKET_OUTGOING 4 /* Outgoing of any type */
29/* These ones are invisible by user level */
30#define PACKET_LOOPBACK 5 /* MC/BRD frame looped back */ 29#define PACKET_LOOPBACK 5 /* MC/BRD frame looped back */
30#define PACKET_USER 6 /* To user space */
31#define PACKET_KERNEL 7 /* To kernel space */
32/* Unused, PACKET_FASTROUTE and PACKET_LOOPBACK are invisible to user space */
31#define PACKET_FASTROUTE 6 /* Fastrouted frame */ 33#define PACKET_FASTROUTE 6 /* Fastrouted frame */
32 34
33/* Packet socket options */ 35/* Packet socket options */
@@ -51,12 +53,14 @@ struct sockaddr_ll {
51#define PACKET_TIMESTAMP 17 53#define PACKET_TIMESTAMP 17
52#define PACKET_FANOUT 18 54#define PACKET_FANOUT 18
53#define PACKET_TX_HAS_OFF 19 55#define PACKET_TX_HAS_OFF 19
56#define PACKET_QDISC_BYPASS 20
54 57
55#define PACKET_FANOUT_HASH 0 58#define PACKET_FANOUT_HASH 0
56#define PACKET_FANOUT_LB 1 59#define PACKET_FANOUT_LB 1
57#define PACKET_FANOUT_CPU 2 60#define PACKET_FANOUT_CPU 2
58#define PACKET_FANOUT_ROLLOVER 3 61#define PACKET_FANOUT_ROLLOVER 3
59#define PACKET_FANOUT_RND 4 62#define PACKET_FANOUT_RND 4
63#define PACKET_FANOUT_QM 5
60#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000 64#define PACKET_FANOUT_FLAG_ROLLOVER 0x1000
61#define PACKET_FANOUT_FLAG_DEFRAG 0x8000 65#define PACKET_FANOUT_FLAG_DEFRAG 0x8000
62 66
@@ -83,17 +87,18 @@ struct tpacket_auxdata {
83 __u16 tp_mac; 87 __u16 tp_mac;
84 __u16 tp_net; 88 __u16 tp_net;
85 __u16 tp_vlan_tci; 89 __u16 tp_vlan_tci;
86 __u16 tp_padding; 90 __u16 tp_vlan_tpid;
87}; 91};
88 92
89/* Rx ring - header status */ 93/* Rx ring - header status */
90#define TP_STATUS_KERNEL 0 94#define TP_STATUS_KERNEL 0
91#define TP_STATUS_USER (1 << 0) 95#define TP_STATUS_USER (1 << 0)
92#define TP_STATUS_COPY (1 << 1) 96#define TP_STATUS_COPY (1 << 1)
93#define TP_STATUS_LOSING (1 << 2) 97#define TP_STATUS_LOSING (1 << 2)
94#define TP_STATUS_CSUMNOTREADY (1 << 3) 98#define TP_STATUS_CSUMNOTREADY (1 << 3)
95#define TP_STATUS_VLAN_VALID (1 << 4) /* auxdata has valid tp_vlan_tci */ 99#define TP_STATUS_VLAN_VALID (1 << 4) /* auxdata has valid tp_vlan_tci */
96#define TP_STATUS_BLK_TMO (1 << 5) 100#define TP_STATUS_BLK_TMO (1 << 5)
101#define TP_STATUS_VLAN_TPID_VALID (1 << 6) /* auxdata has valid tp_vlan_tpid */
97 102
98/* Tx ring - header status */ 103/* Tx ring - header status */
99#define TP_STATUS_AVAILABLE 0 104#define TP_STATUS_AVAILABLE 0
@@ -132,12 +137,15 @@ struct tpacket2_hdr {
132 __u32 tp_sec; 137 __u32 tp_sec;
133 __u32 tp_nsec; 138 __u32 tp_nsec;
134 __u16 tp_vlan_tci; 139 __u16 tp_vlan_tci;
135 __u16 tp_padding; 140 __u16 tp_vlan_tpid;
141 __u8 tp_padding[4];
136}; 142};
137 143
138struct tpacket_hdr_variant1 { 144struct tpacket_hdr_variant1 {
139 __u32 tp_rxhash; 145 __u32 tp_rxhash;
140 __u32 tp_vlan_tci; 146 __u32 tp_vlan_tci;
147 __u16 tp_vlan_tpid;
148 __u16 tp_padding;
141}; 149};
142 150
143struct tpacket3_hdr { 151struct tpacket3_hdr {
@@ -153,6 +161,7 @@ struct tpacket3_hdr {
153 union { 161 union {
154 struct tpacket_hdr_variant1 hv1; 162 struct tpacket_hdr_variant1 hv1;
155 }; 163 };
164 __u8 tp_padding[8];
156}; 165};
157 166
158struct tpacket_bd_ts { 167struct tpacket_bd_ts {
diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h
index 440d5c479145..633b93cac1ed 100644
--- a/include/uapi/linux/in6.h
+++ b/include/uapi/linux/in6.h
@@ -85,6 +85,8 @@ struct in6_flowlabel_req {
85 85
86#define IPV6_FL_F_CREATE 1 86#define IPV6_FL_F_CREATE 1
87#define IPV6_FL_F_EXCL 2 87#define IPV6_FL_F_EXCL 2
88#define IPV6_FL_F_REFLECT 4
89#define IPV6_FL_F_REMOTE 8
88 90
89#define IPV6_FL_S_NONE 0 91#define IPV6_FL_S_NONE 0
90#define IPV6_FL_S_EXCL 1 92#define IPV6_FL_S_EXCL 1
@@ -188,6 +190,10 @@ enum {
188#define IPV6_PMTUDISC_WANT 1 190#define IPV6_PMTUDISC_WANT 1
189#define IPV6_PMTUDISC_DO 2 191#define IPV6_PMTUDISC_DO 2
190#define IPV6_PMTUDISC_PROBE 3 192#define IPV6_PMTUDISC_PROBE 3
193/* same as IPV6_PMTUDISC_PROBE, provided for symetry with IPv4
194 * also see comments on IP_PMTUDISC_INTERFACE
195 */
196#define IPV6_PMTUDISC_INTERFACE 4
191 197
192/* Flowlabel */ 198/* Flowlabel */
193#define IPV6_FLOWLABEL_MGR 32 199#define IPV6_FLOWLABEL_MGR 32
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 902f12461873..932d7f2637d6 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -674,6 +674,7 @@ struct kvm_ppc_smmu_info {
674#define KVM_CAP_ARM_EL1_32BIT 93 674#define KVM_CAP_ARM_EL1_32BIT 93
675#define KVM_CAP_SPAPR_MULTITCE 94 675#define KVM_CAP_SPAPR_MULTITCE 94
676#define KVM_CAP_EXT_EMUL_CPUID 95 676#define KVM_CAP_EXT_EMUL_CPUID 95
677#define KVM_CAP_HYPERV_TIME 96
677 678
678#ifdef KVM_CAP_IRQ_ROUTING 679#ifdef KVM_CAP_IRQ_ROUTING
679 680
@@ -853,6 +854,7 @@ struct kvm_device_attr {
853#define KVM_DEV_VFIO_GROUP 1 854#define KVM_DEV_VFIO_GROUP 1
854#define KVM_DEV_VFIO_GROUP_ADD 1 855#define KVM_DEV_VFIO_GROUP_ADD 1
855#define KVM_DEV_VFIO_GROUP_DEL 2 856#define KVM_DEV_VFIO_GROUP_DEL 2
857#define KVM_DEV_TYPE_ARM_VGIC_V2 5
856 858
857/* 859/*
858 * ioctls for VM fds 860 * ioctls for VM fds
diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index ed49574ad757..d847c760e8f0 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -98,6 +98,7 @@ struct media_entity_desc {
98 98
99#define MEDIA_PAD_FL_SINK (1 << 0) 99#define MEDIA_PAD_FL_SINK (1 << 0)
100#define MEDIA_PAD_FL_SOURCE (1 << 1) 100#define MEDIA_PAD_FL_SOURCE (1 << 1)
101#define MEDIA_PAD_FL_MUST_CONNECT (1 << 2)
101 102
102struct media_pad_desc { 103struct media_pad_desc {
103 __u32 entity; /* entity ID */ 104 __u32 entity; /* entity ID */
diff --git a/include/uapi/linux/mqueue.h b/include/uapi/linux/mqueue.h
index 8b5a79615fbf..d0a2b8e89813 100644
--- a/include/uapi/linux/mqueue.h
+++ b/include/uapi/linux/mqueue.h
@@ -23,11 +23,11 @@
23#define MQ_BYTES_MAX 819200 23#define MQ_BYTES_MAX 819200
24 24
25struct mq_attr { 25struct mq_attr {
26 long mq_flags; /* message queue flags */ 26 __kernel_long_t mq_flags; /* message queue flags */
27 long mq_maxmsg; /* maximum number of messages */ 27 __kernel_long_t mq_maxmsg; /* maximum number of messages */
28 long mq_msgsize; /* maximum message size */ 28 __kernel_long_t mq_msgsize; /* maximum message size */
29 long mq_curmsgs; /* number of messages currently queued */ 29 __kernel_long_t mq_curmsgs; /* number of messages currently queued */
30 long __reserved[4]; /* ignored for input, zeroed for output */ 30 __kernel_long_t __reserved[4]; /* ignored for input, zeroed for output */
31}; 31};
32 32
33/* 33/*
diff --git a/include/uapi/linux/msg.h b/include/uapi/linux/msg.h
index 22d95c6854e0..a70375526578 100644
--- a/include/uapi/linux/msg.h
+++ b/include/uapi/linux/msg.h
@@ -34,8 +34,8 @@ struct msqid_ds {
34 34
35/* message buffer for msgsnd and msgrcv calls */ 35/* message buffer for msgsnd and msgrcv calls */
36struct msgbuf { 36struct msgbuf {
37 long mtype; /* type of message */ 37 __kernel_long_t mtype; /* type of message */
38 char mtext[1]; /* message text */ 38 char mtext[1]; /* message text */
39}; 39};
40 40
41/* buffer for msgctl calls IPC_INFO, MSG_INFO */ 41/* buffer for msgctl calls IPC_INFO, MSG_INFO */
diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h
index f175212420ab..d3ef583104e0 100644
--- a/include/uapi/linux/neighbour.h
+++ b/include/uapi/linux/neighbour.h
@@ -58,7 +58,7 @@ enum {
58 58
59/* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change 59/* NUD_NOARP & NUD_PERMANENT are pseudostates, they never change
60 and make no address resolution or NUD. 60 and make no address resolution or NUD.
61 NUD_PERMANENT is also cannot be deleted by garbage collectors. 61 NUD_PERMANENT also cannot be deleted by garbage collectors.
62 */ 62 */
63 63
64struct nda_cacheinfo { 64struct nda_cacheinfo {
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
index ae5df122e42f..f53879c0f590 100644
--- a/include/uapi/linux/net_tstamp.h
+++ b/include/uapi/linux/net_tstamp.h
@@ -26,17 +26,17 @@ enum {
26}; 26};
27 27
28/** 28/**
29 * struct hwtstamp_config - %SIOCSHWTSTAMP parameter 29 * struct hwtstamp_config - %SIOCGHWTSTAMP and %SIOCSHWTSTAMP parameter
30 * 30 *
31 * @flags: no flags defined right now, must be zero 31 * @flags: no flags defined right now, must be zero for %SIOCSHWTSTAMP
32 * @tx_type: one of HWTSTAMP_TX_* 32 * @tx_type: one of HWTSTAMP_TX_*
33 * @rx_type: one of one of HWTSTAMP_FILTER_* 33 * @rx_filter: one of HWTSTAMP_FILTER_*
34 * 34 *
35 * %SIOCSHWTSTAMP expects a &struct ifreq with a ifr_data pointer to 35 * %SIOCGHWTSTAMP and %SIOCSHWTSTAMP expect a &struct ifreq with a
36 * this structure. dev_ifsioc() in the kernel takes care of the 36 * ifr_data pointer to this structure. For %SIOCSHWTSTAMP, if the
37 * translation between 32 bit userspace and 64 bit kernel. The 37 * driver or hardware does not support the requested @rx_filter value,
38 * structure is intentionally chosen so that it has the same layout on 38 * the driver may use a more general filter mode. In this case
39 * 32 and 64 bit systems, don't break this! 39 * @rx_filter will indicate the actual mode on return.
40 */ 40 */
41struct hwtstamp_config { 41struct hwtstamp_config {
42 int flags; 42 int flags;
diff --git a/include/uapi/linux/netconf.h b/include/uapi/linux/netconf.h
index 64804a798b0c..669a1f0b1d97 100644
--- a/include/uapi/linux/netconf.h
+++ b/include/uapi/linux/netconf.h
@@ -14,6 +14,7 @@ enum {
14 NETCONFA_FORWARDING, 14 NETCONFA_FORWARDING,
15 NETCONFA_RP_FILTER, 15 NETCONFA_RP_FILTER,
16 NETCONFA_MC_FORWARDING, 16 NETCONFA_MC_FORWARDING,
17 NETCONFA_PROXY_NEIGH,
17 __NETCONFA_MAX 18 __NETCONFA_MAX
18}; 19};
19#define NETCONFA_MAX (__NETCONFA_MAX - 1) 20#define NETCONFA_MAX (__NETCONFA_MAX - 1)
diff --git a/include/uapi/linux/netfilter.h b/include/uapi/linux/netfilter.h
index f7dc0ebeeba5..ef1b1f88ca18 100644
--- a/include/uapi/linux/netfilter.h
+++ b/include/uapi/linux/netfilter.h
@@ -53,6 +53,7 @@ enum nf_inet_hooks {
53 53
54enum { 54enum {
55 NFPROTO_UNSPEC = 0, 55 NFPROTO_UNSPEC = 0,
56 NFPROTO_INET = 1,
56 NFPROTO_IPV4 = 2, 57 NFPROTO_IPV4 = 2,
57 NFPROTO_ARP = 3, 58 NFPROTO_ARP = 3,
58 NFPROTO_BRIDGE = 7, 59 NFPROTO_BRIDGE = 7,
diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild
index 17c3af2c4bb9..1d973d2ba417 100644
--- a/include/uapi/linux/netfilter/Kbuild
+++ b/include/uapi/linux/netfilter/Kbuild
@@ -39,6 +39,7 @@ header-y += xt_TEE.h
39header-y += xt_TPROXY.h 39header-y += xt_TPROXY.h
40header-y += xt_addrtype.h 40header-y += xt_addrtype.h
41header-y += xt_bpf.h 41header-y += xt_bpf.h
42header-y += xt_cgroup.h
42header-y += xt_cluster.h 43header-y += xt_cluster.h
43header-y += xt_comment.h 44header-y += xt_comment.h
44header-y += xt_connbytes.h 45header-y += xt_connbytes.h
@@ -54,8 +55,10 @@ header-y += xt_ecn.h
54header-y += xt_esp.h 55header-y += xt_esp.h
55header-y += xt_hashlimit.h 56header-y += xt_hashlimit.h
56header-y += xt_helper.h 57header-y += xt_helper.h
58header-y += xt_ipcomp.h
57header-y += xt_iprange.h 59header-y += xt_iprange.h
58header-y += xt_ipvs.h 60header-y += xt_ipvs.h
61header-y += xt_l2tp.h
59header-y += xt_length.h 62header-y += xt_length.h
60header-y += xt_limit.h 63header-y += xt_limit.h
61header-y += xt_mac.h 64header-y += xt_mac.h
diff --git a/include/uapi/linux/netfilter/nf_nat.h b/include/uapi/linux/netfilter/nf_nat.h
index bf0cc373ffb6..1ad3659102b6 100644
--- a/include/uapi/linux/netfilter/nf_nat.h
+++ b/include/uapi/linux/netfilter/nf_nat.h
@@ -4,10 +4,14 @@
4#include <linux/netfilter.h> 4#include <linux/netfilter.h>
5#include <linux/netfilter/nf_conntrack_tuple_common.h> 5#include <linux/netfilter/nf_conntrack_tuple_common.h>
6 6
7#define NF_NAT_RANGE_MAP_IPS 1 7#define NF_NAT_RANGE_MAP_IPS (1 << 0)
8#define NF_NAT_RANGE_PROTO_SPECIFIED 2 8#define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1)
9#define NF_NAT_RANGE_PROTO_RANDOM 4 9#define NF_NAT_RANGE_PROTO_RANDOM (1 << 2)
10#define NF_NAT_RANGE_PERSISTENT 8 10#define NF_NAT_RANGE_PERSISTENT (1 << 3)
11#define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4)
12
13#define NF_NAT_RANGE_PROTO_RANDOM_ALL \
14 (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY)
11 15
12struct nf_nat_ipv4_range { 16struct nf_nat_ipv4_range {
13 unsigned int flags; 17 unsigned int flags;
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index fbfd229a8e99..83c985a6170b 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -110,11 +110,13 @@ enum nft_table_flags {
110 * 110 *
111 * @NFTA_TABLE_NAME: name of the table (NLA_STRING) 111 * @NFTA_TABLE_NAME: name of the table (NLA_STRING)
112 * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32) 112 * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32)
113 * @NFTA_TABLE_USE: number of chains in this table (NLA_U32)
113 */ 114 */
114enum nft_table_attributes { 115enum nft_table_attributes {
115 NFTA_TABLE_UNSPEC, 116 NFTA_TABLE_UNSPEC,
116 NFTA_TABLE_NAME, 117 NFTA_TABLE_NAME,
117 NFTA_TABLE_FLAGS, 118 NFTA_TABLE_FLAGS,
119 NFTA_TABLE_USE,
118 __NFTA_TABLE_MAX 120 __NFTA_TABLE_MAX
119}; 121};
120#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1) 122#define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1)
@@ -529,6 +531,8 @@ enum nft_exthdr_attributes {
529 * @NFT_META_NFTRACE: packet nftrace bit 531 * @NFT_META_NFTRACE: packet nftrace bit
530 * @NFT_META_RTCLASSID: realm value of packet's route (skb->dst->tclassid) 532 * @NFT_META_RTCLASSID: realm value of packet's route (skb->dst->tclassid)
531 * @NFT_META_SECMARK: packet secmark (skb->secmark) 533 * @NFT_META_SECMARK: packet secmark (skb->secmark)
534 * @NFT_META_NFPROTO: netfilter protocol
535 * @NFT_META_L4PROTO: layer 4 protocol number
532 */ 536 */
533enum nft_meta_keys { 537enum nft_meta_keys {
534 NFT_META_LEN, 538 NFT_META_LEN,
@@ -546,6 +550,8 @@ enum nft_meta_keys {
546 NFT_META_NFTRACE, 550 NFT_META_NFTRACE,
547 NFT_META_RTCLASSID, 551 NFT_META_RTCLASSID,
548 NFT_META_SECMARK, 552 NFT_META_SECMARK,
553 NFT_META_NFPROTO,
554 NFT_META_L4PROTO,
549}; 555};
550 556
551/** 557/**
@@ -553,11 +559,13 @@ enum nft_meta_keys {
553 * 559 *
554 * @NFTA_META_DREG: destination register (NLA_U32) 560 * @NFTA_META_DREG: destination register (NLA_U32)
555 * @NFTA_META_KEY: meta data item to load (NLA_U32: nft_meta_keys) 561 * @NFTA_META_KEY: meta data item to load (NLA_U32: nft_meta_keys)
562 * @NFTA_META_SREG: source register (NLA_U32)
556 */ 563 */
557enum nft_meta_attributes { 564enum nft_meta_attributes {
558 NFTA_META_UNSPEC, 565 NFTA_META_UNSPEC,
559 NFTA_META_DREG, 566 NFTA_META_DREG,
560 NFTA_META_KEY, 567 NFTA_META_KEY,
568 NFTA_META_SREG,
561 __NFTA_META_MAX 569 __NFTA_META_MAX
562}; 570};
563#define NFTA_META_MAX (__NFTA_META_MAX - 1) 571#define NFTA_META_MAX (__NFTA_META_MAX - 1)
@@ -601,12 +609,14 @@ enum nft_ct_keys {
601 * @NFTA_CT_DREG: destination register (NLA_U32) 609 * @NFTA_CT_DREG: destination register (NLA_U32)
602 * @NFTA_CT_KEY: conntrack data item to load (NLA_U32: nft_ct_keys) 610 * @NFTA_CT_KEY: conntrack data item to load (NLA_U32: nft_ct_keys)
603 * @NFTA_CT_DIRECTION: direction in case of directional keys (NLA_U8) 611 * @NFTA_CT_DIRECTION: direction in case of directional keys (NLA_U8)
612 * @NFTA_CT_SREG: source register (NLA_U32)
604 */ 613 */
605enum nft_ct_attributes { 614enum nft_ct_attributes {
606 NFTA_CT_UNSPEC, 615 NFTA_CT_UNSPEC,
607 NFTA_CT_DREG, 616 NFTA_CT_DREG,
608 NFTA_CT_KEY, 617 NFTA_CT_KEY,
609 NFTA_CT_DIRECTION, 618 NFTA_CT_DIRECTION,
619 NFTA_CT_SREG,
610 __NFTA_CT_MAX 620 __NFTA_CT_MAX
611}; 621};
612#define NFTA_CT_MAX (__NFTA_CT_MAX - 1) 622#define NFTA_CT_MAX (__NFTA_CT_MAX - 1)
@@ -658,6 +668,26 @@ enum nft_log_attributes {
658#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) 668#define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1)
659 669
660/** 670/**
671 * enum nft_queue_attributes - nf_tables queue expression netlink attributes
672 *
673 * @NFTA_QUEUE_NUM: netlink queue to send messages to (NLA_U16)
674 * @NFTA_QUEUE_TOTAL: number of queues to load balance packets on (NLA_U16)
675 * @NFTA_QUEUE_FLAGS: various flags (NLA_U16)
676 */
677enum nft_queue_attributes {
678 NFTA_QUEUE_UNSPEC,
679 NFTA_QUEUE_NUM,
680 NFTA_QUEUE_TOTAL,
681 NFTA_QUEUE_FLAGS,
682 __NFTA_QUEUE_MAX
683};
684#define NFTA_QUEUE_MAX (__NFTA_QUEUE_MAX - 1)
685
686#define NFT_QUEUE_FLAG_BYPASS 0x01 /* for compatibility with v2 */
687#define NFT_QUEUE_FLAG_CPU_FANOUT 0x02 /* use current CPU (no hashing) */
688#define NFT_QUEUE_FLAG_MASK 0x03
689
690/**
661 * enum nft_reject_types - nf_tables reject expression reject types 691 * enum nft_reject_types - nf_tables reject expression reject types
662 * 692 *
663 * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable 693 * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable
diff --git a/include/uapi/linux/netfilter/nfnetlink_queue.h b/include/uapi/linux/netfilter/nfnetlink_queue.h
index 0132bad79de7..8dd819e2b5fe 100644
--- a/include/uapi/linux/netfilter/nfnetlink_queue.h
+++ b/include/uapi/linux/netfilter/nfnetlink_queue.h
@@ -47,6 +47,8 @@ enum nfqnl_attr_type {
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 NFQA_SKB_INFO, /* __u32 skb meta information */
49 NFQA_EXP, /* nf_conntrack_netlink.h */ 49 NFQA_EXP, /* nf_conntrack_netlink.h */
50 NFQA_UID, /* __u32 sk uid */
51 NFQA_GID, /* __u32 sk gid */
50 52
51 __NFQA_MAX 53 __NFQA_MAX
52}; 54};
@@ -99,7 +101,8 @@ enum nfqnl_attr_config {
99#define NFQA_CFG_F_FAIL_OPEN (1 << 0) 101#define NFQA_CFG_F_FAIL_OPEN (1 << 0)
100#define NFQA_CFG_F_CONNTRACK (1 << 1) 102#define NFQA_CFG_F_CONNTRACK (1 << 1)
101#define NFQA_CFG_F_GSO (1 << 2) 103#define NFQA_CFG_F_GSO (1 << 2)
102#define NFQA_CFG_F_MAX (1 << 3) 104#define NFQA_CFG_F_UID_GID (1 << 3)
105#define NFQA_CFG_F_MAX (1 << 4)
103 106
104/* flags for NFQA_SKB_INFO */ 107/* flags for NFQA_SKB_INFO */
105/* packet appears to have wrong checksums, but they are ok */ 108/* packet appears to have wrong checksums, but they are ok */
diff --git a/include/uapi/linux/netfilter/xt_cgroup.h b/include/uapi/linux/netfilter/xt_cgroup.h
new file mode 100644
index 000000000000..43acb7e175f6
--- /dev/null
+++ b/include/uapi/linux/netfilter/xt_cgroup.h
@@ -0,0 +1,11 @@
1#ifndef _UAPI_XT_CGROUP_H
2#define _UAPI_XT_CGROUP_H
3
4#include <linux/types.h>
5
6struct xt_cgroup_info {
7 __u32 id;
8 __u32 invert;
9};
10
11#endif /* _UAPI_XT_CGROUP_H */
diff --git a/include/uapi/linux/netfilter/xt_ipcomp.h b/include/uapi/linux/netfilter/xt_ipcomp.h
new file mode 100644
index 000000000000..45c7e40eb8e1
--- /dev/null
+++ b/include/uapi/linux/netfilter/xt_ipcomp.h
@@ -0,0 +1,16 @@
1#ifndef _XT_IPCOMP_H
2#define _XT_IPCOMP_H
3
4#include <linux/types.h>
5
6struct xt_ipcomp {
7 __u32 spis[2]; /* Security Parameter Index */
8 __u8 invflags; /* Inverse flags */
9 __u8 hdrres; /* Test of the Reserved Filed */
10};
11
12/* Values for "invflags" field in struct xt_ipcomp. */
13#define XT_IPCOMP_INV_SPI 0x01 /* Invert the sense of spi. */
14#define XT_IPCOMP_INV_MASK 0x01 /* All possible flags. */
15
16#endif /*_XT_IPCOMP_H*/
diff --git a/include/uapi/linux/netfilter/xt_l2tp.h b/include/uapi/linux/netfilter/xt_l2tp.h
new file mode 100644
index 000000000000..7dccfa0acbfa
--- /dev/null
+++ b/include/uapi/linux/netfilter/xt_l2tp.h
@@ -0,0 +1,27 @@
1#ifndef _LINUX_NETFILTER_XT_L2TP_H
2#define _LINUX_NETFILTER_XT_L2TP_H
3
4#include <linux/types.h>
5
6enum xt_l2tp_type {
7 XT_L2TP_TYPE_CONTROL,
8 XT_L2TP_TYPE_DATA,
9};
10
11/* L2TP matching stuff */
12struct xt_l2tp_info {
13 __u32 tid; /* tunnel id */
14 __u32 sid; /* session id */
15 __u8 version; /* L2TP protocol version */
16 __u8 type; /* L2TP packet type */
17 __u8 flags; /* which fields to match */
18};
19
20enum {
21 XT_L2TP_TID = (1 << 0), /* match L2TP tunnel id */
22 XT_L2TP_SID = (1 << 1), /* match L2TP session id */
23 XT_L2TP_VERSION = (1 << 2), /* match L2TP protocol version */
24 XT_L2TP_TYPE = (1 << 3), /* match L2TP packet type */
25};
26
27#endif /* _LINUX_NETFILTER_XT_L2TP_H */
diff --git a/include/uapi/linux/netfilter/xt_osf.h b/include/uapi/linux/netfilter/xt_osf.h
index 18afa495f973..5d66caeba3ee 100644
--- a/include/uapi/linux/netfilter/xt_osf.h
+++ b/include/uapi/linux/netfilter/xt_osf.h
@@ -13,8 +13,7 @@
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 17 */
19 18
20#ifndef _XT_OSF_H 19#ifndef _XT_OSF_H
diff --git a/include/uapi/linux/nfs4.h b/include/uapi/linux/nfs4.h
index 788128ebac45..35f5f4c6c260 100644
--- a/include/uapi/linux/nfs4.h
+++ b/include/uapi/linux/nfs4.h
@@ -150,7 +150,7 @@
150#define NFS4_SECINFO_STYLE4_CURRENT_FH 0 150#define NFS4_SECINFO_STYLE4_CURRENT_FH 0
151#define NFS4_SECINFO_STYLE4_PARENT 1 151#define NFS4_SECINFO_STYLE4_PARENT 1
152 152
153#define NFS4_MAX_UINT64 (~(u64)0) 153#define NFS4_MAX_UINT64 (~(__u64)0)
154 154
155/* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. 155/* An NFS4 sessions server must support at least NFS4_MAX_OPS operations.
156 * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly. 156 * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly.
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f752e9821e71..91054fd660e0 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -581,7 +581,14 @@
581 * operation, %NL80211_ATTR_MAC contains the peer MAC address, and 581 * operation, %NL80211_ATTR_MAC contains the peer MAC address, and
582 * %NL80211_ATTR_REASON_CODE the reason code to be used (only with 582 * %NL80211_ATTR_REASON_CODE the reason code to be used (only with
583 * %NL80211_TDLS_TEARDOWN). 583 * %NL80211_TDLS_TEARDOWN).
584 * @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame. 584 * @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame. The
585 * %NL80211_ATTR_TDLS_ACTION attribute determines the type of frame to be
586 * sent. Public Action codes (802.11-2012 8.1.5.1) will be sent as
587 * 802.11 management frames, while TDLS action codes (802.11-2012
588 * 8.5.13.1) will be encapsulated and sent as data frames. The currently
589 * supported Public Action code is %WLAN_PUB_ACTION_TDLS_DISCOVER_RES
590 * and the currently supported TDLS actions codes are given in
591 * &enum ieee80211_tdls_actioncode.
585 * 592 *
586 * @NL80211_CMD_UNEXPECTED_FRAME: Used by an application controlling an AP 593 * @NL80211_CMD_UNEXPECTED_FRAME: Used by an application controlling an AP
587 * (or GO) interface (i.e. hostapd) to ask for unexpected frames to 594 * (or GO) interface (i.e. hostapd) to ask for unexpected frames to
@@ -686,6 +693,21 @@
686 * other station that transmission must be blocked until the channel 693 * other station that transmission must be blocked until the channel
687 * switch is complete. 694 * switch is complete.
688 * 695 *
696 * @NL80211_CMD_VENDOR: Vendor-specified command/event. The command is specified
697 * by the %NL80211_ATTR_VENDOR_ID attribute and a sub-command in
698 * %NL80211_ATTR_VENDOR_SUBCMD. Parameter(s) can be transported in
699 * %NL80211_ATTR_VENDOR_DATA.
700 * For feature advertisement, the %NL80211_ATTR_VENDOR_DATA attribute is
701 * used in the wiphy data as a nested attribute containing descriptions
702 * (&struct nl80211_vendor_cmd_info) of the supported vendor commands.
703 * This may also be sent as an event with the same attributes.
704 *
705 * @NL80211_CMD_SET_QOS_MAP: Set Interworking QoS mapping for IP DSCP values.
706 * The QoS mapping information is included in %NL80211_ATTR_QOS_MAP. If
707 * that attribute is not included, QoS mapping is disabled. Since this
708 * QoS mapping is relevant for IP packets, it is only valid during an
709 * association. This is cleared on disassociation and AP restart.
710 *
689 * @NL80211_CMD_MAX: highest used command number 711 * @NL80211_CMD_MAX: highest used command number
690 * @__NL80211_CMD_AFTER_LAST: internal use 712 * @__NL80211_CMD_AFTER_LAST: internal use
691 */ 713 */
@@ -853,6 +875,10 @@ enum nl80211_commands {
853 875
854 NL80211_CMD_CHANNEL_SWITCH, 876 NL80211_CMD_CHANNEL_SWITCH,
855 877
878 NL80211_CMD_VENDOR,
879
880 NL80211_CMD_SET_QOS_MAP,
881
856 /* add new commands above here */ 882 /* add new commands above here */
857 883
858 /* used to define NL80211_CMD_MAX below */ 884 /* used to define NL80211_CMD_MAX below */
@@ -1508,6 +1534,27 @@ enum nl80211_commands {
1508 * to react to radar events, e.g. initiate a channel switch or leave the 1534 * to react to radar events, e.g. initiate a channel switch or leave the
1509 * IBSS network. 1535 * IBSS network.
1510 * 1536 *
1537 * @NL80211_ATTR_SUPPORT_5_MHZ: A flag indicating that the device supports
1538 * 5 MHz channel bandwidth.
1539 * @NL80211_ATTR_SUPPORT_10_MHZ: A flag indicating that the device supports
1540 * 10 MHz channel bandwidth.
1541 *
1542 * @NL80211_ATTR_OPMODE_NOTIF: Operating mode field from Operating Mode
1543 * Notification Element based on association request when used with
1544 * %NL80211_CMD_NEW_STATION; u8 attribute.
1545 *
1546 * @NL80211_ATTR_VENDOR_ID: The vendor ID, either a 24-bit OUI or, if
1547 * %NL80211_VENDOR_ID_IS_LINUX is set, a special Linux ID (not used yet)
1548 * @NL80211_ATTR_VENDOR_SUBCMD: vendor sub-command
1549 * @NL80211_ATTR_VENDOR_DATA: data for the vendor command, if any; this
1550 * attribute is also used for vendor command feature advertisement
1551 * @NL80211_ATTR_VENDOR_EVENTS: used for event list advertising in the wiphy
1552 * info, containing a nested array of possible events
1553 *
1554 * @NL80211_ATTR_QOS_MAP: IP DSCP mapping for Interworking QoS mapping. This
1555 * data is in the format defined for the payload of the QoS Map Set element
1556 * in IEEE Std 802.11-2012, 8.4.2.97.
1557 *
1511 * @NL80211_ATTR_MAX: highest attribute number currently defined 1558 * @NL80211_ATTR_MAX: highest attribute number currently defined
1512 * @__NL80211_ATTR_AFTER_LAST: internal use 1559 * @__NL80211_ATTR_AFTER_LAST: internal use
1513 */ 1560 */
@@ -1824,6 +1871,18 @@ enum nl80211_attrs {
1824 1871
1825 NL80211_ATTR_HANDLE_DFS, 1872 NL80211_ATTR_HANDLE_DFS,
1826 1873
1874 NL80211_ATTR_SUPPORT_5_MHZ,
1875 NL80211_ATTR_SUPPORT_10_MHZ,
1876
1877 NL80211_ATTR_OPMODE_NOTIF,
1878
1879 NL80211_ATTR_VENDOR_ID,
1880 NL80211_ATTR_VENDOR_SUBCMD,
1881 NL80211_ATTR_VENDOR_DATA,
1882 NL80211_ATTR_VENDOR_EVENTS,
1883
1884 NL80211_ATTR_QOS_MAP,
1885
1827 /* add attributes here, update the policy in nl80211.c */ 1886 /* add attributes here, update the policy in nl80211.c */
1828 1887
1829 __NL80211_ATTR_AFTER_LAST, 1888 __NL80211_ATTR_AFTER_LAST,
@@ -2224,10 +2283,9 @@ enum nl80211_band_attr {
2224 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz 2283 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
2225 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current 2284 * @NL80211_FREQUENCY_ATTR_DISABLED: Channel is disabled in current
2226 * regulatory domain. 2285 * regulatory domain.
2227 * @NL80211_FREQUENCY_ATTR_PASSIVE_SCAN: Only passive scanning is 2286 * @NL80211_FREQUENCY_ATTR_NO_IR: no mechanisms that initiate radiation
2228 * permitted on this channel in current regulatory domain. 2287 * are permitted on this channel, this includes sending probe
2229 * @NL80211_FREQUENCY_ATTR_NO_IBSS: IBSS networks are not permitted 2288 * requests, or modes of operation that require beaconing.
2230 * on this channel in current regulatory domain.
2231 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory 2289 * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
2232 * on this channel in current regulatory domain. 2290 * on this channel in current regulatory domain.
2233 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm 2291 * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
@@ -2254,8 +2312,8 @@ enum nl80211_frequency_attr {
2254 __NL80211_FREQUENCY_ATTR_INVALID, 2312 __NL80211_FREQUENCY_ATTR_INVALID,
2255 NL80211_FREQUENCY_ATTR_FREQ, 2313 NL80211_FREQUENCY_ATTR_FREQ,
2256 NL80211_FREQUENCY_ATTR_DISABLED, 2314 NL80211_FREQUENCY_ATTR_DISABLED,
2257 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN, 2315 NL80211_FREQUENCY_ATTR_NO_IR,
2258 NL80211_FREQUENCY_ATTR_NO_IBSS, 2316 __NL80211_FREQUENCY_ATTR_NO_IBSS,
2259 NL80211_FREQUENCY_ATTR_RADAR, 2317 NL80211_FREQUENCY_ATTR_RADAR,
2260 NL80211_FREQUENCY_ATTR_MAX_TX_POWER, 2318 NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
2261 NL80211_FREQUENCY_ATTR_DFS_STATE, 2319 NL80211_FREQUENCY_ATTR_DFS_STATE,
@@ -2271,6 +2329,9 @@ enum nl80211_frequency_attr {
2271}; 2329};
2272 2330
2273#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER 2331#define NL80211_FREQUENCY_ATTR_MAX_TX_POWER NL80211_FREQUENCY_ATTR_MAX_TX_POWER
2332#define NL80211_FREQUENCY_ATTR_PASSIVE_SCAN NL80211_FREQUENCY_ATTR_NO_IR
2333#define NL80211_FREQUENCY_ATTR_NO_IBSS NL80211_FREQUENCY_ATTR_NO_IR
2334#define NL80211_FREQUENCY_ATTR_NO_IR NL80211_FREQUENCY_ATTR_NO_IR
2274 2335
2275/** 2336/**
2276 * enum nl80211_bitrate_attr - bitrate attributes 2337 * enum nl80211_bitrate_attr - bitrate attributes
@@ -2413,8 +2474,9 @@ enum nl80211_sched_scan_match_attr {
2413 * @NL80211_RRF_DFS: DFS support is required to be used 2474 * @NL80211_RRF_DFS: DFS support is required to be used
2414 * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links 2475 * @NL80211_RRF_PTP_ONLY: this is only for Point To Point links
2415 * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links 2476 * @NL80211_RRF_PTMP_ONLY: this is only for Point To Multi Point links
2416 * @NL80211_RRF_PASSIVE_SCAN: passive scan is required 2477 * @NL80211_RRF_NO_IR: no mechanisms that initiate radiation are allowed,
2417 * @NL80211_RRF_NO_IBSS: no IBSS is allowed 2478 * this includes probe requests or modes of operation that require
2479 * beaconing.
2418 */ 2480 */
2419enum nl80211_reg_rule_flags { 2481enum nl80211_reg_rule_flags {
2420 NL80211_RRF_NO_OFDM = 1<<0, 2482 NL80211_RRF_NO_OFDM = 1<<0,
@@ -2424,10 +2486,17 @@ enum nl80211_reg_rule_flags {
2424 NL80211_RRF_DFS = 1<<4, 2486 NL80211_RRF_DFS = 1<<4,
2425 NL80211_RRF_PTP_ONLY = 1<<5, 2487 NL80211_RRF_PTP_ONLY = 1<<5,
2426 NL80211_RRF_PTMP_ONLY = 1<<6, 2488 NL80211_RRF_PTMP_ONLY = 1<<6,
2427 NL80211_RRF_PASSIVE_SCAN = 1<<7, 2489 NL80211_RRF_NO_IR = 1<<7,
2428 NL80211_RRF_NO_IBSS = 1<<8, 2490 __NL80211_RRF_NO_IBSS = 1<<8,
2429}; 2491};
2430 2492
2493#define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR
2494#define NL80211_RRF_NO_IBSS NL80211_RRF_NO_IR
2495#define NL80211_RRF_NO_IR NL80211_RRF_NO_IR
2496
2497/* For backport compatibility with older userspace */
2498#define NL80211_RRF_NO_IR_ALL (NL80211_RRF_NO_IR | __NL80211_RRF_NO_IBSS)
2499
2431/** 2500/**
2432 * enum nl80211_dfs_regions - regulatory DFS regions 2501 * enum nl80211_dfs_regions - regulatory DFS regions
2433 * 2502 *
@@ -3058,21 +3127,35 @@ enum nl80211_key_attributes {
3058 * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with 3127 * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
3059 * 1 = 500 kbps) but without the IE length restriction (at most 3128 * 1 = 500 kbps) but without the IE length restriction (at most
3060 * %NL80211_MAX_SUPP_RATES in a single array). 3129 * %NL80211_MAX_SUPP_RATES in a single array).
3061 * @NL80211_TXRATE_MCS: HT (MCS) rates allowed for TX rate selection 3130 * @NL80211_TXRATE_HT: HT (MCS) rates allowed for TX rate selection
3062 * in an array of MCS numbers. 3131 * in an array of MCS numbers.
3132 * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,
3133 * see &struct nl80211_txrate_vht
3063 * @__NL80211_TXRATE_AFTER_LAST: internal 3134 * @__NL80211_TXRATE_AFTER_LAST: internal
3064 * @NL80211_TXRATE_MAX: highest TX rate attribute 3135 * @NL80211_TXRATE_MAX: highest TX rate attribute
3065 */ 3136 */
3066enum nl80211_tx_rate_attributes { 3137enum nl80211_tx_rate_attributes {
3067 __NL80211_TXRATE_INVALID, 3138 __NL80211_TXRATE_INVALID,
3068 NL80211_TXRATE_LEGACY, 3139 NL80211_TXRATE_LEGACY,
3069 NL80211_TXRATE_MCS, 3140 NL80211_TXRATE_HT,
3141 NL80211_TXRATE_VHT,
3070 3142
3071 /* keep last */ 3143 /* keep last */
3072 __NL80211_TXRATE_AFTER_LAST, 3144 __NL80211_TXRATE_AFTER_LAST,
3073 NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1 3145 NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1
3074}; 3146};
3075 3147
3148#define NL80211_TXRATE_MCS NL80211_TXRATE_HT
3149#define NL80211_VHT_NSS_MAX 8
3150
3151/**
3152 * struct nl80211_txrate_vht - VHT MCS/NSS txrate bitmap
3153 * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.)
3154 */
3155struct nl80211_txrate_vht {
3156 __u16 mcs[NL80211_VHT_NSS_MAX];
3157};
3158
3076/** 3159/**
3077 * enum nl80211_band - Frequency band 3160 * enum nl80211_band - Frequency band
3078 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band 3161 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
@@ -3934,4 +4017,24 @@ enum nl80211_rxmgmt_flags {
3934 NL80211_RXMGMT_FLAG_ANSWERED = 1 << 0, 4017 NL80211_RXMGMT_FLAG_ANSWERED = 1 << 0,
3935}; 4018};
3936 4019
4020/*
4021 * If this flag is unset, the lower 24 bits are an OUI, if set
4022 * a Linux nl80211 vendor ID is used (no such IDs are allocated
4023 * yet, so that's not valid so far)
4024 */
4025#define NL80211_VENDOR_ID_IS_LINUX 0x80000000
4026
4027/**
4028 * struct nl80211_vendor_cmd_info - vendor command data
4029 * @vendor_id: If the %NL80211_VENDOR_ID_IS_LINUX flag is clear, then the
4030 * value is a 24-bit OUI; if it is set then a separately allocated ID
4031 * may be used, but no such IDs are allocated yet. New IDs should be
4032 * added to this file when needed.
4033 * @subcmd: sub-command ID for the command
4034 */
4035struct nl80211_vendor_cmd_info {
4036 __u32 vendor_id;
4037 __u32 subcmd;
4038};
4039
3937#endif /* __LINUX_NL80211_H */ 4040#endif /* __LINUX_NL80211_H */
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h
index d120f9fe0017..970553cbbc8e 100644
--- a/include/uapi/linux/openvswitch.h
+++ b/include/uapi/linux/openvswitch.h
@@ -40,7 +40,15 @@ struct ovs_header {
40 40
41#define OVS_DATAPATH_FAMILY "ovs_datapath" 41#define OVS_DATAPATH_FAMILY "ovs_datapath"
42#define OVS_DATAPATH_MCGROUP "ovs_datapath" 42#define OVS_DATAPATH_MCGROUP "ovs_datapath"
43#define OVS_DATAPATH_VERSION 0x1 43
44/* V2:
45 * - API users are expected to provide OVS_DP_ATTR_USER_FEATURES
46 * when creating the datapath.
47 */
48#define OVS_DATAPATH_VERSION 2
49
50/* First OVS datapath version to support features */
51#define OVS_DP_VER_FEATURES 2
44 52
45enum ovs_datapath_cmd { 53enum ovs_datapath_cmd {
46 OVS_DP_CMD_UNSPEC, 54 OVS_DP_CMD_UNSPEC,
@@ -75,6 +83,7 @@ enum ovs_datapath_attr {
75 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ 83 OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */
76 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ 84 OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */
77 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */ 85 OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */
86 OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */
78 __OVS_DP_ATTR_MAX 87 __OVS_DP_ATTR_MAX
79}; 88};
80 89
@@ -106,6 +115,9 @@ struct ovs_vport_stats {
106 __u64 tx_dropped; /* no space available in linux */ 115 __u64 tx_dropped; /* no space available in linux */
107}; 116};
108 117
118/* Allow last Netlink attribute to be unaligned */
119#define OVS_DP_F_UNALIGNED (1 << 0)
120
109/* Fixed logical ports. */ 121/* Fixed logical ports. */
110#define OVSP_LOCAL ((__u32)0) 122#define OVSP_LOCAL ((__u32)0)
111 123
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index 4a98e85438a7..30db069bce62 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -489,7 +489,12 @@
489#define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ 489#define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */
490#define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ 490#define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */
491#define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ 491#define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */
492#define PCI_EXP_LNKSTA_CLS_8_0GB 0x0003 /* Current Link Speed 8.0GT/s */
492#define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */ 493#define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */
494#define PCI_EXP_LNKSTA_NLW_X1 0x0010 /* Current Link Width x1 */
495#define PCI_EXP_LNKSTA_NLW_X2 0x0020 /* Current Link Width x2 */
496#define PCI_EXP_LNKSTA_NLW_X4 0x0040 /* Current Link Width x4 */
497#define PCI_EXP_LNKSTA_NLW_X8 0x0080 /* Current Link Width x8 */
493#define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */ 498#define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */
494#define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ 499#define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */
495#define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ 500#define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */
@@ -518,8 +523,16 @@
518#define PCI_EXP_SLTCTL_CCIE 0x0010 /* Command Completed Interrupt Enable */ 523#define PCI_EXP_SLTCTL_CCIE 0x0010 /* Command Completed Interrupt Enable */
519#define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */ 524#define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */
520#define PCI_EXP_SLTCTL_AIC 0x00c0 /* Attention Indicator Control */ 525#define PCI_EXP_SLTCTL_AIC 0x00c0 /* Attention Indicator Control */
526#define PCI_EXP_SLTCTL_ATTN_IND_ON 0x0040 /* Attention Indicator on */
527#define PCI_EXP_SLTCTL_ATTN_IND_BLINK 0x0080 /* Attention Indicator blinking */
528#define PCI_EXP_SLTCTL_ATTN_IND_OFF 0x00c0 /* Attention Indicator off */
521#define PCI_EXP_SLTCTL_PIC 0x0300 /* Power Indicator Control */ 529#define PCI_EXP_SLTCTL_PIC 0x0300 /* Power Indicator Control */
530#define PCI_EXP_SLTCTL_PWR_IND_ON 0x0100 /* Power Indicator on */
531#define PCI_EXP_SLTCTL_PWR_IND_BLINK 0x0200 /* Power Indicator blinking */
532#define PCI_EXP_SLTCTL_PWR_IND_OFF 0x0300 /* Power Indicator off */
522#define PCI_EXP_SLTCTL_PCC 0x0400 /* Power Controller Control */ 533#define PCI_EXP_SLTCTL_PCC 0x0400 /* Power Controller Control */
534#define PCI_EXP_SLTCTL_PWR_ON 0x0000 /* Power On */
535#define PCI_EXP_SLTCTL_PWR_OFF 0x0400 /* Power Off */
523#define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */ 536#define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */
524#define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */ 537#define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */
525#define PCI_EXP_SLTSTA 26 /* Slot Status */ 538#define PCI_EXP_SLTSTA 26 /* Slot Status */
@@ -677,17 +690,34 @@
677#define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */ 690#define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */
678 691
679/* Virtual Channel */ 692/* Virtual Channel */
680#define PCI_VC_PORT_REG1 4 693#define PCI_VC_PORT_CAP1 4
681#define PCI_VC_REG1_EVCC 0x7 /* extended VC count */ 694#define PCI_VC_CAP1_EVCC 0x00000007 /* extended VC count */
682#define PCI_VC_PORT_REG2 8 695#define PCI_VC_CAP1_LPEVCC 0x00000070 /* low prio extended VC count */
683#define PCI_VC_REG2_32_PHASE 0x2 696#define PCI_VC_CAP1_ARB_SIZE 0x00000c00
684#define PCI_VC_REG2_64_PHASE 0x4 697#define PCI_VC_PORT_CAP2 8
685#define PCI_VC_REG2_128_PHASE 0x8 698#define PCI_VC_CAP2_32_PHASE 0x00000002
699#define PCI_VC_CAP2_64_PHASE 0x00000004
700#define PCI_VC_CAP2_128_PHASE 0x00000008
701#define PCI_VC_CAP2_ARB_OFF 0xff000000
686#define PCI_VC_PORT_CTRL 12 702#define PCI_VC_PORT_CTRL 12
703#define PCI_VC_PORT_CTRL_LOAD_TABLE 0x00000001
687#define PCI_VC_PORT_STATUS 14 704#define PCI_VC_PORT_STATUS 14
705#define PCI_VC_PORT_STATUS_TABLE 0x00000001
688#define PCI_VC_RES_CAP 16 706#define PCI_VC_RES_CAP 16
707#define PCI_VC_RES_CAP_32_PHASE 0x00000002
708#define PCI_VC_RES_CAP_64_PHASE 0x00000004
709#define PCI_VC_RES_CAP_128_PHASE 0x00000008
710#define PCI_VC_RES_CAP_128_PHASE_TB 0x00000010
711#define PCI_VC_RES_CAP_256_PHASE 0x00000020
712#define PCI_VC_RES_CAP_ARB_OFF 0xff000000
689#define PCI_VC_RES_CTRL 20 713#define PCI_VC_RES_CTRL 20
714#define PCI_VC_RES_CTRL_LOAD_TABLE 0x00010000
715#define PCI_VC_RES_CTRL_ARB_SELECT 0x000e0000
716#define PCI_VC_RES_CTRL_ID 0x07000000
717#define PCI_VC_RES_CTRL_ENABLE 0x80000000
690#define PCI_VC_RES_STATUS 26 718#define PCI_VC_RES_STATUS 26
719#define PCI_VC_RES_STATUS_TABLE 0x00000001
720#define PCI_VC_RES_STATUS_NEGO 0x00000002
691#define PCI_CAP_VC_BASE_SIZEOF 0x10 721#define PCI_CAP_VC_BASE_SIZEOF 0x10
692#define PCI_CAP_VC_PER_VC_SIZEOF 0x0C 722#define PCI_CAP_VC_PER_VC_SIZEOF 0x0C
693 723
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index e244ed412745..853bc1ccb395 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -788,7 +788,7 @@ union perf_mem_data_src {
788#define PERF_MEM_TLB_SHIFT 26 788#define PERF_MEM_TLB_SHIFT 26
789 789
790#define PERF_MEM_S(a, s) \ 790#define PERF_MEM_S(a, s) \
791 (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) 791 (((__u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT)
792 792
793/* 793/*
794 * single taken branch record layout: 794 * single taken branch record layout:
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
index a806687ad98f..d62316baae94 100644
--- a/include/uapi/linux/pkt_sched.h
+++ b/include/uapi/linux/pkt_sched.h
@@ -173,6 +173,8 @@ enum {
173 TCA_TBF_PTAB, 173 TCA_TBF_PTAB,
174 TCA_TBF_RATE64, 174 TCA_TBF_RATE64,
175 TCA_TBF_PRATE64, 175 TCA_TBF_PRATE64,
176 TCA_TBF_BURST,
177 TCA_TBF_PBURST,
176 __TCA_TBF_MAX, 178 __TCA_TBF_MAX,
177}; 179};
178 180
@@ -523,6 +525,7 @@ enum {
523 TCA_NETEM_LOSS, 525 TCA_NETEM_LOSS,
524 TCA_NETEM_RATE, 526 TCA_NETEM_RATE,
525 TCA_NETEM_ECN, 527 TCA_NETEM_ECN,
528 TCA_NETEM_RATE64,
526 __TCA_NETEM_MAX, 529 __TCA_NETEM_MAX,
527}; 530};
528 531
@@ -790,4 +793,54 @@ struct tc_fq_qd_stats {
790 __u32 throttled_flows; 793 __u32 throttled_flows;
791 __u32 pad; 794 __u32 pad;
792}; 795};
796
797/* Heavy-Hitter Filter */
798
799enum {
800 TCA_HHF_UNSPEC,
801 TCA_HHF_BACKLOG_LIMIT,
802 TCA_HHF_QUANTUM,
803 TCA_HHF_HH_FLOWS_LIMIT,
804 TCA_HHF_RESET_TIMEOUT,
805 TCA_HHF_ADMIT_BYTES,
806 TCA_HHF_EVICT_TIMEOUT,
807 TCA_HHF_NON_HH_WEIGHT,
808 __TCA_HHF_MAX
809};
810
811#define TCA_HHF_MAX (__TCA_HHF_MAX - 1)
812
813struct tc_hhf_xstats {
814 __u32 drop_overlimit; /* number of times max qdisc packet limit
815 * was hit
816 */
817 __u32 hh_overlimit; /* number of times max heavy-hitters was hit */
818 __u32 hh_tot_count; /* number of captured heavy-hitters so far */
819 __u32 hh_cur_count; /* number of current heavy-hitters */
820};
821
822/* PIE */
823enum {
824 TCA_PIE_UNSPEC,
825 TCA_PIE_TARGET,
826 TCA_PIE_LIMIT,
827 TCA_PIE_TUPDATE,
828 TCA_PIE_ALPHA,
829 TCA_PIE_BETA,
830 TCA_PIE_ECN,
831 TCA_PIE_BYTEMODE,
832 __TCA_PIE_MAX
833};
834#define TCA_PIE_MAX (__TCA_PIE_MAX - 1)
835
836struct tc_pie_xstats {
837 __u32 prob; /* current probability */
838 __u32 delay; /* current delay in ms */
839 __u32 avg_dq_rate; /* current average dq_rate in bits/pie_time */
840 __u32 packets_in; /* total number of packets enqueued */
841 __u32 dropped; /* packets dropped due to pie_action */
842 __u32 overlimit; /* dropped due to lack of space in queue */
843 __u32 maxq; /* maximum queue size */
844 __u32 ecn_mark; /* packets marked with ecn*/
845};
793#endif 846#endif
diff --git a/include/uapi/linux/ppp-ioctl.h b/include/uapi/linux/ppp-ioctl.h
index 2d9a8859550a..63a23a3b8bb7 100644
--- a/include/uapi/linux/ppp-ioctl.h
+++ b/include/uapi/linux/ppp-ioctl.h
@@ -12,6 +12,7 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/compiler.h> 14#include <linux/compiler.h>
15#include <linux/ppp_defs.h>
15 16
16/* 17/*
17 * Bit definitions for flags argument to PPPIOCGFLAGS/PPPIOCSFLAGS. 18 * Bit definitions for flags argument to PPPIOCGFLAGS/PPPIOCSFLAGS.
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
index f7cf7f351144..49f4210d4394 100644
--- a/include/uapi/linux/raid/md_p.h
+++ b/include/uapi/linux/raid/md_p.h
@@ -292,6 +292,9 @@ struct mdp_superblock_1 {
292 * backwards anyway. 292 * backwards anyway.
293 */ 293 */
294#define MD_FEATURE_NEW_OFFSET 64 /* new_offset must be honoured */ 294#define MD_FEATURE_NEW_OFFSET 64 /* new_offset must be honoured */
295#define MD_FEATURE_RECOVERY_BITMAP 128 /* recovery that is happening
296 * is guided by bitmap.
297 */
295#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ 298#define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \
296 |MD_FEATURE_RECOVERY_OFFSET \ 299 |MD_FEATURE_RECOVERY_OFFSET \
297 |MD_FEATURE_RESHAPE_ACTIVE \ 300 |MD_FEATURE_RESHAPE_ACTIVE \
@@ -299,6 +302,7 @@ struct mdp_superblock_1 {
299 |MD_FEATURE_REPLACEMENT \ 302 |MD_FEATURE_REPLACEMENT \
300 |MD_FEATURE_RESHAPE_BACKWARDS \ 303 |MD_FEATURE_RESHAPE_BACKWARDS \
301 |MD_FEATURE_NEW_OFFSET \ 304 |MD_FEATURE_NEW_OFFSET \
305 |MD_FEATURE_RECOVERY_BITMAP \
302 ) 306 )
303 307
304#endif 308#endif
diff --git a/include/uapi/linux/resource.h b/include/uapi/linux/resource.h
index e0ed28477f48..36fb3b5fb181 100644
--- a/include/uapi/linux/resource.h
+++ b/include/uapi/linux/resource.h
@@ -23,25 +23,25 @@
23struct rusage { 23struct rusage {
24 struct timeval ru_utime; /* user time used */ 24 struct timeval ru_utime; /* user time used */
25 struct timeval ru_stime; /* system time used */ 25 struct timeval ru_stime; /* system time used */
26 long ru_maxrss; /* maximum resident set size */ 26 __kernel_long_t ru_maxrss; /* maximum resident set size */
27 long ru_ixrss; /* integral shared memory size */ 27 __kernel_long_t ru_ixrss; /* integral shared memory size */
28 long ru_idrss; /* integral unshared data size */ 28 __kernel_long_t ru_idrss; /* integral unshared data size */
29 long ru_isrss; /* integral unshared stack size */ 29 __kernel_long_t ru_isrss; /* integral unshared stack size */
30 long ru_minflt; /* page reclaims */ 30 __kernel_long_t ru_minflt; /* page reclaims */
31 long ru_majflt; /* page faults */ 31 __kernel_long_t ru_majflt; /* page faults */
32 long ru_nswap; /* swaps */ 32 __kernel_long_t ru_nswap; /* swaps */
33 long ru_inblock; /* block input operations */ 33 __kernel_long_t ru_inblock; /* block input operations */
34 long ru_oublock; /* block output operations */ 34 __kernel_long_t ru_oublock; /* block output operations */
35 long ru_msgsnd; /* messages sent */ 35 __kernel_long_t ru_msgsnd; /* messages sent */
36 long ru_msgrcv; /* messages received */ 36 __kernel_long_t ru_msgrcv; /* messages received */
37 long ru_nsignals; /* signals received */ 37 __kernel_long_t ru_nsignals; /* signals received */
38 long ru_nvcsw; /* voluntary context switches */ 38 __kernel_long_t ru_nvcsw; /* voluntary context switches */
39 long ru_nivcsw; /* involuntary " */ 39 __kernel_long_t ru_nivcsw; /* involuntary " */
40}; 40};
41 41
42struct rlimit { 42struct rlimit {
43 unsigned long rlim_cur; 43 __kernel_ulong_t rlim_cur;
44 unsigned long rlim_max; 44 __kernel_ulong_t rlim_max;
45}; 45};
46 46
47#define RLIM64_INFINITY (~0ULL) 47#define RLIM64_INFINITY (~0ULL)
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index ca451e99b28b..266022a2be4a 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -22,9 +22,8 @@
22 * See the GNU General Public License for more details. 22 * See the GNU General Public License for more details.
23 * 23 *
24 * You should have received a copy of the GNU General Public License 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 25 * along with GNU CC; see the file COPYING. If not, see
26 * the Free Software Foundation, 59 Temple Place - Suite 330, 26 * <http://www.gnu.org/licenses/>.
27 * Boston, MA 02111-1307, USA.
28 * 27 *
29 * Please send any bug reports or fixes you make to the 28 * Please send any bug reports or fixes you make to the
30 * email address(es): 29 * email address(es):
diff --git a/include/uapi/linux/shm.h b/include/uapi/linux/shm.h
index ec36fa1a83a4..78b69413f582 100644
--- a/include/uapi/linux/shm.h
+++ b/include/uapi/linux/shm.h
@@ -68,11 +68,11 @@ struct shminfo {
68 68
69struct shm_info { 69struct shm_info {
70 int used_ids; 70 int used_ids;
71 unsigned long shm_tot; /* total allocated shm */ 71 __kernel_ulong_t shm_tot; /* total allocated shm */
72 unsigned long shm_rss; /* total resident shm */ 72 __kernel_ulong_t shm_rss; /* total resident shm */
73 unsigned long shm_swp; /* total swapped shm */ 73 __kernel_ulong_t shm_swp; /* total swapped shm */
74 unsigned long swap_attempts; 74 __kernel_ulong_t swap_attempts;
75 unsigned long swap_successes; 75 __kernel_ulong_t swap_successes;
76}; 76};
77 77
78 78
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h
index 1bdb4a39d1e1..bbaba22f2d1b 100644
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -258,6 +258,7 @@ enum
258 LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */ 258 LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */
259 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */ 259 LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
260 LINUX_MIB_BUSYPOLLRXPACKETS, /* BusyPollRxPackets */ 260 LINUX_MIB_BUSYPOLLRXPACKETS, /* BusyPollRxPackets */
261 LINUX_MIB_TCPAUTOCORKING, /* TCPAutoCorking */
261 __LINUX_MIB_MAX 262 __LINUX_MIB_MAX
262}; 263};
263 264
diff --git a/include/uapi/linux/sockios.h b/include/uapi/linux/sockios.h
index 7997a506ad41..e888b1aed69f 100644
--- a/include/uapi/linux/sockios.h
+++ b/include/uapi/linux/sockios.h
@@ -125,7 +125,8 @@
125#define SIOCBRDELIF 0x89a3 /* remove interface from bridge */ 125#define SIOCBRDELIF 0x89a3 /* remove interface from bridge */
126 126
127/* hardware time stamping: parameters in linux/net_tstamp.h */ 127/* hardware time stamping: parameters in linux/net_tstamp.h */
128#define SIOCSHWTSTAMP 0x89b0 128#define SIOCSHWTSTAMP 0x89b0 /* set and get config */
129#define SIOCGHWTSTAMP 0x89b1 /* get config */
129 130
130/* Device private ioctl calls */ 131/* Device private ioctl calls */
131 132
diff --git a/include/uapi/linux/tc_act/tc_ipt.h b/include/uapi/linux/tc_act/tc_ipt.h
index a2335563d21f..130aaadf6fac 100644
--- a/include/uapi/linux/tc_act/tc_ipt.h
+++ b/include/uapi/linux/tc_act/tc_ipt.h
@@ -4,6 +4,7 @@
4#include <linux/pkt_cls.h> 4#include <linux/pkt_cls.h>
5 5
6#define TCA_ACT_IPT 6 6#define TCA_ACT_IPT 6
7#define TCA_ACT_XT 10
7 8
8enum { 9enum {
9 TCA_IPT_UNSPEC, 10 TCA_IPT_UNSPEC,
diff --git a/include/uapi/linux/tcp_metrics.h b/include/uapi/linux/tcp_metrics.h
index cb5157b55f32..54a37b13f2c4 100644
--- a/include/uapi/linux/tcp_metrics.h
+++ b/include/uapi/linux/tcp_metrics.h
@@ -35,6 +35,8 @@ enum {
35 TCP_METRICS_ATTR_FOPEN_SYN_DROPS, /* u16, count of drops */ 35 TCP_METRICS_ATTR_FOPEN_SYN_DROPS, /* u16, count of drops */
36 TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS, /* msecs age */ 36 TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS, /* msecs age */
37 TCP_METRICS_ATTR_FOPEN_COOKIE, /* binary */ 37 TCP_METRICS_ATTR_FOPEN_COOKIE, /* binary */
38 TCP_METRICS_ATTR_SADDR_IPV4, /* u32 */
39 TCP_METRICS_ATTR_SADDR_IPV6, /* binary */
38 40
39 __TCP_METRICS_ATTR_MAX, 41 __TCP_METRICS_ATTR_MAX,
40}; 42};
diff --git a/include/uapi/linux/timex.h b/include/uapi/linux/timex.h
index a7ea81f13711..92685d826444 100644
--- a/include/uapi/linux/timex.h
+++ b/include/uapi/linux/timex.h
@@ -63,27 +63,27 @@
63 */ 63 */
64struct timex { 64struct timex {
65 unsigned int modes; /* mode selector */ 65 unsigned int modes; /* mode selector */
66 long offset; /* time offset (usec) */ 66 __kernel_long_t offset; /* time offset (usec) */
67 long freq; /* frequency offset (scaled ppm) */ 67 __kernel_long_t freq; /* frequency offset (scaled ppm) */
68 long maxerror; /* maximum error (usec) */ 68 __kernel_long_t maxerror;/* maximum error (usec) */
69 long esterror; /* estimated error (usec) */ 69 __kernel_long_t esterror;/* estimated error (usec) */
70 int status; /* clock command/status */ 70 int status; /* clock command/status */
71 long constant; /* pll time constant */ 71 __kernel_long_t constant;/* pll time constant */
72 long precision; /* clock precision (usec) (read only) */ 72 __kernel_long_t precision;/* clock precision (usec) (read only) */
73 long tolerance; /* clock frequency tolerance (ppm) 73 __kernel_long_t tolerance;/* clock frequency tolerance (ppm)
74 * (read only) 74 * (read only)
75 */ 75 */
76 struct timeval time; /* (read only, except for ADJ_SETOFFSET) */ 76 struct timeval time; /* (read only, except for ADJ_SETOFFSET) */
77 long tick; /* (modified) usecs between clock ticks */ 77 __kernel_long_t tick; /* (modified) usecs between clock ticks */
78 78
79 long ppsfreq; /* pps frequency (scaled ppm) (ro) */ 79 __kernel_long_t ppsfreq;/* pps frequency (scaled ppm) (ro) */
80 long jitter; /* pps jitter (us) (ro) */ 80 __kernel_long_t jitter; /* pps jitter (us) (ro) */
81 int shift; /* interval duration (s) (shift) (ro) */ 81 int shift; /* interval duration (s) (shift) (ro) */
82 long stabil; /* pps stability (scaled ppm) (ro) */ 82 __kernel_long_t stabil; /* pps stability (scaled ppm) (ro) */
83 long jitcnt; /* jitter limit exceeded (ro) */ 83 __kernel_long_t jitcnt; /* jitter limit exceeded (ro) */
84 long calcnt; /* calibration intervals (ro) */ 84 __kernel_long_t calcnt; /* calibration intervals (ro) */
85 long errcnt; /* calibration errors (ro) */ 85 __kernel_long_t errcnt; /* calibration errors (ro) */
86 long stbcnt; /* stability limit exceeded (ro) */ 86 __kernel_long_t stbcnt; /* stability limit exceeded (ro) */
87 87
88 int tai; /* TAI offset (ro) */ 88 int tai; /* TAI offset (ro) */
89 89
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 1666aabbbb86..2cbe605bbe04 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -164,6 +164,10 @@ enum v4l2_colorfx {
164 * this driver */ 164 * this driver */
165#define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_USER_BASE + 0x1050) 165#define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_USER_BASE + 0x1050)
166 166
167/* The base for the saa7134 driver controls.
168 * We reserve 16 controls for this driver. */
169#define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060)
170
167/* MPEG-class control IDs */ 171/* MPEG-class control IDs */
168/* The MPEG controls are applicable to all codec controls 172/* The MPEG controls are applicable to all codec controls
169 * and the 'MPEG' part of the define is historical */ 173 * and the 'MPEG' part of the define is historical */
@@ -554,6 +558,11 @@ enum v4l2_vp8_golden_frame_sel {
554 V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0, 558 V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0,
555 V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1, 559 V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1,
556}; 560};
561#define V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (V4L2_CID_MPEG_BASE+507)
562#define V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (V4L2_CID_MPEG_BASE+508)
563#define V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (V4L2_CID_MPEG_BASE+509)
564#define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_MPEG_BASE+510)
565#define V4L2_CID_MPEG_VIDEO_VPX_PROFILE (V4L2_CID_MPEG_BASE+511)
557 566
558/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ 567/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */
559#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) 568#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
index a9601257bb43..b5c3aab6e82c 100644
--- a/include/uapi/linux/v4l2-mediabus.h
+++ b/include/uapi/linux/v4l2-mediabus.h
@@ -110,6 +110,9 @@ enum v4l2_mbus_pixelcode {
110 110
111 /* S5C73M3 sensor specific interleaved UYVY and JPEG */ 111 /* S5C73M3 sensor specific interleaved UYVY and JPEG */
112 V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001, 112 V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001,
113
114 /* HSV - next is 0x6002 */
115 V4L2_MBUS_FMT_AHSV8888_1X32 = 0x6001,
113}; 116};
114 117
115/** 118/**
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 437f1b0f8937..6ae7bbe988cc 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -207,8 +207,8 @@ enum v4l2_priority {
207struct v4l2_rect { 207struct v4l2_rect {
208 __s32 left; 208 __s32 left;
209 __s32 top; 209 __s32 top;
210 __s32 width; 210 __u32 width;
211 __s32 height; 211 __u32 height;
212}; 212};
213 213
214struct v4l2_fract { 214struct v4l2_fract {
diff --git a/include/uapi/linux/vsp1.h b/include/uapi/linux/vsp1.h
new file mode 100644
index 000000000000..e18858f6e865
--- /dev/null
+++ b/include/uapi/linux/vsp1.h
@@ -0,0 +1,34 @@
1/*
2 * vsp1.h
3 *
4 * Renesas R-Car VSP1 - User-space API
5 *
6 * Copyright (C) 2013 Renesas Corporation
7 *
8 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#ifndef __VSP1_USER_H__
16#define __VSP1_USER_H__
17
18#include <linux/types.h>
19#include <linux/videodev2.h>
20
21/*
22 * Private IOCTLs
23 *
24 * VIDIOC_VSP1_LUT_CONFIG - Configure the lookup table
25 */
26
27#define VIDIOC_VSP1_LUT_CONFIG \
28 _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct vsp1_lut_config)
29
30struct vsp1_lut_config {
31 u32 lut[256];
32};
33
34#endif /* __VSP1_USER_H__ */
diff --git a/include/uapi/linux/xattr.h b/include/uapi/linux/xattr.h
index e4629b93bdd6..40bbc04b6f81 100644
--- a/include/uapi/linux/xattr.h
+++ b/include/uapi/linux/xattr.h
@@ -20,6 +20,9 @@
20#define XATTR_MAC_OSX_PREFIX "osx." 20#define XATTR_MAC_OSX_PREFIX "osx."
21#define XATTR_MAC_OSX_PREFIX_LEN (sizeof(XATTR_MAC_OSX_PREFIX) - 1) 21#define XATTR_MAC_OSX_PREFIX_LEN (sizeof(XATTR_MAC_OSX_PREFIX) - 1)
22 22
23#define XATTR_BTRFS_PREFIX "btrfs."
24#define XATTR_BTRFS_PREFIX_LEN (sizeof(XATTR_BTRFS_PREFIX) - 1)
25
23#define XATTR_SECURITY_PREFIX "security." 26#define XATTR_SECURITY_PREFIX "security."
24#define XATTR_SECURITY_PREFIX_LEN (sizeof(XATTR_SECURITY_PREFIX) - 1) 27#define XATTR_SECURITY_PREFIX_LEN (sizeof(XATTR_SECURITY_PREFIX) - 1)
25 28