diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 05:23:45 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 05:23:45 -0500 |
| commit | c4de673b775e4db48cd2db6277e0c6714332ca0c (patch) | |
| tree | 84f9e4728e6ccf257236d2ba063b6e784ec8b65d /include/uapi/linux | |
| parent | bafdc614a1f4f8be8cde41b8ab10ac17e67c1837 (diff) | |
| parent | 55957fb7a0b61d8ab6ff3f04e279b8fc22b738fa (diff) | |
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'include/uapi/linux')
40 files changed, 1832 insertions, 35 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 75cef3fd97ad..db0b825b4810 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h | |||
| @@ -329,7 +329,6 @@ enum { | |||
| 329 | #define AUDIT_ARCH_ARMEB (EM_ARM) | 329 | #define AUDIT_ARCH_ARMEB (EM_ARM) |
| 330 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) | 330 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) |
| 331 | #define AUDIT_ARCH_FRV (EM_FRV) | 331 | #define AUDIT_ARCH_FRV (EM_FRV) |
| 332 | #define AUDIT_ARCH_H8300 (EM_H8_300) | ||
| 333 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) | 332 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) |
| 334 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 333 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
| 335 | #define AUDIT_ARCH_M32R (EM_M32R) | 334 | #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/genetlink.h b/include/uapi/linux/genetlink.h index c880a417d8a9..1af72d8228e0 100644 --- a/include/uapi/linux/genetlink.h +++ b/include/uapi/linux/genetlink.h | |||
| @@ -27,6 +27,7 @@ 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) | ||
| 30 | 31 | ||
| 31 | /************************************************************************** | 32 | /************************************************************************** |
| 32 | * Controller | 33 | * Controller |
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..b78566f59aba 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,17 @@ 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, | ||
| 492 | __IFLA_HSR_MAX, | ||
| 493 | }; | ||
| 494 | |||
| 495 | #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1) | ||
| 496 | |||
| 473 | #endif /* _UAPI_LINUX_IF_LINK_H */ | 497 | #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/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/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..17e7d95e4f53 --- /dev/null +++ b/include/uapi/linux/mic_common.h | |||
| @@ -0,0 +1,240 @@ | |||
| 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 | #ifndef __KERNEL__ | ||
| 27 | #define ALIGN(a, x) (((a) + (x) - 1) & ~((x) - 1)) | ||
| 28 | #define __aligned(x) __attribute__ ((aligned(x))) | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #define mic_aligned_size(x) ALIGN(sizeof(x), 8) | ||
| 32 | |||
| 33 | /** | ||
| 34 | * struct mic_device_desc: Virtio device information shared between the | ||
| 35 | * virtio driver and userspace backend | ||
| 36 | * | ||
| 37 | * @type: Device type: console/network/disk etc. Type 0/-1 terminates. | ||
| 38 | * @num_vq: Number of virtqueues. | ||
| 39 | * @feature_len: Number of bytes of feature bits. Multiply by 2: one for | ||
| 40 | host features and one for guest acknowledgements. | ||
| 41 | * @config_len: Number of bytes of the config array after virtqueues. | ||
| 42 | * @status: A status byte, written by the Guest. | ||
| 43 | * @config: Start of the following variable length config. | ||
| 44 | */ | ||
| 45 | struct mic_device_desc { | ||
| 46 | __s8 type; | ||
| 47 | __u8 num_vq; | ||
| 48 | __u8 feature_len; | ||
| 49 | __u8 config_len; | ||
| 50 | __u8 status; | ||
| 51 | __u64 config[0]; | ||
| 52 | } __aligned(8); | ||
| 53 | |||
| 54 | /** | ||
| 55 | * struct mic_device_ctrl: Per virtio device information in the device page | ||
| 56 | * used internally by the host and card side drivers. | ||
| 57 | * | ||
| 58 | * @vdev: Used for storing MIC vdev information by the guest. | ||
| 59 | * @config_change: Set to 1 by host when a config change is requested. | ||
| 60 | * @vdev_reset: Set to 1 by guest to indicate virtio device has been reset. | ||
| 61 | * @guest_ack: Set to 1 by guest to ack a command. | ||
| 62 | * @host_ack: Set to 1 by host to ack a command. | ||
| 63 | * @used_address_updated: Set to 1 by guest when the used address should be | ||
| 64 | * updated. | ||
| 65 | * @c2h_vdev_db: The doorbell number to be used by guest. Set by host. | ||
| 66 | * @h2c_vdev_db: The doorbell number to be used by host. Set by guest. | ||
| 67 | */ | ||
| 68 | struct mic_device_ctrl { | ||
| 69 | __u64 vdev; | ||
| 70 | __u8 config_change; | ||
| 71 | __u8 vdev_reset; | ||
| 72 | __u8 guest_ack; | ||
| 73 | __u8 host_ack; | ||
| 74 | __u8 used_address_updated; | ||
| 75 | __s8 c2h_vdev_db; | ||
| 76 | __s8 h2c_vdev_db; | ||
| 77 | } __aligned(8); | ||
| 78 | |||
| 79 | /** | ||
| 80 | * struct mic_bootparam: Virtio device independent information in device page | ||
| 81 | * | ||
| 82 | * @magic: A magic value used by the card to ensure it can see the host | ||
| 83 | * @c2h_shutdown_db: Card to Host shutdown doorbell set by host | ||
| 84 | * @h2c_shutdown_db: Host to Card shutdown doorbell set by card | ||
| 85 | * @h2c_config_db: Host to Card Virtio config doorbell set by card | ||
| 86 | * @shutdown_status: Card shutdown status set by card | ||
| 87 | * @shutdown_card: Set to 1 by the host when a card shutdown is initiated | ||
| 88 | */ | ||
| 89 | struct mic_bootparam { | ||
| 90 | __u32 magic; | ||
| 91 | __s8 c2h_shutdown_db; | ||
| 92 | __s8 h2c_shutdown_db; | ||
| 93 | __s8 h2c_config_db; | ||
| 94 | __u8 shutdown_status; | ||
| 95 | __u8 shutdown_card; | ||
| 96 | } __aligned(8); | ||
| 97 | |||
| 98 | /** | ||
| 99 | * struct mic_device_page: High level representation of the device page | ||
| 100 | * | ||
| 101 | * @bootparam: The bootparam structure is used for sharing information and | ||
| 102 | * status updates between MIC host and card drivers. | ||
| 103 | * @desc: Array of MIC virtio device descriptors. | ||
| 104 | */ | ||
| 105 | struct mic_device_page { | ||
| 106 | struct mic_bootparam bootparam; | ||
| 107 | struct mic_device_desc desc[0]; | ||
| 108 | }; | ||
| 109 | /** | ||
| 110 | * struct mic_vqconfig: This is how we expect the device configuration field | ||
| 111 | * for a virtqueue to be laid out in config space. | ||
| 112 | * | ||
| 113 | * @address: Guest/MIC physical address of the virtio ring | ||
| 114 | * (avail and desc rings) | ||
| 115 | * @used_address: Guest/MIC physical address of the used ring | ||
| 116 | * @num: The number of entries in the virtio_ring | ||
| 117 | */ | ||
| 118 | struct mic_vqconfig { | ||
| 119 | __u64 address; | ||
| 120 | __u64 used_address; | ||
| 121 | __u16 num; | ||
| 122 | } __aligned(8); | ||
| 123 | |||
| 124 | /* | ||
| 125 | * The alignment to use between consumer and producer parts of vring. | ||
| 126 | * This is pagesize for historical reasons. | ||
| 127 | */ | ||
| 128 | #define MIC_VIRTIO_RING_ALIGN 4096 | ||
| 129 | |||
| 130 | #define MIC_MAX_VRINGS 4 | ||
| 131 | #define MIC_VRING_ENTRIES 128 | ||
| 132 | |||
| 133 | /* | ||
| 134 | * Max vring entries (power of 2) to ensure desc and avail rings | ||
| 135 | * fit in a single page | ||
| 136 | */ | ||
| 137 | #define MIC_MAX_VRING_ENTRIES 128 | ||
| 138 | |||
| 139 | /** | ||
| 140 | * Max size of the desc block in bytes: includes: | ||
| 141 | * - struct mic_device_desc | ||
| 142 | * - struct mic_vqconfig (num_vq of these) | ||
| 143 | * - host and guest features | ||
| 144 | * - virtio device config space | ||
| 145 | */ | ||
| 146 | #define MIC_MAX_DESC_BLK_SIZE 256 | ||
| 147 | |||
| 148 | /** | ||
| 149 | * struct _mic_vring_info - Host vring info exposed to userspace backend | ||
| 150 | * for the avail index and magic for the card. | ||
| 151 | * | ||
| 152 | * @avail_idx: host avail idx | ||
| 153 | * @magic: A magic debug cookie. | ||
| 154 | */ | ||
| 155 | struct _mic_vring_info { | ||
| 156 | __u16 avail_idx; | ||
| 157 | int magic; | ||
| 158 | }; | ||
| 159 | |||
| 160 | /** | ||
| 161 | * struct mic_vring - Vring information. | ||
| 162 | * | ||
| 163 | * @vr: The virtio ring. | ||
| 164 | * @info: Host vring information exposed to the userspace backend for the | ||
| 165 | * avail index and magic for the card. | ||
| 166 | * @va: The va for the buffer allocated for vr and info. | ||
| 167 | * @len: The length of the buffer required for allocating vr and info. | ||
| 168 | */ | ||
| 169 | struct mic_vring { | ||
| 170 | struct vring vr; | ||
| 171 | struct _mic_vring_info *info; | ||
| 172 | void *va; | ||
| 173 | int len; | ||
| 174 | }; | ||
| 175 | |||
| 176 | #define mic_aligned_desc_size(d) ALIGN(mic_desc_size(d), 8) | ||
| 177 | |||
| 178 | #ifndef INTEL_MIC_CARD | ||
| 179 | static inline unsigned mic_desc_size(const struct mic_device_desc *desc) | ||
| 180 | { | ||
| 181 | return mic_aligned_size(*desc) | ||
| 182 | + desc->num_vq * mic_aligned_size(struct mic_vqconfig) | ||
| 183 | + desc->feature_len * 2 | ||
| 184 | + desc->config_len; | ||
| 185 | } | ||
| 186 | |||
| 187 | static inline struct mic_vqconfig * | ||
| 188 | mic_vq_config(const struct mic_device_desc *desc) | ||
| 189 | { | ||
| 190 | return (struct mic_vqconfig *)(desc + 1); | ||
| 191 | } | ||
| 192 | |||
| 193 | static inline __u8 *mic_vq_features(const struct mic_device_desc *desc) | ||
| 194 | { | ||
| 195 | return (__u8 *)(mic_vq_config(desc) + desc->num_vq); | ||
| 196 | } | ||
| 197 | |||
| 198 | static inline __u8 *mic_vq_configspace(const struct mic_device_desc *desc) | ||
| 199 | { | ||
| 200 | return mic_vq_features(desc) + desc->feature_len * 2; | ||
| 201 | } | ||
| 202 | static inline unsigned mic_total_desc_size(struct mic_device_desc *desc) | ||
| 203 | { | ||
| 204 | return mic_aligned_desc_size(desc) + | ||
| 205 | mic_aligned_size(struct mic_device_ctrl); | ||
| 206 | } | ||
| 207 | #endif | ||
| 208 | |||
| 209 | /* Device page size */ | ||
| 210 | #define MIC_DP_SIZE 4096 | ||
| 211 | |||
| 212 | #define MIC_MAGIC 0xc0ffee00 | ||
| 213 | |||
| 214 | /** | ||
| 215 | * enum mic_states - MIC states. | ||
| 216 | */ | ||
| 217 | enum mic_states { | ||
| 218 | MIC_OFFLINE = 0, | ||
| 219 | MIC_ONLINE, | ||
| 220 | MIC_SHUTTING_DOWN, | ||
| 221 | MIC_RESET_FAILED, | ||
| 222 | MIC_SUSPENDING, | ||
| 223 | MIC_SUSPENDED, | ||
| 224 | MIC_LAST | ||
| 225 | }; | ||
| 226 | |||
| 227 | /** | ||
| 228 | * enum mic_status - MIC status reported by card after | ||
| 229 | * a host or card initiated shutdown or a card crash. | ||
| 230 | */ | ||
| 231 | enum mic_status { | ||
| 232 | MIC_NOP = 0, | ||
| 233 | MIC_CRASHED, | ||
| 234 | MIC_HALTED, | ||
| 235 | MIC_POWER_OFF, | ||
| 236 | MIC_RESTART, | ||
| 237 | MIC_STATUS_LAST | ||
| 238 | }; | ||
| 239 | |||
| 240 | #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/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/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/pci_regs.h b/include/uapi/linux/pci_regs.h index baa7852468ef..0890556f779e 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
| @@ -319,7 +319,6 @@ | |||
| 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 entry's format */ |
| @@ -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 */ |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 40a1fb807396..e1802d6153ae 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 | * |
| @@ -380,10 +403,13 @@ struct perf_event_mmap_page { | |||
| 380 | union { | 403 | union { |
| 381 | __u64 capabilities; | 404 | __u64 capabilities; |
| 382 | struct { | 405 | struct { |
| 383 | __u64 cap_usr_time : 1, | 406 | __u64 cap_bit0 : 1, /* Always 0, deprecated, see commit 860f085b74e9 */ |
| 384 | cap_usr_rdpmc : 1, | 407 | cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */ |
| 385 | cap_usr_time_zero : 1, | 408 | |
| 386 | cap_____res : 61; | 409 | cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */ |
| 410 | cap_user_time : 1, /* The time_* fields are used */ | ||
| 411 | cap_user_time_zero : 1, /* The time_zero field is used */ | ||
| 412 | cap_____res : 59; | ||
| 387 | }; | 413 | }; |
| 388 | }; | 414 | }; |
| 389 | 415 | ||
| @@ -442,23 +468,26 @@ struct perf_event_mmap_page { | |||
| 442 | * ((rem * time_mult) >> time_shift); | 468 | * ((rem * time_mult) >> time_shift); |
| 443 | */ | 469 | */ |
| 444 | __u64 time_zero; | 470 | __u64 time_zero; |
| 471 | __u32 size; /* Header size up to __reserved[] fields. */ | ||
| 445 | 472 | ||
| 446 | /* | 473 | /* |
| 447 | * Hole for extension of the self monitor capabilities | 474 | * Hole for extension of the self monitor capabilities |
| 448 | */ | 475 | */ |
| 449 | 476 | ||
| 450 | __u64 __reserved[119]; /* align to 1k */ | 477 | __u8 __reserved[118*8+4]; /* align to 1k. */ |
| 451 | 478 | ||
| 452 | /* | 479 | /* |
| 453 | * Control data for the mmap() data buffer. | 480 | * Control data for the mmap() data buffer. |
| 454 | * | 481 | * |
| 455 | * User-space reading the @data_head value should issue an rmb(), on | 482 | * User-space reading the @data_head value should issue an smp_rmb(), |
| 456 | * SMP capable platforms, after reading this value -- see | 483 | * after reading this value. |
| 457 | * perf_event_wakeup(). | ||
| 458 | * | 484 | * |
| 459 | * When the mapping is PROT_WRITE the @data_tail value should be | 485 | * When the mapping is PROT_WRITE the @data_tail value should be |
| 460 | * written by userspace to reflect the last read data. In this case | 486 | * written by userspace to reflect the last read data, after issueing |
| 461 | * the kernel will not over-write unread data. | 487 | * an smp_mb() to separate the data read from the ->data_tail store. |
| 488 | * In this case the kernel will not over-write unread data. | ||
| 489 | * | ||
| 490 | * See perf_output_put_handle() for the data ordering. | ||
| 462 | */ | 491 | */ |
| 463 | __u64 data_head; /* head in the data section */ | 492 | __u64 data_head; /* head in the data section */ |
| 464 | __u64 data_tail; /* user-space written tail */ | 493 | __u64 data_tail; /* user-space written tail */ |
| @@ -528,6 +557,7 @@ enum perf_event_type { | |||
| 528 | * u64 len; | 557 | * u64 len; |
| 529 | * u64 pgoff; | 558 | * u64 pgoff; |
| 530 | * char filename[]; | 559 | * char filename[]; |
| 560 | * struct sample_id sample_id; | ||
| 531 | * }; | 561 | * }; |
| 532 | */ | 562 | */ |
| 533 | PERF_RECORD_MMAP = 1, | 563 | PERF_RECORD_MMAP = 1, |
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/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/tc_act/Kbuild b/include/uapi/linux/tc_act/Kbuild index 0623ec4e728f..56f121605c99 100644 --- a/include/uapi/linux/tc_act/Kbuild +++ b/include/uapi/linux/tc_act/Kbuild | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | # UAPI Header export list | 1 | # UAPI Header export list |
| 2 | header-y += tc_csum.h | 2 | header-y += tc_csum.h |
| 3 | header-y += tc_defact.h | ||
| 3 | header-y += tc_gact.h | 4 | header-y += tc_gact.h |
| 4 | header-y += tc_ipt.h | 5 | header-y += tc_ipt.h |
| 5 | header-y += tc_mirred.h | 6 | header-y += tc_mirred.h |
diff --git a/include/uapi/linux/tc_act/tc_defact.h b/include/uapi/linux/tc_act/tc_defact.h new file mode 100644 index 000000000000..17dddb40f740 --- /dev/null +++ b/include/uapi/linux/tc_act/tc_defact.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #ifndef __LINUX_TC_DEF_H | ||
| 2 | #define __LINUX_TC_DEF_H | ||
| 3 | |||
| 4 | #include <linux/pkt_cls.h> | ||
| 5 | |||
| 6 | struct tc_defact { | ||
| 7 | tc_gen; | ||
| 8 | }; | ||
| 9 | |||
| 10 | enum { | ||
| 11 | TCA_DEF_UNSPEC, | ||
| 12 | TCA_DEF_TM, | ||
| 13 | TCA_DEF_PARMS, | ||
| 14 | TCA_DEF_DATA, | ||
| 15 | __TCA_DEF_MAX | ||
| 16 | }; | ||
| 17 | #define TCA_DEF_MAX (__TCA_DEF_MAX - 1) | ||
| 18 | |||
| 19 | #endif | ||
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 */ |
