Linux 3.12
Showing the changes to include/uapi/linux (56 of 8566 files). Show all
Unified · Split
| @@ -227,6 +227,7 @@ header-y += kvm_para.h · 226 unmodified lines | ||
| 227 | 227 | endif |
| 228 | 228 | |
| 229 | 229 | header-y += l2tp.h |
| 230 | +header-y += libc-compat.h | |
| 230 | 231 | header-y += limits.h |
| 231 | 232 | header-y += llc.h |
| 232 | 233 | header-y += loop.h |
| @@ -283,6 +284,7 @@ header-y += nfs_mount.h · 50 unmodified lines | ||
| 283 | 284 | header-y += nfsacl.h |
| 284 | 285 | header-y += nl80211.h |
| 285 | 286 | header-y += nubus.h |
| 287 | +header-y += nvme.h | |
| 286 | 288 | header-y += nvram.h |
| 287 | 289 | header-y += omap3isp.h |
| 288 | 290 | header-y += omapfb.h |
| @@ -305,6 +305,31 @@ struct btrfs_ioctl_clone_range_args { · 304 unmodified lines | ||
| 305 | 305 | #define BTRFS_DEFRAG_RANGE_COMPRESS 1 |
| 306 | 306 | #define BTRFS_DEFRAG_RANGE_START_IO 2 |
| 307 | 307 | |
| 308 | +#define BTRFS_SAME_DATA_DIFFERS 1 | |
| 309 | +/* For extent-same ioctl */ | |
| 310 | +struct btrfs_ioctl_same_extent_info { | |
| 311 | + __s64 fd; /* in - destination file */ | |
| 312 | + __u64 logical_offset; /* in - start of extent in destination */ | |
| 313 | + __u64 bytes_deduped; /* out - total # of bytes we were able | |
| 314 | + * to dedupe from this file */ | |
| 315 | + /* status of this dedupe operation: | |
| 316 | + * 0 if dedup succeeds | |
| 317 | + * < 0 for error | |
| 318 | + * == BTRFS_SAME_DATA_DIFFERS if data differs | |
| 319 | + */ | |
| 320 | + __s32 status; /* out - see above description */ | |
| 321 | + __u32 reserved; | |
| 322 | +}; | |
| 323 | + | |
| 324 | +struct btrfs_ioctl_same_args { | |
| 325 | + __u64 logical_offset; /* in - start of extent in source */ | |
| 326 | + __u64 length; /* in - length of extent */ | |
| 327 | + __u16 dest_count; /* in - total elements in info array */ | |
| 328 | + __u16 reserved1; | |
| 329 | + __u32 reserved2; | |
| 330 | + struct btrfs_ioctl_same_extent_info info[0]; | |
| 331 | +}; | |
| 332 | + | |
| 308 | 333 | struct btrfs_ioctl_space_info { |
| 309 | 334 | __u64 flags; |
| 310 | 335 | __u64 total_bytes; |
| @@ -524,7 +549,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code) · 213 unmodified lines | ||
| 524 | 549 | struct btrfs_ioctl_search_args) |
| 525 | 550 | #define BTRFS_IOC_INO_LOOKUP _IOWR(BTRFS_IOCTL_MAGIC, 18, \ |
| 526 | 551 | struct btrfs_ioctl_ino_lookup_args) |
| 527 | −#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, u64) | |
| 552 | +#define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64) | |
| 528 | 553 | #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \ |
| 529 | 554 | struct btrfs_ioctl_space_args) |
| 530 | 555 | #define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64) |
| @@ -579,4 +604,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code) · 48 unmodified lines | ||
| 579 | 604 | struct btrfs_ioctl_get_dev_stats) |
| 580 | 605 | #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \ |
| 581 | 606 | struct btrfs_ioctl_dev_replace_args) |
| 607 | +#define BTRFS_IOC_FILE_EXTENT_SAME _IOWR(BTRFS_IOCTL_MAGIC, 54, \ | |
| 608 | + struct btrfs_ioctl_same_args) | |
| 609 | + | |
| 582 | 610 | #endif /* _UAPI_LINUX_BTRFS_H */ |
| @@ -45,6 +45,7 @@ enum { · 44 unmodified lines | ||
| 45 | 45 | CGW_DST_IF, /* ifindex of destination network interface */ |
| 46 | 46 | CGW_FILTER, /* specify struct can_filter on source CAN device */ |
| 47 | 47 | CGW_DELETED, /* number of deleted CAN frames (see max_hops param) */ |
| 48 | + CGW_LIM_HOPS, /* limit the number of hops of this specific rule */ | |
| 48 | 49 | __CGW_MAX |
| 49 | 50 | }; |
| 50 | 51 | |
| @@ -116,13 +117,19 @@ enum { · 65 unmodified lines | ||
| 116 | 117 | * Sets a CAN receive filter for the gateway job specified by the |
| 117 | 118 | * struct can_filter described in include/linux/can.h |
| 118 | 119 | * |
| 119 | − * CGW_MOD_XXX (length 17 bytes): | |
| 120 | + * CGW_MOD_(AND|OR|XOR|SET) (length 17 bytes): | |
| 120 | 121 | * Specifies a modification that's done to a received CAN frame before it is |
| 121 | 122 | * send out to the destination interface. |
| 122 | 123 | * |
| 123 | 124 | * <struct can_frame> data used as operator |
| 124 | 125 | * <u8> affected CAN frame elements |
| 125 | 126 | * |
| 127 | + * CGW_LIM_HOPS (length 1 byte): | |
| 128 | + * Limit the number of hops of this specific rule. Usually the received CAN | |
| 129 | + * frame can be processed as much as 'max_hops' times (which is given at module | |
| 130 | + * load time of the can-gw module). This value is used to reduce the number of | |
| 131 | + * possible hops for this gateway rule to a value smaller then max_hops. | |
| 132 | + * | |
| 126 | 133 | * CGW_CS_XOR (length 4 bytes): |
| 127 | 134 | * Set a simple XOR checksum starting with an initial value into |
| 128 | 135 | * data[result-idx] using data[start-idx] .. data[end-idx] |
| @@ -0,0 +1,27 @@ | ||
| 1 | +/* | |
| 2 | + * include/uapi/linux/cifs/cifs_mount.h | |
| 3 | + * | |
| 4 | + * Author(s): Scott Lovenberg (scott.lovenberg@gmail.com) | |
| 5 | + * | |
| 6 | + * This library is free software; you can redistribute it and/or modify | |
| 7 | + * it under the terms of the GNU Lesser General Public License as published | |
| 8 | + * by the Free Software Foundation; either version 2.1 of the License, or | |
| 9 | + * (at your option) any later version. | |
| 10 | + * | |
| 11 | + * This library is distributed in the hope that it will be useful, | |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See | |
| 14 | + * the GNU Lesser General Public License for more details. | |
| 15 | + */ | |
| 16 | +#ifndef _CIFS_MOUNT_H | |
| 17 | +#define _CIFS_MOUNT_H | |
| 18 | + | |
| 19 | +/* Max string lengths for cifs mounting options. */ | |
| 20 | +#define CIFS_MAX_DOMAINNAME_LEN 256 /* max fully qualified domain name */ | |
| 21 | +#define CIFS_MAX_USERNAME_LEN 256 /* reasonable max for current servers */ | |
| 22 | +#define CIFS_MAX_PASSWORD_LEN 512 /* Windows max seems to be 256 wide chars */ | |
| 23 | +#define CIFS_MAX_SHARE_LEN 256 /* reasonable max share name length */ | |
| 24 | +#define CIFS_NI_MAXHOST 1024 /* max host name length (256 * 4 bytes) */ | |
| 25 | + | |
| 26 | + | |
| 27 | +#endif /* _CIFS_MOUNT_H */ | |
| @@ -267,9 +267,9 @@ enum { · 266 unmodified lines | ||
| 267 | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 268 | 268 | |
| 269 | 269 | #define DM_VERSION_MAJOR 4 |
| 270 | −#define DM_VERSION_MINOR 25 | |
| 270 | +#define DM_VERSION_MINOR 26 | |
| 271 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
| 272 | −#define DM_VERSION_EXTRA "-ioctl (2013-06-26)" | |
| 272 | +#define DM_VERSION_EXTRA "-ioctl (2013-08-15)" | |
| 273 | 273 | |
| 274 | 274 | /* Status bits */ |
| 275 | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _LINUX_DN_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if_ether.h> | |
| 5 | 6 | |
| 6 | 7 | /* |
| 7 | 8 | |
| @@ -120,7 +121,7 @@ struct linkinfo_dn { · 112 unmodified lines | ||
| 120 | 121 | * Ethernet address format (for DECnet) |
| 121 | 122 | */ |
| 122 | 123 | union etheraddress { |
| 123 | − __u8 dne_addr[6]; /* Full ethernet address */ | |
| 124 | + __u8 dne_addr[ETH_ALEN]; /* Full ethernet address */ | |
| 124 | 125 | struct { |
| 125 | 126 | __u8 dne_hiord[4]; /* DECnet HIORD prefix */ |
| 126 | 127 | __u8 dne_nodeaddr[2]; /* DECnet node address */ |
| @@ -38,6 +38,7 @@ · 37 unmodified lines | ||
| 38 | 38 | #define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */ |
| 39 | 39 | #define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */ |
| 40 | 40 | #define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */ |
| 41 | +#define Q_XGETQSTATV XQM_CMD(8) /* newer version of get quota */ | |
| 41 | 42 | |
| 42 | 43 | /* |
| 43 | 44 | * fs_disk_quota structure: |
| @@ -163,4 +164,50 @@ typedef struct fs_quota_stat { · 119 unmodified lines | ||
| 163 | 164 | __u16 qs_iwarnlimit; /* limit for num warnings */ |
| 164 | 165 | } fs_quota_stat_t; |
| 165 | 166 | |
| 167 | +/* | |
| 168 | + * fs_quota_statv is used by Q_XGETQSTATV for a given file system. It provides | |
| 169 | + * a centralized way to get meta information about the quota subsystem. eg. | |
| 170 | + * space taken up for user, group, and project quotas, number of dquots | |
| 171 | + * currently incore. | |
| 172 | + * | |
| 173 | + * This version has proper versioning support with appropriate padding for | |
| 174 | + * future expansions, and ability to expand for future without creating any | |
| 175 | + * backward compatibility issues. | |
| 176 | + * | |
| 177 | + * Q_XGETQSTATV uses the passed in value of the requested version via | |
| 178 | + * fs_quota_statv.qs_version to determine the return data layout of | |
| 179 | + * fs_quota_statv. The kernel will fill the data fields relevant to that | |
| 180 | + * version. | |
| 181 | + * | |
| 182 | + * If kernel does not support user space caller specified version, EINVAL will | |
| 183 | + * be returned. User space caller can then reduce the version number and retry | |
| 184 | + * the same command. | |
| 185 | + */ | |
| 186 | +#define FS_QSTATV_VERSION1 1 /* fs_quota_statv.qs_version */ | |
| 187 | +/* | |
| 188 | + * Some basic information about 'quota files' for Q_XGETQSTATV command | |
| 189 | + */ | |
| 190 | +struct fs_qfilestatv { | |
| 191 | + __u64 qfs_ino; /* inode number */ | |
| 192 | + __u64 qfs_nblks; /* number of BBs 512-byte-blks */ | |
| 193 | + __u32 qfs_nextents; /* number of extents */ | |
| 194 | + __u32 qfs_pad; /* pad for 8-byte alignment */ | |
| 195 | +}; | |
| 196 | + | |
| 197 | +struct fs_quota_statv { | |
| 198 | + __s8 qs_version; /* version for future changes */ | |
| 199 | + __u8 qs_pad1; /* pad for 16bit alignment */ | |
| 200 | + __u16 qs_flags; /* FS_QUOTA_.* flags */ | |
| 201 | + __u32 qs_incoredqs; /* number of dquots incore */ | |
| 202 | + struct fs_qfilestatv qs_uquota; /* user quota information */ | |
| 203 | + struct fs_qfilestatv qs_gquota; /* group quota information */ | |
| 204 | + struct fs_qfilestatv qs_pquota; /* project quota information */ | |
| 205 | + __s32 qs_btimelimit; /* limit for blks timer */ | |
| 206 | + __s32 qs_itimelimit; /* limit for inodes timer */ | |
| 207 | + __s32 qs_rtbtimelimit;/* limit for rt blks timer */ | |
| 208 | + __u16 qs_bwarnlimit; /* limit for num warnings */ | |
| 209 | + __u16 qs_iwarnlimit; /* limit for num warnings */ | |
| 210 | + __u64 qs_pad2[8]; /* for future proofing */ | |
| 211 | +}; | |
| 212 | + | |
| 166 | 213 | #endif /* _LINUX_DQBLK_XFS_H */ |
| @@ -22,6 +22,7 @@ · 21 unmodified lines | ||
| 22 | 22 | #define EM_PPC 20 /* PowerPC */ |
| 23 | 23 | #define EM_PPC64 21 /* PowerPC64 */ |
| 24 | 24 | #define EM_SPU 23 /* Cell BE SPU */ |
| 25 | +#define EM_ARM 40 /* ARM 32 bit */ | |
| 25 | 26 | #define EM_SH 42 /* SuperH */ |
| 26 | 27 | #define EM_SPARCV9 43 /* SPARC v9 64-bit */ |
| 27 | 28 | #define EM_IA_64 50 /* HP/Intel IA-64 */ |
| @@ -34,6 +35,7 @@ · 6 unmodified lines | ||
| 34 | 35 | #define EM_MN10300 89 /* Panasonic/MEI MN10300, AM33 */ |
| 35 | 36 | #define EM_BLACKFIN 106 /* ADI Blackfin Processor */ |
| 36 | 37 | #define EM_TI_C6000 140 /* TI C6X DSPs */ |
| 38 | +#define EM_AARCH64 183 /* ARM 64 bit */ | |
| 37 | 39 | #define EM_FRV 0x5441 /* Fujitsu FR-V */ |
| 38 | 40 | #define EM_AVR32 0x18ad /* Atmel AVR32 */ |
| 39 | 41 | |
| @@ -44,8 +44,8 @@ enum { · 43 unmodified lines | ||
| 44 | 44 | FRA_FWMARK, /* mark */ |
| 45 | 45 | FRA_FLOW, /* flow/class id */ |
| 46 | 46 | FRA_UNUSED6, |
| 47 | − FRA_UNUSED7, | |
| 48 | − FRA_UNUSED8, | |
| 47 | + FRA_SUPPRESS_IFGROUP, | |
| 48 | + FRA_SUPPRESS_PREFIXLEN, | |
| 49 | 49 | FRA_TABLE, /* Extended table id */ |
| 50 | 50 | FRA_FWMASK, /* mask for netfilter mark */ |
| 51 | 51 | FRA_OIFNAME, |
| @@ -40,6 +40,7 @@ struct fiemap { · 39 unmodified lines | ||
| 40 | 40 | |
| 41 | 41 | #define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */ |
| 42 | 42 | #define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */ |
| 43 | +#define FIEMAP_FLAG_CACHE 0x00000004 /* request caching of the extents */ | |
| 43 | 44 | |
| 44 | 45 | #define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR) |
| 45 | 46 | |
| @@ -49,9 +49,9 @@ struct files_stat_struct { · 48 unmodified lines | ||
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | 51 | struct inodes_stat_t { |
| 52 | − int nr_inodes; | |
| 53 | − int nr_unused; | |
| 54 | − int dummy[5]; /* padding for sysctl ABI compatibility */ | |
| 52 | + long nr_inodes; | |
| 53 | + long nr_unused; | |
| 54 | + long dummy[5]; /* padding for sysctl ABI compatibility */ | |
| 55 | 55 | }; |
| 56 | 56 | |
| 57 | 57 | |
| @@ -115,6 +115,8 @@ struct icmp6hdr { · 114 unmodified lines | ||
| 115 | 115 | #define ICMPV6_NOT_NEIGHBOUR 2 |
| 116 | 116 | #define ICMPV6_ADDR_UNREACH 3 |
| 117 | 117 | #define ICMPV6_PORT_UNREACH 4 |
| 118 | +#define ICMPV6_POLICY_FAIL 5 | |
| 119 | +#define ICMPV6_REJECT_ROUTE 6 | |
| 118 | 120 | |
| 119 | 121 | /* |
| 120 | 122 | * Codes for Time Exceeded |
| @@ -14,6 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | #define _UAPI_LINUX_IF_BRIDGE_H |
| 15 | 15 | |
| 16 | 16 | #include <linux/types.h> |
| 17 | +#include <linux/if_ether.h> | |
| 17 | 18 | |
| 18 | 19 | #define SYSFS_BRIDGE_ATTR "bridge" |
| 19 | 20 | #define SYSFS_BRIDGE_FDB "brforward" |
| @@ -88,7 +89,7 @@ struct __port_info { · 68 unmodified lines | ||
| 88 | 89 | }; |
| 89 | 90 | |
| 90 | 91 | struct __fdb_entry { |
| 91 | − __u8 mac_addr[6]; | |
| 92 | + __u8 mac_addr[ETH_ALEN]; | |
| 92 | 93 | __u8 port_no; |
| 93 | 94 | __u8 is_local; |
| 94 | 95 | __u32 ageing_timer_value; |
| @@ -143,6 +143,7 @@ enum { · 142 unmodified lines | ||
| 143 | 143 | IFLA_NUM_TX_QUEUES, |
| 144 | 144 | IFLA_NUM_RX_QUEUES, |
| 145 | 145 | IFLA_CARRIER, |
| 146 | + IFLA_PHYS_PORT_ID, | |
| 146 | 147 | __IFLA_MAX |
| 147 | 148 | }; |
| 148 | 149 | |
| @@ -313,6 +314,8 @@ enum { · 164 unmodified lines | ||
| 313 | 314 | IFLA_VXLAN_L2MISS, |
| 314 | 315 | IFLA_VXLAN_L3MISS, |
| 315 | 316 | IFLA_VXLAN_PORT, /* destination port */ |
| 317 | + IFLA_VXLAN_GROUP6, | |
| 318 | + IFLA_VXLAN_LOCAL6, | |
| 316 | 319 | __IFLA_VXLAN_MAX |
| 317 | 320 | }; |
| 318 | 321 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) |
| @@ -56,6 +56,7 @@ struct sockaddr_ll { · 55 unmodified lines | ||
| 56 | 56 | #define PACKET_FANOUT_LB 1 |
| 57 | 57 | #define PACKET_FANOUT_CPU 2 |
| 58 | 58 | #define PACKET_FANOUT_ROLLOVER 3 |
| 59 | +#define PACKET_FANOUT_RND 4 | |
| 59 | 60 | #define PACKET_FANOUT_FLAG_ROLLOVER 0x1000 |
| 60 | 61 | #define PACKET_FANOUT_FLAG_DEFRAG 0x8000 |
| 61 | 62 | |
| @@ -46,7 +46,7 @@ struct pppoe_addr { · 45 unmodified lines | ||
| 46 | 46 | * PPTP addressing definition |
| 47 | 47 | */ |
| 48 | 48 | struct pptp_addr { |
| 49 | − __be16 call_id; | |
| 49 | + __u16 call_id; | |
| 50 | 50 | struct in_addr sin_addr; |
| 51 | 51 | }; |
| 52 | 52 | |
| @@ -56,6 +56,8 @@ · 55 unmodified lines | ||
| 56 | 56 | #define TUNGETVNETHDRSZ _IOR('T', 215, int) |
| 57 | 57 | #define TUNSETVNETHDRSZ _IOW('T', 216, int) |
| 58 | 58 | #define TUNSETQUEUE _IOW('T', 217, int) |
| 59 | +#define TUNSETIFINDEX _IOW('T', 218, unsigned int) | |
| 60 | +#define TUNGETFILTER _IOR('T', 219, struct sock_fprog) | |
| 59 | 61 | |
| 60 | 62 | /* TUNSETIFF ifr flags */ |
| 61 | 63 | #define IFF_TUN 0x0001 |
| @@ -70,6 +72,10 @@ · 8 unmodified lines | ||
| 70 | 72 | #define IFF_DETACH_QUEUE 0x0400 |
| 71 | 73 | /* read-only flag */ |
| 72 | 74 | #define IFF_PERSIST 0x0800 |
| 75 | +#define IFF_NOFILTER 0x1000 | |
| 76 | + | |
| 77 | +/* Socket options */ | |
| 78 | +#define TUN_TX_TIMESTAMP 1 | |
| 73 | 79 | |
| 74 | 80 | /* Features for GSO (TUNSETOFFLOAD). */ |
| 75 | 81 | #define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */ |
| @@ -24,30 +24,53 @@ · 23 unmodified lines | ||
| 24 | 24 | /* Standard well-defined IP protocols. */ |
| 25 | 25 | enum { |
| 26 | 26 | IPPROTO_IP = 0, /* Dummy protocol for TCP */ |
| 27 | +#define IPPROTO_IP IPPROTO_IP | |
| 27 | 28 | IPPROTO_ICMP = 1, /* Internet Control Message Protocol */ |
| 29 | +#define IPPROTO_ICMP IPPROTO_ICMP | |
| 28 | 30 | IPPROTO_IGMP = 2, /* Internet Group Management Protocol */ |
| 31 | +#define IPPROTO_IGMP IPPROTO_IGMP | |
| 29 | 32 | IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */ |
| 33 | +#define IPPROTO_IPIP IPPROTO_IPIP | |
| 30 | 34 | IPPROTO_TCP = 6, /* Transmission Control Protocol */ |
| 35 | +#define IPPROTO_TCP IPPROTO_TCP | |
| 31 | 36 | IPPROTO_EGP = 8, /* Exterior Gateway Protocol */ |
| 37 | +#define IPPROTO_EGP IPPROTO_EGP | |
| 32 | 38 | IPPROTO_PUP = 12, /* PUP protocol */ |
| 39 | +#define IPPROTO_PUP IPPROTO_PUP | |
| 33 | 40 | IPPROTO_UDP = 17, /* User Datagram Protocol */ |
| 41 | +#define IPPROTO_UDP IPPROTO_UDP | |
| 34 | 42 | IPPROTO_IDP = 22, /* XNS IDP protocol */ |
| 43 | +#define IPPROTO_IDP IPPROTO_IDP | |
| 44 | + IPPROTO_TP = 29, /* SO Transport Protocol Class 4 */ | |
| 45 | +#define IPPROTO_TP IPPROTO_TP | |
| 35 | 46 | IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol */ |
| 36 | − IPPROTO_RSVP = 46, /* RSVP protocol */ | |
| 47 | +#define IPPROTO_DCCP IPPROTO_DCCP | |
| 48 | + IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */ | |
| 49 | +#define IPPROTO_IPV6 IPPROTO_IPV6 | |
| 50 | + IPPROTO_RSVP = 46, /* RSVP Protocol */ | |
| 51 | +#define IPPROTO_RSVP IPPROTO_RSVP | |
| 37 | 52 | IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */ |
| 38 | − | |
| 39 | − IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */ | |
| 40 | − | |
| 41 | − IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */ | |
| 42 | − IPPROTO_AH = 51, /* Authentication Header protocol */ | |
| 43 | − IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET */ | |
| 44 | − IPPROTO_PIM = 103, /* Protocol Independent Multicast */ | |
| 45 | − | |
| 46 | − IPPROTO_COMP = 108, /* Compression Header protocol */ | |
| 47 | − IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */ | |
| 53 | +#define IPPROTO_GRE IPPROTO_GRE | |
| 54 | + IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */ | |
| 55 | +#define IPPROTO_ESP IPPROTO_ESP | |
| 56 | + IPPROTO_AH = 51, /* Authentication Header protocol */ | |
| 57 | +#define IPPROTO_AH IPPROTO_AH | |
| 58 | + IPPROTO_MTP = 92, /* Multicast Transport Protocol */ | |
| 59 | +#define IPPROTO_MTP IPPROTO_MTP | |
| 60 | + IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET */ | |
| 61 | +#define IPPROTO_BEETPH IPPROTO_BEETPH | |
| 62 | + IPPROTO_ENCAP = 98, /* Encapsulation Header */ | |
| 63 | +#define IPPROTO_ENCAP IPPROTO_ENCAP | |
| 64 | + IPPROTO_PIM = 103, /* Protocol Independent Multicast */ | |
| 65 | +#define IPPROTO_PIM IPPROTO_PIM | |
| 66 | + IPPROTO_COMP = 108, /* Compression Header Protocol */ | |
| 67 | +#define IPPROTO_COMP IPPROTO_COMP | |
| 68 | + IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */ | |
| 69 | +#define IPPROTO_SCTP IPPROTO_SCTP | |
| 48 | 70 | IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */ |
| 49 | − | |
| 50 | − IPPROTO_RAW = 255, /* Raw IP packets */ | |
| 71 | +#define IPPROTO_UDPLITE IPPROTO_UDPLITE | |
| 72 | + IPPROTO_RAW = 255, /* Raw IP packets */ | |
| 73 | +#define IPPROTO_RAW IPPROTO_RAW | |
| 51 | 74 | IPPROTO_MAX |
| 52 | 75 | }; |
| 53 | 76 | |
| @@ -22,22 +22,30 @@ · 21 unmodified lines | ||
| 22 | 22 | #define _UAPI_LINUX_IN6_H |
| 23 | 23 | |
| 24 | 24 | #include <linux/types.h> |
| 25 | +#include <linux/libc-compat.h> | |
| 25 | 26 | |
| 26 | 27 | /* |
| 27 | 28 | * IPv6 address structure |
| 28 | 29 | */ |
| 29 | 30 | |
| 31 | +#if __UAPI_DEF_IN6_ADDR | |
| 30 | 32 | struct in6_addr { |
| 31 | 33 | union { |
| 32 | 34 | __u8 u6_addr8[16]; |
| 35 | +#if __UAPI_DEF_IN6_ADDR_ALT | |
| 33 | 36 | __be16 u6_addr16[8]; |
| 34 | 37 | __be32 u6_addr32[4]; |
| 38 | +#endif | |
| 35 | 39 | } in6_u; |
| 36 | 40 | #define s6_addr in6_u.u6_addr8 |
| 41 | +#if __UAPI_DEF_IN6_ADDR_ALT | |
| 37 | 42 | #define s6_addr16 in6_u.u6_addr16 |
| 38 | 43 | #define s6_addr32 in6_u.u6_addr32 |
| 44 | +#endif | |
| 39 | 45 | }; |
| 46 | +#endif /* __UAPI_DEF_IN6_ADDR */ | |
| 40 | 47 | |
| 48 | +#if __UAPI_DEF_SOCKADDR_IN6 | |
| 41 | 49 | struct sockaddr_in6 { |
| 42 | 50 | unsigned short int sin6_family; /* AF_INET6 */ |
| 43 | 51 | __be16 sin6_port; /* Transport layer port # */ |
| @@ -45,7 +53,9 @@ struct sockaddr_in6 { · 1 unmodified line | ||
| 45 | 53 | struct in6_addr sin6_addr; /* IPv6 address */ |
| 46 | 54 | __u32 sin6_scope_id; /* scope id (new in RFC2553) */ |
| 47 | 55 | }; |
| 56 | +#endif /* __UAPI_DEF_SOCKADDR_IN6 */ | |
| 48 | 57 | |
| 58 | +#if __UAPI_DEF_IPV6_MREQ | |
| 49 | 59 | struct ipv6_mreq { |
| 50 | 60 | /* IPv6 multicast address of group */ |
| 51 | 61 | struct in6_addr ipv6mr_multiaddr; |
| @@ -53,6 +63,7 @@ struct ipv6_mreq { · 1 unmodified line | ||
| 53 | 63 | /* local IPv6 address of interface */ |
| 54 | 64 | int ipv6mr_ifindex; |
| 55 | 65 | }; |
| 66 | +#endif /* __UAPI_DEF_IVP6_MREQ */ | |
| 56 | 67 | |
| 57 | 68 | #define ipv6mr_acaddr ipv6mr_multiaddr |
| 58 | 69 | |
| @@ -114,13 +125,24 @@ struct in6_flowlabel_req { · 55 unmodified lines | ||
| 114 | 125 | /* |
| 115 | 126 | * IPV6 extension headers |
| 116 | 127 | */ |
| 117 | −#define IPPROTO_HOPOPTS 0 /* IPv6 hop-by-hop options */ | |
| 118 | −#define IPPROTO_ROUTING 43 /* IPv6 routing header */ | |
| 119 | −#define IPPROTO_FRAGMENT 44 /* IPv6 fragmentation header */ | |
| 120 | −#define IPPROTO_ICMPV6 58 /* ICMPv6 */ | |
| 121 | −#define IPPROTO_NONE 59 /* IPv6 no next header */ | |
| 122 | −#define IPPROTO_DSTOPTS 60 /* IPv6 destination options */ | |
| 123 | −#define IPPROTO_MH 135 /* IPv6 mobility header */ | |
| 128 | +#if __UAPI_DEF_IPPROTO_V6 | |
| 129 | +enum { | |
| 130 | + IPPROTO_HOPOPTS = 0, /* IPv6 hop-by-hop options */ | |
| 131 | +#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS | |
| 132 | + IPPROTO_ROUTING = 43, /* IPv6 routing header */ | |
| 133 | +#define IPPROTO_ROUTING IPPROTO_ROUTING | |
| 134 | + IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header */ | |
| 135 | +#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT | |
| 136 | + IPPROTO_ICMPV6 = 58, /* ICMPv6 */ | |
| 137 | +#define IPPROTO_ICMPV6 IPPROTO_ICMPV6 | |
| 138 | + IPPROTO_NONE = 59, /* IPv6 no next header */ | |
| 139 | +#define IPPROTO_NONE IPPROTO_NONE | |
| 140 | + IPPROTO_DSTOPTS = 60, /* IPv6 destination options */ | |
| 141 | +#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS | |
| 142 | + IPPROTO_MH = 135, /* IPv6 mobility header */ | |
| 143 | +#define IPPROTO_MH IPPROTO_MH | |
| 144 | +}; | |
| 145 | +#endif /* __UAPI_DEF_IPPROTO_V6 */ | |
| 124 | 146 | |
| 125 | 147 | /* |
| 126 | 148 | * IPv6 TLV options. |
| @@ -152,6 +152,7 @@ struct input_keymap_entry { · 151 unmodified lines | ||
| 152 | 152 | #define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ |
| 153 | 153 | |
| 154 | 154 | #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ |
| 155 | +#define EVIOCREVOKE _IOW('E', 0x91, int) /* Revoke device access */ | |
| 155 | 156 | |
| 156 | 157 | #define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */ |
| 157 | 158 | |
| @@ -194,6 +195,8 @@ struct input_keymap_entry { · 36 unmodified lines | ||
| 194 | 195 | #define SYN_CONFIG 1 |
| 195 | 196 | #define SYN_MT_REPORT 2 |
| 196 | 197 | #define SYN_DROPPED 3 |
| 198 | +#define SYN_MAX 0xf | |
| 199 | +#define SYN_CNT (SYN_MAX+1) | |
| 197 | 200 | |
| 198 | 201 | /* |
| 199 | 202 | * Keys and buttons |
| @@ -162,6 +162,8 @@ enum · 161 unmodified lines | ||
| 162 | 162 | IPV4_DEVCONF_SRC_VMARK, |
| 163 | 163 | IPV4_DEVCONF_PROXY_ARP_PVLAN, |
| 164 | 164 | IPV4_DEVCONF_ROUTE_LOCALNET, |
| 165 | + IPV4_DEVCONF_IGMPV2_UNSOLICITED_REPORT_INTERVAL, | |
| 166 | + IPV4_DEVCONF_IGMPV3_UNSOLICITED_REPORT_INTERVAL, | |
| 165 | 167 | __IPV4_DEVCONF_MAX |
| 166 | 168 | }; |
| 167 | 169 | |
| @@ -160,6 +160,9 @@ enum { · 159 unmodified lines | ||
| 160 | 160 | DEVCONF_ACCEPT_DAD, |
| 161 | 161 | DEVCONF_FORCE_TLLAO, |
| 162 | 162 | DEVCONF_NDISC_NOTIFY, |
| 163 | + DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL, | |
| 164 | + DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL, | |
| 165 | + DEVCONF_SUPPRESS_FRAG_NDISC, | |
| 163 | 166 | DEVCONF_MAX |
| 164 | 167 | }; |
| 165 | 168 | |
| @@ -667,6 +667,7 @@ struct kvm_ppc_smmu_info { · 666 unmodified lines | ||
| 667 | 667 | #define KVM_CAP_PPC_RTAS 91 |
| 668 | 668 | #define KVM_CAP_IRQ_XICS 92 |
| 669 | 669 | #define KVM_CAP_ARM_EL1_32BIT 93 |
| 670 | +#define KVM_CAP_SPAPR_MULTITCE 94 | |
| 670 | 671 | |
| 671 | 672 | #ifdef KVM_CAP_IRQ_ROUTING |
| 672 | 673 | |
| @@ -19,6 +19,7 @@ · 18 unmodified lines | ||
| 19 | 19 | #define KVM_HC_MMU_OP 2 |
| 20 | 20 | #define KVM_HC_FEATURES 3 |
| 21 | 21 | #define KVM_HC_PPC_MAP_MAGIC_PAGE 4 |
| 22 | +#define KVM_HC_KICK_CPU 5 | |
| 22 | 23 | |
| 23 | 24 | /* |
| 24 | 25 | * hypercalls use architecture specific |
| @@ -0,0 +1,103 @@ | ||
| 1 | +/* | |
| 2 | + * Compatibility interface for userspace libc header coordination: | |
| 3 | + * | |
| 4 | + * Define compatibility macros that are used to control the inclusion or | |
| 5 | + * exclusion of UAPI structures and definitions in coordination with another | |
| 6 | + * userspace C library. | |
| 7 | + * | |
| 8 | + * This header is intended to solve the problem of UAPI definitions that | |
| 9 | + * conflict with userspace definitions. If a UAPI header has such conflicting | |
| 10 | + * definitions then the solution is as follows: | |
| 11 | + * | |
| 12 | + * * Synchronize the UAPI header and the libc headers so either one can be | |
| 13 | + * used and such that the ABI is preserved. If this is not possible then | |
| 14 | + * no simple compatibility interface exists (you need to write translating | |
| 15 | + * wrappers and rename things) and you can't use this interface. | |
| 16 | + * | |
| 17 | + * Then follow this process: | |
| 18 | + * | |
| 19 | + * (a) Include libc-compat.h in the UAPI header. | |
| 20 | + * e.g. #include <linux/libc-compat.h> | |
| 21 | + * This include must be as early as possible. | |
| 22 | + * | |
| 23 | + * (b) In libc-compat.h add enough code to detect that the comflicting | |
| 24 | + * userspace libc header has been included first. | |
| 25 | + * | |
| 26 | + * (c) If the userspace libc header has been included first define a set of | |
| 27 | + * guard macros of the form __UAPI_DEF_FOO and set their values to 1, else | |
| 28 | + * set their values to 0. | |
| 29 | + * | |
| 30 | + * (d) Back in the UAPI header with the conflicting definitions, guard the | |
| 31 | + * definitions with: | |
| 32 | + * #if __UAPI_DEF_FOO | |
| 33 | + * ... | |
| 34 | + * #endif | |
| 35 | + * | |
| 36 | + * This fixes the situation where the linux headers are included *after* the | |
| 37 | + * libc headers. To fix the problem with the inclusion in the other order the | |
| 38 | + * userspace libc headers must be fixed like this: | |
| 39 | + * | |
| 40 | + * * For all definitions that conflict with kernel definitions wrap those | |
| 41 | + * defines in the following: | |
| 42 | + * #if !__UAPI_DEF_FOO | |
| 43 | + * ... | |
| 44 | + * #endif | |
| 45 | + * | |
| 46 | + * This prevents the redefinition of a construct already defined by the kernel. | |
| 47 | + */ | |
| 48 | +#ifndef _UAPI_LIBC_COMPAT_H | |
| 49 | +#define _UAPI_LIBC_COMPAT_H | |
| 50 | + | |
| 51 | +/* We have included glibc headers... */ | |
| 52 | +#if defined(__GLIBC__) | |
| 53 | + | |
| 54 | +/* Coordinate with glibc netinet/in.h header. */ | |
| 55 | +#if defined(_NETINET_IN_H) | |
| 56 | + | |
| 57 | +/* GLIBC headers included first so don't define anything | |
| 58 | + * that would already be defined. */ | |
| 59 | +#define __UAPI_DEF_IN6_ADDR 0 | |
| 60 | +/* The exception is the in6_addr macros which must be defined | |
| 61 | + * if the glibc code didn't define them. This guard matches | |
| 62 | + * the guard in glibc/inet/netinet/in.h which defines the | |
| 63 | + * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */ | |
| 64 | +#if defined(__USE_MISC) || defined (__USE_GNU) | |
| 65 | +#define __UAPI_DEF_IN6_ADDR_ALT 0 | |
| 66 | +#else | |
| 67 | +#define __UAPI_DEF_IN6_ADDR_ALT 1 | |
| 68 | +#endif | |
| 69 | +#define __UAPI_DEF_SOCKADDR_IN6 0 | |
| 70 | +#define __UAPI_DEF_IPV6_MREQ 0 | |
| 71 | +#define __UAPI_DEF_IPPROTO_V6 0 | |
| 72 | + | |
| 73 | +#else | |
| 74 | + | |
| 75 | +/* Linux headers included first, and we must define everything | |
| 76 | + * we need. The expectation is that glibc will check the | |
| 77 | + * __UAPI_DEF_* defines and adjust appropriately. */ | |
| 78 | +#define __UAPI_DEF_IN6_ADDR 1 | |
| 79 | +/* We unconditionally define the in6_addr macros and glibc must | |
| 80 | + * coordinate. */ | |
| 81 | +#define __UAPI_DEF_IN6_ADDR_ALT 1 | |
| 82 | +#define __UAPI_DEF_SOCKADDR_IN6 1 | |
| 83 | +#define __UAPI_DEF_IPV6_MREQ 1 | |
| 84 | +#define __UAPI_DEF_IPPROTO_V6 1 | |
| 85 | + | |
| 86 | +#endif /* _NETINET_IN_H */ | |
| 87 | + | |
| 88 | + | |
| 89 | +/* If we did not see any headers from any supported C libraries, | |
| 90 | + * or we are being included in the kernel, then define everything | |
| 91 | + * that we need. */ | |
| 92 | +#else /* !defined(__GLIBC__) */ | |
| 93 | + | |
| 94 | +/* Definitions for in6.h */ | |
| 95 | +#define __UAPI_DEF_IN6_ADDR 1 | |
| 96 | +#define __UAPI_DEF_IN6_ADDR_ALT 1 | |
| 97 | +#define __UAPI_DEF_SOCKADDR_IN6 1 | |
| 98 | +#define __UAPI_DEF_IPV6_MREQ 1 | |
| 99 | +#define __UAPI_DEF_IPPROTO_V6 1 | |
| 100 | + | |
| 101 | +#endif /* __GLIBC__ */ | |
| 102 | + | |
| 103 | +#endif /* _UAPI_LIBC_COMPAT_H */ | |
| @@ -22,6 +22,7 @@ header-y += xt_CONNMARK.h · 21 unmodified lines | ||
| 22 | 22 | header-y += xt_CONNSECMARK.h |
| 23 | 23 | header-y += xt_CT.h |
| 24 | 24 | header-y += xt_DSCP.h |
| 25 | +header-y += xt_HMARK.h | |
| 25 | 26 | header-y += xt_IDLETIMER.h |
| 26 | 27 | header-y += xt_LED.h |
| 27 | 28 | header-y += xt_LOG.h |
| @@ -68,6 +69,7 @@ header-y += xt_quota.h · 40 unmodified lines | ||
| 68 | 69 | header-y += xt_rateest.h |
| 69 | 70 | header-y += xt_realm.h |
| 70 | 71 | header-y += xt_recent.h |
| 72 | +header-y += xt_rpfilter.h | |
| 71 | 73 | header-y += xt_sctp.h |
| 72 | 74 | header-y += xt_set.h |
| 73 | 75 | header-y += xt_socket.h |
| @@ -99,7 +99,8 @@ enum ip_conntrack_events { · 98 unmodified lines | ||
| 99 | 99 | IPCT_PROTOINFO, /* protocol information has changed */ |
| 100 | 100 | IPCT_HELPER, /* new helper has been set */ |
| 101 | 101 | IPCT_MARK, /* new mark has been set */ |
| 102 | − IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */ | |
| 102 | + IPCT_SEQADJ, /* sequence adjustment has changed */ | |
| 103 | + IPCT_NATSEQADJ = IPCT_SEQADJ, | |
| 103 | 104 | IPCT_SECMARK, /* new security mark has been set */ |
| 104 | 105 | IPCT_LABEL, /* new connlabel has been set */ |
| 105 | 106 | }; |
| @@ -42,8 +42,10 @@ enum ctattr_type { · 41 unmodified lines | ||
| 42 | 42 | CTA_ID, |
| 43 | 43 | CTA_NAT_DST, |
| 44 | 44 | CTA_TUPLE_MASTER, |
| 45 | − CTA_NAT_SEQ_ADJ_ORIG, | |
| 46 | − CTA_NAT_SEQ_ADJ_REPLY, | |
| 45 | + CTA_SEQ_ADJ_ORIG, | |
| 46 | + CTA_NAT_SEQ_ADJ_ORIG = CTA_SEQ_ADJ_ORIG, | |
| 47 | + CTA_SEQ_ADJ_REPLY, | |
| 48 | + CTA_NAT_SEQ_ADJ_REPLY = CTA_SEQ_ADJ_REPLY, | |
| 47 | 49 | CTA_SECMARK, /* obsolete */ |
| 48 | 50 | CTA_ZONE, |
| 49 | 51 | CTA_SECCTX, |
| @@ -165,6 +167,15 @@ enum ctattr_protonat { · 115 unmodified lines | ||
| 165 | 167 | }; |
| 166 | 168 | #define CTA_PROTONAT_MAX (__CTA_PROTONAT_MAX - 1) |
| 167 | 169 | |
| 170 | +enum ctattr_seqadj { | |
| 171 | + CTA_SEQADJ_UNSPEC, | |
| 172 | + CTA_SEQADJ_CORRECTION_POS, | |
| 173 | + CTA_SEQADJ_OFFSET_BEFORE, | |
| 174 | + CTA_SEQADJ_OFFSET_AFTER, | |
| 175 | + __CTA_SEQADJ_MAX | |
| 176 | +}; | |
| 177 | +#define CTA_SEQADJ_MAX (__CTA_SEQADJ_MAX - 1) | |
| 178 | + | |
| 168 | 179 | enum ctattr_natseq { |
| 169 | 180 | CTA_NAT_SEQ_UNSPEC, |
| 170 | 181 | CTA_NAT_SEQ_CORRECTION_POS, |
| @@ -46,6 +46,7 @@ enum nfqnl_attr_type { · 45 unmodified lines | ||
| 46 | 46 | NFQA_CT_INFO, /* enum ip_conntrack_info */ |
| 47 | 47 | NFQA_CAP_LEN, /* __u32 length of captured packet */ |
| 48 | 48 | NFQA_SKB_INFO, /* __u32 skb meta information */ |
| 49 | + NFQA_EXP, /* nf_conntrack_netlink.h */ | |
| 49 | 50 | |
| 50 | 51 | __NFQA_MAX |
| 51 | 52 | }; |
| @@ -0,0 +1,50 @@ | ||
| 1 | +#ifndef XT_HMARK_H_ | |
| 2 | +#define XT_HMARK_H_ | |
| 3 | + | |
| 4 | +#include <linux/types.h> | |
| 5 | + | |
| 6 | +enum { | |
| 7 | + XT_HMARK_SADDR_MASK, | |
| 8 | + XT_HMARK_DADDR_MASK, | |
| 9 | + XT_HMARK_SPI, | |
| 10 | + XT_HMARK_SPI_MASK, | |
| 11 | + XT_HMARK_SPORT, | |
| 12 | + XT_HMARK_DPORT, | |
| 13 | + XT_HMARK_SPORT_MASK, | |
| 14 | + XT_HMARK_DPORT_MASK, | |
| 15 | + XT_HMARK_PROTO_MASK, | |
| 16 | + XT_HMARK_RND, | |
| 17 | + XT_HMARK_MODULUS, | |
| 18 | + XT_HMARK_OFFSET, | |
| 19 | + XT_HMARK_CT, | |
| 20 | + XT_HMARK_METHOD_L3, | |
| 21 | + XT_HMARK_METHOD_L3_4, | |
| 22 | +}; | |
| 23 | +#define XT_HMARK_FLAG(flag) (1 << flag) | |
| 24 | + | |
| 25 | +union hmark_ports { | |
| 26 | + struct { | |
| 27 | + __u16 src; | |
| 28 | + __u16 dst; | |
| 29 | + } p16; | |
| 30 | + struct { | |
| 31 | + __be16 src; | |
| 32 | + __be16 dst; | |
| 33 | + } b16; | |
| 34 | + __u32 v32; | |
| 35 | + __be32 b32; | |
| 36 | +}; | |
| 37 | + | |
| 38 | +struct xt_hmark_info { | |
| 39 | + union nf_inet_addr src_mask; | |
| 40 | + union nf_inet_addr dst_mask; | |
| 41 | + union hmark_ports port_mask; | |
| 42 | + union hmark_ports port_set; | |
| 43 | + __u32 flags; | |
| 44 | + __u16 proto_mask; | |
| 45 | + __u32 hashrnd; | |
| 46 | + __u32 hmodulus; | |
| 47 | + __u32 hoffset; /* Mark offset to start from */ | |
| 48 | +}; | |
| 49 | + | |
| 50 | +#endif /* XT_HMARK_H_ */ | |
| @@ -0,0 +1,16 @@ | ||
| 1 | +#ifndef _XT_SYNPROXY_H | |
| 2 | +#define _XT_SYNPROXY_H | |
| 3 | + | |
| 4 | +#define XT_SYNPROXY_OPT_MSS 0x01 | |
| 5 | +#define XT_SYNPROXY_OPT_WSCALE 0x02 | |
| 6 | +#define XT_SYNPROXY_OPT_SACK_PERM 0x04 | |
| 7 | +#define XT_SYNPROXY_OPT_TIMESTAMP 0x08 | |
| 8 | +#define XT_SYNPROXY_OPT_ECN 0x10 | |
| 9 | + | |
| 10 | +struct xt_synproxy_info { | |
| 11 | + __u8 options; | |
| 12 | + __u8 wscale; | |
| 13 | + __u16 mss; | |
| 14 | +}; | |
| 15 | + | |
| 16 | +#endif /* _XT_SYNPROXY_H */ | |
| @@ -0,0 +1,23 @@ | ||
| 1 | +#ifndef _XT_RPATH_H | |
| 2 | +#define _XT_RPATH_H | |
| 3 | + | |
| 4 | +#include <linux/types.h> | |
| 5 | + | |
| 6 | +enum { | |
| 7 | + XT_RPFILTER_LOOSE = 1 << 0, | |
| 8 | + XT_RPFILTER_VALID_MARK = 1 << 1, | |
| 9 | + XT_RPFILTER_ACCEPT_LOCAL = 1 << 2, | |
| 10 | + XT_RPFILTER_INVERT = 1 << 3, | |
| 11 | +#ifdef __KERNEL__ | |
| 12 | + XT_RPFILTER_OPTION_MASK = XT_RPFILTER_LOOSE | | |
| 13 | + XT_RPFILTER_VALID_MARK | | |
| 14 | + XT_RPFILTER_ACCEPT_LOCAL | | |
| 15 | + XT_RPFILTER_INVERT, | |
| 16 | +#endif | |
| 17 | +}; | |
| 18 | + | |
| 19 | +struct xt_rpfilter_info { | |
| 20 | + __u8 flags; | |
| 21 | +}; | |
| 22 | + | |
| 23 | +#endif | |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _UAPI__LINUX_BRIDGE_EBT_802_3_H |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if_ether.h> | |
| 5 | 6 | |
| 6 | 7 | #define EBT_802_3_SAP 0x01 |
| 7 | 8 | #define EBT_802_3_TYPE 0x02 |
| @@ -42,8 +43,8 @@ struct hdr_ni { · 34 unmodified lines | ||
| 42 | 43 | }; |
| 43 | 44 | |
| 44 | 45 | struct ebt_802_3_hdr { |
| 45 | − __u8 daddr[6]; | |
| 46 | − __u8 saddr[6]; | |
| 46 | + __u8 daddr[ETH_ALEN]; | |
| 47 | + __u8 saddr[ETH_ALEN]; | |
| 47 | 48 | __be16 len; |
| 48 | 49 | union { |
| 49 | 50 | struct hdr_ui ui; |
| @@ -2,6 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | #define _IPT_CLUSTERIP_H_target |
| 3 | 3 | |
| 4 | 4 | #include <linux/types.h> |
| 5 | +#include <linux/if_ether.h> | |
| 5 | 6 | |
| 6 | 7 | enum clusterip_hashmode { |
| 7 | 8 | CLUSTERIP_HASHMODE_SIP = 0, |
| @@ -22,7 +23,7 @@ struct ipt_clusterip_tgt_info { · 14 unmodified lines | ||
| 22 | 23 | __u32 flags; |
| 23 | 24 | |
| 24 | 25 | /* only relevant for new ones */ |
| 25 | − __u8 clustermac[6]; | |
| 26 | + __u8 clustermac[ETH_ALEN]; | |
| 26 | 27 | __u16 num_total_nodes; |
| 27 | 28 | __u16 num_local_nodes; |
| 28 | 29 | __u16 local_nodes[CLUSTERIP_MAX_NODES]; |
| @@ -71,6 +71,20 @@ · 70 unmodified lines | ||
| 71 | 71 | * @NFC_CMD_DISABLE_SE: Disable the physical link to a specific secure element. |
| 72 | 72 | * @NFC_CMD_FW_DOWNLOAD: Request to Load/flash firmware, or event to inform |
| 73 | 73 | * that some firmware was loaded |
| 74 | + * @NFC_EVENT_SE_ADDED: Event emitted when a new secure element is discovered. | |
| 75 | + * This typically will be sent whenever a new NFC controller with either | |
| 76 | + * an embedded SE or an UICC one connected to it through SWP. | |
| 77 | + * @NFC_EVENT_SE_REMOVED: Event emitted when a secure element is removed from | |
| 78 | + * the system, as a consequence of e.g. an NFC controller being unplugged. | |
| 79 | + * @NFC_EVENT_SE_CONNECTIVITY: This event is emitted whenever a secure element | |
| 80 | + * is requesting connectivity access. For example a UICC SE may need to | |
| 81 | + * talk with a sleeping modem and will notify this need by sending this | |
| 82 | + * event. It is then up to userspace to decide if it will wake the modem | |
| 83 | + * up or not. | |
| 84 | + * @NFC_EVENT_SE_TRANSACTION: This event is sent when an application running on | |
| 85 | + * a specific SE notifies us about the end of a transaction. The parameter | |
| 86 | + * for this event is the application ID (AID). | |
| 87 | + * @NFC_CMD_GET_SE: Dump all discovered secure elements from an NFC controller. | |
| 74 | 88 | */ |
| 75 | 89 | enum nfc_commands { |
| 76 | 90 | NFC_CMD_UNSPEC, |
| @@ -97,6 +111,9 @@ enum nfc_commands { · 20 unmodified lines | ||
| 97 | 111 | NFC_CMD_FW_DOWNLOAD, |
| 98 | 112 | NFC_EVENT_SE_ADDED, |
| 99 | 113 | NFC_EVENT_SE_REMOVED, |
| 114 | + NFC_EVENT_SE_CONNECTIVITY, | |
| 115 | + NFC_EVENT_SE_TRANSACTION, | |
| 116 | + NFC_CMD_GET_SE, | |
| 100 | 117 | /* private: internal use only */ |
| 101 | 118 | __NFC_CMD_AFTER_LAST |
| 102 | 119 | }; |
| @@ -129,6 +146,7 @@ enum nfc_commands { · 26 unmodified lines | ||
| 129 | 146 | * @NFC_ATTR_FIRMWARE_NAME: Free format firmware version |
| 130 | 147 | * @NFC_ATTR_SE_INDEX: Secure element index |
| 131 | 148 | * @NFC_ATTR_SE_TYPE: Secure element type (UICC or EMBEDDED) |
| 149 | + * @NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS: Firmware download operation status | |
| 132 | 150 | */ |
| 133 | 151 | enum nfc_attrs { |
| 134 | 152 | NFC_ATTR_UNSPEC, |
| @@ -154,6 +172,8 @@ enum nfc_attrs { · 19 unmodified lines | ||
| 154 | 172 | NFC_ATTR_FIRMWARE_NAME, |
| 155 | 173 | NFC_ATTR_SE_INDEX, |
| 156 | 174 | NFC_ATTR_SE_TYPE, |
| 175 | + NFC_ATTR_SE_AID, | |
| 176 | + NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS, | |
| 157 | 177 | /* private: internal use only */ |
| 158 | 178 | __NFC_ATTR_AFTER_LAST |
| 159 | 179 | }; |
| @@ -125,6 +125,31 @@ · 124 unmodified lines | ||
| 125 | 125 | * interfaces that a given device supports. |
| 126 | 126 | */ |
| 127 | 127 | |
| 128 | +/** | |
| 129 | + * DOC: packet coalesce support | |
| 130 | + * | |
| 131 | + * In most cases, host that receives IPv4 and IPv6 multicast/broadcast | |
| 132 | + * packets does not do anything with these packets. Therefore the | |
| 133 | + * reception of these unwanted packets causes unnecessary processing | |
| 134 | + * and power consumption. | |
| 135 | + * | |
| 136 | + * Packet coalesce feature helps to reduce number of received interrupts | |
| 137 | + * to host by buffering these packets in firmware/hardware for some | |
| 138 | + * predefined time. Received interrupt will be generated when one of the | |
| 139 | + * following events occur. | |
| 140 | + * a) Expiration of hardware timer whose expiration time is set to maximum | |
| 141 | + * coalescing delay of matching coalesce rule. | |
| 142 | + * b) Coalescing buffer in hardware reaches it's limit. | |
| 143 | + * c) Packet doesn't match any of the configured coalesce rules. | |
| 144 | + * | |
| 145 | + * User needs to configure following parameters for creating a coalesce | |
| 146 | + * rule. | |
| 147 | + * a) Maximum coalescing delay | |
| 148 | + * b) List of packet patterns which needs to be matched | |
| 149 | + * c) Condition for coalescence. pattern 'match' or 'no match' | |
| 150 | + * Multiple such rules can be created. | |
| 151 | + */ | |
| 152 | + | |
| 128 | 153 | /** |
| 129 | 154 | * enum nl80211_commands - supported nl80211 commands |
| 130 | 155 | * |
| @@ -648,6 +673,19 @@ · 517 unmodified lines | ||
| 648 | 673 | * @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can |
| 649 | 674 | * return back to normal. |
| 650 | 675 | * |
| 676 | + * @NL80211_CMD_GET_COALESCE: Get currently supported coalesce rules. | |
| 677 | + * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules. | |
| 678 | + * | |
| 679 | + * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the | |
| 680 | + * the new channel information (Channel Switch Announcement - CSA) | |
| 681 | + * in the beacon for some time (as defined in the | |
| 682 | + * %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the | |
| 683 | + * new channel. Userspace provides the new channel information (using | |
| 684 | + * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel | |
| 685 | + * width). %NL80211_ATTR_CH_SWITCH_BLOCK_TX may be supplied to inform | |
| 686 | + * other station that transmission must be blocked until the channel | |
| 687 | + * switch is complete. | |
| 688 | + * | |
| 651 | 689 | * @NL80211_CMD_MAX: highest used command number |
| 652 | 690 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 653 | 691 | */ |
| @@ -810,6 +848,11 @@ enum nl80211_commands { · 156 unmodified lines | ||
| 810 | 848 | NL80211_CMD_CRIT_PROTOCOL_START, |
| 811 | 849 | NL80211_CMD_CRIT_PROTOCOL_STOP, |
| 812 | 850 | |
| 851 | + NL80211_CMD_GET_COALESCE, | |
| 852 | + NL80211_CMD_SET_COALESCE, | |
| 853 | + | |
| 854 | + NL80211_CMD_CHANNEL_SWITCH, | |
| 855 | + | |
| 813 | 856 | /* add new commands above here */ |
| 814 | 857 | |
| 815 | 858 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1436,6 +1479,23 @@ enum nl80211_commands { · 620 unmodified lines | ||
| 1436 | 1479 | * allowed to be used with the first @NL80211_CMD_SET_STATION command to |
| 1437 | 1480 | * update a TDLS peer STA entry. |
| 1438 | 1481 | * |
| 1482 | + * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information. | |
| 1483 | + * | |
| 1484 | + * @NL80211_ATTR_CH_SWITCH_COUNT: u32 attribute specifying the number of TBTT's | |
| 1485 | + * until the channel switch event. | |
| 1486 | + * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission | |
| 1487 | + * must be blocked on the current channel (before the channel switch | |
| 1488 | + * operation). | |
| 1489 | + * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information | |
| 1490 | + * for the time while performing a channel switch. | |
| 1491 | + * @NL80211_ATTR_CSA_C_OFF_BEACON: Offset of the channel switch counter | |
| 1492 | + * field in the beacons tail (%NL80211_ATTR_BEACON_TAIL). | |
| 1493 | + * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter | |
| 1494 | + * field in the probe response (%NL80211_ATTR_PROBE_RESP). | |
| 1495 | + * | |
| 1496 | + * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32. | |
| 1497 | + * As specified in the &enum nl80211_rxmgmt_flags. | |
| 1498 | + * | |
| 1439 | 1499 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1440 | 1500 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1441 | 1501 | */ |
| @@ -1736,6 +1796,16 @@ enum nl80211_attrs { · 294 unmodified lines | ||
| 1736 | 1796 | |
| 1737 | 1797 | NL80211_ATTR_PEER_AID, |
| 1738 | 1798 | |
| 1799 | + NL80211_ATTR_COALESCE_RULE, | |
| 1800 | + | |
| 1801 | + NL80211_ATTR_CH_SWITCH_COUNT, | |
| 1802 | + NL80211_ATTR_CH_SWITCH_BLOCK_TX, | |
| 1803 | + NL80211_ATTR_CSA_IES, | |
| 1804 | + NL80211_ATTR_CSA_C_OFF_BEACON, | |
| 1805 | + NL80211_ATTR_CSA_C_OFF_PRESP, | |
| 1806 | + | |
| 1807 | + NL80211_ATTR_RXMGMT_FLAGS, | |
| 1808 | + | |
| 1739 | 1809 | /* add attributes here, update the policy in nl80211.c */ |
| 1740 | 1810 | |
| 1741 | 1811 | __NL80211_ATTR_AFTER_LAST, |
| @@ -2772,6 +2842,21 @@ enum nl80211_chan_width { · 1030 unmodified lines | ||
| 2772 | 2842 | NL80211_CHAN_WIDTH_10, |
| 2773 | 2843 | }; |
| 2774 | 2844 | |
| 2845 | +/** | |
| 2846 | + * enum nl80211_bss_scan_width - control channel width for a BSS | |
| 2847 | + * | |
| 2848 | + * These values are used with the %NL80211_BSS_CHAN_WIDTH attribute. | |
| 2849 | + * | |
| 2850 | + * @NL80211_BSS_CHAN_WIDTH_20: control channel is 20 MHz wide or compatible | |
| 2851 | + * @NL80211_BSS_CHAN_WIDTH_10: control channel is 10 MHz wide | |
| 2852 | + * @NL80211_BSS_CHAN_WIDTH_5: control channel is 5 MHz wide | |
| 2853 | + */ | |
| 2854 | +enum nl80211_bss_scan_width { | |
| 2855 | + NL80211_BSS_CHAN_WIDTH_20, | |
| 2856 | + NL80211_BSS_CHAN_WIDTH_10, | |
| 2857 | + NL80211_BSS_CHAN_WIDTH_5, | |
| 2858 | +}; | |
| 2859 | + | |
| 2775 | 2860 | /** |
| 2776 | 2861 | * enum nl80211_bss - netlink attributes for a BSS |
| 2777 | 2862 | * |
| @@ -2796,6 +2881,8 @@ enum nl80211_chan_width { · 18 unmodified lines | ||
| 2796 | 2881 | * @NL80211_BSS_BEACON_IES: binary attribute containing the raw information |
| 2797 | 2882 | * elements from a Beacon frame (bin); not present if no Beacon frame has |
| 2798 | 2883 | * yet been received |
| 2884 | + * @NL80211_BSS_CHAN_WIDTH: channel width of the control channel | |
| 2885 | + * (u32, enum nl80211_bss_scan_width) | |
| 2799 | 2886 | * @__NL80211_BSS_AFTER_LAST: internal |
| 2800 | 2887 | * @NL80211_BSS_MAX: highest BSS attribute |
| 2801 | 2888 | */ |
| @@ -2812,6 +2899,7 @@ enum nl80211_bss { · 10 unmodified lines | ||
| 2812 | 2899 | NL80211_BSS_STATUS, |
| 2813 | 2900 | NL80211_BSS_SEEN_MS_AGO, |
| 2814 | 2901 | NL80211_BSS_BEACON_IES, |
| 2902 | + NL80211_BSS_CHAN_WIDTH, | |
| 2815 | 2903 | |
| 2816 | 2904 | /* keep last */ |
| 2817 | 2905 | __NL80211_BSS_AFTER_LAST, |
| @@ -3060,11 +3148,11 @@ enum nl80211_tx_power_setting { · 242 unmodified lines | ||
| 3060 | 3148 | }; |
| 3061 | 3149 | |
| 3062 | 3150 | /** |
| 3063 | − * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute | |
| 3064 | − * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute | |
| 3065 | − * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has | |
| 3151 | + * enum nl80211_packet_pattern_attr - packet pattern attribute | |
| 3152 | + * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute | |
| 3153 | + * @NL80211_PKTPAT_PATTERN: the pattern, values where the mask has | |
| 3066 | 3154 | * a zero bit are ignored |
| 3067 | − * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have | |
| 3155 | + * @NL80211_PKTPAT_MASK: pattern mask, must be long enough to have | |
| 3068 | 3156 | * a bit for each byte in the pattern. The lowest-order bit corresponds |
| 3069 | 3157 | * to the first byte of the pattern, but the bytes of the pattern are |
| 3070 | 3158 | * in a little-endian-like format, i.e. the 9th byte of the pattern |
| @@ -3075,39 +3163,50 @@ enum nl80211_tx_power_setting { · 4 unmodified lines | ||
| 3075 | 3163 | * Note that the pattern matching is done as though frames were not |
| 3076 | 3164 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked |
| 3077 | 3165 | * first (including SNAP header unpacking) and then matched. |
| 3078 | − * @NL80211_WOWLAN_PKTPAT_OFFSET: packet offset, pattern is matched after | |
| 3166 | + * @NL80211_PKTPAT_OFFSET: packet offset, pattern is matched after | |
| 3079 | 3167 | * these fixed number of bytes of received packet |
| 3080 | − * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes | |
| 3081 | − * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number | |
| 3168 | + * @NUM_NL80211_PKTPAT: number of attributes | |
| 3169 | + * @MAX_NL80211_PKTPAT: max attribute number | |
| 3082 | 3170 | */ |
| 3083 | −enum nl80211_wowlan_packet_pattern_attr { | |
| 3084 | − __NL80211_WOWLAN_PKTPAT_INVALID, | |
| 3085 | − NL80211_WOWLAN_PKTPAT_MASK, | |
| 3086 | − NL80211_WOWLAN_PKTPAT_PATTERN, | |
| 3087 | − NL80211_WOWLAN_PKTPAT_OFFSET, | |
| 3171 | +enum nl80211_packet_pattern_attr { | |
| 3172 | + __NL80211_PKTPAT_INVALID, | |
| 3173 | + NL80211_PKTPAT_MASK, | |
| 3174 | + NL80211_PKTPAT_PATTERN, | |
| 3175 | + NL80211_PKTPAT_OFFSET, | |
| 3088 | 3176 | |
| 3089 | − NUM_NL80211_WOWLAN_PKTPAT, | |
| 3090 | − MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, | |
| 3177 | + NUM_NL80211_PKTPAT, | |
| 3178 | + MAX_NL80211_PKTPAT = NUM_NL80211_PKTPAT - 1, | |
| 3091 | 3179 | }; |
| 3092 | 3180 | |
| 3093 | 3181 | /** |
| 3094 | − * struct nl80211_wowlan_pattern_support - pattern support information | |
| 3182 | + * struct nl80211_pattern_support - packet pattern support information | |
| 3095 | 3183 | * @max_patterns: maximum number of patterns supported |
| 3096 | 3184 | * @min_pattern_len: minimum length of each pattern |
| 3097 | 3185 | * @max_pattern_len: maximum length of each pattern |
| 3098 | 3186 | * @max_pkt_offset: maximum Rx packet offset |
| 3099 | 3187 | * |
| 3100 | 3188 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when |
| 3101 | − * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the | |
| 3102 | − * capability information given by the kernel to userspace. | |
| 3189 | + * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED or in | |
| 3190 | + * %NL80211_ATTR_COALESCE_RULE_PKT_PATTERN when that is part of | |
| 3191 | + * %NL80211_ATTR_COALESCE_RULE in the capability information given | |
| 3192 | + * by the kernel to userspace. | |
| 3103 | 3193 | */ |
| 3104 | −struct nl80211_wowlan_pattern_support { | |
| 3194 | +struct nl80211_pattern_support { | |
| 3105 | 3195 | __u32 max_patterns; |
| 3106 | 3196 | __u32 min_pattern_len; |
| 3107 | 3197 | __u32 max_pattern_len; |
| 3108 | 3198 | __u32 max_pkt_offset; |
| 3109 | 3199 | } __attribute__((packed)); |
| 3110 | 3200 | |
| 3201 | +/* only for backward compatibility */ | |
| 3202 | +#define __NL80211_WOWLAN_PKTPAT_INVALID __NL80211_PKTPAT_INVALID | |
| 3203 | +#define NL80211_WOWLAN_PKTPAT_MASK NL80211_PKTPAT_MASK | |
| 3204 | +#define NL80211_WOWLAN_PKTPAT_PATTERN NL80211_PKTPAT_PATTERN | |
| 3205 | +#define NL80211_WOWLAN_PKTPAT_OFFSET NL80211_PKTPAT_OFFSET | |
| 3206 | +#define NUM_NL80211_WOWLAN_PKTPAT NUM_NL80211_PKTPAT | |
| 3207 | +#define MAX_NL80211_WOWLAN_PKTPAT MAX_NL80211_PKTPAT | |
| 3208 | +#define nl80211_wowlan_pattern_support nl80211_pattern_support | |
| 3209 | + | |
| 3111 | 3210 | /** |
| 3112 | 3211 | * enum nl80211_wowlan_triggers - WoWLAN trigger definitions |
| 3113 | 3212 | * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes |
| @@ -3127,7 +3226,7 @@ struct nl80211_wowlan_pattern_support { · 13 unmodified lines | ||
| 3127 | 3226 | * pattern matching is done after the packet is converted to the MSDU. |
| 3128 | 3227 | * |
| 3129 | 3228 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute |
| 3130 | − * carrying a &struct nl80211_wowlan_pattern_support. | |
| 3229 | + * carrying a &struct nl80211_pattern_support. | |
| 3131 | 3230 | * |
| 3132 | 3231 | * When reporting wakeup. it is a u32 attribute containing the 0-based |
| 3133 | 3232 | * index of the pattern that caused the wakeup, in the patterns passed |
| @@ -3284,7 +3383,7 @@ struct nl80211_wowlan_tcp_data_token_feature { · 150 unmodified lines | ||
| 3284 | 3383 | * @NL80211_WOWLAN_TCP_WAKE_PAYLOAD: wake packet payload, for advertising a |
| 3285 | 3384 | * u32 attribute holding the maximum length |
| 3286 | 3385 | * @NL80211_WOWLAN_TCP_WAKE_MASK: Wake packet payload mask, not used for |
| 3287 | − * feature advertising. The mask works like @NL80211_WOWLAN_PKTPAT_MASK | |
| 3386 | + * feature advertising. The mask works like @NL80211_PKTPAT_MASK | |
| 3288 | 3387 | * but on the TCP payload only. |
| 3289 | 3388 | * @NUM_NL80211_WOWLAN_TCP: number of TCP attributes |
| 3290 | 3389 | * @MAX_NL80211_WOWLAN_TCP: highest attribute number |
| @@ -3308,6 +3407,55 @@ enum nl80211_wowlan_tcp_attrs { · 17 unmodified lines | ||
| 3308 | 3407 | MAX_NL80211_WOWLAN_TCP = NUM_NL80211_WOWLAN_TCP - 1 |
| 3309 | 3408 | }; |
| 3310 | 3409 | |
| 3410 | +/** | |
| 3411 | + * struct nl80211_coalesce_rule_support - coalesce rule support information | |
| 3412 | + * @max_rules: maximum number of rules supported | |
| 3413 | + * @pat: packet pattern support information | |
| 3414 | + * @max_delay: maximum supported coalescing delay in msecs | |
| 3415 | + * | |
| 3416 | + * This struct is carried in %NL80211_ATTR_COALESCE_RULE in the | |
| 3417 | + * capability information given by the kernel to userspace. | |
| 3418 | + */ | |
| 3419 | +struct nl80211_coalesce_rule_support { | |
| 3420 | + __u32 max_rules; | |
| 3421 | + struct nl80211_pattern_support pat; | |
| 3422 | + __u32 max_delay; | |
| 3423 | +} __attribute__((packed)); | |
| 3424 | + | |
| 3425 | +/** | |
| 3426 | + * enum nl80211_attr_coalesce_rule - coalesce rule attribute | |
| 3427 | + * @__NL80211_COALESCE_RULE_INVALID: invalid number for nested attribute | |
| 3428 | + * @NL80211_ATTR_COALESCE_RULE_DELAY: delay in msecs used for packet coalescing | |
| 3429 | + * @NL80211_ATTR_COALESCE_RULE_CONDITION: condition for packet coalescence, | |
| 3430 | + * see &enum nl80211_coalesce_condition. | |
| 3431 | + * @NL80211_ATTR_COALESCE_RULE_PKT_PATTERN: packet offset, pattern is matched | |
| 3432 | + * after these fixed number of bytes of received packet | |
| 3433 | + * @NUM_NL80211_ATTR_COALESCE_RULE: number of attributes | |
| 3434 | + * @NL80211_ATTR_COALESCE_RULE_MAX: max attribute number | |
| 3435 | + */ | |
| 3436 | +enum nl80211_attr_coalesce_rule { | |
| 3437 | + __NL80211_COALESCE_RULE_INVALID, | |
| 3438 | + NL80211_ATTR_COALESCE_RULE_DELAY, | |
| 3439 | + NL80211_ATTR_COALESCE_RULE_CONDITION, | |
| 3440 | + NL80211_ATTR_COALESCE_RULE_PKT_PATTERN, | |
| 3441 | + | |
| 3442 | + /* keep last */ | |
| 3443 | + NUM_NL80211_ATTR_COALESCE_RULE, | |
| 3444 | + NL80211_ATTR_COALESCE_RULE_MAX = NUM_NL80211_ATTR_COALESCE_RULE - 1 | |
| 3445 | +}; | |
| 3446 | + | |
| 3447 | +/** | |
| 3448 | + * enum nl80211_coalesce_condition - coalesce rule conditions | |
| 3449 | + * @NL80211_COALESCE_CONDITION_MATCH: coalaesce Rx packets when patterns | |
| 3450 | + * in a rule are matched. | |
| 3451 | + * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns | |
| 3452 | + * in a rule are not matched. | |
| 3453 | + */ | |
| 3454 | +enum nl80211_coalesce_condition { | |
| 3455 | + NL80211_COALESCE_CONDITION_MATCH, | |
| 3456 | + NL80211_COALESCE_CONDITION_NO_MATCH | |
| 3457 | +}; | |
| 3458 | + | |
| 3311 | 3459 | /** |
| 3312 | 3460 | * enum nl80211_iface_limit_attrs - limit attributes |
| 3313 | 3461 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) |
| @@ -3758,4 +3906,15 @@ enum nl80211_crit_proto_id { · 444 unmodified lines | ||
| 3758 | 3906 | /* maximum duration for critical protocol measures */ |
| 3759 | 3907 | #define NL80211_CRIT_PROTO_MAX_DURATION 5000 /* msec */ |
| 3760 | 3908 | |
| 3909 | +/** | |
| 3910 | + * enum nl80211_rxmgmt_flags - flags for received management frame. | |
| 3911 | + * | |
| 3912 | + * Used by cfg80211_rx_mgmt() | |
| 3913 | + * | |
| 3914 | + * @NL80211_RXMGMT_FLAG_ANSWERED: frame was answered by device/driver. | |
| 3915 | + */ | |
| 3916 | +enum nl80211_rxmgmt_flags { | |
| 3917 | + NL80211_RXMGMT_FLAG_ANSWERED = 1 << 0, | |
| 3918 | +}; | |
| 3919 | + | |
| 3761 | 3920 | #endif /* __LINUX_NL80211_H */ |
| @@ -0,0 +1,477 @@ | ||
| 1 | +/* | |
| 2 | + * Definitions for the NVM Express interface | |
| 3 | + * Copyright (c) 2011-2013, Intel Corporation. | |
| 4 | + * | |
| 5 | + * This program is free software; you can redistribute it and/or modify it | |
| 6 | + * under the terms and conditions of the GNU General Public License, | |
| 7 | + * version 2, as published by the Free Software Foundation. | |
| 8 | + * | |
| 9 | + * This program is distributed in the hope it will be useful, but WITHOUT | |
| 10 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 11 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
| 12 | + * more details. | |
| 13 | + * | |
| 14 | + * You should have received a copy of the GNU General Public License along with | |
| 15 | + * this program; if not, write to the Free Software Foundation, Inc., | |
| 16 | + * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | |
| 17 | + */ | |
| 18 | + | |
| 19 | +#ifndef _UAPI_LINUX_NVME_H | |
| 20 | +#define _UAPI_LINUX_NVME_H | |
| 21 | + | |
| 22 | +#include <linux/types.h> | |
| 23 | + | |
| 24 | +struct nvme_id_power_state { | |
| 25 | + __le16 max_power; /* centiwatts */ | |
| 26 | + __u8 rsvd2; | |
| 27 | + __u8 flags; | |
| 28 | + __le32 entry_lat; /* microseconds */ | |
| 29 | + __le32 exit_lat; /* microseconds */ | |
| 30 | + __u8 read_tput; | |
| 31 | + __u8 read_lat; | |
| 32 | + __u8 write_tput; | |
| 33 | + __u8 write_lat; | |
| 34 | + __u8 rsvd16[16]; | |
| 35 | +}; | |
| 36 | + | |
| 37 | +enum { | |
| 38 | + NVME_PS_FLAGS_MAX_POWER_SCALE = 1 << 0, | |
| 39 | + NVME_PS_FLAGS_NON_OP_STATE = 1 << 1, | |
| 40 | +}; | |
| 41 | + | |
| 42 | +struct nvme_id_ctrl { | |
| 43 | + __le16 vid; | |
| 44 | + __le16 ssvid; | |
| 45 | + char sn[20]; | |
| 46 | + char mn[40]; | |
| 47 | + char fr[8]; | |
| 48 | + __u8 rab; | |
| 49 | + __u8 ieee[3]; | |
| 50 | + __u8 mic; | |
| 51 | + __u8 mdts; | |
| 52 | + __u8 rsvd78[178]; | |
| 53 | + __le16 oacs; | |
| 54 | + __u8 acl; | |
| 55 | + __u8 aerl; | |
| 56 | + __u8 frmw; | |
| 57 | + __u8 lpa; | |
| 58 | + __u8 elpe; | |
| 59 | + __u8 npss; | |
| 60 | + __u8 rsvd264[248]; | |
| 61 | + __u8 sqes; | |
| 62 | + __u8 cqes; | |
| 63 | + __u8 rsvd514[2]; | |
| 64 | + __le32 nn; | |
| 65 | + __le16 oncs; | |
| 66 | + __le16 fuses; | |
| 67 | + __u8 fna; | |
| 68 | + __u8 vwc; | |
| 69 | + __le16 awun; | |
| 70 | + __le16 awupf; | |
| 71 | + __u8 rsvd530[1518]; | |
| 72 | + struct nvme_id_power_state psd[32]; | |
| 73 | + __u8 vs[1024]; | |
| 74 | +}; | |
| 75 | + | |
| 76 | +enum { | |
| 77 | + NVME_CTRL_ONCS_COMPARE = 1 << 0, | |
| 78 | + NVME_CTRL_ONCS_WRITE_UNCORRECTABLE = 1 << 1, | |
| 79 | + NVME_CTRL_ONCS_DSM = 1 << 2, | |
| 80 | +}; | |
| 81 | + | |
| 82 | +struct nvme_lbaf { | |
| 83 | + __le16 ms; | |
| 84 | + __u8 ds; | |
| 85 | + __u8 rp; | |
| 86 | +}; | |
| 87 | + | |
| 88 | +struct nvme_id_ns { | |
| 89 | + __le64 nsze; | |
| 90 | + __le64 ncap; | |
| 91 | + __le64 nuse; | |
| 92 | + __u8 nsfeat; | |
| 93 | + __u8 nlbaf; | |
| 94 | + __u8 flbas; | |
| 95 | + __u8 mc; | |
| 96 | + __u8 dpc; | |
| 97 | + __u8 dps; | |
| 98 | + __u8 rsvd30[98]; | |
| 99 | + struct nvme_lbaf lbaf[16]; | |
| 100 | + __u8 rsvd192[192]; | |
| 101 | + __u8 vs[3712]; | |
| 102 | +}; | |
| 103 | + | |
| 104 | +enum { | |
| 105 | + NVME_NS_FEAT_THIN = 1 << 0, | |
| 106 | + NVME_LBAF_RP_BEST = 0, | |
| 107 | + NVME_LBAF_RP_BETTER = 1, | |
| 108 | + NVME_LBAF_RP_GOOD = 2, | |
| 109 | + NVME_LBAF_RP_DEGRADED = 3, | |
| 110 | +}; | |
| 111 | + | |
| 112 | +struct nvme_smart_log { | |
| 113 | + __u8 critical_warning; | |
| 114 | + __u8 temperature[2]; | |
| 115 | + __u8 avail_spare; | |
| 116 | + __u8 spare_thresh; | |
| 117 | + __u8 percent_used; | |
| 118 | + __u8 rsvd6[26]; | |
| 119 | + __u8 data_units_read[16]; | |
| 120 | + __u8 data_units_written[16]; | |
| 121 | + __u8 host_reads[16]; | |
| 122 | + __u8 host_writes[16]; | |
| 123 | + __u8 ctrl_busy_time[16]; | |
| 124 | + __u8 power_cycles[16]; | |
| 125 | + __u8 power_on_hours[16]; | |
| 126 | + __u8 unsafe_shutdowns[16]; | |
| 127 | + __u8 media_errors[16]; | |
| 128 | + __u8 num_err_log_entries[16]; | |
| 129 | + __u8 rsvd192[320]; | |
| 130 | +}; | |
| 131 | + | |
| 132 | +enum { | |
| 133 | + NVME_SMART_CRIT_SPARE = 1 << 0, | |
| 134 | + NVME_SMART_CRIT_TEMPERATURE = 1 << 1, | |
| 135 | + NVME_SMART_CRIT_RELIABILITY = 1 << 2, | |
| 136 | + NVME_SMART_CRIT_MEDIA = 1 << 3, | |
| 137 | + NVME_SMART_CRIT_VOLATILE_MEMORY = 1 << 4, | |
| 138 | +}; | |
| 139 | + | |
| 140 | +struct nvme_lba_range_type { | |
| 141 | + __u8 type; | |
| 142 | + __u8 attributes; | |
| 143 | + __u8 rsvd2[14]; | |
| 144 | + __u64 slba; | |
| 145 | + __u64 nlb; | |
| 146 | + __u8 guid[16]; | |
| 147 | + __u8 rsvd48[16]; | |
| 148 | +}; | |
| 149 | + | |
| 150 | +enum { | |
| 151 | + NVME_LBART_TYPE_FS = 0x01, | |
| 152 | + NVME_LBART_TYPE_RAID = 0x02, | |
| 153 | + NVME_LBART_TYPE_CACHE = 0x03, | |
| 154 | + NVME_LBART_TYPE_SWAP = 0x04, | |
| 155 | + | |
| 156 | + NVME_LBART_ATTRIB_TEMP = 1 << 0, | |
| 157 | + NVME_LBART_ATTRIB_HIDE = 1 << 1, | |
| 158 | +}; | |
| 159 | + | |
| 160 | +/* I/O commands */ | |
| 161 | + | |
| 162 | +enum nvme_opcode { | |
| 163 | + nvme_cmd_flush = 0x00, | |
| 164 | + nvme_cmd_write = 0x01, | |
| 165 | + nvme_cmd_read = 0x02, | |
| 166 | + nvme_cmd_write_uncor = 0x04, | |
| 167 | + nvme_cmd_compare = 0x05, | |
| 168 | + nvme_cmd_dsm = 0x09, | |
| 169 | +}; | |
| 170 | + | |
| 171 | +struct nvme_common_command { | |
| 172 | + __u8 opcode; | |
| 173 | + __u8 flags; | |
| 174 | + __u16 command_id; | |
| 175 | + __le32 nsid; | |
| 176 | + __le32 cdw2[2]; | |
| 177 | + __le64 metadata; | |
| 178 | + __le64 prp1; | |
| 179 | + __le64 prp2; | |
| 180 | + __le32 cdw10[6]; | |
| 181 | +}; | |
| 182 | + | |
| 183 | +struct nvme_rw_command { | |
| 184 | + __u8 opcode; | |
| 185 | + __u8 flags; | |
| 186 | + __u16 command_id; | |
| 187 | + __le32 nsid; | |
| 188 | + __u64 rsvd2; | |
| 189 | + __le64 metadata; | |
| 190 | + __le64 prp1; | |
| 191 | + __le64 prp2; | |
| 192 | + __le64 slba; | |
| 193 | + __le16 length; | |
| 194 | + __le16 control; | |
| 195 | + __le32 dsmgmt; | |
| 196 | + __le32 reftag; | |
| 197 | + __le16 apptag; | |
| 198 | + __le16 appmask; | |
| 199 | +}; | |
| 200 | + | |
| 201 | +enum { | |
| 202 | + NVME_RW_LR = 1 << 15, | |
| 203 | + NVME_RW_FUA = 1 << 14, | |
| 204 | + NVME_RW_DSM_FREQ_UNSPEC = 0, | |
| 205 | + NVME_RW_DSM_FREQ_TYPICAL = 1, | |
| 206 | + NVME_RW_DSM_FREQ_RARE = 2, | |
| 207 | + NVME_RW_DSM_FREQ_READS = 3, | |
| 208 | + NVME_RW_DSM_FREQ_WRITES = 4, | |
| 209 | + NVME_RW_DSM_FREQ_RW = 5, | |
| 210 | + NVME_RW_DSM_FREQ_ONCE = 6, | |
| 211 | + NVME_RW_DSM_FREQ_PREFETCH = 7, | |
| 212 | + NVME_RW_DSM_FREQ_TEMP = 8, | |
| 213 | + NVME_RW_DSM_LATENCY_NONE = 0 << 4, | |
| 214 | + NVME_RW_DSM_LATENCY_IDLE = 1 << 4, | |
| 215 | + NVME_RW_DSM_LATENCY_NORM = 2 << 4, | |
| 216 | + NVME_RW_DSM_LATENCY_LOW = 3 << 4, | |
| 217 | + NVME_RW_DSM_SEQ_REQ = 1 << 6, | |
| 218 | + NVME_RW_DSM_COMPRESSED = 1 << 7, | |
| 219 | +}; | |
| 220 | + | |
| 221 | +struct nvme_dsm_cmd { | |
| 222 | + __u8 opcode; | |
| 223 | + __u8 flags; | |
| 224 | + __u16 command_id; | |
| 225 | + __le32 nsid; | |
| 226 | + __u64 rsvd2[2]; | |
| 227 | + __le64 prp1; | |
| 228 | + __le64 prp2; | |
| 229 | + __le32 nr; | |
| 230 | + __le32 attributes; | |
| 231 | + __u32 rsvd12[4]; | |
| 232 | +}; | |
| 233 | + | |
| 234 | +enum { | |
| 235 | + NVME_DSMGMT_IDR = 1 << 0, | |
| 236 | + NVME_DSMGMT_IDW = 1 << 1, | |
| 237 | + NVME_DSMGMT_AD = 1 << 2, | |
| 238 | +}; | |
| 239 | + | |
| 240 | +struct nvme_dsm_range { | |
| 241 | + __le32 cattr; | |
| 242 | + __le32 nlb; | |
| 243 | + __le64 slba; | |
| 244 | +}; | |
| 245 | + | |
| 246 | +/* Admin commands */ | |
| 247 | + | |
| 248 | +enum nvme_admin_opcode { | |
| 249 | + nvme_admin_delete_sq = 0x00, | |
| 250 | + nvme_admin_create_sq = 0x01, | |
| 251 | + nvme_admin_get_log_page = 0x02, | |
| 252 | + nvme_admin_delete_cq = 0x04, | |
| 253 | + nvme_admin_create_cq = 0x05, | |
| 254 | + nvme_admin_identify = 0x06, | |
| 255 | + nvme_admin_abort_cmd = 0x08, | |
| 256 | + nvme_admin_set_features = 0x09, | |
| 257 | + nvme_admin_get_features = 0x0a, | |
| 258 | + nvme_admin_async_event = 0x0c, | |
| 259 | + nvme_admin_activate_fw = 0x10, | |
| 260 | + nvme_admin_download_fw = 0x11, | |
| 261 | + nvme_admin_format_nvm = 0x80, | |
| 262 | + nvme_admin_security_send = 0x81, | |
| 263 | + nvme_admin_security_recv = 0x82, | |
| 264 | +}; | |
| 265 | + | |
| 266 | +enum { | |
| 267 | + NVME_QUEUE_PHYS_CONTIG = (1 << 0), | |
| 268 | + NVME_CQ_IRQ_ENABLED = (1 << 1), | |
| 269 | + NVME_SQ_PRIO_URGENT = (0 << 1), | |
| 270 | + NVME_SQ_PRIO_HIGH = (1 << 1), | |
| 271 | + NVME_SQ_PRIO_MEDIUM = (2 << 1), | |
| 272 | + NVME_SQ_PRIO_LOW = (3 << 1), | |
| 273 | + NVME_FEAT_ARBITRATION = 0x01, | |
| 274 | + NVME_FEAT_POWER_MGMT = 0x02, | |
| 275 | + NVME_FEAT_LBA_RANGE = 0x03, | |
| 276 | + NVME_FEAT_TEMP_THRESH = 0x04, | |
| 277 | + NVME_FEAT_ERR_RECOVERY = 0x05, | |
| 278 | + NVME_FEAT_VOLATILE_WC = 0x06, | |
| 279 | + NVME_FEAT_NUM_QUEUES = 0x07, | |
| 280 | + NVME_FEAT_IRQ_COALESCE = 0x08, | |
| 281 | + NVME_FEAT_IRQ_CONFIG = 0x09, | |
| 282 | + NVME_FEAT_WRITE_ATOMIC = 0x0a, | |
| 283 | + NVME_FEAT_ASYNC_EVENT = 0x0b, | |
| 284 | + NVME_FEAT_SW_PROGRESS = 0x0c, | |
| 285 | + NVME_FWACT_REPL = (0 << 3), | |
| 286 | + NVME_FWACT_REPL_ACTV = (1 << 3), | |
| 287 | + NVME_FWACT_ACTV = (2 << 3), | |
| 288 | +}; | |
| 289 | + | |
| 290 | +struct nvme_identify { | |
| 291 | + __u8 opcode; | |
| 292 | + __u8 flags; | |
| 293 | + __u16 command_id; | |
| 294 | + __le32 nsid; | |
| 295 | + __u64 rsvd2[2]; | |
| 296 | + __le64 prp1; | |
| 297 | + __le64 prp2; | |
| 298 | + __le32 cns; | |
| 299 | + __u32 rsvd11[5]; | |
| 300 | +}; | |
| 301 | + | |
| 302 | +struct nvme_features { | |
| 303 | + __u8 opcode; | |
| 304 | + __u8 flags; | |
| 305 | + __u16 command_id; | |
| 306 | + __le32 nsid; | |
| 307 | + __u64 rsvd2[2]; | |
| 308 | + __le64 prp1; | |
| 309 | + __le64 prp2; | |
| 310 | + __le32 fid; | |
| 311 | + __le32 dword11; | |
| 312 | + __u32 rsvd12[4]; | |
| 313 | +}; | |
| 314 | + | |
| 315 | +struct nvme_create_cq { | |
| 316 | + __u8 opcode; | |
| 317 | + __u8 flags; | |
| 318 | + __u16 command_id; | |
| 319 | + __u32 rsvd1[5]; | |
| 320 | + __le64 prp1; | |
| 321 | + __u64 rsvd8; | |
| 322 | + __le16 cqid; | |
| 323 | + __le16 qsize; | |
| 324 | + __le16 cq_flags; | |
| 325 | + __le16 irq_vector; | |
| 326 | + __u32 rsvd12[4]; | |
| 327 | +}; | |
| 328 | + | |
| 329 | +struct nvme_create_sq { | |
| 330 | + __u8 opcode; | |
| 331 | + __u8 flags; | |
| 332 | + __u16 command_id; | |
| 333 | + __u32 rsvd1[5]; | |
| 334 | + __le64 prp1; | |
| 335 | + __u64 rsvd8; | |
| 336 | + __le16 sqid; | |
| 337 | + __le16 qsize; | |
| 338 | + __le16 sq_flags; | |
| 339 | + __le16 cqid; | |
| 340 | + __u32 rsvd12[4]; | |
| 341 | +}; | |
| 342 | + | |
| 343 | +struct nvme_delete_queue { | |
| 344 | + __u8 opcode; | |
| 345 | + __u8 flags; | |
| 346 | + __u16 command_id; | |
| 347 | + __u32 rsvd1[9]; | |
| 348 | + __le16 qid; | |
| 349 | + __u16 rsvd10; | |
| 350 | + __u32 rsvd11[5]; | |
| 351 | +}; | |
| 352 | + | |
| 353 | +struct nvme_download_firmware { | |
| 354 | + __u8 opcode; | |
| 355 | + __u8 flags; | |
| 356 | + __u16 command_id; | |
| 357 | + __u32 rsvd1[5]; | |
| 358 | + __le64 prp1; | |
| 359 | + __le64 prp2; | |
| 360 | + __le32 numd; | |
| 361 | + __le32 offset; | |
| 362 | + __u32 rsvd12[4]; | |
| 363 | +}; | |
| 364 | + | |
| 365 | +struct nvme_format_cmd { | |
| 366 | + __u8 opcode; | |
| 367 | + __u8 flags; | |
| 368 | + __u16 command_id; | |
| 369 | + __le32 nsid; | |
| 370 | + __u64 rsvd2[4]; | |
| 371 | + __le32 cdw10; | |
| 372 | + __u32 rsvd11[5]; | |
| 373 | +}; | |
| 374 | + | |
| 375 | +struct nvme_command { | |
| 376 | + union { | |
| 377 | + struct nvme_common_command common; | |
| 378 | + struct nvme_rw_command rw; | |
| 379 | + struct nvme_identify identify; | |
| 380 | + struct nvme_features features; | |
| 381 | + struct nvme_create_cq create_cq; | |
| 382 | + struct nvme_create_sq create_sq; | |
| 383 | + struct nvme_delete_queue delete_queue; | |
| 384 | + struct nvme_download_firmware dlfw; | |
| 385 | + struct nvme_format_cmd format; | |
| 386 | + struct nvme_dsm_cmd dsm; | |
| 387 | + }; | |
| 388 | +}; | |
| 389 | + | |
| 390 | +enum { | |
| 391 | + NVME_SC_SUCCESS = 0x0, | |
| 392 | + NVME_SC_INVALID_OPCODE = 0x1, | |
| 393 | + NVME_SC_INVALID_FIELD = 0x2, | |
| 394 | + NVME_SC_CMDID_CONFLICT = 0x3, | |
| 395 | + NVME_SC_DATA_XFER_ERROR = 0x4, | |
| 396 | + NVME_SC_POWER_LOSS = 0x5, | |
| 397 | + NVME_SC_INTERNAL = 0x6, | |
| 398 | + NVME_SC_ABORT_REQ = 0x7, | |
| 399 | + NVME_SC_ABORT_QUEUE = 0x8, | |
| 400 | + NVME_SC_FUSED_FAIL = 0x9, | |
| 401 | + NVME_SC_FUSED_MISSING = 0xa, | |
| 402 | + NVME_SC_INVALID_NS = 0xb, | |
| 403 | + NVME_SC_CMD_SEQ_ERROR = 0xc, | |
| 404 | + NVME_SC_LBA_RANGE = 0x80, | |
| 405 | + NVME_SC_CAP_EXCEEDED = 0x81, | |
| 406 | + NVME_SC_NS_NOT_READY = 0x82, | |
| 407 | + NVME_SC_CQ_INVALID = 0x100, | |
| 408 | + NVME_SC_QID_INVALID = 0x101, | |
| 409 | + NVME_SC_QUEUE_SIZE = 0x102, | |
| 410 | + NVME_SC_ABORT_LIMIT = 0x103, | |
| 411 | + NVME_SC_ABORT_MISSING = 0x104, | |
| 412 | + NVME_SC_ASYNC_LIMIT = 0x105, | |
| 413 | + NVME_SC_FIRMWARE_SLOT = 0x106, | |
| 414 | + NVME_SC_FIRMWARE_IMAGE = 0x107, | |
| 415 | + NVME_SC_INVALID_VECTOR = 0x108, | |
| 416 | + NVME_SC_INVALID_LOG_PAGE = 0x109, | |
| 417 | + NVME_SC_INVALID_FORMAT = 0x10a, | |
| 418 | + NVME_SC_BAD_ATTRIBUTES = 0x180, | |
| 419 | + NVME_SC_WRITE_FAULT = 0x280, | |
| 420 | + NVME_SC_READ_ERROR = 0x281, | |
| 421 | + NVME_SC_GUARD_CHECK = 0x282, | |
| 422 | + NVME_SC_APPTAG_CHECK = 0x283, | |
| 423 | + NVME_SC_REFTAG_CHECK = 0x284, | |
| 424 | + NVME_SC_COMPARE_FAILED = 0x285, | |
| 425 | + NVME_SC_ACCESS_DENIED = 0x286, | |
| 426 | +}; | |
| 427 | + | |
| 428 | +struct nvme_completion { | |
| 429 | + __le32 result; /* Used by admin commands to return data */ | |
| 430 | + __u32 rsvd; | |
| 431 | + __le16 sq_head; /* how much of this queue may be reclaimed */ | |
| 432 | + __le16 sq_id; /* submission queue that generated this entry */ | |
| 433 | + __u16 command_id; /* of the command which completed */ | |
| 434 | + __le16 status; /* did the command fail, and if so, why? */ | |
| 435 | +}; | |
| 436 | + | |
| 437 | +struct nvme_user_io { | |
| 438 | + __u8 opcode; | |
| 439 | + __u8 flags; | |
| 440 | + __u16 control; | |
| 441 | + __u16 nblocks; | |
| 442 | + __u16 rsvd; | |
| 443 | + __u64 metadata; | |
| 444 | + __u64 addr; | |
| 445 | + __u64 slba; | |
| 446 | + __u32 dsmgmt; | |
| 447 | + __u32 reftag; | |
| 448 | + __u16 apptag; | |
| 449 | + __u16 appmask; | |
| 450 | +}; | |
| 451 | + | |
| 452 | +struct nvme_admin_cmd { | |
| 453 | + __u8 opcode; | |
| 454 | + __u8 flags; | |
| 455 | + __u16 rsvd1; | |
| 456 | + __u32 nsid; | |
| 457 | + __u32 cdw2; | |
| 458 | + __u32 cdw3; | |
| 459 | + __u64 metadata; | |
| 460 | + __u64 addr; | |
| 461 | + __u32 metadata_len; | |
| 462 | + __u32 data_len; | |
| 463 | + __u32 cdw10; | |
| 464 | + __u32 cdw11; | |
| 465 | + __u32 cdw12; | |
| 466 | + __u32 cdw13; | |
| 467 | + __u32 cdw14; | |
| 468 | + __u32 cdw15; | |
| 469 | + __u32 timeout_ms; | |
| 470 | + __u32 result; | |
| 471 | +}; | |
| 472 | + | |
| 473 | +#define NVME_IOCTL_ID _IO('N', 0x40) | |
| 474 | +#define NVME_IOCTL_ADMIN_CMD _IOWR('N', 0x41, struct nvme_admin_cmd) | |
| 475 | +#define NVME_IOCTL_SUBMIT_IO _IOW('N', 0x42, struct nvme_user_io) | |
| 476 | + | |
| 477 | +#endif /* _UAPI_LINUX_NVME_H */ | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | |
| 2 | 2 | /* |
| 3 | − * Copyright (c) 2007-2011 Nicira Networks. | |
| 3 | + * Copyright (c) 2007-2013 Nicira, Inc. | |
| 4 | 4 | * |
| 5 | 5 | * This program is free software; you can redistribute it and/or |
| 6 | 6 | * modify it under the terms of version 2 of the GNU General Public |
| @@ -165,6 +165,7 @@ enum ovs_vport_type { · 158 unmodified lines | ||
| 165 | 165 | OVS_VPORT_TYPE_NETDEV, /* network device */ |
| 166 | 166 | OVS_VPORT_TYPE_INTERNAL, /* network device implemented by datapath */ |
| 167 | 167 | OVS_VPORT_TYPE_GRE, /* GRE tunnel. */ |
| 168 | + OVS_VPORT_TYPE_VXLAN, /* VXLAN tunnel. */ | |
| 168 | 169 | __OVS_VPORT_TYPE_MAX |
| 169 | 170 | }; |
| 170 | 171 | |
| @@ -211,6 +212,16 @@ enum ovs_vport_attr { · 40 unmodified lines | ||
| 211 | 212 | |
| 212 | 213 | #define OVS_VPORT_ATTR_MAX (__OVS_VPORT_ATTR_MAX - 1) |
| 213 | 214 | |
| 215 | +/* OVS_VPORT_ATTR_OPTIONS attributes for tunnels. | |
| 216 | + */ | |
| 217 | +enum { | |
| 218 | + OVS_TUNNEL_ATTR_UNSPEC, | |
| 219 | + OVS_TUNNEL_ATTR_DST_PORT, /* 16-bit UDP port, used by L4 tunnels. */ | |
| 220 | + __OVS_TUNNEL_ATTR_MAX | |
| 221 | +}; | |
| 222 | + | |
| 223 | +#define OVS_TUNNEL_ATTR_MAX (__OVS_TUNNEL_ATTR_MAX - 1) | |
| 224 | + | |
| 214 | 225 | /* Flows. */ |
| 215 | 226 | |
| 216 | 227 | #define OVS_FLOW_FAMILY "ovs_flow" |
| @@ -248,6 +259,7 @@ enum ovs_key_attr { · 31 unmodified lines | ||
| 248 | 259 | OVS_KEY_ATTR_ND, /* struct ovs_key_nd */ |
| 249 | 260 | OVS_KEY_ATTR_SKB_MARK, /* u32 skb mark */ |
| 250 | 261 | OVS_KEY_ATTR_TUNNEL, /* Nested set of ovs_tunnel attributes */ |
| 262 | + OVS_KEY_ATTR_SCTP, /* struct ovs_key_sctp */ | |
| 251 | 263 | |
| 252 | 264 | #ifdef __KERNEL__ |
| 253 | 265 | OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */ |
| @@ -322,6 +334,11 @@ struct ovs_key_udp { · 68 unmodified lines | ||
| 322 | 334 | __be16 udp_dst; |
| 323 | 335 | }; |
| 324 | 336 | |
| 337 | +struct ovs_key_sctp { | |
| 338 | + __be16 sctp_src; | |
| 339 | + __be16 sctp_dst; | |
| 340 | +}; | |
| 341 | + | |
| 325 | 342 | struct ovs_key_icmp { |
| 326 | 343 | __u8 icmp_type; |
| 327 | 344 | __u8 icmp_code; |
| @@ -368,6 +385,12 @@ struct ovs_key_nd { · 40 unmodified lines | ||
| 368 | 385 | * @OVS_FLOW_ATTR_CLEAR: If present in a %OVS_FLOW_CMD_SET request, clears the |
| 369 | 386 | * last-used time, accumulated TCP flags, and statistics for this flow. |
| 370 | 387 | * Otherwise ignored in requests. Never present in notifications. |
| 388 | + * @OVS_FLOW_ATTR_MASK: Nested %OVS_KEY_ATTR_* attributes specifying the | |
| 389 | + * mask bits for wildcarded flow match. Mask bit value '1' specifies exact | |
| 390 | + * match with corresponding flow key bit, while mask bit value '0' specifies | |
| 391 | + * a wildcarded match. Omitting attribute is treated as wildcarding all | |
| 392 | + * corresponding fields. Optional for all requests. If not present, | |
| 393 | + * all flow key bits are exact match bits. | |
| 371 | 394 | * |
| 372 | 395 | * These attributes follow the &struct ovs_header within the Generic Netlink |
| 373 | 396 | * payload for %OVS_FLOW_* commands. |
| @@ -380,6 +403,7 @@ enum ovs_flow_attr { · 6 unmodified lines | ||
| 380 | 403 | OVS_FLOW_ATTR_TCP_FLAGS, /* 8-bit OR'd TCP flags. */ |
| 381 | 404 | OVS_FLOW_ATTR_USED, /* u64 msecs last used in monotonic time. */ |
| 382 | 405 | OVS_FLOW_ATTR_CLEAR, /* Flag to clear stats, tcp_flags, used. */ |
| 406 | + OVS_FLOW_ATTR_MASK, /* Sequence of OVS_KEY_ATTR_* attributes. */ | |
| 383 | 407 | __OVS_FLOW_ATTR_MAX |
| 384 | 408 | }; |
| 385 | 409 | |
| @@ -421,24 +421,24 @@ · 420 unmodified lines | ||
| 421 | 421 | #define PCI_EXP_TYPE_ROOT_PORT 0x4 /* Root Port */ |
| 422 | 422 | #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port */ |
| 423 | 423 | #define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ |
| 424 | −#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ | |
| 425 | −#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIE Bridge */ | |
| 424 | +#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCIe to PCI/PCI-X Bridge */ | |
| 425 | +#define PCI_EXP_TYPE_PCIE_BRIDGE 0x8 /* PCI/PCI-X to PCIe Bridge */ | |
| 426 | 426 | #define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ |
| 427 | 427 | #define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ |
| 428 | 428 | #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ |
| 429 | 429 | #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ |
| 430 | 430 | #define PCI_EXP_DEVCAP 4 /* Device capabilities */ |
| 431 | −#define PCI_EXP_DEVCAP_PAYLOAD 0x07 /* Max_Payload_Size */ | |
| 432 | −#define PCI_EXP_DEVCAP_PHANTOM 0x18 /* Phantom functions */ | |
| 433 | −#define PCI_EXP_DEVCAP_EXT_TAG 0x20 /* Extended tags */ | |
| 434 | −#define PCI_EXP_DEVCAP_L0S 0x1c0 /* L0s Acceptable Latency */ | |
| 435 | −#define PCI_EXP_DEVCAP_L1 0xe00 /* L1 Acceptable Latency */ | |
| 436 | −#define PCI_EXP_DEVCAP_ATN_BUT 0x1000 /* Attention Button Present */ | |
| 437 | −#define PCI_EXP_DEVCAP_ATN_IND 0x2000 /* Attention Indicator Present */ | |
| 438 | −#define PCI_EXP_DEVCAP_PWR_IND 0x4000 /* Power Indicator Present */ | |
| 439 | −#define PCI_EXP_DEVCAP_RBER 0x8000 /* Role-Based Error Reporting */ | |
| 440 | −#define PCI_EXP_DEVCAP_PWR_VAL 0x3fc0000 /* Slot Power Limit Value */ | |
| 441 | −#define PCI_EXP_DEVCAP_PWR_SCL 0xc000000 /* Slot Power Limit Scale */ | |
| 431 | +#define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */ | |
| 432 | +#define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */ | |
| 433 | +#define PCI_EXP_DEVCAP_EXT_TAG 0x00000020 /* Extended tags */ | |
| 434 | +#define PCI_EXP_DEVCAP_L0S 0x000001c0 /* L0s Acceptable Latency */ | |
| 435 | +#define PCI_EXP_DEVCAP_L1 0x00000e00 /* L1 Acceptable Latency */ | |
| 436 | +#define PCI_EXP_DEVCAP_ATN_BUT 0x00001000 /* Attention Button Present */ | |
| 437 | +#define PCI_EXP_DEVCAP_ATN_IND 0x00002000 /* Attention Indicator Present */ | |
| 438 | +#define PCI_EXP_DEVCAP_PWR_IND 0x00004000 /* Power Indicator Present */ | |
| 439 | +#define PCI_EXP_DEVCAP_RBER 0x00008000 /* Role-Based Error Reporting */ | |
| 440 | +#define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */ | |
| 441 | +#define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */ | |
| 442 | 442 | #define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */ |
| 443 | 443 | #define PCI_EXP_DEVCTL 8 /* Device Control */ |
| 444 | 444 | #define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ |
| @@ -454,16 +454,16 @@ · 9 unmodified lines | ||
| 454 | 454 | #define PCI_EXP_DEVCTL_READRQ 0x7000 /* Max_Read_Request_Size */ |
| 455 | 455 | #define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ |
| 456 | 456 | #define PCI_EXP_DEVSTA 10 /* Device Status */ |
| 457 | −#define PCI_EXP_DEVSTA_CED 0x01 /* Correctable Error Detected */ | |
| 458 | −#define PCI_EXP_DEVSTA_NFED 0x02 /* Non-Fatal Error Detected */ | |
| 459 | −#define PCI_EXP_DEVSTA_FED 0x04 /* Fatal Error Detected */ | |
| 460 | −#define PCI_EXP_DEVSTA_URD 0x08 /* Unsupported Request Detected */ | |
| 461 | −#define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */ | |
| 462 | −#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ | |
| 457 | +#define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */ | |
| 458 | +#define PCI_EXP_DEVSTA_NFED 0x0002 /* Non-Fatal Error Detected */ | |
| 459 | +#define PCI_EXP_DEVSTA_FED 0x0004 /* Fatal Error Detected */ | |
| 460 | +#define PCI_EXP_DEVSTA_URD 0x0008 /* Unsupported Request Detected */ | |
| 461 | +#define PCI_EXP_DEVSTA_AUXPD 0x0010 /* AUX Power Detected */ | |
| 462 | +#define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */ | |
| 463 | 463 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ |
| 464 | 464 | #define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */ |
| 465 | −#define PCI_EXP_LNKCAP_SLS_2_5GB 0x1 /* LNKCAP2 SLS Vector bit 0 (2.5GT/s) */ | |
| 466 | −#define PCI_EXP_LNKCAP_SLS_5_0GB 0x2 /* LNKCAP2 SLS Vector bit 1 (5.0GT/s) */ | |
| 465 | +#define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ | |
| 466 | +#define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ | |
| 467 | 467 | #define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */ |
| 468 | 468 | #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ |
| 469 | 469 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ |
| @@ -475,21 +475,21 @@ · 5 unmodified lines | ||
| 475 | 475 | #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ |
| 476 | 476 | #define PCI_EXP_LNKCTL 16 /* Link Control */ |
| 477 | 477 | #define PCI_EXP_LNKCTL_ASPMC 0x0003 /* ASPM Control */ |
| 478 | −#define PCI_EXP_LNKCTL_ASPM_L0S 0x01 /* L0s Enable */ | |
| 479 | −#define PCI_EXP_LNKCTL_ASPM_L1 0x02 /* L1 Enable */ | |
| 478 | +#define PCI_EXP_LNKCTL_ASPM_L0S 0x0001 /* L0s Enable */ | |
| 479 | +#define PCI_EXP_LNKCTL_ASPM_L1 0x0002 /* L1 Enable */ | |
| 480 | 480 | #define PCI_EXP_LNKCTL_RCB 0x0008 /* Read Completion Boundary */ |
| 481 | 481 | #define PCI_EXP_LNKCTL_LD 0x0010 /* Link Disable */ |
| 482 | 482 | #define PCI_EXP_LNKCTL_RL 0x0020 /* Retrain Link */ |
| 483 | 483 | #define PCI_EXP_LNKCTL_CCC 0x0040 /* Common Clock Configuration */ |
| 484 | 484 | #define PCI_EXP_LNKCTL_ES 0x0080 /* Extended Synch */ |
| 485 | −#define PCI_EXP_LNKCTL_CLKREQ_EN 0x100 /* Enable clkreq */ | |
| 485 | +#define PCI_EXP_LNKCTL_CLKREQ_EN 0x0100 /* Enable clkreq */ | |
| 486 | 486 | #define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */ |
| 487 | 487 | #define PCI_EXP_LNKCTL_LBMIE 0x0400 /* Link Bandwidth Management Interrupt Enable */ |
| 488 | 488 | #define PCI_EXP_LNKCTL_LABIE 0x0800 /* Lnk Autonomous Bandwidth Interrupt Enable */ |
| 489 | 489 | #define PCI_EXP_LNKSTA 18 /* Link Status */ |
| 490 | 490 | #define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ |
| 491 | −#define PCI_EXP_LNKSTA_CLS_2_5GB 0x01 /* Current Link Speed 2.5GT/s */ | |
| 492 | −#define PCI_EXP_LNKSTA_CLS_5_0GB 0x02 /* Current Link Speed 5.0GT/s */ | |
| 491 | +#define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ | |
| 492 | +#define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ | |
| 493 | 493 | #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Nogotiated Link Width */ |
| 494 | 494 | #define PCI_EXP_LNKSTA_NLW_SHIFT 4 /* start of NLW mask in link status */ |
| 495 | 495 | #define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */ |
| @@ -534,44 +534,49 @@ · 38 unmodified lines | ||
| 534 | 534 | #define PCI_EXP_SLTSTA_EIS 0x0080 /* Electromechanical Interlock Status */ |
| 535 | 535 | #define PCI_EXP_SLTSTA_DLLSC 0x0100 /* Data Link Layer State Changed */ |
| 536 | 536 | #define PCI_EXP_RTCTL 28 /* Root Control */ |
| 537 | −#define PCI_EXP_RTCTL_SECEE 0x01 /* System Error on Correctable Error */ | |
| 538 | −#define PCI_EXP_RTCTL_SENFEE 0x02 /* System Error on Non-Fatal Error */ | |
| 539 | −#define PCI_EXP_RTCTL_SEFEE 0x04 /* System Error on Fatal Error */ | |
| 540 | −#define PCI_EXP_RTCTL_PMEIE 0x08 /* PME Interrupt Enable */ | |
| 541 | −#define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */ | |
| 537 | +#define PCI_EXP_RTCTL_SECEE 0x0001 /* System Error on Correctable Error */ | |
| 538 | +#define PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */ | |
| 539 | +#define PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */ | |
| 540 | +#define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ | |
| 541 | +#define PCI_EXP_RTCTL_CRSSVE 0x0010 /* CRS Software Visibility Enable */ | |
| 542 | 542 | #define PCI_EXP_RTCAP 30 /* Root Capabilities */ |
| 543 | 543 | #define PCI_EXP_RTSTA 32 /* Root Status */ |
| 544 | −#define PCI_EXP_RTSTA_PME 0x10000 /* PME status */ | |
| 545 | −#define PCI_EXP_RTSTA_PENDING 0x20000 /* PME pending */ | |
| 544 | +#define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ | |
| 545 | +#define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ | |
| 546 | 546 | /* |
| 547 | − * Note that the following PCI Express 'Capability Structure' registers | |
| 548 | − * were introduced with 'Capability Version' 0x2 (v2). These registers | |
| 549 | − * do not exist on devices with Capability Version 1. Use pci_pcie_cap2() | |
| 550 | − * to use these fields safely. | |
| 547 | + * The Device Capabilities 2, Device Status 2, Device Control 2, | |
| 548 | + * Link Capabilities 2, Link Status 2, Link Control 2, | |
| 549 | + * Slot Capabilities 2, Slot Status 2, and Slot Control 2 registers | |
| 550 | + * are only present on devices with PCIe Capability version 2. | |
| 551 | + * Use pcie_capability_read_word() and similar interfaces to use them | |
| 552 | + * safely. | |
| 551 | 553 | */ |
| 552 | 554 | #define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */ |
| 553 | −#define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */ | |
| 554 | −#define PCI_EXP_DEVCAP2_LTR 0x800 /* Latency tolerance reporting */ | |
| 555 | −#define PCI_EXP_OBFF_MASK 0xc0000 /* OBFF support mechanism */ | |
| 556 | −#define PCI_EXP_OBFF_MSG 0x40000 /* New message signaling */ | |
| 557 | −#define PCI_EXP_OBFF_WAKE 0x80000 /* Re-use WAKE# for OBFF */ | |
| 555 | +#define PCI_EXP_DEVCAP2_ARI 0x00000020 /* Alternative Routing-ID */ | |
| 556 | +#define PCI_EXP_DEVCAP2_LTR 0x00000800 /* Latency tolerance reporting */ | |
| 557 | +#define PCI_EXP_DEVCAP2_OBFF_MASK 0x000c0000 /* OBFF support mechanism */ | |
| 558 | +#define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */ | |
| 559 | +#define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */ | |
| 558 | 560 | #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ |
| 559 | −#define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ | |
| 560 | −#define PCI_EXP_IDO_REQ_EN 0x100 /* ID-based ordering request enable */ | |
| 561 | −#define PCI_EXP_IDO_CMP_EN 0x200 /* ID-based ordering completion enable */ | |
| 562 | −#define PCI_EXP_LTR_EN 0x400 /* Latency tolerance reporting */ | |
| 563 | −#define PCI_EXP_OBFF_MSGA_EN 0x2000 /* OBFF enable with Message type A */ | |
| 564 | −#define PCI_EXP_OBFF_MSGB_EN 0x4000 /* OBFF enable with Message type B */ | |
| 565 | −#define PCI_EXP_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ | |
| 561 | +#define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */ | |
| 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 */ | |
| 564 | +#define PCI_EXP_DEVCTL2_LTR_EN 0x0400 /* Enable LTR mechanism */ | |
| 565 | +#define PCI_EXP_DEVCTL2_OBFF_MSGA_EN 0x2000 /* Enable OBFF Message type A */ | |
| 566 | +#define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000 /* Enable OBFF Message type B */ | |
| 567 | +#define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ | |
| 568 | +#define PCI_EXP_DEVSTA2 42 /* Device Status 2 */ | |
| 566 | 569 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints end here */ |
| 567 | −#define PCI_EXP_LNKCAP2 44 /* Link Capability 2 */ | |
| 568 | −#define PCI_EXP_LNKCAP2_SLS_2_5GB 0x02 /* Supported Link Speed 2.5GT/s */ | |
| 569 | −#define PCI_EXP_LNKCAP2_SLS_5_0GB 0x04 /* Supported Link Speed 5.0GT/s */ | |
| 570 | −#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x08 /* Supported Link Speed 8.0GT/s */ | |
| 571 | −#define PCI_EXP_LNKCAP2_CROSSLINK 0x100 /* Crosslink supported */ | |
| 570 | +#define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */ | |
| 571 | +#define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ | |
| 572 | +#define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5.0GT/s */ | |
| 573 | +#define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008 /* Supported Speed 8.0GT/s */ | |
| 574 | +#define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ | |
| 572 | 575 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ |
| 573 | 576 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ |
| 577 | +#define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ | |
| 574 | 578 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ |
| 579 | +#define PCI_EXP_SLTSTA2 58 /* Slot Status 2 */ | |
| 575 | 580 | |
| 576 | 581 | /* Extended Capabilities (PCI-X 2.0 and Express) */ |
| 577 | 582 | #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) |
| @@ -109,6 +109,7 @@ enum perf_sw_ids { · 108 unmodified lines | ||
| 109 | 109 | PERF_COUNT_SW_PAGE_FAULTS_MAJ = 6, |
| 110 | 110 | PERF_COUNT_SW_ALIGNMENT_FAULTS = 7, |
| 111 | 111 | PERF_COUNT_SW_EMULATION_FAULTS = 8, |
| 112 | + PERF_COUNT_SW_DUMMY = 9, | |
| 112 | 113 | |
| 113 | 114 | PERF_COUNT_SW_MAX, /* non-ABI */ |
| 114 | 115 | }; |
| @@ -134,8 +135,9 @@ enum perf_event_sample_format { · 19 unmodified lines | ||
| 134 | 135 | PERF_SAMPLE_STACK_USER = 1U << 13, |
| 135 | 136 | PERF_SAMPLE_WEIGHT = 1U << 14, |
| 136 | 137 | PERF_SAMPLE_DATA_SRC = 1U << 15, |
| 138 | + PERF_SAMPLE_IDENTIFIER = 1U << 16, | |
| 137 | 139 | |
| 138 | − PERF_SAMPLE_MAX = 1U << 16, /* non-ABI */ | |
| 140 | + PERF_SAMPLE_MAX = 1U << 17, /* non-ABI */ | |
| 139 | 141 | }; |
| 140 | 142 | |
| 141 | 143 | /* |
| @@ -275,8 +277,9 @@ struct perf_event_attr { · 133 unmodified lines | ||
| 275 | 277 | |
| 276 | 278 | exclude_callchain_kernel : 1, /* exclude kernel callchains */ |
| 277 | 279 | exclude_callchain_user : 1, /* exclude user callchains */ |
| 280 | + mmap2 : 1, /* include mmap with inode data */ | |
| 278 | 281 | |
| 279 | − __reserved_1 : 41; | |
| 282 | + __reserved_1 : 40; | |
| 280 | 283 | |
| 281 | 284 | union { |
| 282 | 285 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -321,6 +324,7 @@ struct perf_event_attr { · 38 unmodified lines | ||
| 321 | 324 | #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64) |
| 322 | 325 | #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) |
| 323 | 326 | #define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) |
| 327 | +#define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *) | |
| 324 | 328 | |
| 325 | 329 | enum perf_event_ioc_flags { |
| 326 | 330 | PERF_IOC_FLAG_GROUP = 1U << 0, |
| @@ -375,9 +379,15 @@ struct perf_event_mmap_page { · 48 unmodified lines | ||
| 375 | 379 | __u64 time_running; /* time event on cpu */ |
| 376 | 380 | union { |
| 377 | 381 | __u64 capabilities; |
| 378 | − __u64 cap_usr_time : 1, | |
| 379 | − cap_usr_rdpmc : 1, | |
| 380 | − cap_____res : 62; | |
| 382 | + struct { | |
| 383 | + __u64 cap_bit0 : 1, /* Always 0, deprecated, see commit 860f085b74e9 */ | |
| 384 | + cap_bit0_is_deprecated : 1, /* Always 1, signals that bit 0 is zero */ | |
| 385 | + | |
| 386 | + cap_user_rdpmc : 1, /* The RDPMC instruction can be used to read counts */ | |
| 387 | + cap_user_time : 1, /* The time_* fields are used */ | |
| 388 | + cap_user_time_zero : 1, /* The time_zero field is used */ | |
| 389 | + cap_____res : 59; | |
| 390 | + }; | |
| 381 | 391 | }; |
| 382 | 392 | |
| 383 | 393 | /* |
| @@ -418,23 +428,43 @@ struct perf_event_mmap_page { · 34 unmodified lines | ||
| 418 | 428 | __u16 time_shift; |
| 419 | 429 | __u32 time_mult; |
| 420 | 430 | __u64 time_offset; |
| 431 | + /* | |
| 432 | + * If cap_usr_time_zero, the hardware clock (e.g. TSC) can be calculated | |
| 433 | + * from sample timestamps. | |
| 434 | + * | |
| 435 | + * time = timestamp - time_zero; | |
| 436 | + * quot = time / time_mult; | |
| 437 | + * rem = time % time_mult; | |
| 438 | + * cyc = (quot << time_shift) + (rem << time_shift) / time_mult; | |
| 439 | + * | |
| 440 | + * And vice versa: | |
| 441 | + * | |
| 442 | + * quot = cyc >> time_shift; | |
| 443 | + * rem = cyc & ((1 << time_shift) - 1); | |
| 444 | + * timestamp = time_zero + quot * time_mult + | |
| 445 | + * ((rem * time_mult) >> time_shift); | |
| 446 | + */ | |
| 447 | + __u64 time_zero; | |
| 448 | + __u32 size; /* Header size up to __reserved[] fields. */ | |
| 421 | 449 | |
| 422 | 450 | /* |
| 423 | 451 | * Hole for extension of the self monitor capabilities |
| 424 | 452 | */ |
| 425 | 453 | |
| 426 | − __u64 __reserved[120]; /* align to 1k */ | |
| 454 | + __u8 __reserved[118*8+4]; /* align to 1k. */ | |
| 427 | 455 | |
| 428 | 456 | /* |
| 429 | 457 | * Control data for the mmap() data buffer. |
| 430 | 458 | * |
| 431 | − * User-space reading the @data_head value should issue an rmb(), on | |
| 432 | − * SMP capable platforms, after reading this value -- see | |
| 433 | − * perf_event_wakeup(). | |
| 459 | + * User-space reading the @data_head value should issue an smp_rmb(), | |
| 460 | + * after reading this value. | |
| 434 | 461 | * |
| 435 | 462 | * When the mapping is PROT_WRITE the @data_tail value should be |
| 436 | − * written by userspace to reflect the last read data. In this case | |
| 437 | − * the kernel will not over-write unread data. | |
| 463 | + * written by userspace to reflect the last read data, after issueing | |
| 464 | + * an smp_mb() to separate the data read from the ->data_tail store. | |
| 465 | + * In this case the kernel will not over-write unread data. | |
| 466 | + * | |
| 467 | + * See perf_output_put_handle() for the data ordering. | |
| 438 | 468 | */ |
| 439 | 469 | __u64 data_head; /* head in the data section */ |
| 440 | 470 | __u64 data_tail; /* user-space written tail */ |
| @@ -471,13 +501,28 @@ enum perf_event_type { · 30 unmodified lines | ||
| 471 | 501 | /* |
| 472 | 502 | * If perf_event_attr.sample_id_all is set then all event types will |
| 473 | 503 | * have the sample_type selected fields related to where/when |
| 474 | − * (identity) an event took place (TID, TIME, ID, CPU, STREAM_ID) | |
| 475 | − * described in PERF_RECORD_SAMPLE below, it will be stashed just after | |
| 476 | − * the perf_event_header and the fields already present for the existing | |
| 477 | − * fields, i.e. at the end of the payload. That way a newer perf.data | |
| 478 | − * file will be supported by older perf tools, with these new optional | |
| 479 | − * fields being ignored. | |
| 504 | + * (identity) an event took place (TID, TIME, ID, STREAM_ID, CPU, | |
| 505 | + * IDENTIFIER) described in PERF_RECORD_SAMPLE below, it will be stashed | |
| 506 | + * just after the perf_event_header and the fields already present for | |
| 507 | + * the existing fields, i.e. at the end of the payload. That way a newer | |
| 508 | + * perf.data file will be supported by older perf tools, with these new | |
| 509 | + * optional fields being ignored. | |
| 510 | + * | |
| 511 | + * struct sample_id { | |
| 512 | + * { u32 pid, tid; } && PERF_SAMPLE_TID | |
| 513 | + * { u64 time; } && PERF_SAMPLE_TIME | |
| 514 | + * { u64 id; } && PERF_SAMPLE_ID | |
| 515 | + * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID | |
| 516 | + * { u32 cpu, res; } && PERF_SAMPLE_CPU | |
| 517 | + * { u64 id; } && PERF_SAMPLE_IDENTIFIER | |
| 518 | + * } && perf_event_attr::sample_id_all | |
| 480 | 519 | * |
| 520 | + * Note that PERF_SAMPLE_IDENTIFIER duplicates PERF_SAMPLE_ID. The | |
| 521 | + * advantage of PERF_SAMPLE_IDENTIFIER is that its position is fixed | |
| 522 | + * relative to header.size. | |
| 523 | + */ | |
| 524 | + | |
| 525 | + /* | |
| 481 | 526 | * The MMAP events record the PROT_EXEC mappings so that we can |
| 482 | 527 | * correlate userspace IPs to code. They have the following structure: |
| 483 | 528 | * |
| @@ -489,6 +534,7 @@ enum perf_event_type { · 5 unmodified lines | ||
| 489 | 534 | * u64 len; |
| 490 | 535 | * u64 pgoff; |
| 491 | 536 | * char filename[]; |
| 537 | + * struct sample_id sample_id; | |
| 492 | 538 | * }; |
| 493 | 539 | */ |
| 494 | 540 | PERF_RECORD_MMAP = 1, |
| @@ -498,6 +544,7 @@ enum perf_event_type { · 3 unmodified lines | ||
| 498 | 544 | * struct perf_event_header header; |
| 499 | 545 | * u64 id; |
| 500 | 546 | * u64 lost; |
| 547 | + * struct sample_id sample_id; | |
| 501 | 548 | * }; |
| 502 | 549 | */ |
| 503 | 550 | PERF_RECORD_LOST = 2, |
| @@ -508,6 +555,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 508 | 555 | * |
| 509 | 556 | * u32 pid, tid; |
| 510 | 557 | * char comm[]; |
| 558 | + * struct sample_id sample_id; | |
| 511 | 559 | * }; |
| 512 | 560 | */ |
| 513 | 561 | PERF_RECORD_COMM = 3, |
| @@ -518,6 +566,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 518 | 566 | * u32 pid, ppid; |
| 519 | 567 | * u32 tid, ptid; |
| 520 | 568 | * u64 time; |
| 569 | + * struct sample_id sample_id; | |
| 521 | 570 | * }; |
| 522 | 571 | */ |
| 523 | 572 | PERF_RECORD_EXIT = 4, |
| @@ -528,6 +577,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 528 | 577 | * u64 time; |
| 529 | 578 | * u64 id; |
| 530 | 579 | * u64 stream_id; |
| 580 | + * struct sample_id sample_id; | |
| 531 | 581 | * }; |
| 532 | 582 | */ |
| 533 | 583 | PERF_RECORD_THROTTLE = 5, |
| @@ -539,6 +589,7 @@ enum perf_event_type { · 5 unmodified lines | ||
| 539 | 589 | * u32 pid, ppid; |
| 540 | 590 | * u32 tid, ptid; |
| 541 | 591 | * u64 time; |
| 592 | + * struct sample_id sample_id; | |
| 542 | 593 | * }; |
| 543 | 594 | */ |
| 544 | 595 | PERF_RECORD_FORK = 7, |
| @@ -549,6 +600,7 @@ enum perf_event_type { · 4 unmodified lines | ||
| 549 | 600 | * u32 pid, tid; |
| 550 | 601 | * |
| 551 | 602 | * struct read_format values; |
| 603 | + * struct sample_id sample_id; | |
| 552 | 604 | * }; |
| 553 | 605 | */ |
| 554 | 606 | PERF_RECORD_READ = 8, |
| @@ -557,6 +609,13 @@ enum perf_event_type { · 2 unmodified lines | ||
| 557 | 609 | * struct { |
| 558 | 610 | * struct perf_event_header header; |
| 559 | 611 | * |
| 612 | + * # | |
| 613 | + * # Note that PERF_SAMPLE_IDENTIFIER duplicates PERF_SAMPLE_ID. | |
| 614 | + * # The advantage of PERF_SAMPLE_IDENTIFIER is that its position | |
| 615 | + * # is fixed relative to header. | |
| 616 | + * # | |
| 617 | + * | |
| 618 | + * { u64 id; } && PERF_SAMPLE_IDENTIFIER | |
| 560 | 619 | * { u64 ip; } && PERF_SAMPLE_IP |
| 561 | 620 | * { u32 pid, tid; } && PERF_SAMPLE_TID |
| 562 | 621 | * { u64 time; } && PERF_SAMPLE_TIME |
| @@ -596,11 +655,32 @@ enum perf_event_type { · 33 unmodified lines | ||
| 596 | 655 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER |
| 597 | 656 | * |
| 598 | 657 | * { u64 weight; } && PERF_SAMPLE_WEIGHT |
| 599 | − * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | |
| 658 | + * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | |
| 600 | 659 | * }; |
| 601 | 660 | */ |
| 602 | 661 | PERF_RECORD_SAMPLE = 9, |
| 603 | 662 | |
| 663 | + /* | |
| 664 | + * The MMAP2 records are an augmented version of MMAP, they add | |
| 665 | + * maj, min, ino numbers to be used to uniquely identify each mapping | |
| 666 | + * | |
| 667 | + * struct { | |
| 668 | + * struct perf_event_header header; | |
| 669 | + * | |
| 670 | + * u32 pid, tid; | |
| 671 | + * u64 addr; | |
| 672 | + * u64 len; | |
| 673 | + * u64 pgoff; | |
| 674 | + * u32 maj; | |
| 675 | + * u32 min; | |
| 676 | + * u64 ino; | |
| 677 | + * u64 ino_generation; | |
| 678 | + * char filename[]; | |
| 679 | + * struct sample_id sample_id; | |
| 680 | + * }; | |
| 681 | + */ | |
| 682 | + PERF_RECORD_MMAP2 = 10, | |
| 683 | + | |
| 604 | 684 | PERF_RECORD_MAX, /* non-ABI */ |
| 605 | 685 | }; |
| 606 | 686 | |
| @@ -685,4 +765,28 @@ union perf_mem_data_src { · 78 unmodified lines | ||
| 685 | 765 | #define PERF_MEM_S(a, s) \ |
| 686 | 766 | (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) |
| 687 | 767 | |
| 768 | +/* | |
| 769 | + * single taken branch record layout: | |
| 770 | + * | |
| 771 | + * from: source instruction (may not always be a branch insn) | |
| 772 | + * to: branch target | |
| 773 | + * mispred: branch target was mispredicted | |
| 774 | + * predicted: branch target was predicted | |
| 775 | + * | |
| 776 | + * support for mispred, predicted is optional. In case it | |
| 777 | + * is not supported mispred = predicted = 0. | |
| 778 | + * | |
| 779 | + * in_tx: running in a hardware transaction | |
| 780 | + * abort: aborting a hardware transaction | |
| 781 | + */ | |
| 782 | +struct perf_branch_entry { | |
| 783 | + __u64 from; | |
| 784 | + __u64 to; | |
| 785 | + __u64 mispred:1, /* target mispredicted */ | |
| 786 | + predicted:1,/* target predicted */ | |
| 787 | + in_tx:1, /* in transaction */ | |
| 788 | + abort:1, /* transaction abort */ | |
| 789 | + reserved:60; | |
| 790 | +}; | |
| 791 | + | |
| 688 | 792 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ |
| @@ -744,4 +744,45 @@ struct tc_fq_codel_xstats { · 743 unmodified lines | ||
| 744 | 744 | }; |
| 745 | 745 | }; |
| 746 | 746 | |
| 747 | +/* FQ */ | |
| 748 | + | |
| 749 | +enum { | |
| 750 | + TCA_FQ_UNSPEC, | |
| 751 | + | |
| 752 | + TCA_FQ_PLIMIT, /* limit of total number of packets in queue */ | |
| 753 | + | |
| 754 | + TCA_FQ_FLOW_PLIMIT, /* limit of packets per flow */ | |
| 755 | + | |
| 756 | + TCA_FQ_QUANTUM, /* RR quantum */ | |
| 757 | + | |
| 758 | + TCA_FQ_INITIAL_QUANTUM, /* RR quantum for new flow */ | |
| 759 | + | |
| 760 | + TCA_FQ_RATE_ENABLE, /* enable/disable rate limiting */ | |
| 761 | + | |
| 762 | + TCA_FQ_FLOW_DEFAULT_RATE,/* for sockets with unspecified sk_rate, | |
| 763 | + * use the following rate | |
| 764 | + */ | |
| 765 | + | |
| 766 | + TCA_FQ_FLOW_MAX_RATE, /* per flow max rate */ | |
| 767 | + | |
| 768 | + TCA_FQ_BUCKETS_LOG, /* log2(number of buckets) */ | |
| 769 | + __TCA_FQ_MAX | |
| 770 | +}; | |
| 771 | + | |
| 772 | +#define TCA_FQ_MAX (__TCA_FQ_MAX - 1) | |
| 773 | + | |
| 774 | +struct tc_fq_qd_stats { | |
| 775 | + __u64 gc_flows; | |
| 776 | + __u64 highprio_packets; | |
| 777 | + __u64 tcp_retrans; | |
| 778 | + __u64 throttled; | |
| 779 | + __u64 flows_plimit; | |
| 780 | + __u64 pkts_too_long; | |
| 781 | + __u64 allocation_errors; | |
| 782 | + __s64 time_next_delayed_flow; | |
| 783 | + __u32 flows; | |
| 784 | + __u32 inactive_flows; | |
| 785 | + __u32 throttled_flows; | |
| 786 | + __u32 pad; | |
| 787 | +}; | |
| 747 | 788 | #endif |
| @@ -16,7 +16,7 @@ struct reiserfs_xattr_header { · 15 unmodified lines | ||
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | 18 | struct reiserfs_security_handle { |
| 19 | − char *name; | |
| 19 | + const char *name; | |
| 20 | 20 | void *value; |
| 21 | 21 | size_t length; |
| 22 | 22 | }; |
| @@ -28,7 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | * |
| 29 | 29 | * Please send any bug reports or fixes you make to the |
| 30 | 30 | * email address(es): |
| 31 | − * lksctp developers <lksctp-developers@lists.sourceforge.net> | |
| 31 | + * lksctp developers <linux-sctp@vger.kernel.org> | |
| 32 | 32 | * |
| 33 | 33 | * Or submit a bug report through the following website: |
| 34 | 34 | * http://www.sf.net/projects/lksctp |
| @@ -232,4 +232,10 @@ · 231 unmodified lines | ||
| 232 | 232 | /* SH-SCI */ |
| 233 | 233 | #define PORT_HSCIF 104 |
| 234 | 234 | |
| 235 | +/* ST ASC type numbers */ | |
| 236 | +#define PORT_ASC 105 | |
| 237 | + | |
| 238 | +/* Tilera TILE-Gx UART */ | |
| 239 | +#define PORT_TILEGX 106 | |
| 240 | + | |
| 235 | 241 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |
| @@ -51,6 +51,10 @@ enum · 50 unmodified lines | ||
| 51 | 51 | IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */ |
| 52 | 52 | IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */ |
| 53 | 53 | IPSTATS_MIB_CSUMERRORS, /* InCsumErrors */ |
| 54 | + IPSTATS_MIB_NOECTPKTS, /* InNoECTPkts */ | |
| 55 | + IPSTATS_MIB_ECT1PKTS, /* InECT1Pkts */ | |
| 56 | + IPSTATS_MIB_ECT0PKTS, /* InECT0Pkts */ | |
| 57 | + IPSTATS_MIB_CEPKTS, /* InCEPkts */ | |
| 54 | 58 | __IPSTATS_MIB_MAX |
| 55 | 59 | }; |
| 56 | 60 | |
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | # UAPI Header export list |
| 2 | 2 | header-y += tc_csum.h |
| 3 | +header-y += tc_defact.h | |
| 3 | 4 | header-y += tc_gact.h |
| 4 | 5 | header-y += tc_ipt.h |
| 5 | 6 | header-y += tc_mirred.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 | |
| @@ -111,6 +111,7 @@ enum { · 110 unmodified lines | ||
| 111 | 111 | #define TCP_REPAIR_OPTIONS 22 |
| 112 | 112 | #define TCP_FASTOPEN 23 /* Enable FastOpen on listeners */ |
| 113 | 113 | #define TCP_TIMESTAMP 24 |
| 114 | +#define TCP_NOTSENT_LOWAT 25 /* limit number of unsent bytes in write queue */ | |
| 114 | 115 | |
| 115 | 116 | struct tcp_repair_opt { |
| 116 | 117 | __u32 opt_code; |
| @@ -30,7 +30,7 @@ enum uhid_event_type { · 29 unmodified lines | ||
| 30 | 30 | UHID_OPEN, |
| 31 | 31 | UHID_CLOSE, |
| 32 | 32 | UHID_OUTPUT, |
| 33 | − UHID_OUTPUT_EV, | |
| 33 | + UHID_OUTPUT_EV, /* obsolete! */ | |
| 34 | 34 | UHID_INPUT, |
| 35 | 35 | UHID_FEATURE, |
| 36 | 36 | UHID_FEATURE_ANSWER, |
| @@ -69,6 +69,8 @@ struct uhid_output_req { · 32 unmodified lines | ||
| 69 | 69 | __u8 rtype; |
| 70 | 70 | } __attribute__((__packed__)); |
| 71 | 71 | |
| 72 | +/* Obsolete! Newer kernels will no longer send these events but instead convert | |
| 73 | + * it into raw output reports via UHID_OUTPUT. */ | |
| 72 | 74 | struct uhid_output_ev_req { |
| 73 | 75 | __u16 type; |
| 74 | 76 | __u16 code; |
| @@ -161,6 +161,8 @@ enum v4l2_colorfx { · 160 unmodified lines | ||
| 161 | 161 | #define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040) |
| 162 | 162 | |
| 163 | 163 | /* MPEG-class control IDs */ |
| 164 | +/* The MPEG controls are applicable to all codec controls | |
| 165 | + * and the 'MPEG' part of the define is historical */ | |
| 164 | 166 | |
| 165 | 167 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
| 166 | 168 | #define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) |
| @@ -522,6 +524,33 @@ enum v4l2_mpeg_video_mpeg4_profile { · 355 unmodified lines | ||
| 522 | 524 | }; |
| 523 | 525 | #define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407) |
| 524 | 526 | |
| 527 | +/* Control IDs for VP8 streams | |
| 528 | + * Although VP8 is not part of MPEG we add these controls to the MPEG class | |
| 529 | + * as that class is already handling other video compression standards | |
| 530 | + */ | |
| 531 | +#define V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS (V4L2_CID_MPEG_BASE+500) | |
| 532 | +enum v4l2_vp8_num_partitions { | |
| 533 | + V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION = 0, | |
| 534 | + V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS = 1, | |
| 535 | + V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS = 2, | |
| 536 | + V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS = 3, | |
| 537 | +}; | |
| 538 | +#define V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (V4L2_CID_MPEG_BASE+501) | |
| 539 | +#define V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES (V4L2_CID_MPEG_BASE+502) | |
| 540 | +enum v4l2_vp8_num_ref_frames { | |
| 541 | + V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME = 0, | |
| 542 | + V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME = 1, | |
| 543 | + V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME = 2, | |
| 544 | +}; | |
| 545 | +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (V4L2_CID_MPEG_BASE+503) | |
| 546 | +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (V4L2_CID_MPEG_BASE+504) | |
| 547 | +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (V4L2_CID_MPEG_BASE+505) | |
| 548 | +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (V4L2_CID_MPEG_BASE+506) | |
| 549 | +enum v4l2_vp8_golden_frame_sel { | |
| 550 | + V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0, | |
| 551 | + V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1, | |
| 552 | +}; | |
| 553 | + | |
| 525 | 554 | /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ |
| 526 | 555 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) |
| 527 | 556 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) |
| @@ -823,12 +823,4 @@ · 822 unmodified lines | ||
| 823 | 823 | V4L2_DV_FL_REDUCED_BLANKING) \ |
| 824 | 824 | } |
| 825 | 825 | |
| 826 | −#define V4L2_DV_BT_DMT_1366X768P60 { \ | |
| 827 | − .type = V4L2_DV_BT_656_1120, \ | |
| 828 | − V4L2_INIT_BT_TIMINGS(1366, 768, 0, \ | |
| 829 | − V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ | |
| 830 | − 85500000, 70, 143, 213, 3, 3, 24, 0, 0, 0, \ | |
| 831 | − V4L2_DV_BT_STD_DMT, 0) \ | |
| 832 | −} | |
| 833 | − | |
| 834 | 826 | #endif |
| @@ -37,7 +37,7 @@ · 36 unmodified lines | ||
| 37 | 37 | enum v4l2_mbus_pixelcode { |
| 38 | 38 | V4L2_MBUS_FMT_FIXED = 0x0001, |
| 39 | 39 | |
| 40 | − /* RGB - next is 0x100d */ | |
| 40 | + /* RGB - next is 0x100e */ | |
| 41 | 41 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, |
| 42 | 42 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, |
| 43 | 43 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, |
| @@ -50,8 +50,9 @@ enum v4l2_mbus_pixelcode { · 6 unmodified lines | ||
| 50 | 50 | V4L2_MBUS_FMT_RGB888_1X24 = 0x100a, |
| 51 | 51 | V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b, |
| 52 | 52 | V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c, |
| 53 | + V4L2_MBUS_FMT_ARGB8888_1X32 = 0x100d, | |
| 53 | 54 | |
| 54 | − /* YUV (including grey) - next is 0x2017 */ | |
| 55 | + /* YUV (including grey) - next is 0x2018 */ | |
| 55 | 56 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, |
| 56 | 57 | V4L2_MBUS_FMT_UV8_1X8 = 0x2015, |
| 57 | 58 | V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, |
| @@ -74,6 +75,7 @@ enum v4l2_mbus_pixelcode { · 16 unmodified lines | ||
| 74 | 75 | V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, |
| 75 | 76 | V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, |
| 76 | 77 | V4L2_MBUS_FMT_YUV10_1X30 = 0x2016, |
| 78 | + V4L2_MBUS_FMT_AYUV8_1X32 = 0x2017, | |
| 77 | 79 | |
| 78 | 80 | /* Bayer - next is 0x3019 */ |
| 79 | 81 | V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, |
| @@ -324,6 +324,44 @@ enum { · 323 unmodified lines | ||
| 324 | 324 | VFIO_PCI_NUM_IRQS |
| 325 | 325 | }; |
| 326 | 326 | |
| 327 | +/** | |
| 328 | + * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12, | |
| 329 | + * struct vfio_pci_hot_reset_info) | |
| 330 | + * | |
| 331 | + * Return: 0 on success, -errno on failure: | |
| 332 | + * -enospc = insufficient buffer, -enodev = unsupported for device. | |
| 333 | + */ | |
| 334 | +struct vfio_pci_dependent_device { | |
| 335 | + __u32 group_id; | |
| 336 | + __u16 segment; | |
| 337 | + __u8 bus; | |
| 338 | + __u8 devfn; /* Use PCI_SLOT/PCI_FUNC */ | |
| 339 | +}; | |
| 340 | + | |
| 341 | +struct vfio_pci_hot_reset_info { | |
| 342 | + __u32 argsz; | |
| 343 | + __u32 flags; | |
| 344 | + __u32 count; | |
| 345 | + struct vfio_pci_dependent_device devices[]; | |
| 346 | +}; | |
| 347 | + | |
| 348 | +#define VFIO_DEVICE_GET_PCI_HOT_RESET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12) | |
| 349 | + | |
| 350 | +/** | |
| 351 | + * VFIO_DEVICE_PCI_HOT_RESET - _IOW(VFIO_TYPE, VFIO_BASE + 13, | |
| 352 | + * struct vfio_pci_hot_reset) | |
| 353 | + * | |
| 354 | + * Return: 0 on success, -errno on failure. | |
| 355 | + */ | |
| 356 | +struct vfio_pci_hot_reset { | |
| 357 | + __u32 argsz; | |
| 358 | + __u32 flags; | |
| 359 | + __u32 count; | |
| 360 | + __s32 group_fds[]; | |
| 361 | +}; | |
| 362 | + | |
| 363 | +#define VFIO_DEVICE_PCI_HOT_RESET _IO(VFIO_TYPE, VFIO_BASE + 13) | |
| 364 | + | |
| 327 | 365 | /* -------- API for Type1 VFIO IOMMU -------- */ |
| 328 | 366 | |
| 329 | 367 | /** |
| @@ -348,6 +348,8 @@ struct v4l2_pix_format { · 347 unmodified lines | ||
| 348 | 348 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ |
| 349 | 349 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
| 350 | 350 | #define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */ |
| 351 | +#define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */ | |
| 352 | +#define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */ | |
| 351 | 353 | #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ |
| 352 | 354 | #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */ |
| 353 | 355 | |
| @@ -1055,6 +1057,16 @@ struct v4l2_bt_timings { · 701 unmodified lines | ||
| 1055 | 1057 | or used depends on the hardware. */ |
| 1056 | 1058 | #define V4L2_DV_FL_HALF_LINE (1 << 3) |
| 1057 | 1059 | |
| 1060 | +/* A few useful defines to calculate the total blanking and frame sizes */ | |
| 1061 | +#define V4L2_DV_BT_BLANKING_WIDTH(bt) \ | |
| 1062 | + (bt->hfrontporch + bt->hsync + bt->hbackporch) | |
| 1063 | +#define V4L2_DV_BT_FRAME_WIDTH(bt) \ | |
| 1064 | + (bt->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) | |
| 1065 | +#define V4L2_DV_BT_BLANKING_HEIGHT(bt) \ | |
| 1066 | + (bt->vfrontporch + bt->vsync + bt->vbackporch + \ | |
| 1067 | + bt->il_vfrontporch + bt->il_vsync + bt->il_vbackporch) | |
| 1068 | +#define V4L2_DV_BT_FRAME_HEIGHT(bt) \ | |
| 1069 | + (bt->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) | |
| 1058 | 1070 | |
| 1059 | 1071 | /** struct v4l2_dv_timings - DV timings |
| 1060 | 1072 | * @type: the type of the timings |
| @@ -60,7 +60,7 @@ · 59 unmodified lines | ||
| 60 | 60 | |
| 61 | 61 | struct virtio_net_config { |
| 62 | 62 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
| 63 | − __u8 mac[6]; | |
| 63 | + __u8 mac[ETH_ALEN]; | |
| 64 | 64 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ |
| 65 | 65 | __u16 status; |
| 66 | 66 | /* Maximum number of each of transmit and receive queues; |
| @@ -70,7 +70,9 @@ struct virtio_net_config { · 3 unmodified lines | ||
| 70 | 70 | __u16 max_virtqueue_pairs; |
| 71 | 71 | } __attribute__((packed)); |
| 72 | 72 | |
| 73 | −/* This is the first element of the scatter-gather list. If you don't | |
| 73 | +/* This header comes first in the scatter-gather list. | |
| 74 | + * If VIRTIO_F_ANY_LAYOUT is not negotiated, it must | |
| 75 | + * be the first element of the scatter-gather list. If you don't | |
| 74 | 76 | * specify GSO or CSUM features, you can simply ignore the header. */ |
| 75 | 77 | struct virtio_net_hdr { |
| 76 | 78 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset |
| @@ -122,7 +122,7 @@ · 121 unmodified lines | ||
| 122 | 122 | #define __LINUX__WIMAX__I2400M_H__ |
| 123 | 123 | |
| 124 | 124 | #include <linux/types.h> |
| 125 | − | |
| 125 | +#include <linux/if_ether.h> | |
| 126 | 126 | |
| 127 | 127 | /* |
| 128 | 128 | * Host Device Interface (HDI) common to all busses |
| @@ -487,7 +487,7 @@ struct i2400m_tlv_l4_message_versions { · 358 unmodified lines | ||
| 487 | 487 | struct i2400m_tlv_detailed_device_info { |
| 488 | 488 | struct i2400m_tlv_hdr hdr; |
| 489 | 489 | __u8 reserved1[400]; |
| 490 | − __u8 mac_address[6]; | |
| 490 | + __u8 mac_address[ETH_ALEN]; | |
| 491 | 491 | __u8 reserved2[2]; |
| 492 | 492 | } __attribute__((packed)); |
| 493 | 493 | |