diff options
| author | Eric Paris <eparis@redhat.com> | 2014-03-07 11:41:32 -0500 |
|---|---|---|
| committer | Eric Paris <eparis@redhat.com> | 2014-03-07 11:41:32 -0500 |
| commit | b7d3622a39fde7658170b7f3cf6c6889bb8db30d (patch) | |
| tree | 64f4e781ecb2a85d675e234072b988560bcd25f1 /include/uapi/linux | |
| parent | f3411cb2b2e396a41ed3a439863f028db7140a34 (diff) | |
| parent | d8ec26d7f8287f5788a494f56e8814210f0e64be (diff) | |
Merge tag 'v3.13' into for-3.15
Linux 3.13
Conflicts:
include/net/xfrm.h
Simple merge where v3.13 removed 'extern' from definitions and the audit
tree did s/u32/unsigned int/ to the same definitions.
Diffstat (limited to 'include/uapi/linux')
48 files changed, 1912 insertions, 68 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 115add2515aa..33d2b8fe166d 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -241,6 +241,8 @@ header-y += media.h | |||
| 241 | header-y += mei.h | 241 | header-y += mei.h |
| 242 | header-y += mempolicy.h | 242 | header-y += mempolicy.h |
| 243 | header-y += meye.h | 243 | header-y += meye.h |
| 244 | header-y += mic_common.h | ||
| 245 | header-y += mic_ioctl.h | ||
| 244 | header-y += mii.h | 246 | header-y += mii.h |
| 245 | header-y += minix_fs.h | 247 | header-y += minix_fs.h |
| 246 | header-y += mman.h | 248 | header-y += mman.h |
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 3e1fbe933016..2d48fe1274ca 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
| @@ -338,7 +338,6 @@ enum { | |||
| 338 | #define AUDIT_ARCH_ARMEB (EM_ARM) | 338 | #define AUDIT_ARCH_ARMEB (EM_ARM) |
| 339 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) | 339 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) |
| 340 | #define AUDIT_ARCH_FRV (EM_FRV) | 340 | #define AUDIT_ARCH_FRV (EM_FRV) |
| 341 | #define AUDIT_ARCH_H8300 (EM_H8_300) | ||
| 342 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) | 341 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) |
| 343 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 342 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 344 | #define AUDIT_ARCH_M32R (EM_M32R) | 343 | #define AUDIT_ARCH_M32R (EM_M32R) |
diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h new file mode 100644 index 000000000000..164a7e263988 --- /dev/null +++ b/include/uapi/linux/bcache.h | |||
| @@ -0,0 +1,373 @@ | |||
| 1 | #ifndef _LINUX_BCACHE_H | ||
| 2 | #define _LINUX_BCACHE_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Bcache on disk data structures | ||
| 6 | */ | ||
| 7 | |||
| 8 | #include <asm/types.h> | ||
| 9 | |||
| 10 | #define BITMASK(name, type, field, offset, size) \ | ||
| 11 | static inline __u64 name(const type *k) \ | ||
| 12 | { return (k->field >> offset) & ~(~0ULL << size); } \ | ||
| 13 | \ | ||
| 14 | static inline void SET_##name(type *k, __u64 v) \ | ||
| 15 | { \ | ||
| 16 | k->field &= ~(~(~0ULL << size) << offset); \ | ||
| 17 | k->field |= (v & ~(~0ULL << size)) << offset; \ | ||
| 18 | } | ||
| 19 | |||
| 20 | /* Btree keys - all units are in sectors */ | ||
| 21 | |||
| 22 | struct bkey { | ||
| 23 | __u64 high; | ||
| 24 | __u64 low; | ||
| 25 | __u64 ptr[]; | ||
| 26 | }; | ||
| 27 | |||
| 28 | #define KEY_FIELD(name, field, offset, size) \ | ||
| 29 | BITMASK(name, struct bkey, field, offset, size) | ||
| 30 | |||
| 31 | #define PTR_FIELD(name, offset, size) \ | ||
| 32 | static inline __u64 name(const struct bkey *k, unsigned i) \ | ||
| 33 | { return (k->ptr[i] >> offset) & ~(~0ULL << size); } \ | ||
| 34 | \ | ||
| 35 | static inline void SET_##name(struct bkey *k, unsigned i, __u64 v) \ | ||
| 36 | { \ | ||
| 37 | k->ptr[i] &= ~(~(~0ULL << size) << offset); \ | ||
| 38 | k->ptr[i] |= (v & ~(~0ULL << size)) << offset; \ | ||
| 39 | } | ||
| 40 | |||
| 41 | #define KEY_SIZE_BITS 16 | ||
| 42 | |||
| 43 | KEY_FIELD(KEY_PTRS, high, 60, 3) | ||
| 44 | KEY_FIELD(HEADER_SIZE, high, 58, 2) | ||
| 45 | KEY_FIELD(KEY_CSUM, high, 56, 2) | ||
| 46 | KEY_FIELD(KEY_PINNED, high, 55, 1) | ||
| 47 | KEY_FIELD(KEY_DIRTY, high, 36, 1) | ||
| 48 | |||
| 49 | KEY_FIELD(KEY_SIZE, high, 20, KEY_SIZE_BITS) | ||
| 50 | KEY_FIELD(KEY_INODE, high, 0, 20) | ||
| 51 | |||
| 52 | /* Next time I change the on disk format, KEY_OFFSET() won't be 64 bits */ | ||
| 53 | |||
| 54 | static inline __u64 KEY_OFFSET(const struct bkey *k) | ||
| 55 | { | ||
| 56 | return k->low; | ||
| 57 | } | ||
| 58 | |||
| 59 | static inline void SET_KEY_OFFSET(struct bkey *k, __u64 v) | ||
| 60 | { | ||
| 61 | k->low = v; | ||
| 62 | } | ||
| 63 | |||
| 64 | /* | ||
| 65 | * The high bit being set is a relic from when we used it to do binary | ||
| 66 | * searches - it told you where a key started. It's not used anymore, | ||
| 67 | * and can probably be safely dropped. | ||
| 68 | */ | ||
| 69 | #define KEY(inode, offset, size) \ | ||
| 70 | ((struct bkey) { \ | ||
| 71 | .high = (1ULL << 63) | ((__u64) (size) << 20) | (inode), \ | ||
| 72 | .low = (offset) \ | ||
| 73 | }) | ||
| 74 | |||
| 75 | #define ZERO_KEY KEY(0, 0, 0) | ||
| 76 | |||
| 77 | #define MAX_KEY_INODE (~(~0 << 20)) | ||
| 78 | #define MAX_KEY_OFFSET (~0ULL >> 1) | ||
| 79 | #define MAX_KEY KEY(MAX_KEY_INODE, MAX_KEY_OFFSET, 0) | ||
| 80 | |||
| 81 | #define KEY_START(k) (KEY_OFFSET(k) - KEY_SIZE(k)) | ||
| 82 | #define START_KEY(k) KEY(KEY_INODE(k), KEY_START(k), 0) | ||
| 83 | |||
| 84 | #define PTR_DEV_BITS 12 | ||
| 85 | |||
| 86 | PTR_FIELD(PTR_DEV, 51, PTR_DEV_BITS) | ||
| 87 | PTR_FIELD(PTR_OFFSET, 8, 43) | ||
| 88 | PTR_FIELD(PTR_GEN, 0, 8) | ||
| 89 | |||
| 90 | #define PTR_CHECK_DEV ((1 << PTR_DEV_BITS) - 1) | ||
| 91 | |||
| 92 | #define PTR(gen, offset, dev) \ | ||
| 93 | ((((__u64) dev) << 51) | ((__u64) offset) << 8 | gen) | ||
| 94 | |||
| 95 | /* Bkey utility code */ | ||
| 96 | |||
| 97 | static inline unsigned long bkey_u64s(const struct bkey *k) | ||
| 98 | { | ||
| 99 | return (sizeof(struct bkey) / sizeof(__u64)) + KEY_PTRS(k); | ||
| 100 | } | ||
| 101 | |||
| 102 | static inline unsigned long bkey_bytes(const struct bkey *k) | ||
| 103 | { | ||
| 104 | return bkey_u64s(k) * sizeof(__u64); | ||
| 105 | } | ||
| 106 | |||
| 107 | #define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src)) | ||
| 108 | |||
| 109 | static inline void bkey_copy_key(struct bkey *dest, const struct bkey *src) | ||
| 110 | { | ||
| 111 | SET_KEY_INODE(dest, KEY_INODE(src)); | ||
| 112 | SET_KEY_OFFSET(dest, KEY_OFFSET(src)); | ||
| 113 | } | ||
| 114 | |||
| 115 | static inline struct bkey *bkey_next(const struct bkey *k) | ||
| 116 | { | ||
| 117 | __u64 *d = (void *) k; | ||
| 118 | return (struct bkey *) (d + bkey_u64s(k)); | ||
| 119 | } | ||
| 120 | |||
| 121 | static inline struct bkey *bkey_last(const struct bkey *k, unsigned nr_keys) | ||
| 122 | { | ||
| 123 | __u64 *d = (void *) k; | ||
| 124 | return (struct bkey *) (d + nr_keys); | ||
| 125 | } | ||
| 126 | /* Enough for a key with 6 pointers */ | ||
| 127 | #define BKEY_PAD 8 | ||
| 128 | |||
| 129 | #define BKEY_PADDED(key) \ | ||
| 130 | union { struct bkey key; __u64 key ## _pad[BKEY_PAD]; } | ||
| 131 | |||
| 132 | /* Superblock */ | ||
| 133 | |||
| 134 | /* Version 0: Cache device | ||
| 135 | * Version 1: Backing device | ||
| 136 | * Version 2: Seed pointer into btree node checksum | ||
| 137 | * Version 3: Cache device with new UUID format | ||
| 138 | * Version 4: Backing device with data offset | ||
| 139 | */ | ||
| 140 | #define BCACHE_SB_VERSION_CDEV 0 | ||
| 141 | #define BCACHE_SB_VERSION_BDEV 1 | ||
| 142 | #define BCACHE_SB_VERSION_CDEV_WITH_UUID 3 | ||
| 143 | #define BCACHE_SB_VERSION_BDEV_WITH_OFFSET 4 | ||
| 144 | #define BCACHE_SB_MAX_VERSION 4 | ||
| 145 | |||
| 146 | #define SB_SECTOR 8 | ||
| 147 | #define SB_SIZE 4096 | ||
| 148 | #define SB_LABEL_SIZE 32 | ||
| 149 | #define SB_JOURNAL_BUCKETS 256U | ||
| 150 | /* SB_JOURNAL_BUCKETS must be divisible by BITS_PER_LONG */ | ||
| 151 | #define MAX_CACHES_PER_SET 8 | ||
| 152 | |||
| 153 | #define BDEV_DATA_START_DEFAULT 16 /* sectors */ | ||
| 154 | |||
| 155 | struct cache_sb { | ||
| 156 | __u64 csum; | ||
| 157 | __u64 offset; /* sector where this sb was written */ | ||
| 158 | __u64 version; | ||
| 159 | |||
| 160 | __u8 magic[16]; | ||
| 161 | |||
| 162 | __u8 uuid[16]; | ||
| 163 | union { | ||
| 164 | __u8 set_uuid[16]; | ||
| 165 | __u64 set_magic; | ||
| 166 | }; | ||
| 167 | __u8 label[SB_LABEL_SIZE]; | ||
| 168 | |||
| 169 | __u64 flags; | ||
| 170 | __u64 seq; | ||
| 171 | __u64 pad[8]; | ||
| 172 | |||
| 173 | union { | ||
| 174 | struct { | ||
| 175 | /* Cache devices */ | ||
| 176 | __u64 nbuckets; /* device size */ | ||
| 177 | |||
| 178 | __u16 block_size; /* sectors */ | ||
| 179 | __u16 bucket_size; /* sectors */ | ||
| 180 | |||
| 181 | __u16 nr_in_set; | ||
| 182 | __u16 nr_this_dev; | ||
| 183 | }; | ||
| 184 | struct { | ||
| 185 | /* Backing devices */ | ||
| 186 | __u64 data_offset; | ||
| 187 | |||
| 188 | /* | ||
| 189 | * block_size from the cache device section is still used by | ||
| 190 | * backing devices, so don't add anything here until we fix | ||
| 191 | * things to not need it for backing devices anymore | ||
| 192 | */ | ||
| 193 | }; | ||
| 194 | }; | ||
| 195 | |||
| 196 | __u32 last_mount; /* time_t */ | ||
| 197 | |||
| 198 | __u16 first_bucket; | ||
| 199 | union { | ||
| 200 | __u16 njournal_buckets; | ||
| 201 | __u16 keys; | ||
| 202 | }; | ||
| 203 | __u64 d[SB_JOURNAL_BUCKETS]; /* journal buckets */ | ||
| 204 | }; | ||
| 205 | |||
| 206 | static inline _Bool SB_IS_BDEV(const struct cache_sb *sb) | ||
| 207 | { | ||
| 208 | return sb->version == BCACHE_SB_VERSION_BDEV | ||
| 209 | || sb->version == BCACHE_SB_VERSION_BDEV_WITH_OFFSET; | ||
| 210 | } | ||
| 211 | |||
| 212 | BITMASK(CACHE_SYNC, struct cache_sb, flags, 0, 1); | ||
| 213 | BITMASK(CACHE_DISCARD, struct cache_sb, flags, 1, 1); | ||
| 214 | BITMASK(CACHE_REPLACEMENT, struct cache_sb, flags, 2, 3); | ||
| 215 | #define CACHE_REPLACEMENT_LRU 0U | ||
| 216 | #define CACHE_REPLACEMENT_FIFO 1U | ||
| 217 | #define CACHE_REPLACEMENT_RANDOM 2U | ||
| 218 | |||
| 219 | BITMASK(BDEV_CACHE_MODE, struct cache_sb, flags, 0, 4); | ||
| 220 | #define CACHE_MODE_WRITETHROUGH 0U | ||
| 221 | #define CACHE_MODE_WRITEBACK 1U | ||
| 222 | #define CACHE_MODE_WRITEAROUND 2U | ||
| 223 | #define CACHE_MODE_NONE 3U | ||
| 224 | BITMASK(BDEV_STATE, struct cache_sb, flags, 61, 2); | ||
| 225 | #define BDEV_STATE_NONE 0U | ||
| 226 | #define BDEV_STATE_CLEAN 1U | ||
| 227 | #define BDEV_STATE_DIRTY 2U | ||
| 228 | #define BDEV_STATE_STALE 3U | ||
| 229 | |||
| 230 | /* | ||
| 231 | * Magic numbers | ||
| 232 | * | ||
| 233 | * The various other data structures have their own magic numbers, which are | ||
| 234 | * xored with the first part of the cache set's UUID | ||
| 235 | */ | ||
| 236 | |||
| 237 | #define JSET_MAGIC 0x245235c1a3625032ULL | ||
| 238 | #define PSET_MAGIC 0x6750e15f87337f91ULL | ||
| 239 | #define BSET_MAGIC 0x90135c78b99e07f5ULL | ||
| 240 | |||
| 241 | static inline __u64 jset_magic(struct cache_sb *sb) | ||
| 242 | { | ||
| 243 | return sb->set_magic ^ JSET_MAGIC; | ||
| 244 | } | ||
| 245 | |||
| 246 | static inline __u64 pset_magic(struct cache_sb *sb) | ||
| 247 | { | ||
| 248 | return sb->set_magic ^ PSET_MAGIC; | ||
| 249 | } | ||
| 250 | |||
| 251 | static inline __u64 bset_magic(struct cache_sb *sb) | ||
| 252 | { | ||
| 253 | return sb->set_magic ^ BSET_MAGIC; | ||
| 254 | } | ||
| 255 | |||
| 256 | /* | ||
| 257 | * Journal | ||
| 258 | * | ||
| 259 | * On disk format for a journal entry: | ||
| 260 | * seq is monotonically increasing; every journal entry has its own unique | ||
| 261 | * sequence number. | ||
| 262 | * | ||
| 263 | * last_seq is the oldest journal entry that still has keys the btree hasn't | ||
| 264 | * flushed to disk yet. | ||
| 265 | * | ||
| 266 | * version is for on disk format changes. | ||
| 267 | */ | ||
| 268 | |||
| 269 | #define BCACHE_JSET_VERSION_UUIDv1 1 | ||
| 270 | #define BCACHE_JSET_VERSION_UUID 1 /* Always latest UUID format */ | ||
| 271 | #define BCACHE_JSET_VERSION 1 | ||
| 272 | |||
| 273 | struct jset { | ||
| 274 | __u64 csum; | ||
| 275 | __u64 magic; | ||
| 276 | __u64 seq; | ||
| 277 | __u32 version; | ||
| 278 | __u32 keys; | ||
| 279 | |||
| 280 | __u64 last_seq; | ||
| 281 | |||
| 282 | BKEY_PADDED(uuid_bucket); | ||
| 283 | BKEY_PADDED(btree_root); | ||
| 284 | __u16 btree_level; | ||
| 285 | __u16 pad[3]; | ||
| 286 | |||
| 287 | __u64 prio_bucket[MAX_CACHES_PER_SET]; | ||
| 288 | |||
| 289 | union { | ||
| 290 | struct bkey start[0]; | ||
| 291 | __u64 d[0]; | ||
| 292 | }; | ||
| 293 | }; | ||
| 294 | |||
| 295 | /* Bucket prios/gens */ | ||
| 296 | |||
| 297 | struct prio_set { | ||
| 298 | __u64 csum; | ||
| 299 | __u64 magic; | ||
| 300 | __u64 seq; | ||
| 301 | __u32 version; | ||
| 302 | __u32 pad; | ||
| 303 | |||
| 304 | __u64 next_bucket; | ||
| 305 | |||
| 306 | struct bucket_disk { | ||
| 307 | __u16 prio; | ||
| 308 | __u8 gen; | ||
| 309 | } __attribute((packed)) data[]; | ||
| 310 | }; | ||
| 311 | |||
| 312 | /* UUIDS - per backing device/flash only volume metadata */ | ||
| 313 | |||
| 314 | struct uuid_entry { | ||
| 315 | union { | ||
| 316 | struct { | ||
| 317 | __u8 uuid[16]; | ||
| 318 | __u8 label[32]; | ||
| 319 | __u32 first_reg; | ||
| 320 | __u32 last_reg; | ||
| 321 | __u32 invalidated; | ||
| 322 | |||
| 323 | __u32 flags; | ||
| 324 | /* Size of flash only volumes */ | ||
| 325 | __u64 sectors; | ||
| 326 | }; | ||
| 327 | |||
| 328 | __u8 pad[128]; | ||
| 329 | }; | ||
| 330 | }; | ||
| 331 | |||
| 332 | BITMASK(UUID_FLASH_ONLY, struct uuid_entry, flags, 0, 1); | ||
| 333 | |||
| 334 | /* Btree nodes */ | ||
| 335 | |||
| 336 | /* Version 1: Seed pointer into btree node checksum | ||
| 337 | */ | ||
| 338 | #define BCACHE_BSET_CSUM 1 | ||
| 339 | #define BCACHE_BSET_VERSION 1 | ||
| 340 | |||
| 341 | /* | ||
| 342 | * Btree nodes | ||
| 343 | * | ||
| 344 | * On disk a btree node is a list/log of these; within each set the keys are | ||
| 345 | * sorted | ||
| 346 | */ | ||
| 347 | struct bset { | ||
| 348 | __u64 csum; | ||
| 349 | __u64 magic; | ||
| 350 | __u64 seq; | ||
| 351 | __u32 version; | ||
| 352 | __u32 keys; | ||
| 353 | |||
| 354 | union { | ||
| 355 | struct bkey start[0]; | ||
| 356 | __u64 d[0]; | ||
| 357 | }; | ||
| 358 | }; | ||
| 359 | |||
| 360 | /* OBSOLETE */ | ||
| 361 | |||
| 362 | /* UUIDS - per backing device/flash only volume metadata */ | ||
| 363 | |||
| 364 | struct uuid_entry_v0 { | ||
| 365 | __u8 uuid[16]; | ||
| 366 | __u8 label[32]; | ||
| 367 | __u32 first_reg; | ||
| 368 | __u32 last_reg; | ||
| 369 | __u32 invalidated; | ||
| 370 | __u32 pad; | ||
| 371 | }; | ||
| 372 | |||
| 373 | #endif /* _LINUX_BCACHE_H */ | ||
diff --git a/include/uapi/linux/can/bcm.h b/include/uapi/linux/can/bcm.h index 3ebe387fea4d..382251a1d214 100644 --- a/include/uapi/linux/can/bcm.h +++ b/include/uapi/linux/can/bcm.h | |||
| @@ -7,6 +7,38 @@ | |||
| 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 8 | * All rights reserved. | 8 | * All rights reserved. |
| 9 | * | 9 | * |
| 10 | * Redistribution and use in source and binary forms, with or without | ||
| 11 | * modification, are permitted provided that the following conditions | ||
| 12 | * are met: | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in the | ||
| 17 | * documentation and/or other materials provided with the distribution. | ||
| 18 | * 3. Neither the name of Volkswagen nor the names of its contributors | ||
| 19 | * may be used to endorse or promote products derived from this software | ||
| 20 | * without specific prior written permission. | ||
| 21 | * | ||
| 22 | * Alternatively, provided that this notice is retained in full, this | ||
| 23 | * software may be distributed under the terms of the GNU General | ||
| 24 | * Public License ("GPL") version 2, in which case the provisions of the | ||
| 25 | * GPL apply INSTEAD OF those given above. | ||
| 26 | * | ||
| 27 | * The provided data structures and external interfaces from this code | ||
| 28 | * are not restricted to be used by modules with a GPL compatible license. | ||
| 29 | * | ||
| 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
| 41 | * DAMAGE. | ||
| 10 | */ | 42 | */ |
| 11 | 43 | ||
| 12 | #ifndef CAN_BCM_H | 44 | #ifndef CAN_BCM_H |
diff --git a/include/uapi/linux/can/error.h b/include/uapi/linux/can/error.h index 7b7148bded71..b63204545320 100644 --- a/include/uapi/linux/can/error.h +++ b/include/uapi/linux/can/error.h | |||
| @@ -7,6 +7,38 @@ | |||
| 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 8 | * All rights reserved. | 8 | * All rights reserved. |
| 9 | * | 9 | * |
| 10 | * Redistribution and use in source and binary forms, with or without | ||
| 11 | * modification, are permitted provided that the following conditions | ||
| 12 | * are met: | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in the | ||
| 17 | * documentation and/or other materials provided with the distribution. | ||
| 18 | * 3. Neither the name of Volkswagen nor the names of its contributors | ||
| 19 | * may be used to endorse or promote products derived from this software | ||
| 20 | * without specific prior written permission. | ||
| 21 | * | ||
| 22 | * Alternatively, provided that this notice is retained in full, this | ||
| 23 | * software may be distributed under the terms of the GNU General | ||
| 24 | * Public License ("GPL") version 2, in which case the provisions of the | ||
| 25 | * GPL apply INSTEAD OF those given above. | ||
| 26 | * | ||
| 27 | * The provided data structures and external interfaces from this code | ||
| 28 | * are not restricted to be used by modules with a GPL compatible license. | ||
| 29 | * | ||
| 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
| 41 | * DAMAGE. | ||
| 10 | */ | 42 | */ |
| 11 | 43 | ||
| 12 | #ifndef CAN_ERROR_H | 44 | #ifndef CAN_ERROR_H |
diff --git a/include/uapi/linux/can/gw.h b/include/uapi/linux/can/gw.h index 4e27c82b564a..844c8964bdfe 100644 --- a/include/uapi/linux/can/gw.h +++ b/include/uapi/linux/can/gw.h | |||
| @@ -7,6 +7,38 @@ | |||
| 7 | * Copyright (c) 2011 Volkswagen Group Electronic Research | 7 | * Copyright (c) 2011 Volkswagen Group Electronic Research |
| 8 | * All rights reserved. | 8 | * All rights reserved. |
| 9 | * | 9 | * |
| 10 | * Redistribution and use in source and binary forms, with or without | ||
| 11 | * modification, are permitted provided that the following conditions | ||
| 12 | * are met: | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in the | ||
| 17 | * documentation and/or other materials provided with the distribution. | ||
| 18 | * 3. Neither the name of Volkswagen nor the names of its contributors | ||
| 19 | * may be used to endorse or promote products derived from this software | ||
| 20 | * without specific prior written permission. | ||
| 21 | * | ||
| 22 | * Alternatively, provided that this notice is retained in full, this | ||
| 23 | * software may be distributed under the terms of the GNU General | ||
| 24 | * Public License ("GPL") version 2, in which case the provisions of the | ||
| 25 | * GPL apply INSTEAD OF those given above. | ||
| 26 | * | ||
| 27 | * The provided data structures and external interfaces from this code | ||
| 28 | * are not restricted to be used by modules with a GPL compatible license. | ||
| 29 | * | ||
| 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 31 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 32 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 33 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 34 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 35 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 36 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 37 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 38 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 39 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 40 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
| 41 | * DAMAGE. | ||
| 10 | */ | 42 | */ |
| 11 | 43 | ||
| 12 | #ifndef CAN_GW_H | 44 | #ifndef CAN_GW_H |
diff --git a/include/uapi/linux/can/netlink.h b/include/uapi/linux/can/netlink.h index 14966ddb7df1..df944ed206a8 100644 --- a/include/uapi/linux/can/netlink.h +++ b/include/uapi/linux/can/netlink.h | |||
| @@ -5,6 +5,14 @@ | |||
| 5 | * | 5 | * |
| 6 | * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com> | 6 | * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com> |
| 7 | * | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the version 2 of the GNU General Public License | ||
| 10 | * as published by the Free Software Foundation | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 8 | */ | 16 | */ |
| 9 | 17 | ||
| 10 | #ifndef CAN_NETLINK_H | 18 | #ifndef CAN_NETLINK_H |
diff --git a/include/uapi/linux/can/raw.h b/include/uapi/linux/can/raw.h index a814062b0719..c7d8c334e0ce 100644 --- a/include/uapi/linux/can/raw.h +++ b/include/uapi/linux/can/raw.h | |||
| @@ -8,6 +8,38 @@ | |||
| 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | ||
| 12 | * modification, are permitted provided that the following conditions | ||
| 13 | * are met: | ||
| 14 | * 1. Redistributions of source code must retain the above copyright | ||
| 15 | * notice, this list of conditions and the following disclaimer. | ||
| 16 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 17 | * notice, this list of conditions and the following disclaimer in the | ||
| 18 | * documentation and/or other materials provided with the distribution. | ||
| 19 | * 3. Neither the name of Volkswagen nor the names of its contributors | ||
| 20 | * may be used to endorse or promote products derived from this software | ||
| 21 | * without specific prior written permission. | ||
| 22 | * | ||
| 23 | * Alternatively, provided that this notice is retained in full, this | ||
| 24 | * software may be distributed under the terms of the GNU General | ||
| 25 | * Public License ("GPL") version 2, in which case the provisions of the | ||
| 26 | * GPL apply INSTEAD OF those given above. | ||
| 27 | * | ||
| 28 | * The provided data structures and external interfaces from this code | ||
| 29 | * are not restricted to be used by modules with a GPL compatible license. | ||
| 30 | * | ||
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 35 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 36 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| 37 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 38 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 39 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 40 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| 41 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
| 42 | * DAMAGE. | ||
| 11 | */ | 43 | */ |
| 12 | 44 | ||
| 13 | #ifndef CAN_RAW_H | 45 | #ifndef CAN_RAW_H |
diff --git a/include/uapi/linux/dm-ioctl.h b/include/uapi/linux/dm-ioctl.h index f1e12bd40b3b..c8a4302093a3 100644 --- a/include/uapi/linux/dm-ioctl.h +++ b/include/uapi/linux/dm-ioctl.h | |||
| @@ -267,9 +267,9 @@ enum { | |||
| 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 268 | 268 | ||
| 269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
| 270 | #define DM_VERSION_MINOR 26 | 270 | #define DM_VERSION_MINOR 27 |
| 271 | #define DM_VERSION_PATCHLEVEL 0 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
| 272 | #define DM_VERSION_EXTRA "-ioctl (2013-08-15)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2013-10-30)" |
| 273 | 273 | ||
| 274 | /* Status bits */ | 274 | /* Status bits */ |
| 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -341,4 +341,15 @@ enum { | |||
| 341 | */ | 341 | */ |
| 342 | #define DM_DATA_OUT_FLAG (1 << 16) /* Out */ | 342 | #define DM_DATA_OUT_FLAG (1 << 16) /* Out */ |
| 343 | 343 | ||
| 344 | /* | ||
| 345 | * If set with DM_DEV_REMOVE or DM_REMOVE_ALL this indicates that if | ||
| 346 | * the device cannot be removed immediately because it is still in use | ||
| 347 | * it should instead be scheduled for removal when it gets closed. | ||
| 348 | * | ||
| 349 | * On return from DM_DEV_REMOVE, DM_DEV_STATUS or other ioctls, this | ||
| 350 | * flag indicates that the device is scheduled to be removed when it | ||
| 351 | * gets closed. | ||
| 352 | */ | ||
| 353 | #define DM_DEFERRED_REMOVE (1 << 17) /* In/Out */ | ||
| 354 | |||
| 344 | #endif /* _LINUX_DM_IOCTL_H */ | 355 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index 59c17a2d38ad..01529bd96438 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h | |||
| @@ -31,7 +31,6 @@ | |||
| 31 | #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ | 31 | #define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ |
| 32 | #define EM_V850 87 /* NEC v850 */ | 32 | #define EM_V850 87 /* NEC v850 */ |
| 33 | #define EM_M32R 88 /* Renesas M32R */ | 33 | #define EM_M32R 88 /* Renesas M32R */ |
| 34 | #define EM_H8_300 46 /* Renesas H8/300,300H,H8S */ | ||
| 35 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ | 34 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ |
| 36 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ | 35 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ |
| 37 | #define EM_TI_C6000 140 /* TI C6X DSPs */ | 36 | #define EM_TI_C6000 140 /* TI C6X DSPs */ |
diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h index 2c267bcbb85c..bc81fb2e1f0e 100644 --- a/include/uapi/linux/eventpoll.h +++ b/include/uapi/linux/eventpoll.h | |||
| @@ -61,5 +61,16 @@ struct epoll_event { | |||
| 61 | __u64 data; | 61 | __u64 data; |
| 62 | } EPOLL_PACKED; | 62 | } EPOLL_PACKED; |
| 63 | 63 | ||
| 64 | 64 | #ifdef CONFIG_PM_SLEEP | |
| 65 | static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) | ||
| 66 | { | ||
| 67 | if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) | ||
| 68 | epev->events &= ~EPOLLWAKEUP; | ||
| 69 | } | ||
| 70 | #else | ||
| 71 | static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) | ||
| 72 | { | ||
| 73 | epev->events &= ~EPOLLWAKEUP; | ||
| 74 | } | ||
| 75 | #endif | ||
| 65 | #endif /* _UAPI_LINUX_EVENTPOLL_H */ | 76 | #endif /* _UAPI_LINUX_EVENTPOLL_H */ |
diff --git a/include/uapi/linux/genetlink.h b/include/uapi/linux/genetlink.h index c880a417d8a9..c3363ba1ae05 100644 --- a/include/uapi/linux/genetlink.h +++ b/include/uapi/linux/genetlink.h | |||
| @@ -27,6 +27,8 @@ struct genlmsghdr { | |||
| 27 | */ | 27 | */ |
| 28 | #define GENL_ID_GENERATE 0 | 28 | #define GENL_ID_GENERATE 0 |
| 29 | #define GENL_ID_CTRL NLMSG_MIN_TYPE | 29 | #define GENL_ID_CTRL NLMSG_MIN_TYPE |
| 30 | #define GENL_ID_VFS_DQUOT (NLMSG_MIN_TYPE + 1) | ||
| 31 | #define GENL_ID_PMCRAID (NLMSG_MIN_TYPE + 2) | ||
| 30 | 32 | ||
| 31 | /************************************************************************** | 33 | /************************************************************************** |
| 32 | * Controller | 34 | * Controller |
diff --git a/include/uapi/linux/hash_info.h b/include/uapi/linux/hash_info.h new file mode 100644 index 000000000000..ca18c45f8304 --- /dev/null +++ b/include/uapi/linux/hash_info.h | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | /* | ||
| 2 | * Hash Info: Hash algorithms information | ||
| 3 | * | ||
| 4 | * Copyright (c) 2013 Dmitry Kasatkin <d.kasatkin@samsung.com> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms of the GNU General Public License as published by the Free | ||
| 8 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef _UAPI_LINUX_HASH_INFO_H | ||
| 14 | #define _UAPI_LINUX_HASH_INFO_H | ||
| 15 | |||
| 16 | enum hash_algo { | ||
| 17 | HASH_ALGO_MD4, | ||
| 18 | HASH_ALGO_MD5, | ||
| 19 | HASH_ALGO_SHA1, | ||
| 20 | HASH_ALGO_RIPE_MD_160, | ||
| 21 | HASH_ALGO_SHA256, | ||
| 22 | HASH_ALGO_SHA384, | ||
| 23 | HASH_ALGO_SHA512, | ||
| 24 | HASH_ALGO_SHA224, | ||
| 25 | HASH_ALGO_RIPE_MD_128, | ||
| 26 | HASH_ALGO_RIPE_MD_256, | ||
| 27 | HASH_ALGO_RIPE_MD_320, | ||
| 28 | HASH_ALGO_WP_256, | ||
| 29 | HASH_ALGO_WP_384, | ||
| 30 | HASH_ALGO_WP_512, | ||
| 31 | HASH_ALGO_TGR_128, | ||
| 32 | HASH_ALGO_TGR_160, | ||
| 33 | HASH_ALGO_TGR_192, | ||
| 34 | HASH_ALGO__LAST | ||
| 35 | }; | ||
| 36 | |||
| 37 | #endif /* _UAPI_LINUX_HASH_INFO_H */ | ||
diff --git a/include/uapi/linux/hsr_netlink.h b/include/uapi/linux/hsr_netlink.h new file mode 100644 index 000000000000..2475cb8a53af --- /dev/null +++ b/include/uapi/linux/hsr_netlink.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2011-2013 Autronica Fire and Security AS | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify it | ||
| 5 | * under the terms of the GNU General Public License as published by the Free | ||
| 6 | * Software Foundation; either version 2 of the License, or (at your option) | ||
| 7 | * any later version. | ||
| 8 | * | ||
| 9 | * Author(s): | ||
| 10 | * 2011-2013 Arvid Brodin, arvid.brodin@xdin.com | ||
| 11 | */ | ||
| 12 | |||
| 13 | #ifndef __UAPI_HSR_NETLINK_H | ||
| 14 | #define __UAPI_HSR_NETLINK_H | ||
| 15 | |||
| 16 | /* Generic Netlink HSR family definition | ||
| 17 | */ | ||
| 18 | |||
| 19 | /* attributes */ | ||
| 20 | enum { | ||
| 21 | HSR_A_UNSPEC, | ||
| 22 | HSR_A_NODE_ADDR, | ||
| 23 | HSR_A_IFINDEX, | ||
| 24 | HSR_A_IF1_AGE, | ||
| 25 | HSR_A_IF2_AGE, | ||
| 26 | HSR_A_NODE_ADDR_B, | ||
| 27 | HSR_A_IF1_SEQ, | ||
| 28 | HSR_A_IF2_SEQ, | ||
| 29 | HSR_A_IF1_IFINDEX, | ||
| 30 | HSR_A_IF2_IFINDEX, | ||
| 31 | HSR_A_ADDR_B_IFINDEX, | ||
| 32 | __HSR_A_MAX, | ||
| 33 | }; | ||
| 34 | #define HSR_A_MAX (__HSR_A_MAX - 1) | ||
| 35 | |||
| 36 | |||
| 37 | /* commands */ | ||
| 38 | enum { | ||
| 39 | HSR_C_UNSPEC, | ||
| 40 | HSR_C_RING_ERROR, | ||
| 41 | HSR_C_NODE_DOWN, | ||
| 42 | HSR_C_GET_NODE_STATUS, | ||
| 43 | HSR_C_SET_NODE_STATUS, | ||
| 44 | HSR_C_GET_NODE_LIST, | ||
| 45 | HSR_C_SET_NODE_LIST, | ||
| 46 | __HSR_C_MAX, | ||
| 47 | }; | ||
| 48 | #define HSR_C_MAX (__HSR_C_MAX - 1) | ||
| 49 | |||
| 50 | #endif /* __UAPI_HSR_NETLINK_H */ | ||
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h index 1ec407b01e46..d758163b0e43 100644 --- a/include/uapi/linux/if.h +++ b/include/uapi/linux/if.h | |||
| @@ -83,6 +83,7 @@ | |||
| 83 | #define IFF_SUPP_NOFCS 0x80000 /* device supports sending custom FCS */ | 83 | #define IFF_SUPP_NOFCS 0x80000 /* device supports sending custom FCS */ |
| 84 | #define IFF_LIVE_ADDR_CHANGE 0x100000 /* device supports hardware address | 84 | #define IFF_LIVE_ADDR_CHANGE 0x100000 /* device supports hardware address |
| 85 | * change when it's running */ | 85 | * change when it's running */ |
| 86 | #define IFF_MACVLAN 0x200000 /* Macvlan device */ | ||
| 86 | 87 | ||
| 87 | 88 | ||
| 88 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 89 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
diff --git a/include/uapi/linux/if_bonding.h b/include/uapi/linux/if_bonding.h index a17edda8a781..9635a62f6f89 100644 --- a/include/uapi/linux/if_bonding.h +++ b/include/uapi/linux/if_bonding.h | |||
| @@ -91,6 +91,8 @@ | |||
| 91 | #define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */ | 91 | #define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */ |
| 92 | #define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ (TCP || UDP)) */ | 92 | #define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ (TCP || UDP)) */ |
| 93 | #define BOND_XMIT_POLICY_LAYER23 2 /* layer 2+3 (IP ^ MAC) */ | 93 | #define BOND_XMIT_POLICY_LAYER23 2 /* layer 2+3 (IP ^ MAC) */ |
| 94 | #define BOND_XMIT_POLICY_ENCAP23 3 /* encapsulated layer 2+3 */ | ||
| 95 | #define BOND_XMIT_POLICY_ENCAP34 4 /* encapsulated layer 3+4 */ | ||
| 94 | 96 | ||
| 95 | typedef struct ifbond { | 97 | typedef struct ifbond { |
| 96 | __s32 bond_mode; | 98 | __s32 bond_mode; |
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index ade07f1c491a..2ce0f6a78fa5 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h | |||
| @@ -85,6 +85,7 @@ | |||
| 85 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ | 85 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ |
| 86 | #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ | 86 | #define ETH_P_MVRP 0x88F5 /* 802.1Q MVRP */ |
| 87 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | 87 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ |
| 88 | #define ETH_P_PRP 0x88FB /* IEC 62439-3 PRP/HSRv0 */ | ||
| 88 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | 89 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ |
| 89 | #define ETH_P_TDLS 0x890D /* TDLS */ | 90 | #define ETH_P_TDLS 0x890D /* TDLS */ |
| 90 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ | 91 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ |
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index 80394e8dc3a3..6db460121f84 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h | |||
| @@ -325,6 +325,17 @@ struct ifla_vxlan_port_range { | |||
| 325 | __be16 high; | 325 | __be16 high; |
| 326 | }; | 326 | }; |
| 327 | 327 | ||
| 328 | /* Bonding section */ | ||
| 329 | |||
| 330 | enum { | ||
| 331 | IFLA_BOND_UNSPEC, | ||
| 332 | IFLA_BOND_MODE, | ||
| 333 | IFLA_BOND_ACTIVE_SLAVE, | ||
| 334 | __IFLA_BOND_MAX, | ||
| 335 | }; | ||
| 336 | |||
| 337 | #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1) | ||
| 338 | |||
| 328 | /* SR-IOV virtual function management section */ | 339 | /* SR-IOV virtual function management section */ |
| 329 | 340 | ||
| 330 | enum { | 341 | enum { |
| @@ -470,4 +481,19 @@ enum { | |||
| 470 | 481 | ||
| 471 | #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) | 482 | #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1) |
| 472 | 483 | ||
| 484 | |||
| 485 | /* HSR section */ | ||
| 486 | |||
| 487 | enum { | ||
| 488 | IFLA_HSR_UNSPEC, | ||
| 489 | IFLA_HSR_SLAVE1, | ||
| 490 | IFLA_HSR_SLAVE2, | ||
| 491 | IFLA_HSR_MULTICAST_SPEC, /* Last byte of supervision addr */ | ||
| 492 | IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */ | ||
| 493 | IFLA_HSR_SEQ_NR, | ||
| 494 | __IFLA_HSR_MAX, | ||
| 495 | }; | ||
| 496 | |||
| 497 | #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1) | ||
| 498 | |||
| 473 | #endif /* _UAPI_LINUX_IF_LINK_H */ | 499 | #endif /* _UAPI_LINUX_IF_LINK_H */ |
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h index f9e8e496ae5d..393c5de09d42 100644 --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h | |||
| @@ -115,6 +115,11 @@ struct in_addr { | |||
| 115 | #define IP_PMTUDISC_WANT 1 /* Use per route hints */ | 115 | #define IP_PMTUDISC_WANT 1 /* Use per route hints */ |
| 116 | #define IP_PMTUDISC_DO 2 /* Always DF */ | 116 | #define IP_PMTUDISC_DO 2 /* Always DF */ |
| 117 | #define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu */ | 117 | #define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu */ |
| 118 | /* Always use interface mtu (ignores dst pmtu) but don't set DF flag. | ||
| 119 | * Also incoming ICMP frag_needed notifications will be ignored on | ||
| 120 | * this socket to prevent accepting spoofed ones. | ||
| 121 | */ | ||
| 122 | #define IP_PMTUDISC_INTERFACE 4 | ||
| 118 | 123 | ||
| 119 | #define IP_MULTICAST_IF 32 | 124 | #define IP_MULTICAST_IF 32 |
| 120 | #define IP_MULTICAST_TTL 33 | 125 | #define IP_MULTICAST_TTL 33 |
diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h index a3726275876d..bd24470d24a2 100644 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h | |||
| @@ -464,7 +464,8 @@ struct input_keymap_entry { | |||
| 464 | #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ | 464 | #define KEY_BRIGHTNESS_ZERO 244 /* brightness off, use ambient */ |
| 465 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ | 465 | #define KEY_DISPLAY_OFF 245 /* display device to off state */ |
| 466 | 466 | ||
| 467 | #define KEY_WIMAX 246 | 467 | #define KEY_WWAN 246 /* Wireless WAN (LTE, UMTS, GSM, etc.) */ |
| 468 | #define KEY_WIMAX KEY_WWAN | ||
| 468 | #define KEY_RFKILL 247 /* Key that controls all radios */ | 469 | #define KEY_RFKILL 247 /* Key that controls all radios */ |
| 469 | 470 | ||
| 470 | #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ | 471 | #define KEY_MICMUTE 248 /* Mute / unmute the microphone */ |
| @@ -719,6 +720,8 @@ struct input_keymap_entry { | |||
| 719 | #define BTN_DPAD_LEFT 0x222 | 720 | #define BTN_DPAD_LEFT 0x222 |
| 720 | #define BTN_DPAD_RIGHT 0x223 | 721 | #define BTN_DPAD_RIGHT 0x223 |
| 721 | 722 | ||
| 723 | #define KEY_ALS_TOGGLE 0x230 /* Ambient light sensor */ | ||
| 724 | |||
| 722 | #define BTN_TRIGGER_HAPPY 0x2c0 | 725 | #define BTN_TRIGGER_HAPPY 0x2c0 |
| 723 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 726 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
| 724 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 727 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
| @@ -856,6 +859,7 @@ struct input_keymap_entry { | |||
| 856 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ | 859 | #define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */ |
| 857 | #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ | 860 | #define SW_ROTATE_LOCK 0x0c /* set = rotate locked/disabled */ |
| 858 | #define SW_LINEIN_INSERT 0x0d /* set = inserted */ | 861 | #define SW_LINEIN_INSERT 0x0d /* set = inserted */ |
| 862 | #define SW_MUTE_DEVICE 0x0e /* set = device disabled */ | ||
| 859 | #define SW_MAX 0x0f | 863 | #define SW_MAX 0x0f |
| 860 | #define SW_CNT (SW_MAX+1) | 864 | #define SW_CNT (SW_MAX+1) |
| 861 | 865 | ||
diff --git a/include/uapi/linux/ip_vs.h b/include/uapi/linux/ip_vs.h index 29458223d044..fbcffe8041f7 100644 --- a/include/uapi/linux/ip_vs.h +++ b/include/uapi/linux/ip_vs.h | |||
| @@ -334,7 +334,7 @@ enum { | |||
| 334 | __IPVS_CMD_ATTR_MAX, | 334 | __IPVS_CMD_ATTR_MAX, |
| 335 | }; | 335 | }; |
| 336 | 336 | ||
| 337 | #define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1) | 337 | #define IPVS_CMD_ATTR_MAX (__IPVS_CMD_ATTR_MAX - 1) |
| 338 | 338 | ||
| 339 | /* | 339 | /* |
| 340 | * Attributes used to describe a service | 340 | * Attributes used to describe a service |
diff --git a/include/uapi/linux/keyctl.h b/include/uapi/linux/keyctl.h index c9b7f4faf97a..840cb990abe2 100644 --- a/include/uapi/linux/keyctl.h +++ b/include/uapi/linux/keyctl.h | |||
| @@ -56,5 +56,6 @@ | |||
| 56 | #define KEYCTL_REJECT 19 /* reject a partially constructed key */ | 56 | #define KEYCTL_REJECT 19 /* reject a partially constructed key */ |
| 57 | #define KEYCTL_INSTANTIATE_IOV 20 /* instantiate a partially constructed key */ | 57 | #define KEYCTL_INSTANTIATE_IOV 20 /* instantiate a partially constructed key */ |
| 58 | #define KEYCTL_INVALIDATE 21 /* invalidate a key */ | 58 | #define KEYCTL_INVALIDATE 21 /* invalidate a key */ |
| 59 | #define KEYCTL_GET_PERSISTENT 22 /* get a user's persistent keyring */ | ||
| 59 | 60 | ||
| 60 | #endif /* _LINUX_KEYCTL_H */ | 61 | #endif /* _LINUX_KEYCTL_H */ |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 99c25338ede8..902f12461873 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -518,6 +518,10 @@ struct kvm_ppc_smmu_info { | |||
| 518 | /* machine type bits, to be used as argument to KVM_CREATE_VM */ | 518 | /* machine type bits, to be used as argument to KVM_CREATE_VM */ |
| 519 | #define KVM_VM_S390_UCONTROL 1 | 519 | #define KVM_VM_S390_UCONTROL 1 |
| 520 | 520 | ||
| 521 | /* on ppc, 0 indicate default, 1 should force HV and 2 PR */ | ||
| 522 | #define KVM_VM_PPC_HV 1 | ||
| 523 | #define KVM_VM_PPC_PR 2 | ||
| 524 | |||
| 521 | #define KVM_S390_SIE_PAGE_OFFSET 1 | 525 | #define KVM_S390_SIE_PAGE_OFFSET 1 |
| 522 | 526 | ||
| 523 | /* | 527 | /* |
| @@ -541,6 +545,7 @@ struct kvm_ppc_smmu_info { | |||
| 541 | #define KVM_TRACE_ENABLE __KVM_DEPRECATED_MAIN_W_0x06 | 545 | #define KVM_TRACE_ENABLE __KVM_DEPRECATED_MAIN_W_0x06 |
| 542 | #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 | 546 | #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 |
| 543 | #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 | 547 | #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 |
| 548 | #define KVM_GET_EMULATED_CPUID _IOWR(KVMIO, 0x09, struct kvm_cpuid2) | ||
| 544 | 549 | ||
| 545 | /* | 550 | /* |
| 546 | * Extension capability list. | 551 | * Extension capability list. |
| @@ -668,6 +673,7 @@ struct kvm_ppc_smmu_info { | |||
| 668 | #define KVM_CAP_IRQ_XICS 92 | 673 | #define KVM_CAP_IRQ_XICS 92 |
| 669 | #define KVM_CAP_ARM_EL1_32BIT 93 | 674 | #define KVM_CAP_ARM_EL1_32BIT 93 |
| 670 | #define KVM_CAP_SPAPR_MULTITCE 94 | 675 | #define KVM_CAP_SPAPR_MULTITCE 94 |
| 676 | #define KVM_CAP_EXT_EMUL_CPUID 95 | ||
| 671 | 677 | ||
| 672 | #ifdef KVM_CAP_IRQ_ROUTING | 678 | #ifdef KVM_CAP_IRQ_ROUTING |
| 673 | 679 | ||
| @@ -843,6 +849,10 @@ struct kvm_device_attr { | |||
| 843 | #define KVM_DEV_TYPE_FSL_MPIC_20 1 | 849 | #define KVM_DEV_TYPE_FSL_MPIC_20 1 |
| 844 | #define KVM_DEV_TYPE_FSL_MPIC_42 2 | 850 | #define KVM_DEV_TYPE_FSL_MPIC_42 2 |
| 845 | #define KVM_DEV_TYPE_XICS 3 | 851 | #define KVM_DEV_TYPE_XICS 3 |
| 852 | #define KVM_DEV_TYPE_VFIO 4 | ||
| 853 | #define KVM_DEV_VFIO_GROUP 1 | ||
| 854 | #define KVM_DEV_VFIO_GROUP_ADD 1 | ||
| 855 | #define KVM_DEV_VFIO_GROUP_DEL 2 | ||
| 846 | 856 | ||
| 847 | /* | 857 | /* |
| 848 | * ioctls for VM fds | 858 | * ioctls for VM fds |
| @@ -1012,6 +1022,7 @@ struct kvm_s390_ucas_mapping { | |||
| 1012 | /* VM is being stopped by host */ | 1022 | /* VM is being stopped by host */ |
| 1013 | #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad) | 1023 | #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad) |
| 1014 | #define KVM_ARM_VCPU_INIT _IOW(KVMIO, 0xae, struct kvm_vcpu_init) | 1024 | #define KVM_ARM_VCPU_INIT _IOW(KVMIO, 0xae, struct kvm_vcpu_init) |
| 1025 | #define KVM_ARM_PREFERRED_TARGET _IOR(KVMIO, 0xaf, struct kvm_vcpu_init) | ||
| 1015 | #define KVM_GET_REG_LIST _IOWR(KVMIO, 0xb0, struct kvm_reg_list) | 1026 | #define KVM_GET_REG_LIST _IOWR(KVMIO, 0xb0, struct kvm_reg_list) |
| 1016 | 1027 | ||
| 1017 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 1028 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 2944278a8ba7..77c60311a6c6 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h | |||
| @@ -71,6 +71,6 @@ | |||
| 71 | #define USBDEVICE_SUPER_MAGIC 0x9fa2 | 71 | #define USBDEVICE_SUPER_MAGIC 0x9fa2 |
| 72 | #define MTD_INODE_FS_MAGIC 0x11307854 | 72 | #define MTD_INODE_FS_MAGIC 0x11307854 |
| 73 | #define ANON_INODE_FS_MAGIC 0x09041934 | 73 | #define ANON_INODE_FS_MAGIC 0x09041934 |
| 74 | 74 | #define BTRFS_TEST_MAGIC 0x73727279 | |
| 75 | 75 | ||
| 76 | #endif /* __LINUX_MAGIC_H__ */ | 76 | #endif /* __LINUX_MAGIC_H__ */ |
diff --git a/include/uapi/linux/major.h b/include/uapi/linux/major.h index 6a8ca98c9a96..620252e69b44 100644 --- a/include/uapi/linux/major.h +++ b/include/uapi/linux/major.h | |||
| @@ -54,6 +54,7 @@ | |||
| 54 | #define ACSI_MAJOR 28 | 54 | #define ACSI_MAJOR 28 |
| 55 | #define AZTECH_CDROM_MAJOR 29 | 55 | #define AZTECH_CDROM_MAJOR 29 |
| 56 | #define FB_MAJOR 29 /* /dev/fb* framebuffers */ | 56 | #define FB_MAJOR 29 /* /dev/fb* framebuffers */ |
| 57 | #define MTD_BLOCK_MAJOR 31 | ||
| 57 | #define CM206_CDROM_MAJOR 32 | 58 | #define CM206_CDROM_MAJOR 32 |
| 58 | #define IDE2_MAJOR 33 | 59 | #define IDE2_MAJOR 33 |
| 59 | #define IDE3_MAJOR 34 | 60 | #define IDE3_MAJOR 34 |
| @@ -105,6 +106,7 @@ | |||
| 105 | #define IDE6_MAJOR 88 | 106 | #define IDE6_MAJOR 88 |
| 106 | #define IDE7_MAJOR 89 | 107 | #define IDE7_MAJOR 89 |
| 107 | #define IDE8_MAJOR 90 | 108 | #define IDE8_MAJOR 90 |
| 109 | #define MTD_CHAR_MAJOR 90 | ||
| 108 | #define IDE9_MAJOR 91 | 110 | #define IDE9_MAJOR 91 |
| 109 | 111 | ||
| 110 | #define DASD_MAJOR 94 | 112 | #define DASD_MAJOR 94 |
diff --git a/include/uapi/linux/mic_common.h b/include/uapi/linux/mic_common.h new file mode 100644 index 000000000000..6eb40244e019 --- /dev/null +++ b/include/uapi/linux/mic_common.h | |||
| @@ -0,0 +1,232 @@ | |||
| 1 | /* | ||
| 2 | * Intel MIC Platform Software Stack (MPSS) | ||
| 3 | * | ||
| 4 | * Copyright(c) 2013 Intel Corporation. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License, version 2, as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, but | ||
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * The full GNU General Public License is included in this distribution in | ||
| 16 | * the file called "COPYING". | ||
| 17 | * | ||
| 18 | * Intel MIC driver. | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | #ifndef __MIC_COMMON_H_ | ||
| 22 | #define __MIC_COMMON_H_ | ||
| 23 | |||
| 24 | #include <linux/virtio_ring.h> | ||
| 25 | |||
| 26 | #define __mic_align(a, x) (((a) + (x) - 1) & ~((x) - 1)) | ||
| 27 | |||
| 28 | /** | ||
| 29 | * struct mic_device_desc: Virtio device information shared between the | ||
| 30 | * virtio driver and userspace backend | ||
| 31 | * | ||
| 32 | * @type: Device type: console/network/disk etc. Type 0/-1 terminates. | ||
| 33 | * @num_vq: Number of virtqueues. | ||
| 34 | * @feature_len: Number of bytes of feature bits. Multiply by 2: one for | ||
| 35 | host features and one for guest acknowledgements. | ||
| 36 | * @config_len: Number of bytes of the config array after virtqueues. | ||
| 37 | * @status: A status byte, written by the Guest. | ||
| 38 | * @config: Start of the following variable length config. | ||
| 39 | */ | ||
| 40 | struct mic_device_desc { | ||
| 41 | __s8 type; | ||
| 42 | __u8 num_vq; | ||
| 43 | __u8 feature_len; | ||
| 44 | __u8 config_len; | ||
| 45 | __u8 status; | ||
| 46 | __le64 config[0]; | ||
| 47 | } __attribute__ ((aligned(8))); | ||
| 48 | |||
| 49 | /** | ||
| 50 | * struct mic_device_ctrl: Per virtio device information in the device page | ||
| 51 | * used internally by the host and card side drivers. | ||
| 52 | * | ||
| 53 | * @vdev: Used for storing MIC vdev information by the guest. | ||
| 54 | * @config_change: Set to 1 by host when a config change is requested. | ||
| 55 | * @vdev_reset: Set to 1 by guest to indicate virtio device has been reset. | ||
| 56 | * @guest_ack: Set to 1 by guest to ack a command. | ||
| 57 | * @host_ack: Set to 1 by host to ack a command. | ||
| 58 | * @used_address_updated: Set to 1 by guest when the used address should be | ||
| 59 | * updated. | ||
| 60 | * @c2h_vdev_db: The doorbell number to be used by guest. Set by host. | ||
| 61 | * @h2c_vdev_db: The doorbell number to be used by host. Set by guest. | ||
| 62 | */ | ||
| 63 | struct mic_device_ctrl { | ||
| 64 | __le64 vdev; | ||
| 65 | __u8 config_change; | ||
| 66 | __u8 vdev_reset; | ||
| 67 | __u8 guest_ack; | ||
| 68 | __u8 host_ack; | ||
| 69 | __u8 used_address_updated; | ||
| 70 | __s8 c2h_vdev_db; | ||
| 71 | __s8 h2c_vdev_db; | ||
| 72 | } __attribute__ ((aligned(8))); | ||
| 73 | |||
| 74 | /** | ||
| 75 | * struct mic_bootparam: Virtio device independent information in device page | ||
| 76 | * | ||
| 77 | * @magic: A magic value used by the card to ensure it can see the host | ||
| 78 | * @c2h_shutdown_db: Card to Host shutdown doorbell set by host | ||
| 79 | * @h2c_shutdown_db: Host to Card shutdown doorbell set by card | ||
| 80 | * @h2c_config_db: Host to Card Virtio config doorbell set by card | ||
| 81 | * @shutdown_status: Card shutdown status set by card | ||
| 82 | * @shutdown_card: Set to 1 by the host when a card shutdown is initiated | ||
| 83 | */ | ||
| 84 | struct mic_bootparam { | ||
| 85 | __le32 magic; | ||
| 86 | __s8 c2h_shutdown_db; | ||
| 87 | __s8 h2c_shutdown_db; | ||
| 88 | __s8 h2c_config_db; | ||
| 89 | __u8 shutdown_status; | ||
| 90 | __u8 shutdown_card; | ||
| 91 | } __attribute__ ((aligned(8))); | ||
| 92 | |||
| 93 | /** | ||
| 94 | * struct mic_device_page: High level representation of the device page | ||
| 95 | * | ||
| 96 | * @bootparam: The bootparam structure is used for sharing information and | ||
| 97 | * status updates between MIC host and card drivers. | ||
| 98 | * @desc: Array of MIC virtio device descriptors. | ||
| 99 | */ | ||
| 100 | struct mic_device_page { | ||
| 101 | struct mic_bootparam bootparam; | ||
| 102 | struct mic_device_desc desc[0]; | ||
| 103 | }; | ||
| 104 | /** | ||
| 105 | * struct mic_vqconfig: This is how we expect the device configuration field | ||
| 106 | * for a virtqueue to be laid out in config space. | ||
| 107 | * | ||
| 108 | * @address: Guest/MIC physical address of the virtio ring | ||
| 109 | * (avail and desc rings) | ||
| 110 | * @used_address: Guest/MIC physical address of the used ring | ||
| 111 | * @num: The number of entries in the virtio_ring | ||
| 112 | */ | ||
| 113 | struct mic_vqconfig { | ||
| 114 | __le64 address; | ||
| 115 | __le64 used_address; | ||
| 116 | __le16 num; | ||
| 117 | } __attribute__ ((aligned(8))); | ||
| 118 | |||
| 119 | /* | ||
| 120 | * The alignment to use between consumer and producer parts of vring. | ||
| 121 | * This is pagesize for historical reasons. | ||
| 122 | */ | ||
| 123 | #define MIC_VIRTIO_RING_ALIGN 4096 | ||
| 124 | |||
| 125 | #define MIC_MAX_VRINGS 4 | ||
| 126 | #define MIC_VRING_ENTRIES 128 | ||
| 127 | |||
| 128 | /* | ||
| 129 | * Max vring entries (power of 2) to ensure desc and avail rings | ||
| 130 | * fit in a single page | ||
| 131 | */ | ||
| 132 | #define MIC_MAX_VRING_ENTRIES 128 | ||
| 133 | |||
| 134 | /** | ||
| 135 | * Max size of the desc block in bytes: includes: | ||
| 136 | * - struct mic_device_desc | ||
| 137 | * - struct mic_vqconfig (num_vq of these) | ||
| 138 | * - host and guest features | ||
| 139 | * - virtio device config space | ||
| 140 | */ | ||
| 141 | #define MIC_MAX_DESC_BLK_SIZE 256 | ||
| 142 | |||
| 143 | /** | ||
| 144 | * struct _mic_vring_info - Host vring info exposed to userspace backend | ||
| 145 | * for the avail index and magic for the card. | ||
| 146 | * | ||
| 147 | * @avail_idx: host avail idx | ||
| 148 | * @magic: A magic debug cookie. | ||
| 149 | */ | ||
| 150 | struct _mic_vring_info { | ||
| 151 | __u16 avail_idx; | ||
| 152 | __le32 magic; | ||
| 153 | }; | ||
| 154 | |||
| 155 | /** | ||
| 156 | * struct mic_vring - Vring information. | ||
| 157 | * | ||
| 158 | * @vr: The virtio ring. | ||
| 159 | * @info: Host vring information exposed to the userspace backend for the | ||
| 160 | * avail index and magic for the card. | ||
| 161 | * @va: The va for the buffer allocated for vr and info. | ||
| 162 | * @len: The length of the buffer required for allocating vr and info. | ||
| 163 | */ | ||
| 164 | struct mic_vring { | ||
| 165 | struct vring vr; | ||
| 166 | struct _mic_vring_info *info; | ||
| 167 | void *va; | ||
| 168 | int len; | ||
| 169 | }; | ||
| 170 | |||
| 171 | #define mic_aligned_desc_size(d) __mic_align(mic_desc_size(d), 8) | ||
| 172 | |||
| 173 | #ifndef INTEL_MIC_CARD | ||
| 174 | static inline unsigned mic_desc_size(const struct mic_device_desc *desc) | ||
| 175 | { | ||
| 176 | return sizeof(*desc) + desc->num_vq * sizeof(struct mic_vqconfig) | ||
| 177 | + desc->feature_len * 2 + desc->config_len; | ||
| 178 | } | ||
| 179 | |||
| 180 | static inline struct mic_vqconfig * | ||
| 181 | mic_vq_config(const struct mic_device_desc *desc) | ||
| 182 | { | ||
| 183 | return (struct mic_vqconfig *)(desc + 1); | ||
| 184 | } | ||
| 185 | |||
| 186 | static inline __u8 *mic_vq_features(const struct mic_device_desc *desc) | ||
| 187 | { | ||
| 188 | return (__u8 *)(mic_vq_config(desc) + desc->num_vq); | ||
| 189 | } | ||
| 190 | |||
| 191 | static inline __u8 *mic_vq_configspace(const struct mic_device_desc *desc) | ||
| 192 | { | ||
| 193 | return mic_vq_features(desc) + desc->feature_len * 2; | ||
| 194 | } | ||
| 195 | static inline unsigned mic_total_desc_size(struct mic_device_desc *desc) | ||
| 196 | { | ||
| 197 | return mic_aligned_desc_size(desc) + sizeof(struct mic_device_ctrl); | ||
| 198 | } | ||
| 199 | #endif | ||
| 200 | |||
| 201 | /* Device page size */ | ||
| 202 | #define MIC_DP_SIZE 4096 | ||
| 203 | |||
| 204 | #define MIC_MAGIC 0xc0ffee00 | ||
| 205 | |||
| 206 | /** | ||
| 207 | * enum mic_states - MIC states. | ||
| 208 | */ | ||
| 209 | enum mic_states { | ||
| 210 | MIC_OFFLINE = 0, | ||
| 211 | MIC_ONLINE, | ||
| 212 | MIC_SHUTTING_DOWN, | ||
| 213 | MIC_RESET_FAILED, | ||
| 214 | MIC_SUSPENDING, | ||
| 215 | MIC_SUSPENDED, | ||
| 216 | MIC_LAST | ||
| 217 | }; | ||
| 218 | |||
| 219 | /** | ||
| 220 | * enum mic_status - MIC status reported by card after | ||
| 221 | * a host or card initiated shutdown or a card crash. | ||
| 222 | */ | ||
| 223 | enum mic_status { | ||
| 224 | MIC_NOP = 0, | ||
| 225 | MIC_CRASHED, | ||
| 226 | MIC_HALTED, | ||
| 227 | MIC_POWER_OFF, | ||
| 228 | MIC_RESTART, | ||
| 229 | MIC_STATUS_LAST | ||
| 230 | }; | ||
| 231 | |||
| 232 | #endif | ||
diff --git a/include/uapi/linux/mic_ioctl.h b/include/uapi/linux/mic_ioctl.h new file mode 100644 index 000000000000..7fabba5059cf --- /dev/null +++ b/include/uapi/linux/mic_ioctl.h | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | /* | ||
| 2 | * Intel MIC Platform Software Stack (MPSS) | ||
| 3 | * | ||
| 4 | * Copyright(c) 2013 Intel Corporation. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License, version 2, as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, but | ||
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 13 | * General Public License for more details. | ||
| 14 | * | ||
| 15 | * The full GNU General Public License is included in this distribution in | ||
| 16 | * the file called "COPYING". | ||
| 17 | * | ||
| 18 | * Intel MIC Host driver. | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | #ifndef _MIC_IOCTL_H_ | ||
| 22 | #define _MIC_IOCTL_H_ | ||
| 23 | |||
| 24 | #include <linux/types.h> | ||
| 25 | |||
| 26 | /* | ||
| 27 | * mic_copy - MIC virtio descriptor copy. | ||
| 28 | * | ||
| 29 | * @iov: An array of IOVEC structures containing user space buffers. | ||
| 30 | * @iovcnt: Number of IOVEC structures in iov. | ||
| 31 | * @vr_idx: The vring index. | ||
| 32 | * @update_used: A non zero value results in used index being updated. | ||
| 33 | * @out_len: The aggregate of the total length written to or read from | ||
| 34 | * the virtio device. | ||
| 35 | */ | ||
| 36 | struct mic_copy_desc { | ||
| 37 | #ifdef __KERNEL__ | ||
| 38 | struct iovec __user *iov; | ||
| 39 | #else | ||
| 40 | struct iovec *iov; | ||
| 41 | #endif | ||
| 42 | int iovcnt; | ||
| 43 | __u8 vr_idx; | ||
| 44 | __u8 update_used; | ||
| 45 | __u32 out_len; | ||
| 46 | }; | ||
| 47 | |||
| 48 | /* | ||
| 49 | * Add a new virtio device | ||
| 50 | * The (struct mic_device_desc *) pointer points to a device page entry | ||
| 51 | * for the virtio device consisting of: | ||
| 52 | * - struct mic_device_desc | ||
| 53 | * - struct mic_vqconfig (num_vq of these) | ||
| 54 | * - host and guest features | ||
| 55 | * - virtio device config space | ||
| 56 | * The total size referenced by the pointer should equal the size returned | ||
| 57 | * by desc_size() in mic_common.h | ||
| 58 | */ | ||
| 59 | #define MIC_VIRTIO_ADD_DEVICE _IOWR('s', 1, struct mic_device_desc *) | ||
| 60 | |||
| 61 | /* | ||
| 62 | * Copy the number of entries in the iovec and update the used index | ||
| 63 | * if requested by the user. | ||
| 64 | */ | ||
| 65 | #define MIC_VIRTIO_COPY_DESC _IOWR('s', 2, struct mic_copy_desc *) | ||
| 66 | |||
| 67 | /* | ||
| 68 | * Notify virtio device of a config change | ||
| 69 | * The (__u8 *) pointer points to config space values for the device | ||
| 70 | * as they should be written into the device page. The total size | ||
| 71 | * referenced by the pointer should equal the config_len field of struct | ||
| 72 | * mic_device_desc. | ||
| 73 | */ | ||
| 74 | #define MIC_VIRTIO_CONFIG_CHANGE _IOWR('s', 5, __u8 *) | ||
| 75 | |||
| 76 | #endif | ||
diff --git a/include/uapi/linux/netfilter/Kbuild b/include/uapi/linux/netfilter/Kbuild index 174915420d3f..17c3af2c4bb9 100644 --- a/include/uapi/linux/netfilter/Kbuild +++ b/include/uapi/linux/netfilter/Kbuild | |||
| @@ -5,6 +5,8 @@ header-y += nf_conntrack_ftp.h | |||
| 5 | header-y += nf_conntrack_sctp.h | 5 | header-y += nf_conntrack_sctp.h |
| 6 | header-y += nf_conntrack_tcp.h | 6 | header-y += nf_conntrack_tcp.h |
| 7 | header-y += nf_conntrack_tuple_common.h | 7 | header-y += nf_conntrack_tuple_common.h |
| 8 | header-y += nf_tables.h | ||
| 9 | header-y += nf_tables_compat.h | ||
| 8 | header-y += nf_nat.h | 10 | header-y += nf_nat.h |
| 9 | header-y += nfnetlink.h | 11 | header-y += nfnetlink.h |
| 10 | header-y += nfnetlink_acct.h | 12 | header-y += nfnetlink_acct.h |
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h index 8024cdf13b70..25d3b2f79c02 100644 --- a/include/uapi/linux/netfilter/ipset/ip_set.h +++ b/include/uapi/linux/netfilter/ipset/ip_set.h | |||
| @@ -10,12 +10,14 @@ | |||
| 10 | #ifndef _UAPI_IP_SET_H | 10 | #ifndef _UAPI_IP_SET_H |
| 11 | #define _UAPI_IP_SET_H | 11 | #define _UAPI_IP_SET_H |
| 12 | 12 | ||
| 13 | |||
| 14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 15 | 14 | ||
| 16 | /* The protocol version */ | 15 | /* The protocol version */ |
| 17 | #define IPSET_PROTOCOL 6 | 16 | #define IPSET_PROTOCOL 6 |
| 18 | 17 | ||
| 18 | /* The maximum permissible comment length we will accept over netlink */ | ||
| 19 | #define IPSET_MAX_COMMENT_SIZE 255 | ||
| 20 | |||
| 19 | /* The max length of strings including NUL: set and type identifiers */ | 21 | /* The max length of strings including NUL: set and type identifiers */ |
| 20 | #define IPSET_MAXNAMELEN 32 | 22 | #define IPSET_MAXNAMELEN 32 |
| 21 | 23 | ||
| @@ -110,6 +112,7 @@ enum { | |||
| 110 | IPSET_ATTR_IFACE, | 112 | IPSET_ATTR_IFACE, |
| 111 | IPSET_ATTR_BYTES, | 113 | IPSET_ATTR_BYTES, |
| 112 | IPSET_ATTR_PACKETS, | 114 | IPSET_ATTR_PACKETS, |
| 115 | IPSET_ATTR_COMMENT, | ||
| 113 | __IPSET_ATTR_ADT_MAX, | 116 | __IPSET_ATTR_ADT_MAX, |
| 114 | }; | 117 | }; |
| 115 | #define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) | 118 | #define IPSET_ATTR_ADT_MAX (__IPSET_ATTR_ADT_MAX - 1) |
| @@ -140,6 +143,7 @@ enum ipset_errno { | |||
| 140 | IPSET_ERR_IPADDR_IPV4, | 143 | IPSET_ERR_IPADDR_IPV4, |
| 141 | IPSET_ERR_IPADDR_IPV6, | 144 | IPSET_ERR_IPADDR_IPV6, |
| 142 | IPSET_ERR_COUNTER, | 145 | IPSET_ERR_COUNTER, |
| 146 | IPSET_ERR_COMMENT, | ||
| 143 | 147 | ||
| 144 | /* Type specific error codes */ | 148 | /* Type specific error codes */ |
| 145 | IPSET_ERR_TYPE_SPECIFIC = 4352, | 149 | IPSET_ERR_TYPE_SPECIFIC = 4352, |
| @@ -176,6 +180,8 @@ enum ipset_cadt_flags { | |||
| 176 | IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH), | 180 | IPSET_FLAG_NOMATCH = (1 << IPSET_FLAG_BIT_NOMATCH), |
| 177 | IPSET_FLAG_BIT_WITH_COUNTERS = 3, | 181 | IPSET_FLAG_BIT_WITH_COUNTERS = 3, |
| 178 | IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS), | 182 | IPSET_FLAG_WITH_COUNTERS = (1 << IPSET_FLAG_BIT_WITH_COUNTERS), |
| 183 | IPSET_FLAG_BIT_WITH_COMMENT = 4, | ||
| 184 | IPSET_FLAG_WITH_COMMENT = (1 << IPSET_FLAG_BIT_WITH_COMMENT), | ||
| 179 | IPSET_FLAG_CADT_MAX = 15, | 185 | IPSET_FLAG_CADT_MAX = 15, |
| 180 | }; | 186 | }; |
| 181 | 187 | ||
| @@ -250,6 +256,14 @@ struct ip_set_req_get_set { | |||
| 250 | #define IP_SET_OP_GET_BYINDEX 0x00000007 /* Get set name by index */ | 256 | #define IP_SET_OP_GET_BYINDEX 0x00000007 /* Get set name by index */ |
| 251 | /* Uses ip_set_req_get_set */ | 257 | /* Uses ip_set_req_get_set */ |
| 252 | 258 | ||
| 259 | #define IP_SET_OP_GET_FNAME 0x00000008 /* Get set index and family */ | ||
| 260 | struct ip_set_req_get_set_family { | ||
| 261 | unsigned int op; | ||
| 262 | unsigned int version; | ||
| 263 | unsigned int family; | ||
| 264 | union ip_set_name_index set; | ||
| 265 | }; | ||
| 266 | |||
| 253 | #define IP_SET_OP_VERSION 0x00000100 /* Ask kernel version */ | 267 | #define IP_SET_OP_VERSION 0x00000100 /* Ask kernel version */ |
| 254 | struct ip_set_req_version { | 268 | struct ip_set_req_version { |
| 255 | unsigned int op; | 269 | unsigned int op; |
diff --git a/include/uapi/linux/netfilter/nf_conntrack_common.h b/include/uapi/linux/netfilter/nf_conntrack_common.h index 8dd803818ebe..319f47128db8 100644 --- a/include/uapi/linux/netfilter/nf_conntrack_common.h +++ b/include/uapi/linux/netfilter/nf_conntrack_common.h | |||
| @@ -25,6 +25,10 @@ enum ip_conntrack_info { | |||
| 25 | IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1 | 25 | IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1 |
| 26 | }; | 26 | }; |
| 27 | 27 | ||
| 28 | #define NF_CT_STATE_INVALID_BIT (1 << 0) | ||
| 29 | #define NF_CT_STATE_BIT(ctinfo) (1 << ((ctinfo) % IP_CT_IS_REPLY + 1)) | ||
| 30 | #define NF_CT_STATE_UNTRACKED_BIT (1 << (IP_CT_NUMBER + 1)) | ||
| 31 | |||
| 28 | /* Bitset representing status of connection. */ | 32 | /* Bitset representing status of connection. */ |
| 29 | enum ip_conntrack_status { | 33 | enum ip_conntrack_status { |
| 30 | /* It's an expected connection: bit 0 set. This bit never changed */ | 34 | /* It's an expected connection: bit 0 set. This bit never changed */ |
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h new file mode 100644 index 000000000000..fbfd229a8e99 --- /dev/null +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
| @@ -0,0 +1,718 @@ | |||
| 1 | #ifndef _LINUX_NF_TABLES_H | ||
| 2 | #define _LINUX_NF_TABLES_H | ||
| 3 | |||
| 4 | #define NFT_CHAIN_MAXNAMELEN 32 | ||
| 5 | |||
| 6 | enum nft_registers { | ||
| 7 | NFT_REG_VERDICT, | ||
| 8 | NFT_REG_1, | ||
| 9 | NFT_REG_2, | ||
| 10 | NFT_REG_3, | ||
| 11 | NFT_REG_4, | ||
| 12 | __NFT_REG_MAX | ||
| 13 | }; | ||
| 14 | #define NFT_REG_MAX (__NFT_REG_MAX - 1) | ||
| 15 | |||
| 16 | /** | ||
| 17 | * enum nft_verdicts - nf_tables internal verdicts | ||
| 18 | * | ||
| 19 | * @NFT_CONTINUE: continue evaluation of the current rule | ||
| 20 | * @NFT_BREAK: terminate evaluation of the current rule | ||
| 21 | * @NFT_JUMP: push the current chain on the jump stack and jump to a chain | ||
| 22 | * @NFT_GOTO: jump to a chain without pushing the current chain on the jump stack | ||
| 23 | * @NFT_RETURN: return to the topmost chain on the jump stack | ||
| 24 | * | ||
| 25 | * The nf_tables verdicts share their numeric space with the netfilter verdicts. | ||
| 26 | */ | ||
| 27 | enum nft_verdicts { | ||
| 28 | NFT_CONTINUE = -1, | ||
| 29 | NFT_BREAK = -2, | ||
| 30 | NFT_JUMP = -3, | ||
| 31 | NFT_GOTO = -4, | ||
| 32 | NFT_RETURN = -5, | ||
| 33 | }; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * enum nf_tables_msg_types - nf_tables netlink message types | ||
| 37 | * | ||
| 38 | * @NFT_MSG_NEWTABLE: create a new table (enum nft_table_attributes) | ||
| 39 | * @NFT_MSG_GETTABLE: get a table (enum nft_table_attributes) | ||
| 40 | * @NFT_MSG_DELTABLE: delete a table (enum nft_table_attributes) | ||
| 41 | * @NFT_MSG_NEWCHAIN: create a new chain (enum nft_chain_attributes) | ||
| 42 | * @NFT_MSG_GETCHAIN: get a chain (enum nft_chain_attributes) | ||
| 43 | * @NFT_MSG_DELCHAIN: delete a chain (enum nft_chain_attributes) | ||
| 44 | * @NFT_MSG_NEWRULE: create a new rule (enum nft_rule_attributes) | ||
| 45 | * @NFT_MSG_GETRULE: get a rule (enum nft_rule_attributes) | ||
| 46 | * @NFT_MSG_DELRULE: delete a rule (enum nft_rule_attributes) | ||
| 47 | * @NFT_MSG_NEWSET: create a new set (enum nft_set_attributes) | ||
| 48 | * @NFT_MSG_GETSET: get a set (enum nft_set_attributes) | ||
| 49 | * @NFT_MSG_DELSET: delete a set (enum nft_set_attributes) | ||
| 50 | * @NFT_MSG_NEWSETELEM: create a new set element (enum nft_set_elem_attributes) | ||
| 51 | * @NFT_MSG_GETSETELEM: get a set element (enum nft_set_elem_attributes) | ||
| 52 | * @NFT_MSG_DELSETELEM: delete a set element (enum nft_set_elem_attributes) | ||
| 53 | */ | ||
| 54 | enum nf_tables_msg_types { | ||
| 55 | NFT_MSG_NEWTABLE, | ||
| 56 | NFT_MSG_GETTABLE, | ||
| 57 | NFT_MSG_DELTABLE, | ||
| 58 | NFT_MSG_NEWCHAIN, | ||
| 59 | NFT_MSG_GETCHAIN, | ||
| 60 | NFT_MSG_DELCHAIN, | ||
| 61 | NFT_MSG_NEWRULE, | ||
| 62 | NFT_MSG_GETRULE, | ||
| 63 | NFT_MSG_DELRULE, | ||
| 64 | NFT_MSG_NEWSET, | ||
| 65 | NFT_MSG_GETSET, | ||
| 66 | NFT_MSG_DELSET, | ||
| 67 | NFT_MSG_NEWSETELEM, | ||
| 68 | NFT_MSG_GETSETELEM, | ||
| 69 | NFT_MSG_DELSETELEM, | ||
| 70 | NFT_MSG_MAX, | ||
| 71 | }; | ||
| 72 | |||
| 73 | /** | ||
| 74 | * enum nft_list_attributes - nf_tables generic list netlink attributes | ||
| 75 | * | ||
| 76 | * @NFTA_LIST_ELEM: list element (NLA_NESTED) | ||
| 77 | */ | ||
| 78 | enum nft_list_attributes { | ||
| 79 | NFTA_LIST_UNPEC, | ||
| 80 | NFTA_LIST_ELEM, | ||
| 81 | __NFTA_LIST_MAX | ||
| 82 | }; | ||
| 83 | #define NFTA_LIST_MAX (__NFTA_LIST_MAX - 1) | ||
| 84 | |||
| 85 | /** | ||
| 86 | * enum nft_hook_attributes - nf_tables netfilter hook netlink attributes | ||
| 87 | * | ||
| 88 | * @NFTA_HOOK_HOOKNUM: netfilter hook number (NLA_U32) | ||
| 89 | * @NFTA_HOOK_PRIORITY: netfilter hook priority (NLA_U32) | ||
| 90 | */ | ||
| 91 | enum nft_hook_attributes { | ||
| 92 | NFTA_HOOK_UNSPEC, | ||
| 93 | NFTA_HOOK_HOOKNUM, | ||
| 94 | NFTA_HOOK_PRIORITY, | ||
| 95 | __NFTA_HOOK_MAX | ||
| 96 | }; | ||
| 97 | #define NFTA_HOOK_MAX (__NFTA_HOOK_MAX - 1) | ||
| 98 | |||
| 99 | /** | ||
| 100 | * enum nft_table_flags - nf_tables table flags | ||
| 101 | * | ||
| 102 | * @NFT_TABLE_F_DORMANT: this table is not active | ||
| 103 | */ | ||
| 104 | enum nft_table_flags { | ||
| 105 | NFT_TABLE_F_DORMANT = 0x1, | ||
| 106 | }; | ||
| 107 | |||
| 108 | /** | ||
| 109 | * enum nft_table_attributes - nf_tables table netlink attributes | ||
| 110 | * | ||
| 111 | * @NFTA_TABLE_NAME: name of the table (NLA_STRING) | ||
| 112 | * @NFTA_TABLE_FLAGS: bitmask of enum nft_table_flags (NLA_U32) | ||
| 113 | */ | ||
| 114 | enum nft_table_attributes { | ||
| 115 | NFTA_TABLE_UNSPEC, | ||
| 116 | NFTA_TABLE_NAME, | ||
| 117 | NFTA_TABLE_FLAGS, | ||
| 118 | __NFTA_TABLE_MAX | ||
| 119 | }; | ||
| 120 | #define NFTA_TABLE_MAX (__NFTA_TABLE_MAX - 1) | ||
| 121 | |||
| 122 | /** | ||
| 123 | * enum nft_chain_attributes - nf_tables chain netlink attributes | ||
| 124 | * | ||
| 125 | * @NFTA_CHAIN_TABLE: name of the table containing the chain (NLA_STRING) | ||
| 126 | * @NFTA_CHAIN_HANDLE: numeric handle of the chain (NLA_U64) | ||
| 127 | * @NFTA_CHAIN_NAME: name of the chain (NLA_STRING) | ||
| 128 | * @NFTA_CHAIN_HOOK: hook specification for basechains (NLA_NESTED: nft_hook_attributes) | ||
| 129 | * @NFTA_CHAIN_POLICY: numeric policy of the chain (NLA_U32) | ||
| 130 | * @NFTA_CHAIN_USE: number of references to this chain (NLA_U32) | ||
| 131 | * @NFTA_CHAIN_TYPE: type name of the string (NLA_NUL_STRING) | ||
| 132 | * @NFTA_CHAIN_COUNTERS: counter specification of the chain (NLA_NESTED: nft_counter_attributes) | ||
| 133 | */ | ||
| 134 | enum nft_chain_attributes { | ||
| 135 | NFTA_CHAIN_UNSPEC, | ||
| 136 | NFTA_CHAIN_TABLE, | ||
| 137 | NFTA_CHAIN_HANDLE, | ||
| 138 | NFTA_CHAIN_NAME, | ||
| 139 | NFTA_CHAIN_HOOK, | ||
| 140 | NFTA_CHAIN_POLICY, | ||
| 141 | NFTA_CHAIN_USE, | ||
| 142 | NFTA_CHAIN_TYPE, | ||
| 143 | NFTA_CHAIN_COUNTERS, | ||
| 144 | __NFTA_CHAIN_MAX | ||
| 145 | }; | ||
| 146 | #define NFTA_CHAIN_MAX (__NFTA_CHAIN_MAX - 1) | ||
| 147 | |||
| 148 | /** | ||
| 149 | * enum nft_rule_attributes - nf_tables rule netlink attributes | ||
| 150 | * | ||
| 151 | * @NFTA_RULE_TABLE: name of the table containing the rule (NLA_STRING) | ||
| 152 | * @NFTA_RULE_CHAIN: name of the chain containing the rule (NLA_STRING) | ||
| 153 | * @NFTA_RULE_HANDLE: numeric handle of the rule (NLA_U64) | ||
| 154 | * @NFTA_RULE_EXPRESSIONS: list of expressions (NLA_NESTED: nft_expr_attributes) | ||
| 155 | * @NFTA_RULE_COMPAT: compatibility specifications of the rule (NLA_NESTED: nft_rule_compat_attributes) | ||
| 156 | * @NFTA_RULE_POSITION: numeric handle of the previous rule (NLA_U64) | ||
| 157 | */ | ||
| 158 | enum nft_rule_attributes { | ||
| 159 | NFTA_RULE_UNSPEC, | ||
| 160 | NFTA_RULE_TABLE, | ||
| 161 | NFTA_RULE_CHAIN, | ||
| 162 | NFTA_RULE_HANDLE, | ||
| 163 | NFTA_RULE_EXPRESSIONS, | ||
| 164 | NFTA_RULE_COMPAT, | ||
| 165 | NFTA_RULE_POSITION, | ||
| 166 | __NFTA_RULE_MAX | ||
| 167 | }; | ||
| 168 | #define NFTA_RULE_MAX (__NFTA_RULE_MAX - 1) | ||
| 169 | |||
| 170 | /** | ||
| 171 | * enum nft_rule_compat_flags - nf_tables rule compat flags | ||
| 172 | * | ||
| 173 | * @NFT_RULE_COMPAT_F_INV: invert the check result | ||
| 174 | */ | ||
| 175 | enum nft_rule_compat_flags { | ||
| 176 | NFT_RULE_COMPAT_F_INV = (1 << 1), | ||
| 177 | NFT_RULE_COMPAT_F_MASK = NFT_RULE_COMPAT_F_INV, | ||
| 178 | }; | ||
| 179 | |||
| 180 | /** | ||
| 181 | * enum nft_rule_compat_attributes - nf_tables rule compat attributes | ||
| 182 | * | ||
| 183 | * @NFTA_RULE_COMPAT_PROTO: numerice value of handled protocol (NLA_U32) | ||
| 184 | * @NFTA_RULE_COMPAT_FLAGS: bitmask of enum nft_rule_compat_flags (NLA_U32) | ||
| 185 | */ | ||
| 186 | enum nft_rule_compat_attributes { | ||
| 187 | NFTA_RULE_COMPAT_UNSPEC, | ||
| 188 | NFTA_RULE_COMPAT_PROTO, | ||
| 189 | NFTA_RULE_COMPAT_FLAGS, | ||
| 190 | __NFTA_RULE_COMPAT_MAX | ||
| 191 | }; | ||
| 192 | #define NFTA_RULE_COMPAT_MAX (__NFTA_RULE_COMPAT_MAX - 1) | ||
| 193 | |||
| 194 | /** | ||
| 195 | * enum nft_set_flags - nf_tables set flags | ||
| 196 | * | ||
| 197 | * @NFT_SET_ANONYMOUS: name allocation, automatic cleanup on unlink | ||
| 198 | * @NFT_SET_CONSTANT: set contents may not change while bound | ||
| 199 | * @NFT_SET_INTERVAL: set contains intervals | ||
| 200 | * @NFT_SET_MAP: set is used as a dictionary | ||
| 201 | */ | ||
| 202 | enum nft_set_flags { | ||
| 203 | NFT_SET_ANONYMOUS = 0x1, | ||
| 204 | NFT_SET_CONSTANT = 0x2, | ||
| 205 | NFT_SET_INTERVAL = 0x4, | ||
| 206 | NFT_SET_MAP = 0x8, | ||
| 207 | }; | ||
| 208 | |||
| 209 | /** | ||
| 210 | * enum nft_set_attributes - nf_tables set netlink attributes | ||
| 211 | * | ||
| 212 | * @NFTA_SET_TABLE: table name (NLA_STRING) | ||
| 213 | * @NFTA_SET_NAME: set name (NLA_STRING) | ||
| 214 | * @NFTA_SET_FLAGS: bitmask of enum nft_set_flags (NLA_U32) | ||
| 215 | * @NFTA_SET_KEY_TYPE: key data type, informational purpose only (NLA_U32) | ||
| 216 | * @NFTA_SET_KEY_LEN: key data length (NLA_U32) | ||
| 217 | * @NFTA_SET_DATA_TYPE: mapping data type (NLA_U32) | ||
| 218 | * @NFTA_SET_DATA_LEN: mapping data length (NLA_U32) | ||
| 219 | */ | ||
| 220 | enum nft_set_attributes { | ||
| 221 | NFTA_SET_UNSPEC, | ||
| 222 | NFTA_SET_TABLE, | ||
| 223 | NFTA_SET_NAME, | ||
| 224 | NFTA_SET_FLAGS, | ||
| 225 | NFTA_SET_KEY_TYPE, | ||
| 226 | NFTA_SET_KEY_LEN, | ||
| 227 | NFTA_SET_DATA_TYPE, | ||
| 228 | NFTA_SET_DATA_LEN, | ||
| 229 | __NFTA_SET_MAX | ||
| 230 | }; | ||
| 231 | #define NFTA_SET_MAX (__NFTA_SET_MAX - 1) | ||
| 232 | |||
| 233 | /** | ||
| 234 | * enum nft_set_elem_flags - nf_tables set element flags | ||
| 235 | * | ||
| 236 | * @NFT_SET_ELEM_INTERVAL_END: element ends the previous interval | ||
| 237 | */ | ||
| 238 | enum nft_set_elem_flags { | ||
| 239 | NFT_SET_ELEM_INTERVAL_END = 0x1, | ||
| 240 | }; | ||
| 241 | |||
| 242 | /** | ||
| 243 | * enum nft_set_elem_attributes - nf_tables set element netlink attributes | ||
| 244 | * | ||
| 245 | * @NFTA_SET_ELEM_KEY: key value (NLA_NESTED: nft_data) | ||
| 246 | * @NFTA_SET_ELEM_DATA: data value of mapping (NLA_NESTED: nft_data_attributes) | ||
| 247 | * @NFTA_SET_ELEM_FLAGS: bitmask of nft_set_elem_flags (NLA_U32) | ||
| 248 | */ | ||
| 249 | enum nft_set_elem_attributes { | ||
| 250 | NFTA_SET_ELEM_UNSPEC, | ||
| 251 | NFTA_SET_ELEM_KEY, | ||
| 252 | NFTA_SET_ELEM_DATA, | ||
| 253 | NFTA_SET_ELEM_FLAGS, | ||
| 254 | __NFTA_SET_ELEM_MAX | ||
| 255 | }; | ||
| 256 | #define NFTA_SET_ELEM_MAX (__NFTA_SET_ELEM_MAX - 1) | ||
| 257 | |||
| 258 | /** | ||
| 259 | * enum nft_set_elem_list_attributes - nf_tables set element list netlink attributes | ||
| 260 | * | ||
| 261 | * @NFTA_SET_ELEM_LIST_TABLE: table of the set to be changed (NLA_STRING) | ||
| 262 | * @NFTA_SET_ELEM_LIST_SET: name of the set to be changed (NLA_STRING) | ||
| 263 | * @NFTA_SET_ELEM_LIST_ELEMENTS: list of set elements (NLA_NESTED: nft_set_elem_attributes) | ||
| 264 | */ | ||
| 265 | enum nft_set_elem_list_attributes { | ||
| 266 | NFTA_SET_ELEM_LIST_UNSPEC, | ||
| 267 | NFTA_SET_ELEM_LIST_TABLE, | ||
| 268 | NFTA_SET_ELEM_LIST_SET, | ||
| 269 | NFTA_SET_ELEM_LIST_ELEMENTS, | ||
| 270 | __NFTA_SET_ELEM_LIST_MAX | ||
| 271 | }; | ||
| 272 | #define NFTA_SET_ELEM_LIST_MAX (__NFTA_SET_ELEM_LIST_MAX - 1) | ||
| 273 | |||
| 274 | /** | ||
| 275 | * enum nft_data_types - nf_tables data types | ||
| 276 | * | ||
| 277 | * @NFT_DATA_VALUE: generic data | ||
| 278 | * @NFT_DATA_VERDICT: netfilter verdict | ||
| 279 | * | ||
| 280 | * The type of data is usually determined by the kernel directly and is not | ||
| 281 | * explicitly specified by userspace. The only difference are sets, where | ||
| 282 | * userspace specifies the key and mapping data types. | ||
| 283 | * | ||
| 284 | * The values 0xffffff00-0xffffffff are reserved for internally used types. | ||
| 285 | * The remaining range can be freely used by userspace to encode types, all | ||
| 286 | * values are equivalent to NFT_DATA_VALUE. | ||
| 287 | */ | ||
| 288 | enum nft_data_types { | ||
| 289 | NFT_DATA_VALUE, | ||
| 290 | NFT_DATA_VERDICT = 0xffffff00U, | ||
| 291 | }; | ||
| 292 | |||
| 293 | #define NFT_DATA_RESERVED_MASK 0xffffff00U | ||
| 294 | |||
| 295 | /** | ||
| 296 | * enum nft_data_attributes - nf_tables data netlink attributes | ||
| 297 | * | ||
| 298 | * @NFTA_DATA_VALUE: generic data (NLA_BINARY) | ||
| 299 | * @NFTA_DATA_VERDICT: nf_tables verdict (NLA_NESTED: nft_verdict_attributes) | ||
| 300 | */ | ||
| 301 | enum nft_data_attributes { | ||
| 302 | NFTA_DATA_UNSPEC, | ||
| 303 | NFTA_DATA_VALUE, | ||
| 304 | NFTA_DATA_VERDICT, | ||
| 305 | __NFTA_DATA_MAX | ||
| 306 | }; | ||
| 307 | #define NFTA_DATA_MAX (__NFTA_DATA_MAX - 1) | ||
| 308 | |||
| 309 | /** | ||
| 310 | * enum nft_verdict_attributes - nf_tables verdict netlink attributes | ||
| 311 | * | ||
| 312 | * @NFTA_VERDICT_CODE: nf_tables verdict (NLA_U32: enum nft_verdicts) | ||
| 313 | * @NFTA_VERDICT_CHAIN: jump target chain name (NLA_STRING) | ||
| 314 | */ | ||
| 315 | enum nft_verdict_attributes { | ||
| 316 | NFTA_VERDICT_UNSPEC, | ||
| 317 | NFTA_VERDICT_CODE, | ||
| 318 | NFTA_VERDICT_CHAIN, | ||
| 319 | __NFTA_VERDICT_MAX | ||
| 320 | }; | ||
| 321 | #define NFTA_VERDICT_MAX (__NFTA_VERDICT_MAX - 1) | ||
| 322 | |||
| 323 | /** | ||
| 324 | * enum nft_expr_attributes - nf_tables expression netlink attributes | ||
| 325 | * | ||
| 326 | * @NFTA_EXPR_NAME: name of the expression type (NLA_STRING) | ||
| 327 | * @NFTA_EXPR_DATA: type specific data (NLA_NESTED) | ||
| 328 | */ | ||
| 329 | enum nft_expr_attributes { | ||
| 330 | NFTA_EXPR_UNSPEC, | ||
| 331 | NFTA_EXPR_NAME, | ||
| 332 | NFTA_EXPR_DATA, | ||
| 333 | __NFTA_EXPR_MAX | ||
| 334 | }; | ||
| 335 | #define NFTA_EXPR_MAX (__NFTA_EXPR_MAX - 1) | ||
| 336 | |||
| 337 | /** | ||
| 338 | * enum nft_immediate_attributes - nf_tables immediate expression netlink attributes | ||
| 339 | * | ||
| 340 | * @NFTA_IMMEDIATE_DREG: destination register to load data into (NLA_U32) | ||
| 341 | * @NFTA_IMMEDIATE_DATA: data to load (NLA_NESTED: nft_data_attributes) | ||
| 342 | */ | ||
| 343 | enum nft_immediate_attributes { | ||
| 344 | NFTA_IMMEDIATE_UNSPEC, | ||
| 345 | NFTA_IMMEDIATE_DREG, | ||
| 346 | NFTA_IMMEDIATE_DATA, | ||
| 347 | __NFTA_IMMEDIATE_MAX | ||
| 348 | }; | ||
| 349 | #define NFTA_IMMEDIATE_MAX (__NFTA_IMMEDIATE_MAX - 1) | ||
| 350 | |||
| 351 | /** | ||
| 352 | * enum nft_bitwise_attributes - nf_tables bitwise expression netlink attributes | ||
| 353 | * | ||
| 354 | * @NFTA_BITWISE_SREG: source register (NLA_U32: nft_registers) | ||
| 355 | * @NFTA_BITWISE_DREG: destination register (NLA_U32: nft_registers) | ||
| 356 | * @NFTA_BITWISE_LEN: length of operands (NLA_U32) | ||
| 357 | * @NFTA_BITWISE_MASK: mask value (NLA_NESTED: nft_data_attributes) | ||
| 358 | * @NFTA_BITWISE_XOR: xor value (NLA_NESTED: nft_data_attributes) | ||
| 359 | * | ||
| 360 | * The bitwise expression performs the following operation: | ||
| 361 | * | ||
| 362 | * dreg = (sreg & mask) ^ xor | ||
| 363 | * | ||
| 364 | * which allow to express all bitwise operations: | ||
| 365 | * | ||
| 366 | * mask xor | ||
| 367 | * NOT: 1 1 | ||
| 368 | * OR: 0 x | ||
| 369 | * XOR: 1 x | ||
| 370 | * AND: x 0 | ||
| 371 | */ | ||
| 372 | enum nft_bitwise_attributes { | ||
| 373 | NFTA_BITWISE_UNSPEC, | ||
| 374 | NFTA_BITWISE_SREG, | ||
| 375 | NFTA_BITWISE_DREG, | ||
| 376 | NFTA_BITWISE_LEN, | ||
| 377 | NFTA_BITWISE_MASK, | ||
| 378 | NFTA_BITWISE_XOR, | ||
| 379 | __NFTA_BITWISE_MAX | ||
| 380 | }; | ||
| 381 | #define NFTA_BITWISE_MAX (__NFTA_BITWISE_MAX - 1) | ||
| 382 | |||
| 383 | /** | ||
| 384 | * enum nft_byteorder_ops - nf_tables byteorder operators | ||
| 385 | * | ||
| 386 | * @NFT_BYTEORDER_NTOH: network to host operator | ||
| 387 | * @NFT_BYTEORDER_HTON: host to network opertaor | ||
| 388 | */ | ||
| 389 | enum nft_byteorder_ops { | ||
| 390 | NFT_BYTEORDER_NTOH, | ||
| 391 | NFT_BYTEORDER_HTON, | ||
| 392 | }; | ||
| 393 | |||
| 394 | /** | ||
| 395 | * enum nft_byteorder_attributes - nf_tables byteorder expression netlink attributes | ||
| 396 | * | ||
| 397 | * @NFTA_BYTEORDER_SREG: source register (NLA_U32: nft_registers) | ||
| 398 | * @NFTA_BYTEORDER_DREG: destination register (NLA_U32: nft_registers) | ||
| 399 | * @NFTA_BYTEORDER_OP: operator (NLA_U32: enum nft_byteorder_ops) | ||
| 400 | * @NFTA_BYTEORDER_LEN: length of the data (NLA_U32) | ||
| 401 | * @NFTA_BYTEORDER_SIZE: data size in bytes (NLA_U32: 2 or 4) | ||
| 402 | */ | ||
| 403 | enum nft_byteorder_attributes { | ||
| 404 | NFTA_BYTEORDER_UNSPEC, | ||
| 405 | NFTA_BYTEORDER_SREG, | ||
| 406 | NFTA_BYTEORDER_DREG, | ||
| 407 | NFTA_BYTEORDER_OP, | ||
| 408 | NFTA_BYTEORDER_LEN, | ||
| 409 | NFTA_BYTEORDER_SIZE, | ||
| 410 | __NFTA_BYTEORDER_MAX | ||
| 411 | }; | ||
| 412 | #define NFTA_BYTEORDER_MAX (__NFTA_BYTEORDER_MAX - 1) | ||
| 413 | |||
| 414 | /** | ||
| 415 | * enum nft_cmp_ops - nf_tables relational operator | ||
| 416 | * | ||
| 417 | * @NFT_CMP_EQ: equal | ||
| 418 | * @NFT_CMP_NEQ: not equal | ||
| 419 | * @NFT_CMP_LT: less than | ||
| 420 | * @NFT_CMP_LTE: less than or equal to | ||
| 421 | * @NFT_CMP_GT: greater than | ||
| 422 | * @NFT_CMP_GTE: greater than or equal to | ||
| 423 | */ | ||
| 424 | enum nft_cmp_ops { | ||
| 425 | NFT_CMP_EQ, | ||
| 426 | NFT_CMP_NEQ, | ||
| 427 | NFT_CMP_LT, | ||
| 428 | NFT_CMP_LTE, | ||
| 429 | NFT_CMP_GT, | ||
| 430 | NFT_CMP_GTE, | ||
| 431 | }; | ||
| 432 | |||
| 433 | /** | ||
| 434 | * enum nft_cmp_attributes - nf_tables cmp expression netlink attributes | ||
| 435 | * | ||
| 436 | * @NFTA_CMP_SREG: source register of data to compare (NLA_U32: nft_registers) | ||
| 437 | * @NFTA_CMP_OP: cmp operation (NLA_U32: nft_cmp_ops) | ||
| 438 | * @NFTA_CMP_DATA: data to compare against (NLA_NESTED: nft_data_attributes) | ||
| 439 | */ | ||
| 440 | enum nft_cmp_attributes { | ||
| 441 | NFTA_CMP_UNSPEC, | ||
| 442 | NFTA_CMP_SREG, | ||
| 443 | NFTA_CMP_OP, | ||
| 444 | NFTA_CMP_DATA, | ||
| 445 | __NFTA_CMP_MAX | ||
| 446 | }; | ||
| 447 | #define NFTA_CMP_MAX (__NFTA_CMP_MAX - 1) | ||
| 448 | |||
| 449 | /** | ||
| 450 | * enum nft_lookup_attributes - nf_tables set lookup expression netlink attributes | ||
| 451 | * | ||
| 452 | * @NFTA_LOOKUP_SET: name of the set where to look for (NLA_STRING) | ||
| 453 | * @NFTA_LOOKUP_SREG: source register of the data to look for (NLA_U32: nft_registers) | ||
| 454 | * @NFTA_LOOKUP_DREG: destination register (NLA_U32: nft_registers) | ||
| 455 | */ | ||
| 456 | enum nft_lookup_attributes { | ||
| 457 | NFTA_LOOKUP_UNSPEC, | ||
| 458 | NFTA_LOOKUP_SET, | ||
| 459 | NFTA_LOOKUP_SREG, | ||
| 460 | NFTA_LOOKUP_DREG, | ||
| 461 | __NFTA_LOOKUP_MAX | ||
| 462 | }; | ||
| 463 | #define NFTA_LOOKUP_MAX (__NFTA_LOOKUP_MAX - 1) | ||
| 464 | |||
| 465 | /** | ||
| 466 | * enum nft_payload_bases - nf_tables payload expression offset bases | ||
| 467 | * | ||
| 468 | * @NFT_PAYLOAD_LL_HEADER: link layer header | ||
| 469 | * @NFT_PAYLOAD_NETWORK_HEADER: network header | ||
| 470 | * @NFT_PAYLOAD_TRANSPORT_HEADER: transport header | ||
| 471 | */ | ||
| 472 | enum nft_payload_bases { | ||
| 473 | NFT_PAYLOAD_LL_HEADER, | ||
| 474 | NFT_PAYLOAD_NETWORK_HEADER, | ||
| 475 | NFT_PAYLOAD_TRANSPORT_HEADER, | ||
| 476 | }; | ||
| 477 | |||
| 478 | /** | ||
| 479 | * enum nft_payload_attributes - nf_tables payload expression netlink attributes | ||
| 480 | * | ||
| 481 | * @NFTA_PAYLOAD_DREG: destination register to load data into (NLA_U32: nft_registers) | ||
| 482 | * @NFTA_PAYLOAD_BASE: payload base (NLA_U32: nft_payload_bases) | ||
| 483 | * @NFTA_PAYLOAD_OFFSET: payload offset relative to base (NLA_U32) | ||
| 484 | * @NFTA_PAYLOAD_LEN: payload length (NLA_U32) | ||
| 485 | */ | ||
| 486 | enum nft_payload_attributes { | ||
| 487 | NFTA_PAYLOAD_UNSPEC, | ||
| 488 | NFTA_PAYLOAD_DREG, | ||
| 489 | NFTA_PAYLOAD_BASE, | ||
| 490 | NFTA_PAYLOAD_OFFSET, | ||
| 491 | NFTA_PAYLOAD_LEN, | ||
| 492 | __NFTA_PAYLOAD_MAX | ||
| 493 | }; | ||
| 494 | #define NFTA_PAYLOAD_MAX (__NFTA_PAYLOAD_MAX - 1) | ||
| 495 | |||
| 496 | /** | ||
| 497 | * enum nft_exthdr_attributes - nf_tables IPv6 extension header expression netlink attributes | ||
| 498 | * | ||
| 499 | * @NFTA_EXTHDR_DREG: destination register (NLA_U32: nft_registers) | ||
| 500 | * @NFTA_EXTHDR_TYPE: extension header type (NLA_U8) | ||
| 501 | * @NFTA_EXTHDR_OFFSET: extension header offset (NLA_U32) | ||
| 502 | * @NFTA_EXTHDR_LEN: extension header length (NLA_U32) | ||
| 503 | */ | ||
| 504 | enum nft_exthdr_attributes { | ||
| 505 | NFTA_EXTHDR_UNSPEC, | ||
| 506 | NFTA_EXTHDR_DREG, | ||
| 507 | NFTA_EXTHDR_TYPE, | ||
| 508 | NFTA_EXTHDR_OFFSET, | ||
| 509 | NFTA_EXTHDR_LEN, | ||
| 510 | __NFTA_EXTHDR_MAX | ||
| 511 | }; | ||
| 512 | #define NFTA_EXTHDR_MAX (__NFTA_EXTHDR_MAX - 1) | ||
| 513 | |||
| 514 | /** | ||
| 515 | * enum nft_meta_keys - nf_tables meta expression keys | ||
| 516 | * | ||
| 517 | * @NFT_META_LEN: packet length (skb->len) | ||
| 518 | * @NFT_META_PROTOCOL: packet ethertype protocol (skb->protocol), invalid in OUTPUT | ||
| 519 | * @NFT_META_PRIORITY: packet priority (skb->priority) | ||
| 520 | * @NFT_META_MARK: packet mark (skb->mark) | ||
| 521 | * @NFT_META_IIF: packet input interface index (dev->ifindex) | ||
| 522 | * @NFT_META_OIF: packet output interface index (dev->ifindex) | ||
| 523 | * @NFT_META_IIFNAME: packet input interface name (dev->name) | ||
| 524 | * @NFT_META_OIFNAME: packet output interface name (dev->name) | ||
| 525 | * @NFT_META_IIFTYPE: packet input interface type (dev->type) | ||
| 526 | * @NFT_META_OIFTYPE: packet output interface type (dev->type) | ||
| 527 | * @NFT_META_SKUID: originating socket UID (fsuid) | ||
| 528 | * @NFT_META_SKGID: originating socket GID (fsgid) | ||
| 529 | * @NFT_META_NFTRACE: packet nftrace bit | ||
| 530 | * @NFT_META_RTCLASSID: realm value of packet's route (skb->dst->tclassid) | ||
| 531 | * @NFT_META_SECMARK: packet secmark (skb->secmark) | ||
| 532 | */ | ||
| 533 | enum nft_meta_keys { | ||
| 534 | NFT_META_LEN, | ||
| 535 | NFT_META_PROTOCOL, | ||
| 536 | NFT_META_PRIORITY, | ||
| 537 | NFT_META_MARK, | ||
| 538 | NFT_META_IIF, | ||
| 539 | NFT_META_OIF, | ||
| 540 | NFT_META_IIFNAME, | ||
| 541 | NFT_META_OIFNAME, | ||
| 542 | NFT_META_IIFTYPE, | ||
| 543 | NFT_META_OIFTYPE, | ||
| 544 | NFT_META_SKUID, | ||
| 545 | NFT_META_SKGID, | ||
| 546 | NFT_META_NFTRACE, | ||
| 547 | NFT_META_RTCLASSID, | ||
| 548 | NFT_META_SECMARK, | ||
| 549 | }; | ||
| 550 | |||
| 551 | /** | ||
| 552 | * enum nft_meta_attributes - nf_tables meta expression netlink attributes | ||
| 553 | * | ||
| 554 | * @NFTA_META_DREG: destination register (NLA_U32) | ||
| 555 | * @NFTA_META_KEY: meta data item to load (NLA_U32: nft_meta_keys) | ||
| 556 | */ | ||
| 557 | enum nft_meta_attributes { | ||
| 558 | NFTA_META_UNSPEC, | ||
| 559 | NFTA_META_DREG, | ||
| 560 | NFTA_META_KEY, | ||
| 561 | __NFTA_META_MAX | ||
| 562 | }; | ||
| 563 | #define NFTA_META_MAX (__NFTA_META_MAX - 1) | ||
| 564 | |||
| 565 | /** | ||
| 566 | * enum nft_ct_keys - nf_tables ct expression keys | ||
| 567 | * | ||
| 568 | * @NFT_CT_STATE: conntrack state (bitmask of enum ip_conntrack_info) | ||
| 569 | * @NFT_CT_DIRECTION: conntrack direction (enum ip_conntrack_dir) | ||
| 570 | * @NFT_CT_STATUS: conntrack status (bitmask of enum ip_conntrack_status) | ||
| 571 | * @NFT_CT_MARK: conntrack mark value | ||
| 572 | * @NFT_CT_SECMARK: conntrack secmark value | ||
| 573 | * @NFT_CT_EXPIRATION: relative conntrack expiration time in ms | ||
| 574 | * @NFT_CT_HELPER: connection tracking helper assigned to conntrack | ||
| 575 | * @NFT_CT_L3PROTOCOL: conntrack layer 3 protocol | ||
| 576 | * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address) | ||
| 577 | * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address) | ||
| 578 | * @NFT_CT_PROTOCOL: conntrack layer 4 protocol | ||
| 579 | * @NFT_CT_PROTO_SRC: conntrack layer 4 protocol source | ||
| 580 | * @NFT_CT_PROTO_DST: conntrack layer 4 protocol destination | ||
| 581 | */ | ||
| 582 | enum nft_ct_keys { | ||
| 583 | NFT_CT_STATE, | ||
| 584 | NFT_CT_DIRECTION, | ||
| 585 | NFT_CT_STATUS, | ||
| 586 | NFT_CT_MARK, | ||
| 587 | NFT_CT_SECMARK, | ||
| 588 | NFT_CT_EXPIRATION, | ||
| 589 | NFT_CT_HELPER, | ||
| 590 | NFT_CT_L3PROTOCOL, | ||
| 591 | NFT_CT_SRC, | ||
| 592 | NFT_CT_DST, | ||
| 593 | NFT_CT_PROTOCOL, | ||
| 594 | NFT_CT_PROTO_SRC, | ||
| 595 | NFT_CT_PROTO_DST, | ||
| 596 | }; | ||
| 597 | |||
| 598 | /** | ||
| 599 | * enum nft_ct_attributes - nf_tables ct expression netlink attributes | ||
| 600 | * | ||
| 601 | * @NFTA_CT_DREG: destination register (NLA_U32) | ||
| 602 | * @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) | ||
| 604 | */ | ||
| 605 | enum nft_ct_attributes { | ||
| 606 | NFTA_CT_UNSPEC, | ||
| 607 | NFTA_CT_DREG, | ||
| 608 | NFTA_CT_KEY, | ||
| 609 | NFTA_CT_DIRECTION, | ||
| 610 | __NFTA_CT_MAX | ||
| 611 | }; | ||
| 612 | #define NFTA_CT_MAX (__NFTA_CT_MAX - 1) | ||
| 613 | |||
| 614 | /** | ||
| 615 | * enum nft_limit_attributes - nf_tables limit expression netlink attributes | ||
| 616 | * | ||
| 617 | * @NFTA_LIMIT_RATE: refill rate (NLA_U64) | ||
| 618 | * @NFTA_LIMIT_UNIT: refill unit (NLA_U64) | ||
| 619 | */ | ||
| 620 | enum nft_limit_attributes { | ||
| 621 | NFTA_LIMIT_UNSPEC, | ||
| 622 | NFTA_LIMIT_RATE, | ||
| 623 | NFTA_LIMIT_UNIT, | ||
| 624 | __NFTA_LIMIT_MAX | ||
| 625 | }; | ||
| 626 | #define NFTA_LIMIT_MAX (__NFTA_LIMIT_MAX - 1) | ||
| 627 | |||
| 628 | /** | ||
| 629 | * enum nft_counter_attributes - nf_tables counter expression netlink attributes | ||
| 630 | * | ||
| 631 | * @NFTA_COUNTER_BYTES: number of bytes (NLA_U64) | ||
| 632 | * @NFTA_COUNTER_PACKETS: number of packets (NLA_U64) | ||
| 633 | */ | ||
| 634 | enum nft_counter_attributes { | ||
| 635 | NFTA_COUNTER_UNSPEC, | ||
| 636 | NFTA_COUNTER_BYTES, | ||
| 637 | NFTA_COUNTER_PACKETS, | ||
| 638 | __NFTA_COUNTER_MAX | ||
| 639 | }; | ||
| 640 | #define NFTA_COUNTER_MAX (__NFTA_COUNTER_MAX - 1) | ||
| 641 | |||
| 642 | /** | ||
| 643 | * enum nft_log_attributes - nf_tables log expression netlink attributes | ||
| 644 | * | ||
| 645 | * @NFTA_LOG_GROUP: netlink group to send messages to (NLA_U32) | ||
| 646 | * @NFTA_LOG_PREFIX: prefix to prepend to log messages (NLA_STRING) | ||
| 647 | * @NFTA_LOG_SNAPLEN: length of payload to include in netlink message (NLA_U32) | ||
| 648 | * @NFTA_LOG_QTHRESHOLD: queue threshold (NLA_U32) | ||
| 649 | */ | ||
| 650 | enum nft_log_attributes { | ||
| 651 | NFTA_LOG_UNSPEC, | ||
| 652 | NFTA_LOG_GROUP, | ||
| 653 | NFTA_LOG_PREFIX, | ||
| 654 | NFTA_LOG_SNAPLEN, | ||
| 655 | NFTA_LOG_QTHRESHOLD, | ||
| 656 | __NFTA_LOG_MAX | ||
| 657 | }; | ||
| 658 | #define NFTA_LOG_MAX (__NFTA_LOG_MAX - 1) | ||
| 659 | |||
| 660 | /** | ||
| 661 | * enum nft_reject_types - nf_tables reject expression reject types | ||
| 662 | * | ||
| 663 | * @NFT_REJECT_ICMP_UNREACH: reject using ICMP unreachable | ||
| 664 | * @NFT_REJECT_TCP_RST: reject using TCP RST | ||
| 665 | */ | ||
| 666 | enum nft_reject_types { | ||
| 667 | NFT_REJECT_ICMP_UNREACH, | ||
| 668 | NFT_REJECT_TCP_RST, | ||
| 669 | }; | ||
| 670 | |||
| 671 | /** | ||
| 672 | * enum nft_reject_attributes - nf_tables reject expression netlink attributes | ||
| 673 | * | ||
| 674 | * @NFTA_REJECT_TYPE: packet type to use (NLA_U32: nft_reject_types) | ||
| 675 | * @NFTA_REJECT_ICMP_CODE: ICMP code to use (NLA_U8) | ||
| 676 | */ | ||
| 677 | enum nft_reject_attributes { | ||
| 678 | NFTA_REJECT_UNSPEC, | ||
| 679 | NFTA_REJECT_TYPE, | ||
| 680 | NFTA_REJECT_ICMP_CODE, | ||
| 681 | __NFTA_REJECT_MAX | ||
| 682 | }; | ||
| 683 | #define NFTA_REJECT_MAX (__NFTA_REJECT_MAX - 1) | ||
| 684 | |||
| 685 | /** | ||
| 686 | * enum nft_nat_types - nf_tables nat expression NAT types | ||
| 687 | * | ||
| 688 | * @NFT_NAT_SNAT: source NAT | ||
| 689 | * @NFT_NAT_DNAT: destination NAT | ||
| 690 | */ | ||
| 691 | enum nft_nat_types { | ||
| 692 | NFT_NAT_SNAT, | ||
| 693 | NFT_NAT_DNAT, | ||
| 694 | }; | ||
| 695 | |||
| 696 | /** | ||
| 697 | * enum nft_nat_attributes - nf_tables nat expression netlink attributes | ||
| 698 | * | ||
| 699 | * @NFTA_NAT_TYPE: NAT type (NLA_U32: nft_nat_types) | ||
| 700 | * @NFTA_NAT_FAMILY: NAT family (NLA_U32) | ||
| 701 | * @NFTA_NAT_REG_ADDR_MIN: source register of address range start (NLA_U32: nft_registers) | ||
| 702 | * @NFTA_NAT_REG_ADDR_MAX: source register of address range end (NLA_U32: nft_registers) | ||
| 703 | * @NFTA_NAT_REG_PROTO_MIN: source register of proto range start (NLA_U32: nft_registers) | ||
| 704 | * @NFTA_NAT_REG_PROTO_MAX: source register of proto range end (NLA_U32: nft_registers) | ||
| 705 | */ | ||
| 706 | enum nft_nat_attributes { | ||
| 707 | NFTA_NAT_UNSPEC, | ||
| 708 | NFTA_NAT_TYPE, | ||
| 709 | NFTA_NAT_FAMILY, | ||
| 710 | NFTA_NAT_REG_ADDR_MIN, | ||
| 711 | NFTA_NAT_REG_ADDR_MAX, | ||
| 712 | NFTA_NAT_REG_PROTO_MIN, | ||
| 713 | NFTA_NAT_REG_PROTO_MAX, | ||
| 714 | __NFTA_NAT_MAX | ||
| 715 | }; | ||
| 716 | #define NFTA_NAT_MAX (__NFTA_NAT_MAX - 1) | ||
| 717 | |||
| 718 | #endif /* _LINUX_NF_TABLES_H */ | ||
diff --git a/include/uapi/linux/netfilter/nf_tables_compat.h b/include/uapi/linux/netfilter/nf_tables_compat.h new file mode 100644 index 000000000000..8310f5f76551 --- /dev/null +++ b/include/uapi/linux/netfilter/nf_tables_compat.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #ifndef _NFT_COMPAT_NFNETLINK_H_ | ||
| 2 | #define _NFT_COMPAT_NFNETLINK_H_ | ||
| 3 | |||
| 4 | enum nft_target_attributes { | ||
| 5 | NFTA_TARGET_UNSPEC, | ||
| 6 | NFTA_TARGET_NAME, | ||
| 7 | NFTA_TARGET_REV, | ||
| 8 | NFTA_TARGET_INFO, | ||
| 9 | __NFTA_TARGET_MAX | ||
| 10 | }; | ||
| 11 | #define NFTA_TARGET_MAX (__NFTA_TARGET_MAX - 1) | ||
| 12 | |||
| 13 | enum nft_match_attributes { | ||
| 14 | NFTA_MATCH_UNSPEC, | ||
| 15 | NFTA_MATCH_NAME, | ||
| 16 | NFTA_MATCH_REV, | ||
| 17 | NFTA_MATCH_INFO, | ||
| 18 | __NFTA_MATCH_MAX | ||
| 19 | }; | ||
| 20 | #define NFTA_MATCH_MAX (__NFTA_MATCH_MAX - 1) | ||
| 21 | |||
| 22 | #define NFT_COMPAT_NAME_MAX 32 | ||
| 23 | |||
| 24 | enum { | ||
| 25 | NFNL_MSG_COMPAT_GET, | ||
| 26 | NFNL_MSG_COMPAT_MAX | ||
| 27 | }; | ||
| 28 | |||
| 29 | enum { | ||
| 30 | NFTA_COMPAT_UNSPEC = 0, | ||
| 31 | NFTA_COMPAT_NAME, | ||
| 32 | NFTA_COMPAT_REV, | ||
| 33 | NFTA_COMPAT_TYPE, | ||
| 34 | __NFTA_COMPAT_MAX, | ||
| 35 | }; | ||
| 36 | #define NFTA_COMPAT_MAX (__NFTA_COMPAT_MAX - 1) | ||
| 37 | |||
| 38 | #endif | ||
diff --git a/include/uapi/linux/netfilter/nfnetlink.h b/include/uapi/linux/netfilter/nfnetlink.h index 4a4efafad5f4..596ddd45253c 100644 --- a/include/uapi/linux/netfilter/nfnetlink.h +++ b/include/uapi/linux/netfilter/nfnetlink.h | |||
| @@ -18,6 +18,8 @@ enum nfnetlink_groups { | |||
| 18 | #define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE | 18 | #define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE |
| 19 | NFNLGRP_CONNTRACK_EXP_DESTROY, | 19 | NFNLGRP_CONNTRACK_EXP_DESTROY, |
| 20 | #define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY | 20 | #define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY |
| 21 | NFNLGRP_NFTABLES, | ||
| 22 | #define NFNLGRP_NFTABLES NFNLGRP_NFTABLES | ||
| 21 | __NFNLGRP_MAX, | 23 | __NFNLGRP_MAX, |
| 22 | }; | 24 | }; |
| 23 | #define NFNLGRP_MAX (__NFNLGRP_MAX - 1) | 25 | #define NFNLGRP_MAX (__NFNLGRP_MAX - 1) |
| @@ -51,6 +53,12 @@ struct nfgenmsg { | |||
| 51 | #define NFNL_SUBSYS_ACCT 7 | 53 | #define NFNL_SUBSYS_ACCT 7 |
| 52 | #define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8 | 54 | #define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8 |
| 53 | #define NFNL_SUBSYS_CTHELPER 9 | 55 | #define NFNL_SUBSYS_CTHELPER 9 |
| 54 | #define NFNL_SUBSYS_COUNT 10 | 56 | #define NFNL_SUBSYS_NFTABLES 10 |
| 57 | #define NFNL_SUBSYS_NFT_COMPAT 11 | ||
| 58 | #define NFNL_SUBSYS_COUNT 12 | ||
| 59 | |||
| 60 | /* Reserved control nfnetlink messages */ | ||
| 61 | #define NFNL_MSG_BATCH_BEGIN NLMSG_MIN_TYPE | ||
| 62 | #define NFNL_MSG_BATCH_END NLMSG_MIN_TYPE+1 | ||
| 55 | 63 | ||
| 56 | #endif /* _UAPI_NFNETLINK_H */ | 64 | #endif /* _UAPI_NFNETLINK_H */ |
diff --git a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h index a2810a7c5e30..1ab0b97b3a1e 100644 --- a/include/uapi/linux/netfilter/nfnetlink_cttimeout.h +++ b/include/uapi/linux/netfilter/nfnetlink_cttimeout.h | |||
| @@ -6,6 +6,8 @@ enum ctnl_timeout_msg_types { | |||
| 6 | IPCTNL_MSG_TIMEOUT_NEW, | 6 | IPCTNL_MSG_TIMEOUT_NEW, |
| 7 | IPCTNL_MSG_TIMEOUT_GET, | 7 | IPCTNL_MSG_TIMEOUT_GET, |
| 8 | IPCTNL_MSG_TIMEOUT_DELETE, | 8 | IPCTNL_MSG_TIMEOUT_DELETE, |
| 9 | IPCTNL_MSG_TIMEOUT_DEFAULT_SET, | ||
| 10 | IPCTNL_MSG_TIMEOUT_DEFAULT_GET, | ||
| 9 | 11 | ||
| 10 | IPCTNL_MSG_TIMEOUT_MAX | 12 | IPCTNL_MSG_TIMEOUT_MAX |
| 11 | }; | 13 | }; |
diff --git a/include/uapi/linux/netlink_diag.h b/include/uapi/linux/netlink_diag.h index 4e31db4eea41..f2159d30d1f5 100644 --- a/include/uapi/linux/netlink_diag.h +++ b/include/uapi/linux/netlink_diag.h | |||
| @@ -33,6 +33,7 @@ struct netlink_diag_ring { | |||
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | enum { | 35 | enum { |
| 36 | /* NETLINK_DIAG_NONE, standard nl API requires this attribute! */ | ||
| 36 | NETLINK_DIAG_MEMINFO, | 37 | NETLINK_DIAG_MEMINFO, |
| 37 | NETLINK_DIAG_GROUPS, | 38 | NETLINK_DIAG_GROUPS, |
| 38 | NETLINK_DIAG_RX_RING, | 39 | NETLINK_DIAG_RX_RING, |
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h index 29bed72a4ac4..6ad6cc03ccd3 100644 --- a/include/uapi/linux/nfc.h +++ b/include/uapi/linux/nfc.h | |||
| @@ -85,6 +85,7 @@ | |||
| 85 | * a specific SE notifies us about the end of a transaction. The parameter | 85 | * a specific SE notifies us about the end of a transaction. The parameter |
| 86 | * for this event is the application ID (AID). | 86 | * for this event is the application ID (AID). |
| 87 | * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller. | 87 | * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller. |
| 88 | * @NFC_CMD_SE_IO: Send/Receive APDUs to/from the selected secure element. | ||
| 88 | */ | 89 | */ |
| 89 | enum nfc_commands { | 90 | enum nfc_commands { |
| 90 | NFC_CMD_UNSPEC, | 91 | NFC_CMD_UNSPEC, |
| @@ -114,6 +115,7 @@ enum nfc_commands { | |||
| 114 | NFC_EVENT_SE_CONNECTIVITY, | 115 | NFC_EVENT_SE_CONNECTIVITY, |
| 115 | NFC_EVENT_SE_TRANSACTION, | 116 | NFC_EVENT_SE_TRANSACTION, |
| 116 | NFC_CMD_GET_SE, | 117 | NFC_CMD_GET_SE, |
| 118 | NFC_CMD_SE_IO, | ||
| 117 | /* private: internal use only */ | 119 | /* private: internal use only */ |
| 118 | __NFC_CMD_AFTER_LAST | 120 | __NFC_CMD_AFTER_LAST |
| 119 | }; | 121 | }; |
| @@ -147,6 +149,7 @@ enum nfc_commands { | |||
| 147 | * @NFC_ATTR_SE_INDEX: Secure element index | 149 | * @NFC_ATTR_SE_INDEX: Secure element index |
| 148 | * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED) | 150 | * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED) |
| 149 | * @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status | 151 | * @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status |
| 152 | * @NFC_ATTR_APDU: Secure element APDU | ||
| 150 | */ | 153 | */ |
| 151 | enum nfc_attrs { | 154 | enum nfc_attrs { |
| 152 | NFC_ATTR_UNSPEC, | 155 | NFC_ATTR_UNSPEC, |
| @@ -174,6 +177,7 @@ enum nfc_attrs { | |||
| 174 | NFC_ATTR_SE_TYPE, | 177 | NFC_ATTR_SE_TYPE, |
| 175 | NFC_ATTR_SE_AID, | 178 | NFC_ATTR_SE_AID, |
| 176 | NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS, | 179 | NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS, |
| 180 | NFC_ATTR_SE_APDU, | ||
| 177 | /* private: internal use only */ | 181 | /* private: internal use only */ |
| 178 | __NFC_ATTR_AFTER_LAST | 182 | __NFC_ATTR_AFTER_LAST |
| 179 | }; | 183 | }; |
diff --git a/include/uapi/linux/nfs_mount.h b/include/uapi/linux/nfs_mount.h index 576bddd72e04..64b0f22f5c4c 100644 --- a/include/uapi/linux/nfs_mount.h +++ b/include/uapi/linux/nfs_mount.h | |||
| @@ -60,7 +60,7 @@ struct nfs_mount_data { | |||
| 60 | #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ | 60 | #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ |
| 61 | #define NFS_MOUNT_NOACL 0x0800 /* 4 */ | 61 | #define NFS_MOUNT_NOACL 0x0800 /* 4 */ |
| 62 | #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ | 62 | #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ |
| 63 | #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ | 63 | #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 non-text parsed mount data only */ |
| 64 | #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ | 64 | #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ |
| 65 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ | 65 | #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ |
| 66 | #define NFS_MOUNT_FLAGMASK 0xFFFF | 66 | #define NFS_MOUNT_FLAGMASK 0xFFFF |
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index fde2c021b26d..f752e9821e71 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h | |||
| @@ -988,7 +988,7 @@ enum nl80211_commands { | |||
| 988 | * to query the CRDA to retrieve one regulatory domain. This attribute can | 988 | * to query the CRDA to retrieve one regulatory domain. This attribute can |
| 989 | * also be used by userspace to query the kernel for the currently set | 989 | * also be used by userspace to query the kernel for the currently set |
| 990 | * regulatory domain. We chose an alpha2 as that is also used by the | 990 | * regulatory domain. We chose an alpha2 as that is also used by the |
| 991 | * IEEE-802.11d country information element to identify a country. | 991 | * IEEE-802.11 country information element to identify a country. |
| 992 | * Users can also simply ask the wireless core to set regulatory domain | 992 | * Users can also simply ask the wireless core to set regulatory domain |
| 993 | * to a specific alpha2. | 993 | * to a specific alpha2. |
| 994 | * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory | 994 | * @NL80211_ATTR_REG_RULES: a nested array of regulatory domain regulatory |
| @@ -1496,6 +1496,18 @@ enum nl80211_commands { | |||
| 1496 | * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32. | 1496 | * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32. |
| 1497 | * As specified in the &enum nl80211_rxmgmt_flags. | 1497 | * As specified in the &enum nl80211_rxmgmt_flags. |
| 1498 | * | 1498 | * |
| 1499 | * @NL80211_ATTR_STA_SUPPORTED_CHANNELS: array of supported channels. | ||
| 1500 | * | ||
| 1501 | * @NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES: array of supported | ||
| 1502 | * supported operating classes. | ||
| 1503 | * | ||
| 1504 | * @NL80211_ATTR_HANDLE_DFS: A flag indicating whether user space | ||
| 1505 | * controls DFS operation in IBSS mode. If the flag is included in | ||
| 1506 | * %NL80211_CMD_JOIN_IBSS request, the driver will allow use of DFS | ||
| 1507 | * channels and reports radar events to userspace. Userspace is required | ||
| 1508 | * to react to radar events, e.g. initiate a channel switch or leave the | ||
| 1509 | * IBSS network. | ||
| 1510 | * | ||
| 1499 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1511 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1500 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1512 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1501 | */ | 1513 | */ |
| @@ -1806,6 +1818,12 @@ enum nl80211_attrs { | |||
| 1806 | 1818 | ||
| 1807 | NL80211_ATTR_RXMGMT_FLAGS, | 1819 | NL80211_ATTR_RXMGMT_FLAGS, |
| 1808 | 1820 | ||
| 1821 | NL80211_ATTR_STA_SUPPORTED_CHANNELS, | ||
| 1822 | |||
| 1823 | NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES, | ||
| 1824 | |||
| 1825 | NL80211_ATTR_HANDLE_DFS, | ||
| 1826 | |||
| 1809 | /* add attributes here, update the policy in nl80211.c */ | 1827 | /* add attributes here, update the policy in nl80211.c */ |
| 1810 | 1828 | ||
| 1811 | __NL80211_ATTR_AFTER_LAST, | 1829 | __NL80211_ATTR_AFTER_LAST, |
| @@ -3860,13 +3878,12 @@ enum nl80211_radar_event { | |||
| 3860 | * | 3878 | * |
| 3861 | * Channel states used by the DFS code. | 3879 | * Channel states used by the DFS code. |
| 3862 | * | 3880 | * |
| 3863 | * @IEEE80211_DFS_USABLE: The channel can be used, but channel availability | 3881 | * @NL80211_DFS_USABLE: The channel can be used, but channel availability |
| 3864 | * check (CAC) must be performed before using it for AP or IBSS. | 3882 | * check (CAC) must be performed before using it for AP or IBSS. |
| 3865 | * @IEEE80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it | 3883 | * @NL80211_DFS_UNAVAILABLE: A radar has been detected on this channel, it |
| 3866 | * is therefore marked as not available. | 3884 | * is therefore marked as not available. |
| 3867 | * @IEEE80211_DFS_AVAILABLE: The channel has been CAC checked and is available. | 3885 | * @NL80211_DFS_AVAILABLE: The channel has been CAC checked and is available. |
| 3868 | */ | 3886 | */ |
| 3869 | |||
| 3870 | enum nl80211_dfs_state { | 3887 | enum nl80211_dfs_state { |
| 3871 | NL80211_DFS_USABLE, | 3888 | NL80211_DFS_USABLE, |
| 3872 | NL80211_DFS_UNAVAILABLE, | 3889 | NL80211_DFS_UNAVAILABLE, |
diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index a74d375b439b..d120f9fe0017 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h | |||
| @@ -63,15 +63,18 @@ enum ovs_datapath_cmd { | |||
| 63 | * not be sent. | 63 | * not be sent. |
| 64 | * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the | 64 | * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the |
| 65 | * datapath. Always present in notifications. | 65 | * datapath. Always present in notifications. |
| 66 | * @OVS_DP_ATTR_MEGAFLOW_STATS: Statistics about mega flow masks usage for the | ||
| 67 | * datapath. Always present in notifications. | ||
| 66 | * | 68 | * |
| 67 | * These attributes follow the &struct ovs_header within the Generic Netlink | 69 | * These attributes follow the &struct ovs_header within the Generic Netlink |
| 68 | * payload for %OVS_DP_* commands. | 70 | * payload for %OVS_DP_* commands. |
| 69 | */ | 71 | */ |
| 70 | enum ovs_datapath_attr { | 72 | enum ovs_datapath_attr { |
| 71 | OVS_DP_ATTR_UNSPEC, | 73 | OVS_DP_ATTR_UNSPEC, |
| 72 | OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */ | 74 | OVS_DP_ATTR_NAME, /* name of dp_ifindex netdev */ |
| 73 | OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ | 75 | OVS_DP_ATTR_UPCALL_PID, /* Netlink PID to receive upcalls */ |
| 74 | OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ | 76 | OVS_DP_ATTR_STATS, /* struct ovs_dp_stats */ |
| 77 | OVS_DP_ATTR_MEGAFLOW_STATS, /* struct ovs_dp_megaflow_stats */ | ||
| 75 | __OVS_DP_ATTR_MAX | 78 | __OVS_DP_ATTR_MAX |
| 76 | }; | 79 | }; |
| 77 | 80 | ||
| @@ -84,6 +87,14 @@ struct ovs_dp_stats { | |||
| 84 | __u64 n_flows; /* Number of flows present */ | 87 | __u64 n_flows; /* Number of flows present */ |
| 85 | }; | 88 | }; |
| 86 | 89 | ||
| 90 | struct ovs_dp_megaflow_stats { | ||
| 91 | __u64 n_mask_hit; /* Number of masks used for flow lookups. */ | ||
| 92 | __u32 n_masks; /* Number of masks for the datapath. */ | ||
| 93 | __u32 pad0; /* Pad for future expension. */ | ||
| 94 | __u64 pad1; /* Pad for future expension. */ | ||
| 95 | __u64 pad2; /* Pad for future expension. */ | ||
| 96 | }; | ||
| 97 | |||
| 87 | struct ovs_vport_stats { | 98 | struct ovs_vport_stats { |
| 88 | __u64 rx_packets; /* total packets received */ | 99 | __u64 rx_packets; /* total packets received */ |
| 89 | __u64 tx_packets; /* total packets transmitted */ | 100 | __u64 tx_packets; /* total packets transmitted */ |
| @@ -260,6 +271,7 @@ enum ovs_key_attr { | |||
| 260 | OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ | 271 | OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ |
| 261 | OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ | 272 | OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ |
| 262 | OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ | 273 | OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ |
| 274 | OVS_KEY_ATTR_TCP_FLAGS, /* be16 TCP flags. */ | ||
| 263 | 275 | ||
| 264 | #ifdef __KERNEL__ | 276 | #ifdef __KERNEL__ |
| 265 | OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ | 277 | OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ |
diff --git a/include/uapi/linux/packet_diag.h b/include/uapi/linux/packet_diag.h index b2cc0cd9c4d9..d08c63f3dd6f 100644 --- a/include/uapi/linux/packet_diag.h +++ b/include/uapi/linux/packet_diag.h | |||
| @@ -29,6 +29,7 @@ struct packet_diag_msg { | |||
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | enum { | 31 | enum { |
| 32 | /* PACKET_DIAG_NONE, standard nl API requires this attribute! */ | ||
| 32 | PACKET_DIAG_INFO, | 33 | PACKET_DIAG_INFO, |
| 33 | PACKET_DIAG_MCLIST, | 34 | PACKET_DIAG_MCLIST, |
| 34 | PACKET_DIAG_RX_RING, | 35 | PACKET_DIAG_RX_RING, |
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index baa7852468ef..4a98e85438a7 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
| @@ -13,10 +13,10 @@ | |||
| 13 | * PCI to PCI Bridge Specification | 13 | * PCI to PCI Bridge Specification |
| 14 | * PCI System Design Guide | 14 | * PCI System Design Guide |
| 15 | * | 15 | * |
| 16 | * For hypertransport information, please consult the following manuals | 16 | * For HyperTransport information, please consult the following manuals |
| 17 | * from http://www.hypertransport.org | 17 | * from http://www.hypertransport.org |
| 18 | * | 18 | * |
| 19 | * The Hypertransport I/O Link Specification | 19 | * The HyperTransport I/O Link Specification |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #ifndef LINUX_PCI_REGS_H | 22 | #ifndef LINUX_PCI_REGS_H |
| @@ -37,7 +37,7 @@ | |||
| 37 | #define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ | 37 | #define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ |
| 38 | #define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ | 38 | #define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ |
| 39 | #define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ | 39 | #define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ |
| 40 | #define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ | 40 | #define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ |
| 41 | #define PCI_COMMAND_SERR 0x100 /* Enable SERR */ | 41 | #define PCI_COMMAND_SERR 0x100 /* Enable SERR */ |
| 42 | #define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ | 42 | #define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ |
| 43 | #define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ | 43 | #define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ |
| @@ -45,7 +45,7 @@ | |||
| 45 | #define PCI_STATUS 0x06 /* 16 bits */ | 45 | #define PCI_STATUS 0x06 /* 16 bits */ |
| 46 | #define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */ | 46 | #define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */ |
| 47 | #define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ | 47 | #define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ |
| 48 | #define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ | 48 | #define PCI_STATUS_66MHZ 0x20 /* Support 66 MHz PCI 2.1 bus */ |
| 49 | #define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ | 49 | #define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ |
| 50 | #define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ | 50 | #define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ |
| 51 | #define PCI_STATUS_PARITY 0x100 /* Detected parity error */ | 51 | #define PCI_STATUS_PARITY 0x100 /* Detected parity error */ |
| @@ -205,14 +205,14 @@ | |||
| 205 | #define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ | 205 | #define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ |
| 206 | #define PCI_CAP_ID_PCIX 0x07 /* PCI-X */ | 206 | #define PCI_CAP_ID_PCIX 0x07 /* PCI-X */ |
| 207 | #define PCI_CAP_ID_HT 0x08 /* HyperTransport */ | 207 | #define PCI_CAP_ID_HT 0x08 /* HyperTransport */ |
| 208 | #define PCI_CAP_ID_VNDR 0x09 /* Vendor specific */ | 208 | #define PCI_CAP_ID_VNDR 0x09 /* Vendor-Specific */ |
| 209 | #define PCI_CAP_ID_DBG 0x0A /* Debug port */ | 209 | #define PCI_CAP_ID_DBG 0x0A /* Debug port */ |
| 210 | #define PCI_CAP_ID_CCRC 0x0B /* CompactPCI Central Resource Control */ | 210 | #define PCI_CAP_ID_CCRC 0x0B /* CompactPCI Central Resource Control */ |
| 211 | #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */ | 211 | #define PCI_CAP_ID_SHPC 0x0C /* PCI Standard Hot-Plug Controller */ |
| 212 | #define PCI_CAP_ID_SSVID 0x0D /* Bridge subsystem vendor/device ID */ | 212 | #define PCI_CAP_ID_SSVID 0x0D /* Bridge subsystem vendor/device ID */ |
| 213 | #define PCI_CAP_ID_AGP3 0x0E /* AGP Target PCI-PCI bridge */ | 213 | #define PCI_CAP_ID_AGP3 0x0E /* AGP Target PCI-PCI bridge */ |
| 214 | #define PCI_CAP_ID_SECDEV 0x0F /* Secure Device */ | 214 | #define PCI_CAP_ID_SECDEV 0x0F /* Secure Device */ |
| 215 | #define PCI_CAP_ID_EXP 0x10 /* PCI Express */ | 215 | #define PCI_CAP_ID_EXP 0x10 /* PCI Express */ |
| 216 | #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ | 216 | #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ |
| 217 | #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ | 217 | #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ |
| 218 | #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ | 218 | #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ |
| @@ -268,8 +268,8 @@ | |||
| 268 | #define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */ | 268 | #define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */ |
| 269 | #define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ | 269 | #define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ |
| 270 | #define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ | 270 | #define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ |
| 271 | #define PCI_AGP_COMMAND_64BIT 0x0020 /* Allow processing of 64-bit addresses */ | 271 | #define PCI_AGP_COMMAND_64BIT 0x0020 /* Allow processing of 64-bit addresses */ |
| 272 | #define PCI_AGP_COMMAND_FW 0x0010 /* Force FW transfers */ | 272 | #define PCI_AGP_COMMAND_FW 0x0010 /* Force FW transfers */ |
| 273 | #define PCI_AGP_COMMAND_RATE4 0x0004 /* Use 4x rate */ | 273 | #define PCI_AGP_COMMAND_RATE4 0x0004 /* Use 4x rate */ |
| 274 | #define PCI_AGP_COMMAND_RATE2 0x0002 /* Use 2x rate */ | 274 | #define PCI_AGP_COMMAND_RATE2 0x0002 /* Use 2x rate */ |
| 275 | #define PCI_AGP_COMMAND_RATE1 0x0001 /* Use 1x rate */ | 275 | #define PCI_AGP_COMMAND_RATE1 0x0001 /* Use 1x rate */ |
| @@ -319,10 +319,9 @@ | |||
| 319 | #define PCI_MSIX_PBA 8 /* Pending Bit Array offset */ | 319 | #define PCI_MSIX_PBA 8 /* Pending Bit Array offset */ |
| 320 | #define PCI_MSIX_PBA_BIR 0x00000007 /* BAR index */ | 320 | #define PCI_MSIX_PBA_BIR 0x00000007 /* BAR index */ |
| 321 | #define PCI_MSIX_PBA_OFFSET 0xfffffff8 /* Offset into specified BAR */ | 321 | #define PCI_MSIX_PBA_OFFSET 0xfffffff8 /* Offset into specified BAR */ |
| 322 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) /* deprecated */ | ||
| 323 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ | 322 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ |
| 324 | 323 | ||
| 325 | /* MSI-X entry's format */ | 324 | /* MSI-X Table entry format */ |
| 326 | #define PCI_MSIX_ENTRY_SIZE 16 | 325 | #define PCI_MSIX_ENTRY_SIZE 16 |
| 327 | #define PCI_MSIX_ENTRY_LOWER_ADDR 0 | 326 | #define PCI_MSIX_ENTRY_LOWER_ADDR 0 |
| 328 | #define PCI_MSIX_ENTRY_UPPER_ADDR 4 | 327 | #define PCI_MSIX_ENTRY_UPPER_ADDR 4 |
| @@ -373,7 +372,7 @@ | |||
| 373 | #define PCI_X_CMD_SPLIT_16 0x0060 /* Max 16 */ | 372 | #define PCI_X_CMD_SPLIT_16 0x0060 /* Max 16 */ |
| 374 | #define PCI_X_CMD_SPLIT_32 0x0070 /* Max 32 */ | 373 | #define PCI_X_CMD_SPLIT_32 0x0070 /* Max 32 */ |
| 375 | #define PCI_X_CMD_MAX_SPLIT 0x0070 /* Max Outstanding Split Transactions */ | 374 | #define PCI_X_CMD_MAX_SPLIT 0x0070 /* Max Outstanding Split Transactions */ |
| 376 | #define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3) /* Version */ | 375 | #define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3) /* Version */ |
| 377 | #define PCI_X_STATUS 4 /* PCI-X capabilities */ | 376 | #define PCI_X_STATUS 4 /* PCI-X capabilities */ |
| 378 | #define PCI_X_STATUS_DEVFN 0x000000ff /* A copy of devfn */ | 377 | #define PCI_X_STATUS_DEVFN 0x000000ff /* A copy of devfn */ |
| 379 | #define PCI_X_STATUS_BUS 0x0000ff00 /* A copy of bus nr */ | 378 | #define PCI_X_STATUS_BUS 0x0000ff00 /* A copy of bus nr */ |
| @@ -408,8 +407,8 @@ | |||
| 408 | 407 | ||
| 409 | /* PCI Bridge Subsystem ID registers */ | 408 | /* PCI Bridge Subsystem ID registers */ |
| 410 | 409 | ||
| 411 | #define PCI_SSVID_VENDOR_ID 4 /* PCI-Bridge subsystem vendor id register */ | 410 | #define PCI_SSVID_VENDOR_ID 4 /* PCI Bridge subsystem vendor ID */ |
| 412 | #define PCI_SSVID_DEVICE_ID 6 /* PCI-Bridge subsystem device id register */ | 411 | #define PCI_SSVID_DEVICE_ID 6 /* PCI Bridge subsystem device ID */ |
| 413 | 412 | ||
| 414 | /* PCI Express capability registers */ | 413 | /* PCI Express capability registers */ |
| 415 | 414 | ||
| @@ -485,12 +484,12 @@ | |||
| 485 | #define PCI_EXP_LNKCTL_CLKREQ_EN 0x0100 /* Enable clkreq */ | 484 | #define PCI_EXP_LNKCTL_CLKREQ_EN 0x0100 /* Enable clkreq */ |
| 486 | #define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */ | 485 | #define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */ |
| 487 | #define PCI_EXP_LNKCTL_LBMIE 0x0400 /* Link Bandwidth Management Interrupt Enable */ | 486 | #define PCI_EXP_LNKCTL_LBMIE 0x0400 /* Link Bandwidth Management Interrupt Enable */ |
| 488 | #define PCI_EXP_LNKCTL_LABIE 0x0800 /* Lnk Autonomous Bandwidth Interrupt Enable */ | 487 | #define PCI_EXP_LNKCTL_LABIE 0x0800 /* Link Autonomous Bandwidth Interrupt Enable */ |
| 489 | #define PCI_EXP_LNKSTA 18 /* Link Status */ | 488 | #define PCI_EXP_LNKSTA 18 /* Link Status */ |
| 490 | #define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ | 489 | #define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ |
| 491 | #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 */ |
| 492 | #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 */ |
| 493 | #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Nogotiated Link Width */ | 492 | #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */ |
| 494 | #define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */ | 493 | #define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */ |
| 495 | #define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ | 494 | #define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ |
| 496 | #define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ | 495 | #define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ |
| @@ -558,7 +557,8 @@ | |||
| 558 | #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */ | 557 | #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */ |
| 559 | #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */ | 558 | #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */ |
| 560 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ | 559 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ |
| 561 | #define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ | 560 | #define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */ |
| 561 | #define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */ | ||
| 562 | #define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ | 562 | #define PCI_EXP_DEVCTL2_IDO_REQ_EN 0x0100 /* Allow IDO for requests */ |
| 563 | #define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ | 563 | #define PCI_EXP_DEVCTL2_IDO_CMP_EN 0x0200 /* Allow IDO for completions */ |
| 564 | #define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */ | 564 | #define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */ |
| @@ -593,7 +593,7 @@ | |||
| 593 | #define PCI_EXT_CAP_ID_MFVC 0x08 /* Multi-Function VC Capability */ | 593 | #define PCI_EXT_CAP_ID_MFVC 0x08 /* Multi-Function VC Capability */ |
| 594 | #define PCI_EXT_CAP_ID_VC9 0x09 /* same as _VC */ | 594 | #define PCI_EXT_CAP_ID_VC9 0x09 /* same as _VC */ |
| 595 | #define PCI_EXT_CAP_ID_RCRB 0x0A /* Root Complex RB? */ | 595 | #define PCI_EXT_CAP_ID_RCRB 0x0A /* Root Complex RB? */ |
| 596 | #define PCI_EXT_CAP_ID_VNDR 0x0B /* Vendor Specific */ | 596 | #define PCI_EXT_CAP_ID_VNDR 0x0B /* Vendor-Specific */ |
| 597 | #define PCI_EXT_CAP_ID_CAC 0x0C /* Config Access - obsolete */ | 597 | #define PCI_EXT_CAP_ID_CAC 0x0C /* Config Access - obsolete */ |
| 598 | #define PCI_EXT_CAP_ID_ACS 0x0D /* Access Control Services */ | 598 | #define PCI_EXT_CAP_ID_ACS 0x0D /* Access Control Services */ |
| 599 | #define PCI_EXT_CAP_ID_ARI 0x0E /* Alternate Routing ID */ | 599 | #define PCI_EXT_CAP_ID_ARI 0x0E /* Alternate Routing ID */ |
| @@ -602,12 +602,12 @@ | |||
| 602 | #define PCI_EXT_CAP_ID_MRIOV 0x11 /* Multi Root I/O Virtualization */ | 602 | #define PCI_EXT_CAP_ID_MRIOV 0x11 /* Multi Root I/O Virtualization */ |
| 603 | #define PCI_EXT_CAP_ID_MCAST 0x12 /* Multicast */ | 603 | #define PCI_EXT_CAP_ID_MCAST 0x12 /* Multicast */ |
| 604 | #define PCI_EXT_CAP_ID_PRI 0x13 /* Page Request Interface */ | 604 | #define PCI_EXT_CAP_ID_PRI 0x13 /* Page Request Interface */ |
| 605 | #define PCI_EXT_CAP_ID_AMD_XXX 0x14 /* reserved for AMD */ | 605 | #define PCI_EXT_CAP_ID_AMD_XXX 0x14 /* Reserved for AMD */ |
| 606 | #define PCI_EXT_CAP_ID_REBAR 0x15 /* resizable BAR */ | 606 | #define PCI_EXT_CAP_ID_REBAR 0x15 /* Resizable BAR */ |
| 607 | #define PCI_EXT_CAP_ID_DPA 0x16 /* dynamic power alloc */ | 607 | #define PCI_EXT_CAP_ID_DPA 0x16 /* Dynamic Power Allocation */ |
| 608 | #define PCI_EXT_CAP_ID_TPH 0x17 /* TPH request */ | 608 | #define PCI_EXT_CAP_ID_TPH 0x17 /* TPH Requester */ |
| 609 | #define PCI_EXT_CAP_ID_LTR 0x18 /* latency tolerance reporting */ | 609 | #define PCI_EXT_CAP_ID_LTR 0x18 /* Latency Tolerance Reporting */ |
| 610 | #define PCI_EXT_CAP_ID_SECPCI 0x19 /* Secondary PCIe */ | 610 | #define PCI_EXT_CAP_ID_SECPCI 0x19 /* Secondary PCIe Capability */ |
| 611 | #define PCI_EXT_CAP_ID_PMUX 0x1A /* Protocol Multiplexing */ | 611 | #define PCI_EXT_CAP_ID_PMUX 0x1A /* Protocol Multiplexing */ |
| 612 | #define PCI_EXT_CAP_ID_PASID 0x1B /* Process Address Space ID */ | 612 | #define PCI_EXT_CAP_ID_PASID 0x1B /* Process Address Space ID */ |
| 613 | #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PASID | 613 | #define PCI_EXT_CAP_ID_MAX PCI_EXT_CAP_ID_PASID |
| @@ -667,9 +667,9 @@ | |||
| 667 | #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ | 667 | #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ |
| 668 | /* Multi ERR_COR Received */ | 668 | /* Multi ERR_COR Received */ |
| 669 | #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 | 669 | #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 |
| 670 | /* ERR_FATAL/NONFATAL Recevied */ | 670 | /* ERR_FATAL/NONFATAL Received */ |
| 671 | #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 | 671 | #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 |
| 672 | /* Multi ERR_FATAL/NONFATAL Recevied */ | 672 | /* Multi ERR_FATAL/NONFATAL Received */ |
| 673 | #define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 | 673 | #define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 |
| 674 | #define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First Fatal */ | 674 | #define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First Fatal */ |
| 675 | #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ | 675 | #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ |
| @@ -678,7 +678,7 @@ | |||
| 678 | 678 | ||
| 679 | /* Virtual Channel */ | 679 | /* Virtual Channel */ |
| 680 | #define PCI_VC_PORT_REG1 4 | 680 | #define PCI_VC_PORT_REG1 4 |
| 681 | #define PCI_VC_REG1_EVCC 0x7 /* extended vc count */ | 681 | #define PCI_VC_REG1_EVCC 0x7 /* extended VC count */ |
| 682 | #define PCI_VC_PORT_REG2 8 | 682 | #define PCI_VC_PORT_REG2 8 |
| 683 | #define PCI_VC_REG2_32_PHASE 0x2 | 683 | #define PCI_VC_REG2_32_PHASE 0x2 |
| 684 | #define PCI_VC_REG2_64_PHASE 0x4 | 684 | #define PCI_VC_REG2_64_PHASE 0x4 |
| @@ -711,7 +711,7 @@ | |||
| 711 | #define PCI_VNDR_HEADER_LEN(x) (((x) >> 20) & 0xfff) | 711 | #define PCI_VNDR_HEADER_LEN(x) (((x) >> 20) & 0xfff) |
| 712 | 712 | ||
| 713 | /* | 713 | /* |
| 714 | * Hypertransport sub capability types | 714 | * HyperTransport sub capability types |
| 715 | * | 715 | * |
| 716 | * Unfortunately there are both 3 bit and 5 bit capability types defined | 716 | * Unfortunately there are both 3 bit and 5 bit capability types defined |
| 717 | * in the HT spec, catering for that is a little messy. You probably don't | 717 | * in the HT spec, catering for that is a little messy. You probably don't |
| @@ -739,8 +739,8 @@ | |||
| 739 | #define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */ | 739 | #define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */ |
| 740 | #define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */ | 740 | #define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */ |
| 741 | #define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */ | 741 | #define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */ |
| 742 | #define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */ | 742 | #define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 HyperTransport configuration */ |
| 743 | #define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */ | 743 | #define HT_CAPTYPE_PM 0xE0 /* HyperTransport power management configuration */ |
| 744 | #define HT_CAP_SIZEOF_LONG 28 /* slave & primary */ | 744 | #define HT_CAP_SIZEOF_LONG 28 /* slave & primary */ |
| 745 | #define HT_CAP_SIZEOF_SHORT 24 /* host & secondary */ | 745 | #define HT_CAP_SIZEOF_SHORT 24 /* host & secondary */ |
| 746 | 746 | ||
| @@ -777,14 +777,14 @@ | |||
| 777 | #define PCI_PRI_ALLOC_REQ 0x0c /* PRI max reqs allowed */ | 777 | #define PCI_PRI_ALLOC_REQ 0x0c /* PRI max reqs allowed */ |
| 778 | #define PCI_EXT_CAP_PRI_SIZEOF 16 | 778 | #define PCI_EXT_CAP_PRI_SIZEOF 16 |
| 779 | 779 | ||
| 780 | /* PASID capability */ | 780 | /* Process Address Space ID */ |
| 781 | #define PCI_PASID_CAP 0x04 /* PASID feature register */ | 781 | #define PCI_PASID_CAP 0x04 /* PASID feature register */ |
| 782 | #define PCI_PASID_CAP_EXEC 0x02 /* Exec permissions Supported */ | 782 | #define PCI_PASID_CAP_EXEC 0x02 /* Exec permissions Supported */ |
| 783 | #define PCI_PASID_CAP_PRIV 0x04 /* Priviledge Mode Supported */ | 783 | #define PCI_PASID_CAP_PRIV 0x04 /* Privilege Mode Supported */ |
| 784 | #define PCI_PASID_CTRL 0x06 /* PASID control register */ | 784 | #define PCI_PASID_CTRL 0x06 /* PASID control register */ |
| 785 | #define PCI_PASID_CTRL_ENABLE 0x01 /* Enable bit */ | 785 | #define PCI_PASID_CTRL_ENABLE 0x01 /* Enable bit */ |
| 786 | #define PCI_PASID_CTRL_EXEC 0x02 /* Exec permissions Enable */ | 786 | #define PCI_PASID_CTRL_EXEC 0x02 /* Exec permissions Enable */ |
| 787 | #define PCI_PASID_CTRL_PRIV 0x04 /* Priviledge Mode Enable */ | 787 | #define PCI_PASID_CTRL_PRIV 0x04 /* Privilege Mode Enable */ |
| 788 | #define PCI_EXT_CAP_PASID_SIZEOF 8 | 788 | #define PCI_EXT_CAP_PASID_SIZEOF 8 |
| 789 | 789 | ||
| 790 | /* Single Root I/O Virtualization */ | 790 | /* Single Root I/O Virtualization */ |
| @@ -839,22 +839,22 @@ | |||
| 839 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ | 839 | #define PCI_ACS_CTRL 0x06 /* ACS Control Register */ |
| 840 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ | 840 | #define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */ |
| 841 | 841 | ||
| 842 | #define PCI_VSEC_HDR 4 /* extended cap - vendor specific */ | 842 | #define PCI_VSEC_HDR 4 /* extended cap - vendor-specific */ |
| 843 | #define PCI_VSEC_HDR_LEN_SHIFT 20 /* shift for length field */ | 843 | #define PCI_VSEC_HDR_LEN_SHIFT 20 /* shift for length field */ |
| 844 | 844 | ||
| 845 | /* sata capability */ | 845 | /* SATA capability */ |
| 846 | #define PCI_SATA_REGS 4 /* SATA REGs specifier */ | 846 | #define PCI_SATA_REGS 4 /* SATA REGs specifier */ |
| 847 | #define PCI_SATA_REGS_MASK 0xF /* location - BAR#/inline */ | 847 | #define PCI_SATA_REGS_MASK 0xF /* location - BAR#/inline */ |
| 848 | #define PCI_SATA_REGS_INLINE 0xF /* REGS in config space */ | 848 | #define PCI_SATA_REGS_INLINE 0xF /* REGS in config space */ |
| 849 | #define PCI_SATA_SIZEOF_SHORT 8 | 849 | #define PCI_SATA_SIZEOF_SHORT 8 |
| 850 | #define PCI_SATA_SIZEOF_LONG 16 | 850 | #define PCI_SATA_SIZEOF_LONG 16 |
| 851 | 851 | ||
| 852 | /* resizable BARs */ | 852 | /* Resizable BARs */ |
| 853 | #define PCI_REBAR_CTRL 8 /* control register */ | 853 | #define PCI_REBAR_CTRL 8 /* control register */ |
| 854 | #define PCI_REBAR_CTRL_NBAR_MASK (7 << 5) /* mask for # bars */ | 854 | #define PCI_REBAR_CTRL_NBAR_MASK (7 << 5) /* mask for # bars */ |
| 855 | #define PCI_REBAR_CTRL_NBAR_SHIFT 5 /* shift for # bars */ | 855 | #define PCI_REBAR_CTRL_NBAR_SHIFT 5 /* shift for # bars */ |
| 856 | 856 | ||
| 857 | /* dynamic power allocation */ | 857 | /* Dynamic Power Allocation */ |
| 858 | #define PCI_DPA_CAP 4 /* capability register */ | 858 | #define PCI_DPA_CAP 4 /* capability register */ |
| 859 | #define PCI_DPA_CAP_SUBSTATE_MASK 0x1F /* # substates - 1 */ | 859 | #define PCI_DPA_CAP_SUBSTATE_MASK 0x1F /* # substates - 1 */ |
| 860 | #define PCI_DPA_BASE_SIZEOF 16 /* size with 0 substates */ | 860 | #define PCI_DPA_BASE_SIZEOF 16 /* size with 0 substates */ |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 2fc1602e23bb..959d454f76a1 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -136,8 +136,9 @@ enum perf_event_sample_format { | |||
| 136 | PERF_SAMPLE_WEIGHT = 1U << 14, | 136 | PERF_SAMPLE_WEIGHT = 1U << 14, |
| 137 | PERF_SAMPLE_DATA_SRC = 1U << 15, | 137 | PERF_SAMPLE_DATA_SRC = 1U << 15, |
| 138 | PERF_SAMPLE_IDENTIFIER = 1U << 16, | 138 | PERF_SAMPLE_IDENTIFIER = 1U << 16, |
| 139 | PERF_SAMPLE_TRANSACTION = 1U << 17, | ||
| 139 | 140 | ||
| 140 | PERF_SAMPLE_MAX = 1U << 17, /* non-ABI */ | 141 | PERF_SAMPLE_MAX = 1U << 18, /* non-ABI */ |
| 141 | }; | 142 | }; |
| 142 | 143 | ||
| 143 | /* | 144 | /* |
| @@ -181,6 +182,28 @@ enum perf_sample_regs_abi { | |||
| 181 | }; | 182 | }; |
| 182 | 183 | ||
| 183 | /* | 184 | /* |
| 185 | * Values for the memory transaction event qualifier, mostly for | ||
| 186 | * abort events. Multiple bits can be set. | ||
| 187 | */ | ||
| 188 | enum { | ||
| 189 | PERF_TXN_ELISION = (1 << 0), /* From elision */ | ||
| 190 | PERF_TXN_TRANSACTION = (1 << 1), /* From transaction */ | ||
| 191 | PERF_TXN_SYNC = (1 << 2), /* Instruction is related */ | ||
| 192 | PERF_TXN_ASYNC = (1 << 3), /* Instruction not related */ | ||
| 193 | PERF_TXN_RETRY = (1 << 4), /* Retry possible */ | ||
| 194 | PERF_TXN_CONFLICT = (1 << 5), /* Conflict abort */ | ||
| 195 | PERF_TXN_CAPACITY_WRITE = (1 << 6), /* Capacity write abort */ | ||
| 196 | PERF_TXN_CAPACITY_READ = (1 << 7), /* Capacity read abort */ | ||
| 197 | |||
| 198 | PERF_TXN_MAX = (1 << 8), /* non-ABI */ | ||
| 199 | |||
| 200 | /* bits 32..63 are reserved for the abort code */ | ||
| 201 | |||
| 202 | PERF_TXN_ABORT_MASK = (0xffffffffULL << 32), | ||
| 203 | PERF_TXN_ABORT_SHIFT = 32, | ||
| 204 | }; | ||
| 205 | |||
| 206 | /* | ||
| 184 | * The format of the data returned by read() on a perf event fd, | 207 | * The format of the data returned by read() on a perf event fd, |
| 185 | * as specified by attr.read_format: | 208 | * as specified by attr.read_format: |
| 186 | * | 209 | * |
| @@ -656,6 +679,7 @@ enum perf_event_type { | |||
| 656 | * | 679 | * |
| 657 | * { u64 weight; } && PERF_SAMPLE_WEIGHT | 680 | * { u64 weight; } && PERF_SAMPLE_WEIGHT |
| 658 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | 681 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC |
| 682 | * { u64 transaction; } && PERF_SAMPLE_TRANSACTION | ||
| 659 | * }; | 683 | * }; |
| 660 | */ | 684 | */ |
| 661 | PERF_RECORD_SAMPLE = 9, | 685 | PERF_RECORD_SAMPLE = 9, |
diff --git a/include/uapi/linux/pkt_cls.h b/include/uapi/linux/pkt_cls.h index 082eafaf026b..25731dfb3fcc 100644 --- a/include/uapi/linux/pkt_cls.h +++ b/include/uapi/linux/pkt_cls.h | |||
| @@ -388,6 +388,20 @@ enum { | |||
| 388 | 388 | ||
| 389 | #define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1) | 389 | #define TCA_CGROUP_MAX (__TCA_CGROUP_MAX - 1) |
| 390 | 390 | ||
| 391 | /* BPF classifier */ | ||
| 392 | |||
| 393 | enum { | ||
| 394 | TCA_BPF_UNSPEC, | ||
| 395 | TCA_BPF_ACT, | ||
| 396 | TCA_BPF_POLICE, | ||
| 397 | TCA_BPF_CLASSID, | ||
| 398 | TCA_BPF_OPS_LEN, | ||
| 399 | TCA_BPF_OPS, | ||
| 400 | __TCA_BPF_MAX, | ||
| 401 | }; | ||
| 402 | |||
| 403 | #define TCA_BPF_MAX (__TCA_BPF_MAX - 1) | ||
| 404 | |||
| 391 | /* Extended Matches */ | 405 | /* Extended Matches */ |
| 392 | 406 | ||
| 393 | struct tcf_ematch_tree_hdr { | 407 | struct tcf_ematch_tree_hdr { |
diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index 9b829134d422..a806687ad98f 100644 --- a/include/uapi/linux/pkt_sched.h +++ b/include/uapi/linux/pkt_sched.h | |||
| @@ -171,6 +171,8 @@ enum { | |||
| 171 | TCA_TBF_PARMS, | 171 | TCA_TBF_PARMS, |
| 172 | TCA_TBF_RTAB, | 172 | TCA_TBF_RTAB, |
| 173 | TCA_TBF_PTAB, | 173 | TCA_TBF_PTAB, |
| 174 | TCA_TBF_RATE64, | ||
| 175 | TCA_TBF_PRATE64, | ||
| 174 | __TCA_TBF_MAX, | 176 | __TCA_TBF_MAX, |
| 175 | }; | 177 | }; |
| 176 | 178 | ||
| @@ -357,6 +359,8 @@ enum { | |||
| 357 | TCA_HTB_CTAB, | 359 | TCA_HTB_CTAB, |
| 358 | TCA_HTB_RTAB, | 360 | TCA_HTB_RTAB, |
| 359 | TCA_HTB_DIRECT_QLEN, | 361 | TCA_HTB_DIRECT_QLEN, |
| 362 | TCA_HTB_RATE64, | ||
| 363 | TCA_HTB_CEIL64, | ||
| 360 | __TCA_HTB_MAX, | 364 | __TCA_HTB_MAX, |
| 361 | }; | 365 | }; |
| 362 | 366 | ||
| @@ -759,13 +763,14 @@ enum { | |||
| 759 | 763 | ||
| 760 | TCA_FQ_RATE_ENABLE, /* enable/disable rate limiting */ | 764 | TCA_FQ_RATE_ENABLE, /* enable/disable rate limiting */ |
| 761 | 765 | ||
| 762 | TCA_FQ_FLOW_DEFAULT_RATE,/* for sockets with unspecified sk_rate, | 766 | TCA_FQ_FLOW_DEFAULT_RATE,/* obsolete, do not use */ |
| 763 | * use the following rate | ||
| 764 | */ | ||
| 765 | 767 | ||
| 766 | TCA_FQ_FLOW_MAX_RATE, /* per flow max rate */ | 768 | TCA_FQ_FLOW_MAX_RATE, /* per flow max rate */ |
| 767 | 769 | ||
| 768 | TCA_FQ_BUCKETS_LOG, /* log2(number of buckets) */ | 770 | TCA_FQ_BUCKETS_LOG, /* log2(number of buckets) */ |
| 771 | |||
| 772 | TCA_FQ_FLOW_REFILL_DELAY, /* flow credit refill delay in usec */ | ||
| 773 | |||
| 769 | __TCA_FQ_MAX | 774 | __TCA_FQ_MAX |
| 770 | }; | 775 | }; |
| 771 | 776 | ||
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h index fe1a5406d4d9..f7cf7f351144 100644 --- a/include/uapi/linux/raid/md_p.h +++ b/include/uapi/linux/raid/md_p.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #define _MD_P_H | 16 | #define _MD_P_H |
| 17 | 17 | ||
| 18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
| 19 | #include <asm/byteorder.h> | ||
| 19 | 20 | ||
| 20 | /* | 21 | /* |
| 21 | * RAID superblock. | 22 | * RAID superblock. |
diff --git a/include/uapi/linux/random.h b/include/uapi/linux/random.h index 7471b5b3b8ba..fff3528a078f 100644 --- a/include/uapi/linux/random.h +++ b/include/uapi/linux/random.h | |||
| @@ -40,11 +40,4 @@ struct rand_pool_info { | |||
| 40 | __u32 buf[0]; | 40 | __u32 buf[0]; |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | struct rnd_state { | ||
| 44 | __u32 s1, s2, s3; | ||
| 45 | }; | ||
| 46 | |||
| 47 | /* Exported functions */ | ||
| 48 | |||
| 49 | |||
| 50 | #endif /* _UAPI_LINUX_RANDOM_H */ | 43 | #endif /* _UAPI_LINUX_RANDOM_H */ |
diff --git a/include/uapi/linux/unix_diag.h b/include/uapi/linux/unix_diag.h index b9e2a6a7446f..1eb0b8dd1830 100644 --- a/include/uapi/linux/unix_diag.h +++ b/include/uapi/linux/unix_diag.h | |||
| @@ -31,6 +31,7 @@ struct unix_diag_msg { | |||
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | enum { | 33 | enum { |
| 34 | /* UNIX_DIAG_NONE, standard nl API requires this attribute! */ | ||
| 34 | UNIX_DIAG_NAME, | 35 | UNIX_DIAG_NAME, |
| 35 | UNIX_DIAG_VFS, | 36 | UNIX_DIAG_VFS, |
| 36 | UNIX_DIAG_PEER, | 37 | UNIX_DIAG_PEER, |
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 083bb5a5aae2..1666aabbbb86 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h | |||
| @@ -160,6 +160,10 @@ enum v4l2_colorfx { | |||
| 160 | * of controls. Total of 16 controls is reserved for this driver */ | 160 | * of controls. Total of 16 controls is reserved for this driver */ |
| 161 | #define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040) | 161 | #define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040) |
| 162 | 162 | ||
| 163 | /* The base for the TI VPE driver controls. Total of 16 controls is reserved for | ||
| 164 | * this driver */ | ||
| 165 | #define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_USER_BASE + 0x1050) | ||
| 166 | |||
| 163 | /* MPEG-class control IDs */ | 167 | /* MPEG-class control IDs */ |
| 164 | /* The MPEG controls are applicable to all codec controls | 168 | /* The MPEG controls are applicable to all codec controls |
| 165 | * and the 'MPEG' part of the define is historical */ | 169 | * and the 'MPEG' part of the define is historical */ |
