Backmerging in order to pull "topic/phy-compliance".
Showing the changes to include/uapi (79 of 11011 files). Show all
Unified · Split
| @@ -87,7 +87,9 @@ typedef struct { · 86 unmodified lines | |||
| 87 | typedef __kernel_long_t __kernel_off_t; | 87 | typedef __kernel_long_t __kernel_off_t; |
| 88 | typedef long long __kernel_loff_t; | 88 | typedef long long __kernel_loff_t; |
| 89 | typedef __kernel_long_t __kernel_old_time_t; | 89 | typedef __kernel_long_t __kernel_old_time_t; |
| 90 | #ifndef __KERNEL__ | ||
| 90 | typedef __kernel_long_t __kernel_time_t; | 91 | typedef __kernel_long_t __kernel_time_t; |
| 92 | #endif | ||
| 91 | typedef long long __kernel_time64_t; | 93 | typedef long long __kernel_time64_t; |
| 92 | typedef __kernel_long_t __kernel_clock_t; | 94 | typedef __kernel_long_t __kernel_clock_t; |
| 93 | typedef int __kernel_timer_t; | 95 | typedef int __kernel_timer_t; |
| @@ -125,9 +125,10 @@ extern "C" { · 124 unmodified lines | |||
| 125 | /* Flag that BO sharing will be explicitly synchronized */ | 125 | /* Flag that BO sharing will be explicitly synchronized */ |
| 126 | #define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7) | 126 | #define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7) |
| 127 | /* Flag that indicates allocating MQD gart on GFX9, where the mtype | 127 | /* Flag that indicates allocating MQD gart on GFX9, where the mtype |
| 128 | * for the second page onward should be set to NC. | 128 | * for the second page onward should be set to NC. It should never |
| 129 | * be used by user space applications. | ||
| 129 | */ | 130 | */ |
| 130 | #define AMDGPU_GEM_CREATE_MQD_GFX9 (1 << 8) | 131 | #define AMDGPU_GEM_CREATE_CP_MQD_GFX9 (1 << 8) |
| 131 | /* Flag that BO may contain sensitive data that must be wiped before | 132 | /* Flag that BO may contain sensitive data that must be wiped before |
| 132 | * releasing the memory | 133 | * releasing the memory |
| 133 | */ | 134 | */ |
| @@ -86,6 +86,9 @@ extern "C" { · 85 unmodified lines | |||
| 86 | * | 86 | * |
| 87 | * DRM_VMW_PARAM_SM4_1 | 87 | * DRM_VMW_PARAM_SM4_1 |
| 88 | * SM4_1 support is enabled. | 88 | * SM4_1 support is enabled. |
| 89 | * | ||
| 90 | * DRM_VMW_PARAM_SM5 | ||
| 91 | * SM5 support is enabled. | ||
| 89 | */ | 92 | */ |
| 90 | 93 | ||
| 91 | #define DRM_VMW_PARAM_NUM_STREAMS 0 | 94 | #define DRM_VMW_PARAM_NUM_STREAMS 0 |
| @@ -103,6 +106,7 @@ extern "C" { · 11 unmodified lines | |||
| 103 | #define DRM_VMW_PARAM_DX 12 | 106 | #define DRM_VMW_PARAM_DX 12 |
| 104 | #define DRM_VMW_PARAM_HW_CAPS2 13 | 107 | #define DRM_VMW_PARAM_HW_CAPS2 13 |
| 105 | #define DRM_VMW_PARAM_SM4_1 14 | 108 | #define DRM_VMW_PARAM_SM4_1 14 |
| 109 | #define DRM_VMW_PARAM_SM5 15 | ||
| 106 | 110 | ||
| 107 | /** | 111 | /** |
| 108 | * enum drm_vmw_handle_type - handle type for ref ioctls | 112 | * enum drm_vmw_handle_type - handle type for ref ioctls |
| @@ -1133,7 +1137,7 @@ struct drm_vmw_handle_close_arg { · 1024 unmodified lines | |||
| 1133 | * svga3d surface flags split into 2, upper half and lower half. | 1137 | * svga3d surface flags split into 2, upper half and lower half. |
| 1134 | */ | 1138 | */ |
| 1135 | enum drm_vmw_surface_version { | 1139 | enum drm_vmw_surface_version { |
| 1136 | drm_vmw_gb_surface_v1 | 1140 | drm_vmw_gb_surface_v1, |
| 1137 | }; | 1141 | }; |
| 1138 | 1142 | ||
| 1139 | /** | 1143 | /** |
| @@ -1144,6 +1148,7 @@ enum drm_vmw_surface_version { · 4 unmodified lines | |||
| 1144 | * @svga3d_flags_upper_32_bits: Upper 32 bits of svga3d flags. | 1148 | * @svga3d_flags_upper_32_bits: Upper 32 bits of svga3d flags. |
| 1145 | * @multisample_pattern: Multisampling pattern when msaa is supported. | 1149 | * @multisample_pattern: Multisampling pattern when msaa is supported. |
| 1146 | * @quality_level: Precision settings for each sample. | 1150 | * @quality_level: Precision settings for each sample. |
| 1151 | * @buffer_byte_stride: Buffer byte stride. | ||
| 1147 | * @must_be_zero: Reserved for future usage. | 1152 | * @must_be_zero: Reserved for future usage. |
| 1148 | * | 1153 | * |
| 1149 | * Input argument to the DRM_VMW_GB_SURFACE_CREATE_EXT Ioctl. | 1154 | * Input argument to the DRM_VMW_GB_SURFACE_CREATE_EXT Ioctl. |
| @@ -1152,10 +1157,11 @@ enum drm_vmw_surface_version { · 2 unmodified lines | |||
| 1152 | struct drm_vmw_gb_surface_create_ext_req { | 1157 | struct drm_vmw_gb_surface_create_ext_req { |
| 1153 | struct drm_vmw_gb_surface_create_req base; | 1158 | struct drm_vmw_gb_surface_create_req base; |
| 1154 | enum drm_vmw_surface_version version; | 1159 | enum drm_vmw_surface_version version; |
| 1155 | uint32_t svga3d_flags_upper_32_bits; | 1160 | __u32 svga3d_flags_upper_32_bits; |
| 1156 | SVGA3dMSPattern multisample_pattern; | 1161 | __u32 multisample_pattern; |
| 1157 | SVGA3dMSQualityLevel quality_level; | 1162 | __u32 quality_level; |
| 1158 | uint64_t must_be_zero; | 1163 | __u32 buffer_byte_stride; |
| 1164 | __u32 must_be_zero; | ||
| 1159 | }; | 1165 | }; |
| 1160 | 1166 | ||
| 1161 | /** | 1167 | /** |
| @@ -73,7 +73,7 @@ struct bpf_insn { · 72 unmodified lines | |||
| 73 | /* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */ | 73 | /* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */ |
| 74 | struct bpf_lpm_trie_key { | 74 | struct bpf_lpm_trie_key { |
| 75 | __u32 prefixlen; /* up to 32 for AF_INET, 128 for AF_INET6 */ | 75 | __u32 prefixlen; /* up to 32 for AF_INET, 128 for AF_INET6 */ |
| 76 | __u8 data[0]; /* Arbitrary size */ | 76 | __u8 data[]; /* Arbitrary size */ |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | struct bpf_cgroup_storage_key { | 79 | struct bpf_cgroup_storage_key { |
| @@ -111,6 +111,8 @@ enum bpf_cmd { · 31 unmodified lines | |||
| 111 | BPF_MAP_LOOKUP_AND_DELETE_BATCH, | 111 | BPF_MAP_LOOKUP_AND_DELETE_BATCH, |
| 112 | BPF_MAP_UPDATE_BATCH, | 112 | BPF_MAP_UPDATE_BATCH, |
| 113 | BPF_MAP_DELETE_BATCH, | 113 | BPF_MAP_DELETE_BATCH, |
| 114 | BPF_LINK_CREATE, | ||
| 115 | BPF_LINK_UPDATE, | ||
| 114 | }; | 116 | }; |
| 115 | 117 | ||
| 116 | enum bpf_map_type { | 118 | enum bpf_map_type { |
| @@ -181,6 +183,7 @@ enum bpf_prog_type { · 64 unmodified lines | |||
| 181 | BPF_PROG_TYPE_TRACING, | 183 | BPF_PROG_TYPE_TRACING, |
| 182 | BPF_PROG_TYPE_STRUCT_OPS, | 184 | BPF_PROG_TYPE_STRUCT_OPS, |
| 183 | BPF_PROG_TYPE_EXT, | 185 | BPF_PROG_TYPE_EXT, |
| 186 | BPF_PROG_TYPE_LSM, | ||
| 184 | }; | 187 | }; |
| 185 | 188 | ||
| 186 | enum bpf_attach_type { | 189 | enum bpf_attach_type { |
| @@ -210,6 +213,8 @@ enum bpf_attach_type { · 23 unmodified lines | |||
| 210 | BPF_TRACE_RAW_TP, | 213 | BPF_TRACE_RAW_TP, |
| 211 | BPF_TRACE_FENTRY, | 214 | BPF_TRACE_FENTRY, |
| 212 | BPF_TRACE_FEXIT, | 215 | BPF_TRACE_FEXIT, |
| 216 | BPF_MODIFY_RETURN, | ||
| 217 | BPF_LSM_MAC, | ||
| 213 | __MAX_BPF_ATTACH_TYPE | 218 | __MAX_BPF_ATTACH_TYPE |
| 214 | }; | 219 | }; |
| 215 | 220 | ||
| @@ -325,44 +330,46 @@ enum bpf_attach_type { · 109 unmodified lines | |||
| 325 | #define BPF_PSEUDO_CALL 1 | 330 | #define BPF_PSEUDO_CALL 1 |
| 326 | 331 | ||
| 327 | /* flags for BPF_MAP_UPDATE_ELEM command */ | 332 | /* flags for BPF_MAP_UPDATE_ELEM command */ |
| 328 | #define BPF_ANY 0 /* create new element or update existing */ | 333 | enum { |
| 329 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ | 334 | BPF_ANY = 0, /* create new element or update existing */ |
| 330 | #define BPF_EXIST 2 /* update existing element */ | 335 | BPF_NOEXIST = 1, /* create new element if it didn't exist */ |
| 331 | #define BPF_F_LOCK 4 /* spin_lock-ed map_lookup/map_update */ | 336 | BPF_EXIST = 2, /* update existing element */ |
| 337 | BPF_F_LOCK = 4, /* spin_lock-ed map_lookup/map_update */ | ||
| 338 | }; | ||
| 332 | 339 | ||
| 333 | /* flags for BPF_MAP_CREATE command */ | 340 | /* flags for BPF_MAP_CREATE command */ |
| 334 | #define BPF_F_NO_PREALLOC (1U << 0) | 341 | enum { |
| 342 | BPF_F_NO_PREALLOC = (1U << 0), | ||
| 335 | /* Instead of having one common LRU list in the | 343 | /* Instead of having one common LRU list in the |
| 336 | * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list | 344 | * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list |
| 337 | * which can scale and perform better. | 345 | * which can scale and perform better. |
| 338 | * Note, the LRU nodes (including free nodes) cannot be moved | 346 | * Note, the LRU nodes (including free nodes) cannot be moved |
| 339 | * across different LRU lists. | 347 | * across different LRU lists. |
| 340 | */ | 348 | */ |
| 341 | #define BPF_F_NO_COMMON_LRU (1U << 1) | 349 | BPF_F_NO_COMMON_LRU = (1U << 1), |
| 342 | /* Specify numa node during map creation */ | 350 | /* Specify numa node during map creation */ |
| 343 | #define BPF_F_NUMA_NODE (1U << 2) | 351 | BPF_F_NUMA_NODE = (1U << 2), |
| 344 | |||
| 345 | #define BPF_OBJ_NAME_LEN 16U | ||
| 346 | 352 | ||
| 347 | /* Flags for accessing BPF object from syscall side. */ | 353 | /* Flags for accessing BPF object from syscall side. */ |
| 348 | #define BPF_F_RDONLY (1U << 3) | 354 | BPF_F_RDONLY = (1U << 3), |
| 349 | #define BPF_F_WRONLY (1U << 4) | 355 | BPF_F_WRONLY = (1U << 4), |
| 350 | 356 | ||
| 351 | /* Flag for stack_map, store build_id+offset instead of pointer */ | 357 | /* Flag for stack_map, store build_id+offset instead of pointer */ |
| 352 | #define BPF_F_STACK_BUILD_ID (1U << 5) | 358 | BPF_F_STACK_BUILD_ID = (1U << 5), |
| 353 | 359 | ||
| 354 | /* Zero-initialize hash function seed. This should only be used for testing. */ | 360 | /* Zero-initialize hash function seed. This should only be used for testing. */ |
| 355 | #define BPF_F_ZERO_SEED (1U << 6) | 361 | BPF_F_ZERO_SEED = (1U << 6), |
| 356 | 362 | ||
| 357 | /* Flags for accessing BPF object from program side. */ | 363 | /* Flags for accessing BPF object from program side. */ |
| 358 | #define BPF_F_RDONLY_PROG (1U << 7) | 364 | BPF_F_RDONLY_PROG = (1U << 7), |
| 359 | #define BPF_F_WRONLY_PROG (1U << 8) | 365 | BPF_F_WRONLY_PROG = (1U << 8), |
| 360 | 366 | ||
| 361 | /* Clone map from listener for newly accepted socket */ | 367 | /* Clone map from listener for newly accepted socket */ |
| 362 | #define BPF_F_CLONE (1U << 9) | 368 | BPF_F_CLONE = (1U << 9), |
| 363 | 369 | ||
| 364 | /* Enable memory-mapping BPF map */ | 370 | /* Enable memory-mapping BPF map */ |
| 365 | #define BPF_F_MMAPABLE (1U << 10) | 371 | BPF_F_MMAPABLE = (1U << 10), |
| 372 | }; | ||
| 366 | 373 | ||
| 367 | /* Flags for BPF_PROG_QUERY. */ | 374 | /* Flags for BPF_PROG_QUERY. */ |
| 368 | 375 | ||
| @@ -391,6 +398,8 @@ struct bpf_stack_build_id { · 22 unmodified lines | |||
| 391 | }; | 398 | }; |
| 392 | }; | 399 | }; |
| 393 | 400 | ||
| 401 | #define BPF_OBJ_NAME_LEN 16U | ||
| 402 | |||
| 394 | union bpf_attr { | 403 | union bpf_attr { |
| 395 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 404 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
| 396 | __u32 map_type; /* one of enum bpf_map_type */ | 405 | __u32 map_type; /* one of enum bpf_map_type */ |
| @@ -534,7 +543,7 @@ union bpf_attr { · 137 unmodified lines | |||
| 534 | __u32 prog_cnt; | 543 | __u32 prog_cnt; |
| 535 | } query; | 544 | } query; |
| 536 | 545 | ||
| 537 | struct { | 546 | struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */ |
| 538 | __u64 name; | 547 | __u64 name; |
| 539 | __u32 prog_fd; | 548 | __u32 prog_fd; |
| 540 | } raw_tracepoint; | 549 | } raw_tracepoint; |
| @@ -562,6 +571,24 @@ union bpf_attr { · 21 unmodified lines | |||
| 562 | __u64 probe_offset; /* output: probe_offset */ | 571 | __u64 probe_offset; /* output: probe_offset */ |
| 563 | __u64 probe_addr; /* output: probe_addr */ | 572 | __u64 probe_addr; /* output: probe_addr */ |
| 564 | } task_fd_query; | 573 | } task_fd_query; |
| 574 | |||
| 575 | struct { /* struct used by BPF_LINK_CREATE command */ | ||
| 576 | __u32 prog_fd; /* eBPF program to attach */ | ||
| 577 | __u32 target_fd; /* object to attach to */ | ||
| 578 | __u32 attach_type; /* attach type */ | ||
| 579 | __u32 flags; /* extra flags */ | ||
| 580 | } link_create; | ||
| 581 | |||
| 582 | struct { /* struct used by BPF_LINK_UPDATE command */ | ||
| 583 | __u32 link_fd; /* link fd */ | ||
| 584 | /* new program fd to update link with */ | ||
| 585 | __u32 new_prog_fd; | ||
| 586 | __u32 flags; /* extra flags */ | ||
| 587 | /* expected link's program fd; is specified only if | ||
| 588 | * BPF_F_REPLACE flag is set in flags */ | ||
| 589 | __u32 old_prog_fd; | ||
| 590 | } link_update; | ||
| 591 | |||
| 565 | } __attribute__((aligned(8))); | 592 | } __attribute__((aligned(8))); |
| 566 | 593 | ||
| 567 | /* The description below is an attempt at providing documentation to eBPF | 594 | /* The description below is an attempt at providing documentation to eBPF |
| @@ -1045,9 +1072,9 @@ union bpf_attr { · 477 unmodified lines | |||
| 1045 | * supports redirection to the egress interface, and accepts no | 1072 | * supports redirection to the egress interface, and accepts no |
| 1046 | * flag at all. | 1073 | * flag at all. |
| 1047 | * | 1074 | * |
| 1048 | * The same effect can be attained with the more generic | 1075 | * The same effect can also be attained with the more generic |
| 1049 | * **bpf_redirect_map**\ (), which requires specific maps to be | 1076 | * **bpf_redirect_map**\ (), which uses a BPF map to store the |
| 1050 | * used but offers better performance. | 1077 | * redirect target instead of providing it directly to the helper. |
| 1051 | * Return | 1078 | * Return |
| 1052 | * For XDP, the helper returns **XDP_REDIRECT** on success or | 1079 | * For XDP, the helper returns **XDP_REDIRECT** on success or |
| 1053 | * **XDP_ABORTED** on error. For other program types, the values | 1080 | * **XDP_ABORTED** on error. For other program types, the values |
| @@ -1611,13 +1638,11 @@ union bpf_attr { · 557 unmodified lines | |||
| 1611 | * the caller. Any higher bits in the *flags* argument must be | 1638 | * the caller. Any higher bits in the *flags* argument must be |
| 1612 | * unset. | 1639 | * unset. |
| 1613 | * | 1640 | * |
| 1614 | * When used to redirect packets to net devices, this helper | 1641 | * See also bpf_redirect(), which only supports redirecting to an |
| 1615 | * provides a high performance increase over **bpf_redirect**\ (). | 1642 | * ifindex, but doesn't require a map to do so. |
| 1616 | * This is due to various implementation details of the underlying | ||
| 1617 | * mechanisms, one of which is the fact that **bpf_redirect_map**\ | ||
| 1618 | * () tries to send packet as a "bulk" to the device. | ||
| 1619 | * Return | 1643 | * Return |
| 1620 | * **XDP_REDIRECT** on success, or **XDP_ABORTED** on error. | 1644 | * **XDP_REDIRECT** on success, or the value of the two lower bits |
| 1645 | * of the **flags* argument on error. | ||
| 1621 | * | 1646 | * |
| 1622 | * int bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags) | 1647 | * int bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags) |
| 1623 | * Description | 1648 | * Description |
| @@ -2892,6 +2917,114 @@ union bpf_attr { · 1268 unmodified lines | |||
| 2892 | * Obtain the 64bit jiffies | 2917 | * Obtain the 64bit jiffies |
| 2893 | * Return | 2918 | * Return |
| 2894 | * The 64 bit jiffies | 2919 | * The 64 bit jiffies |
| 2920 | * | ||
| 2921 | * int bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags) | ||
| 2922 | * Description | ||
| 2923 | * For an eBPF program attached to a perf event, retrieve the | ||
| 2924 | * branch records (struct perf_branch_entry) associated to *ctx* | ||
| 2925 | * and store it in the buffer pointed by *buf* up to size | ||
| 2926 | * *size* bytes. | ||
| 2927 | * Return | ||
| 2928 | * On success, number of bytes written to *buf*. On error, a | ||
| 2929 | * negative value. | ||
| 2930 | * | ||
| 2931 | * The *flags* can be set to **BPF_F_GET_BRANCH_RECORDS_SIZE** to | ||
| 2932 | * instead return the number of bytes required to store all the | ||
| 2933 | * branch entries. If this flag is set, *buf* may be NULL. | ||
| 2934 | * | ||
| 2935 | * **-EINVAL** if arguments invalid or **size** not a multiple | ||
| 2936 | * of sizeof(struct perf_branch_entry). | ||
| 2937 | * | ||
| 2938 | * **-ENOENT** if architecture does not support branch records. | ||
| 2939 | * | ||
| 2940 | * int bpf_get_ns_current_pid_tgid(u64 dev, u64 ino, struct bpf_pidns_info *nsdata, u32 size) | ||
| 2941 | * Description | ||
| 2942 | * Returns 0 on success, values for *pid* and *tgid* as seen from the current | ||
| 2943 | * *namespace* will be returned in *nsdata*. | ||
| 2944 | * | ||
| 2945 | * On failure, the returned value is one of the following: | ||
| 2946 | * | ||
| 2947 | * **-EINVAL** if dev and inum supplied don't match dev_t and inode number | ||
| 2948 | * with nsfs of current task, or if dev conversion to dev_t lost high bits. | ||
| 2949 | * | ||
| 2950 | * **-ENOENT** if pidns does not exists for the current task. | ||
| 2951 | * | ||
| 2952 | * int bpf_xdp_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size) | ||
| 2953 | * Description | ||
| 2954 | * Write raw *data* blob into a special BPF perf event held by | ||
| 2955 | * *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf | ||
| 2956 | * event must have the following attributes: **PERF_SAMPLE_RAW** | ||
| 2957 | * as **sample_type**, **PERF_TYPE_SOFTWARE** as **type**, and | ||
| 2958 | * **PERF_COUNT_SW_BPF_OUTPUT** as **config**. | ||
| 2959 | * | ||
| 2960 | * The *flags* are used to indicate the index in *map* for which | ||
| 2961 | * the value must be put, masked with **BPF_F_INDEX_MASK**. | ||
| 2962 | * Alternatively, *flags* can be set to **BPF_F_CURRENT_CPU** | ||
| 2963 | * to indicate that the index of the current CPU core should be | ||
| 2964 | * used. | ||
| 2965 | * | ||
| 2966 | * The value to write, of *size*, is passed through eBPF stack and | ||
| 2967 | * pointed by *data*. | ||
| 2968 | * | ||
| 2969 | * *ctx* is a pointer to in-kernel struct xdp_buff. | ||
| 2970 | * | ||
| 2971 | * This helper is similar to **bpf_perf_eventoutput**\ () but | ||
| 2972 | * restricted to raw_tracepoint bpf programs. | ||
| 2973 | * Return | ||
| 2974 | * 0 on success, or a negative error in case of failure. | ||
| 2975 | * | ||
| 2976 | * u64 bpf_get_netns_cookie(void *ctx) | ||
| 2977 | * Description | ||
| 2978 | * Retrieve the cookie (generated by the kernel) of the network | ||
| 2979 | * namespace the input *ctx* is associated with. The network | ||
| 2980 | * namespace cookie remains stable for its lifetime and provides | ||
| 2981 | * a global identifier that can be assumed unique. If *ctx* is | ||
| 2982 | * NULL, then the helper returns the cookie for the initial | ||
| 2983 | * network namespace. The cookie itself is very similar to that | ||
| 2984 | * of bpf_get_socket_cookie() helper, but for network namespaces | ||
| 2985 | * instead of sockets. | ||
| 2986 | * Return | ||
| 2987 | * A 8-byte long opaque number. | ||
| 2988 | * | ||
| 2989 | * u64 bpf_get_current_ancestor_cgroup_id(int ancestor_level) | ||
| 2990 | * Description | ||
| 2991 | * Return id of cgroup v2 that is ancestor of the cgroup associated | ||
| 2992 | * with the current task at the *ancestor_level*. The root cgroup | ||
| 2993 | * is at *ancestor_level* zero and each step down the hierarchy | ||
| 2994 | * increments the level. If *ancestor_level* == level of cgroup | ||
| 2995 | * associated with the current task, then return value will be the | ||
| 2996 | * same as that of **bpf_get_current_cgroup_id**\ (). | ||
| 2997 | * | ||
| 2998 | * The helper is useful to implement policies based on cgroups | ||
| 2999 | * that are upper in hierarchy than immediate cgroup associated | ||
| 3000 | * with the current task. | ||
| 3001 | * | ||
| 3002 | * The format of returned id and helper limitations are same as in | ||
| 3003 | * **bpf_get_current_cgroup_id**\ (). | ||
| 3004 | * Return | ||
| 3005 | * The id is returned or 0 in case the id could not be retrieved. | ||
| 3006 | * | ||
| 3007 | * int bpf_sk_assign(struct sk_buff *skb, struct bpf_sock *sk, u64 flags) | ||
| 3008 | * Description | ||
| 3009 | * Assign the *sk* to the *skb*. When combined with appropriate | ||
| 3010 | * routing configuration to receive the packet towards the socket, | ||
| 3011 | * will cause *skb* to be delivered to the specified socket. | ||
| 3012 | * Subsequent redirection of *skb* via **bpf_redirect**\ (), | ||
| 3013 | * **bpf_clone_redirect**\ () or other methods outside of BPF may | ||
| 3014 | * interfere with successful delivery to the socket. | ||
| 3015 | * | ||
| 3016 | * This operation is only valid from TC ingress path. | ||
| 3017 | * | ||
| 3018 | * The *flags* argument must be zero. | ||
| 3019 | * Return | ||
| 3020 | * 0 on success, or a negative errno in case of failure. | ||
| 3021 | * | ||
| 3022 | * * **-EINVAL** Unsupported flags specified. | ||
| 3023 | * * **-ENOENT** Socket is unavailable for assignment. | ||
| 3024 | * * **-ENETUNREACH** Socket is unreachable (wrong netns). | ||
| 3025 | * * **-EOPNOTSUPP** Unsupported operation, for example a | ||
| 3026 | * call from outside of TC ingress. | ||
| 3027 | * * **-ESOCKTNOSUPPORT** Socket type not supported (reuseport). | ||
| 2895 | */ | 3028 | */ |
| 2896 | #define __BPF_FUNC_MAPPER(FN) \ | 3029 | #define __BPF_FUNC_MAPPER(FN) \ |
| 2897 | FN(unspec), \ | 3030 | FN(unspec), \ |
| @@ -3012,7 +3145,13 @@ union bpf_attr { · 114 unmodified lines | |||
| 3012 | FN(probe_read_kernel_str), \ | 3145 | FN(probe_read_kernel_str), \ |
| 3013 | FN(tcp_send_ack), \ | 3146 | FN(tcp_send_ack), \ |
| 3014 | FN(send_signal_thread), \ | 3147 | FN(send_signal_thread), \ |
| 3015 | FN(jiffies64), | 3148 | FN(jiffies64), \ |
| 3149 | FN(read_branch_records), \ | ||
| 3150 | FN(get_ns_current_pid_tgid), \ | ||
| 3151 | FN(xdp_output), \ | ||
| 3152 | FN(get_netns_cookie), \ | ||
| 3153 | FN(get_current_ancestor_cgroup_id), \ | ||
| 3154 | FN(sk_assign), | ||
| 3016 | 3155 | ||
| 3017 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 3156 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 3018 | * function eBPF program intends to call | 3157 | * function eBPF program intends to call |
| @@ -3027,69 +3166,100 @@ enum bpf_func_id { · 8 unmodified lines | |||
| 3027 | /* All flags used by eBPF helper functions, placed here. */ | 3166 | /* All flags used by eBPF helper functions, placed here. */ |
| 3028 | 3167 | ||
| 3029 | /* BPF_FUNC_skb_store_bytes flags. */ | 3168 | /* BPF_FUNC_skb_store_bytes flags. */ |
| 3030 | #define BPF_F_RECOMPUTE_CSUM (1ULL << 0) | 3169 | enum { |
| 3031 | #define BPF_F_INVALIDATE_HASH (1ULL << 1) | 3170 | BPF_F_RECOMPUTE_CSUM = (1ULL << 0), |
| 3171 | BPF_F_INVALIDATE_HASH = (1ULL << 1), | ||
| 3172 | }; | ||
| 3032 | 3173 | ||
| 3033 | /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags. | 3174 | /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags. |
| 3034 | * First 4 bits are for passing the header field size. | 3175 | * First 4 bits are for passing the header field size. |
| 3035 | */ | 3176 | */ |
| 3036 | #define BPF_F_HDR_FIELD_MASK 0xfULL | 3177 | enum { |
| 3178 | BPF_F_HDR_FIELD_MASK = 0xfULL, | ||
| 3179 | }; | ||
| 3037 | 3180 | ||
| 3038 | /* BPF_FUNC_l4_csum_replace flags. */ | 3181 | /* BPF_FUNC_l4_csum_replace flags. */ |
| 3039 | #define BPF_F_PSEUDO_HDR (1ULL << 4) | 3182 | enum { |
| 3040 | #define BPF_F_MARK_MANGLED_0 (1ULL << 5) | 3183 | BPF_F_PSEUDO_HDR = (1ULL << 4), |
| 3041 | #define BPF_F_MARK_ENFORCE (1ULL << 6) | 3184 | BPF_F_MARK_MANGLED_0 = (1ULL << 5), |
| 3185 | BPF_F_MARK_ENFORCE = (1ULL << 6), | ||
| 3186 | }; | ||
| 3042 | 3187 | ||
| 3043 | /* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */ | 3188 | /* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */ |
| 3044 | #define BPF_F_INGRESS (1ULL << 0) | 3189 | enum { |
| 3190 | BPF_F_INGRESS = (1ULL << 0), | ||
| 3191 | }; | ||
| 3045 | 3192 | ||
| 3046 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ | 3193 | /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */ |
| 3047 | #define BPF_F_TUNINFO_IPV6 (1ULL << 0) | 3194 | enum { |
| 3195 | BPF_F_TUNINFO_IPV6 = (1ULL << 0), | ||
| 3196 | }; | ||
| 3048 | 3197 | ||
| 3049 | /* flags for both BPF_FUNC_get_stackid and BPF_FUNC_get_stack. */ | 3198 | /* flags for both BPF_FUNC_get_stackid and BPF_FUNC_get_stack. */ |
| 3050 | #define BPF_F_SKIP_FIELD_MASK 0xffULL | 3199 | enum { |
| 3051 | #define BPF_F_USER_STACK (1ULL << 8) | 3200 | BPF_F_SKIP_FIELD_MASK = 0xffULL, |
| 3201 | BPF_F_USER_STACK = (1ULL << 8), | ||
| 3052 | /* flags used by BPF_FUNC_get_stackid only. */ | 3202 | /* flags used by BPF_FUNC_get_stackid only. */ |
| 3053 | #define BPF_F_FAST_STACK_CMP (1ULL << 9) | 3203 | BPF_F_FAST_STACK_CMP = (1ULL << 9), |
| 3054 | #define BPF_F_REUSE_STACKID (1ULL << 10) | 3204 | BPF_F_REUSE_STACKID = (1ULL << 10), |
| 3055 | /* flags used by BPF_FUNC_get_stack only. */ | 3205 | /* flags used by BPF_FUNC_get_stack only. */ |
| 3056 | #define BPF_F_USER_BUILD_ID (1ULL << 11) | 3206 | BPF_F_USER_BUILD_ID = (1ULL << 11), |
| 3207 | }; | ||
| 3057 | 3208 | ||
| 3058 | /* BPF_FUNC_skb_set_tunnel_key flags. */ | 3209 | /* BPF_FUNC_skb_set_tunnel_key flags. */ |
| 3059 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) | 3210 | enum { |
| 3060 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) | 3211 | BPF_F_ZERO_CSUM_TX = (1ULL << 1), |
| 3061 | #define BPF_F_SEQ_NUMBER (1ULL << 3) | 3212 | BPF_F_DONT_FRAGMENT = (1ULL << 2), |
| 3213 | BPF_F_SEQ_NUMBER = (1ULL << 3), | ||
| 3214 | }; | ||
| 3062 | 3215 | ||
| 3063 | /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and | 3216 | /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and |
| 3064 | * BPF_FUNC_perf_event_read_value flags. | 3217 | * BPF_FUNC_perf_event_read_value flags. |
| 3065 | */ | 3218 | */ |
| 3066 | #define BPF_F_INDEX_MASK 0xffffffffULL | 3219 | enum { |
| 3067 | #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK | 3220 | BPF_F_INDEX_MASK = 0xffffffffULL, |
| 3221 | BPF_F_CURRENT_CPU = BPF_F_INDEX_MASK, | ||
| 3068 | /* BPF_FUNC_perf_event_output for sk_buff input context. */ | 3222 | /* BPF_FUNC_perf_event_output for sk_buff input context. */ |
| 3069 | #define BPF_F_CTXLEN_MASK (0xfffffULL << 32) | 3223 | BPF_F_CTXLEN_MASK = (0xfffffULL << 32), |
| 3224 | }; | ||
| 3070 | 3225 | ||
| 3071 | /* Current network namespace */ | 3226 | /* Current network namespace */ |
| 3072 | #define BPF_F_CURRENT_NETNS (-1L) | 3227 | enum { |
| 3228 | BPF_F_CURRENT_NETNS = (-1L), | ||
| 3229 | }; | ||
| 3073 | 3230 | ||
| 3074 | /* BPF_FUNC_skb_adjust_room flags. */ | 3231 | /* BPF_FUNC_skb_adjust_room flags. */ |
| 3075 | #define BPF_F_ADJ_ROOM_FIXED_GSO (1ULL << 0) | 3232 | enum { |
| 3233 | BPF_F_ADJ_ROOM_FIXED_GSO = (1ULL << 0), | ||
| 3234 | BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = (1ULL << 1), | ||
| 3235 | BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = (1ULL << 2), | ||
| 3236 | BPF_F_ADJ_ROOM_ENCAP_L4_GRE = (1ULL << 3), | ||
| 3237 | BPF_F_ADJ_ROOM_ENCAP_L4_UDP = (1ULL << 4), | ||
| 3238 | }; | ||
| 3076 | 3239 | ||
| 3077 | #define BPF_ADJ_ROOM_ENCAP_L2_MASK 0xff | 3240 | enum { |
| 3078 | #define BPF_ADJ_ROOM_ENCAP_L2_SHIFT 56 | 3241 | BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff, |
| 3242 | BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 56, | ||
| 3243 | }; | ||
| 3079 | 3244 | ||
| 3080 | #define BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 (1ULL << 1) | ||
| 3081 | #define BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 (1ULL << 2) | ||
| 3082 | #define BPF_F_ADJ_ROOM_ENCAP_L4_GRE (1ULL << 3) | ||
| 3083 | #define BPF_F_ADJ_ROOM_ENCAP_L4_UDP (1ULL << 4) | ||
| 3084 | #define BPF_F_ADJ_ROOM_ENCAP_L2(len) (((__u64)len & \ | 3245 | #define BPF_F_ADJ_ROOM_ENCAP_L2(len) (((__u64)len & \ |
| 3085 | BPF_ADJ_ROOM_ENCAP_L2_MASK) \ | 3246 | BPF_ADJ_ROOM_ENCAP_L2_MASK) \ |
| 3086 | << BPF_ADJ_ROOM_ENCAP_L2_SHIFT) | 3247 | << BPF_ADJ_ROOM_ENCAP_L2_SHIFT) |
| 3087 | 3248 | ||
| 3088 | /* BPF_FUNC_sysctl_get_name flags. */ | 3249 | /* BPF_FUNC_sysctl_get_name flags. */ |
| 3089 | #define BPF_F_SYSCTL_BASE_NAME (1ULL << 0) | 3250 | enum { |
| 3251 | BPF_F_SYSCTL_BASE_NAME = (1ULL << 0), | ||
| 3252 | }; | ||
| 3090 | 3253 | ||
| 3091 | /* BPF_FUNC_sk_storage_get flags */ | 3254 | /* BPF_FUNC_sk_storage_get flags */ |
| 3092 | #define BPF_SK_STORAGE_GET_F_CREATE (1ULL << 0) | 3255 | enum { |
| 3256 | BPF_SK_STORAGE_GET_F_CREATE = (1ULL << 0), | ||
| 3257 | }; | ||
| 3258 | |||
| 3259 | /* BPF_FUNC_read_branch_records flags. */ | ||
| 3260 | enum { | ||
| 3261 | BPF_F_GET_BRANCH_RECORDS_SIZE = (1ULL << 0), | ||
| 3262 | }; | ||
| 3093 | 3263 | ||
| 3094 | /* Mode for BPF_FUNC_skb_adjust_room helper. */ | 3264 | /* Mode for BPF_FUNC_skb_adjust_room helper. */ |
| 3095 | enum bpf_adj_room_mode { | 3265 | enum bpf_adj_room_mode { |
| @@ -3155,6 +3325,7 @@ struct __sk_buff { · 59 unmodified lines | |||
| 3155 | __u32 wire_len; | 3325 | __u32 wire_len; |
| 3156 | __u32 gso_segs; | 3326 | __u32 gso_segs; |
| 3157 | __bpf_md_ptr(struct bpf_sock *, sk); | 3327 | __bpf_md_ptr(struct bpf_sock *, sk); |
| 3328 | __u32 gso_size; | ||
| 3158 | }; | 3329 | }; |
| 3159 | 3330 | ||
| 3160 | struct bpf_tunnel_key { | 3331 | struct bpf_tunnel_key { |
| @@ -3507,13 +3678,14 @@ struct bpf_sock_ops { · 346 unmodified lines | |||
| 3507 | }; | 3678 | }; |
| 3508 | 3679 | ||
| 3509 | /* Definitions for bpf_sock_ops_cb_flags */ | 3680 | /* Definitions for bpf_sock_ops_cb_flags */ |
| 3510 | #define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0) | 3681 | enum { |
| 3511 | #define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1) | 3682 | BPF_SOCK_OPS_RTO_CB_FLAG = (1<<0), |
| 3512 | #define BPF_SOCK_OPS_STATE_CB_FLAG (1<<2) | 3683 | BPF_SOCK_OPS_RETRANS_CB_FLAG = (1<<1), |
| 3513 | #define BPF_SOCK_OPS_RTT_CB_FLAG (1<<3) | 3684 | BPF_SOCK_OPS_STATE_CB_FLAG = (1<<2), |
| 3514 | #define BPF_SOCK_OPS_ALL_CB_FLAGS 0xF /* Mask of all currently | 3685 | BPF_SOCK_OPS_RTT_CB_FLAG = (1<<3), |
| 3515 | * supported cb flags | 3686 | /* Mask of all currently supported cb flags */ |
| 3516 | */ | 3687 | BPF_SOCK_OPS_ALL_CB_FLAGS = 0xF, |
| 3688 | }; | ||
| 3517 | 3689 | ||
| 3518 | /* List of known BPF sock_ops operators. | 3690 | /* List of known BPF sock_ops operators. |
| 3519 | * New entries can only be added at the end | 3691 | * New entries can only be added at the end |
| @@ -3592,8 +3764,10 @@ enum { · 72 unmodified lines | |||
| 3592 | BPF_TCP_MAX_STATES /* Leave at the end! */ | 3764 | BPF_TCP_MAX_STATES /* Leave at the end! */ |
| 3593 | }; | 3765 | }; |
| 3594 | 3766 | ||
| 3595 | #define TCP_BPF_IW 1001 /* Set TCP initial congestion window */ | 3767 | enum { |
| 3596 | #define TCP_BPF_SNDCWND_CLAMP 1002 /* Set sndcwnd_clamp */ | 3768 | TCP_BPF_IW = 1001, /* Set TCP initial congestion window */ |
| 3769 | TCP_BPF_SNDCWND_CLAMP = 1002, /* Set sndcwnd_clamp */ | ||
| 3770 | }; | ||
| 3597 | 3771 | ||
| 3598 | struct bpf_perf_event_value { | 3772 | struct bpf_perf_event_value { |
| 3599 | __u64 counter; | 3773 | __u64 counter; |
| @@ -3601,12 +3775,16 @@ struct bpf_perf_event_value { · 1 unmodified line | |||
| 3601 | __u64 running; | 3775 | __u64 running; |
| 3602 | }; | 3776 | }; |
| 3603 | 3777 | ||
| 3604 | #define BPF_DEVCG_ACC_MKNOD (1ULL << 0) | 3778 | enum { |
| 3605 | #define BPF_DEVCG_ACC_READ (1ULL << 1) | 3779 | BPF_DEVCG_ACC_MKNOD = (1ULL << 0), |
| 3606 | #define BPF_DEVCG_ACC_WRITE (1ULL << 2) | 3780 | BPF_DEVCG_ACC_READ = (1ULL << 1), |
| 3781 | BPF_DEVCG_ACC_WRITE = (1ULL << 2), | ||
| 3782 | }; | ||
| 3607 | 3783 | ||
| 3608 | #define BPF_DEVCG_DEV_BLOCK (1ULL << 0) | 3784 | enum { |
| 3609 | #define BPF_DEVCG_DEV_CHAR (1ULL << 1) | 3785 | BPF_DEVCG_DEV_BLOCK = (1ULL << 0), |
| 3786 | BPF_DEVCG_DEV_CHAR = (1ULL << 1), | ||
| 3787 | }; | ||
| 3610 | 3788 | ||
| 3611 | struct bpf_cgroup_dev_ctx { | 3789 | struct bpf_cgroup_dev_ctx { |
| 3612 | /* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */ | 3790 | /* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */ |
| @@ -3622,8 +3800,10 @@ struct bpf_raw_tracepoint_args { · 9 unmodified lines | |||
| 3622 | /* DIRECT: Skip the FIB rules and go to FIB table associated with device | 3800 | /* DIRECT: Skip the FIB rules and go to FIB table associated with device |
| 3623 | * OUTPUT: Do lookup from egress perspective; default is ingress | 3801 | * OUTPUT: Do lookup from egress perspective; default is ingress |
| 3624 | */ | 3802 | */ |
| 3625 | #define BPF_FIB_LOOKUP_DIRECT (1U << 0) | 3803 | enum { |
| 3626 | #define BPF_FIB_LOOKUP_OUTPUT (1U << 1) | 3804 | BPF_FIB_LOOKUP_DIRECT = (1U << 0), |
| 3805 | BPF_FIB_LOOKUP_OUTPUT = (1U << 1), | ||
| 3806 | }; | ||
| 3627 | 3807 | ||
| 3628 | enum { | 3808 | enum { |
| 3629 | BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */ | 3809 | BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */ |
| @@ -3695,9 +3875,11 @@ enum bpf_task_fd_type { · 65 unmodified lines | |||
| 3695 | BPF_FD_TYPE_URETPROBE, /* filename + offset */ | 3875 | BPF_FD_TYPE_URETPROBE, /* filename + offset */ |
| 3696 | }; | 3876 | }; |
| 3697 | 3877 | ||
| 3698 | #define BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG (1U << 0) | 3878 | enum { |
| 3699 | #define BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL (1U << 1) | 3879 | BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = (1U << 0), |
| 3700 | #define BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP (1U << 2) | 3880 | BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = (1U << 1), |
| 3881 | BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = (1U << 2), | ||
| 3882 | }; | ||
| 3701 | 3883 | ||
| 3702 | struct bpf_flow_keys { | 3884 | struct bpf_flow_keys { |
| 3703 | __u16 nhoff; | 3885 | __u16 nhoff; |
| @@ -3763,4 +3945,8 @@ struct bpf_sockopt { · 59 unmodified lines | |||
| 3763 | __s32 retval; | 3945 | __s32 retval; |
| 3764 | }; | 3946 | }; |
| 3765 | 3947 | ||
| 3948 | struct bpf_pidns_info { | ||
| 3949 | __u32 pid; | ||
| 3950 | __u32 tgid; | ||
| 3951 | }; | ||
| 3766 | #endif /* _UAPI__LINUX_BPF_H__ */ | 3952 | #endif /* _UAPI__LINUX_BPF_H__ */ |
| @@ -36,17 +36,24 @@ struct btrfs_ioctl_vol_args { · 35 unmodified lines | |||
| 36 | #define BTRFS_DEVICE_PATH_NAME_MAX 1024 | 36 | #define BTRFS_DEVICE_PATH_NAME_MAX 1024 |
| 37 | #define BTRFS_SUBVOL_NAME_MAX 4039 | 37 | #define BTRFS_SUBVOL_NAME_MAX 4039 |
| 38 | 38 | ||
| 39 | #define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) | 39 | /* |
| 40 | * Deprecated since 5.7: | ||
| 41 | * | ||
| 42 | * BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0) | ||
| 43 | */ | ||
| 44 | |||
| 40 | #define BTRFS_SUBVOL_RDONLY (1ULL << 1) | 45 | #define BTRFS_SUBVOL_RDONLY (1ULL << 1) |
| 41 | #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) | 46 | #define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2) |
| 42 | 47 | ||
| 43 | #define BTRFS_DEVICE_SPEC_BY_ID (1ULL << 3) | 48 | #define BTRFS_DEVICE_SPEC_BY_ID (1ULL << 3) |
| 44 | 49 | ||
| 50 | #define BTRFS_SUBVOL_SPEC_BY_ID (1ULL << 4) | ||
| 51 | |||
| 45 | #define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED \ | 52 | #define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED \ |
| 46 | (BTRFS_SUBVOL_CREATE_ASYNC | \ | 53 | (BTRFS_SUBVOL_RDONLY | \ |
| 47 | BTRFS_SUBVOL_RDONLY | \ | ||
| 48 | BTRFS_SUBVOL_QGROUP_INHERIT | \ | 54 | BTRFS_SUBVOL_QGROUP_INHERIT | \ |
| 49 | BTRFS_DEVICE_SPEC_BY_ID) | 55 | BTRFS_DEVICE_SPEC_BY_ID | \ |
| 56 | BTRFS_SUBVOL_SPEC_BY_ID) | ||
| 50 | 57 | ||
| 51 | #define BTRFS_FSID_SIZE 16 | 58 | #define BTRFS_FSID_SIZE 16 |
| 52 | #define BTRFS_UUID_SIZE 16 | 59 | #define BTRFS_UUID_SIZE 16 |
| @@ -97,16 +104,29 @@ struct btrfs_ioctl_qgroup_limit_args { · 44 unmodified lines | |||
| 97 | }; | 104 | }; |
| 98 | 105 | ||
| 99 | /* | 106 | /* |
| 100 | * flags for subvolumes | 107 | * Arguments for specification of subvolumes or devices, supporting by-name or |
| 108 | * by-id and flags | ||
| 101 | * | 109 | * |
| 102 | * Used by: | 110 | * The set of supported flags depends on the ioctl |
| 103 | * struct btrfs_ioctl_vol_args_v2.flags | ||
| 104 | * | 111 | * |
| 105 | * BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls: | 112 | * BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls: |
| 106 | * - BTRFS_IOC_SUBVOL_GETFLAGS | 113 | * - BTRFS_IOC_SUBVOL_GETFLAGS |
| 107 | * - BTRFS_IOC_SUBVOL_SETFLAGS | 114 | * - BTRFS_IOC_SUBVOL_SETFLAGS |
| 108 | */ | 115 | */ |
| 109 | 116 | ||
| 117 | /* Supported flags for BTRFS_IOC_RM_DEV_V2 */ | ||
| 118 | #define BTRFS_DEVICE_REMOVE_ARGS_MASK \ | ||
| 119 | (BTRFS_DEVICE_SPEC_BY_ID) | ||
| 120 | |||
| 121 | /* Supported flags for BTRFS_IOC_SNAP_CREATE_V2 and BTRFS_IOC_SUBVOL_CREATE_V2 */ | ||
| 122 | #define BTRFS_SUBVOL_CREATE_ARGS_MASK \ | ||
| 123 | (BTRFS_SUBVOL_RDONLY | \ | ||
| 124 | BTRFS_SUBVOL_QGROUP_INHERIT) | ||
| 125 | |||
| 126 | /* Supported flags for BTRFS_IOC_SNAP_DESTROY_V2 */ | ||
| 127 | #define BTRFS_SUBVOL_DELETE_ARGS_MASK \ | ||
| 128 | (BTRFS_SUBVOL_SPEC_BY_ID) | ||
| 129 | |||
| 110 | struct btrfs_ioctl_vol_args_v2 { | 130 | struct btrfs_ioctl_vol_args_v2 { |
| 111 | __s64 fd; | 131 | __s64 fd; |
| 112 | __u64 transid; | 132 | __u64 transid; |
| @@ -121,6 +141,7 @@ struct btrfs_ioctl_vol_args_v2 { · 8 unmodified lines | |||
| 121 | union { | 141 | union { |
| 122 | char name[BTRFS_SUBVOL_NAME_MAX + 1]; | 142 | char name[BTRFS_SUBVOL_NAME_MAX + 1]; |
| 123 | __u64 devid; | 143 | __u64 devid; |
| 144 | __u64 subvolid; | ||
| 124 | }; | 145 | }; |
| 125 | }; | 146 | }; |
| 126 | 147 | ||
| @@ -949,5 +970,7 @@ enum btrfs_err_code { · 822 unmodified lines | |||
| 949 | struct btrfs_ioctl_get_subvol_rootref_args) | 970 | struct btrfs_ioctl_get_subvol_rootref_args) |
| 950 | #define BTRFS_IOC_INO_LOOKUP_USER _IOWR(BTRFS_IOCTL_MAGIC, 62, \ | 971 | #define BTRFS_IOC_INO_LOOKUP_USER _IOWR(BTRFS_IOCTL_MAGIC, 62, \ |
| 951 | struct btrfs_ioctl_ino_lookup_user_args) | 972 | struct btrfs_ioctl_ino_lookup_user_args) |
| 973 | #define BTRFS_IOC_SNAP_DESTROY_V2 _IOW(BTRFS_IOCTL_MAGIC, 63, \ | ||
| 974 | struct btrfs_ioctl_vol_args_v2) | ||
| 952 | 975 | ||
| 953 | #endif /* _UAPI_LINUX_BTRFS_H */ | 976 | #endif /* _UAPI_LINUX_BTRFS_H */ |
| @@ -2,8 +2,10 @@ · 1 unmodified line | |||
| 2 | #ifndef __UAPI_CORESIGHT_STM_H_ | 2 | #ifndef __UAPI_CORESIGHT_STM_H_ |
| 3 | #define __UAPI_CORESIGHT_STM_H_ | 3 | #define __UAPI_CORESIGHT_STM_H_ |
| 4 | 4 | ||
| 5 | #define STM_FLAG_TIMESTAMPED BIT(3) | 5 | #include <linux/const.h> |
| 6 | #define STM_FLAG_GUARANTEED BIT(7) | 6 | |
| 7 | #define STM_FLAG_TIMESTAMPED _BITUL(3) | ||
| 8 | #define STM_FLAG_GUARANTEED _BITUL(7) | ||
| 7 | 9 | ||
| 8 | /* | 10 | /* |
| 9 | * The CoreSight STM supports guaranteed and invariant timing | 11 | * The CoreSight STM supports guaranteed and invariant timing |
| @@ -117,6 +117,11 @@ enum devlink_command { · 116 unmodified lines | |||
| 117 | DEVLINK_CMD_TRAP_GROUP_NEW, | 117 | DEVLINK_CMD_TRAP_GROUP_NEW, |
| 118 | DEVLINK_CMD_TRAP_GROUP_DEL, | 118 | DEVLINK_CMD_TRAP_GROUP_DEL, |
| 119 | 119 | ||
| 120 | DEVLINK_CMD_TRAP_POLICER_GET, /* can dump */ | ||
| 121 | DEVLINK_CMD_TRAP_POLICER_SET, | ||
| 122 | DEVLINK_CMD_TRAP_POLICER_NEW, | ||
| 123 | DEVLINK_CMD_TRAP_POLICER_DEL, | ||
| 124 | |||
| 120 | /* add new commands above here */ | 125 | /* add new commands above here */ |
| 121 | __DEVLINK_CMD_MAX, | 126 | __DEVLINK_CMD_MAX, |
| 122 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 | 127 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 |
| @@ -187,6 +192,7 @@ enum devlink_port_flavour { · 64 unmodified lines | |||
| 187 | * for the PCI VF. It is an internal | 192 | * for the PCI VF. It is an internal |
| 188 | * port that faces the PCI VF. | 193 | * port that faces the PCI VF. |
| 189 | */ | 194 | */ |
| 195 | DEVLINK_PORT_FLAVOUR_VIRTUAL, /* Any virtual port facing the user. */ | ||
| 190 | }; | 196 | }; |
| 191 | 197 | ||
| 192 | enum devlink_param_cmode { | 198 | enum devlink_param_cmode { |
| @@ -216,6 +222,7 @@ enum devlink_param_reset_dev_on_drv_probe_value { · 23 unmodified lines | |||
| 216 | enum { | 222 | enum { |
| 217 | DEVLINK_ATTR_STATS_RX_PACKETS, /* u64 */ | 223 | DEVLINK_ATTR_STATS_RX_PACKETS, /* u64 */ |
| 218 | DEVLINK_ATTR_STATS_RX_BYTES, /* u64 */ | 224 | DEVLINK_ATTR_STATS_RX_BYTES, /* u64 */ |
| 225 | DEVLINK_ATTR_STATS_RX_DROPPED, /* u64 */ | ||
| 219 | 226 | ||
| 220 | __DEVLINK_ATTR_STATS_MAX, | 227 | __DEVLINK_ATTR_STATS_MAX, |
| 221 | DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1 | 228 | DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1 |
| @@ -252,6 +259,8 @@ enum devlink_trap_type { · 30 unmodified lines | |||
| 252 | enum { | 259 | enum { |
| 253 | /* Trap can report input port as metadata */ | 260 | /* Trap can report input port as metadata */ |
| 254 | DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT, | 261 | DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT, |
| 262 | /* Trap can report flow action cookie as metadata */ | ||
| 263 | DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE, | ||
| 255 | }; | 264 | }; |
| 256 | 265 | ||
| 257 | enum devlink_attr { | 266 | enum devlink_attr { |
| @@ -426,6 +435,13 @@ enum devlink_attr { · 168 unmodified lines | |||
| 426 | DEVLINK_ATTR_NETNS_FD, /* u32 */ | 435 | DEVLINK_ATTR_NETNS_FD, /* u32 */ |
| 427 | DEVLINK_ATTR_NETNS_PID, /* u32 */ | 436 | DEVLINK_ATTR_NETNS_PID, /* u32 */ |
| 428 | DEVLINK_ATTR_NETNS_ID, /* u32 */ | 437 | DEVLINK_ATTR_NETNS_ID, /* u32 */ |
| 438 | |||
| 439 | DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP, /* u8 */ | ||
| 440 | |||
| 441 | DEVLINK_ATTR_TRAP_POLICER_ID, /* u32 */ | ||
| 442 | DEVLINK_ATTR_TRAP_POLICER_RATE, /* u64 */ | ||
| 443 | DEVLINK_ATTR_TRAP_POLICER_BURST, /* u64 */ | ||
| 444 | |||
| 429 | /* add new attributes above here, update the policy in devlink.c */ | 445 | /* add new attributes above here, update the policy in devlink.c */ |
| 430 | 446 | ||
| 431 | __DEVLINK_ATTR_MAX, | 447 | __DEVLINK_ATTR_MAX, |
| @@ -272,9 +272,9 @@ enum { · 271 unmodified lines | |||
| 272 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 272 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 273 | 273 | ||
| 274 | #define DM_VERSION_MAJOR 4 | 274 | #define DM_VERSION_MAJOR 4 |
| 275 | #define DM_VERSION_MINOR 41 | 275 | #define DM_VERSION_MINOR 42 |
| 276 | #define DM_VERSION_PATCHLEVEL 0 | 276 | #define DM_VERSION_PATCHLEVEL 0 |
| 277 | #define DM_VERSION_EXTRA "-ioctl (2019-09-16)" | 277 | #define DM_VERSION_EXTRA "-ioctl (2020-02-27)" |
| 278 | 278 | ||
| 279 | /* Status bits */ | 279 | /* Status bits */ |
| 280 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 280 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -596,6 +596,9 @@ struct ethtool_pauseparam { · 595 unmodified lines | |||
| 596 | * @ETH_SS_LINK_MODES: link mode names | 596 | * @ETH_SS_LINK_MODES: link mode names |
| 597 | * @ETH_SS_MSG_CLASSES: debug message class names | 597 | * @ETH_SS_MSG_CLASSES: debug message class names |
| 598 | * @ETH_SS_WOL_MODES: wake-on-lan modes | 598 | * @ETH_SS_WOL_MODES: wake-on-lan modes |
| 599 | * @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags | ||
| 600 | * @ETH_SS_TS_TX_TYPES: timestamping Tx types | ||
| 601 | * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters | ||
| 599 | */ | 602 | */ |
| 600 | enum ethtool_stringset { | 603 | enum ethtool_stringset { |
| 601 | ETH_SS_TEST = 0, | 604 | ETH_SS_TEST = 0, |
| @@ -610,6 +613,9 @@ enum ethtool_stringset { · 8 unmodified lines | |||
| 610 | ETH_SS_LINK_MODES, | 613 | ETH_SS_LINK_MODES, |
| 611 | ETH_SS_MSG_CLASSES, | 614 | ETH_SS_MSG_CLASSES, |
| 612 | ETH_SS_WOL_MODES, | 615 | ETH_SS_WOL_MODES, |
| 616 | ETH_SS_SOF_TIMESTAMPING, | ||
| 617 | ETH_SS_TS_TX_TYPES, | ||
| 618 | ETH_SS_TS_RX_FILTERS, | ||
| 613 | 619 | ||
| 614 | /* add new constants above here */ | 620 | /* add new constants above here */ |
| 615 | ETH_SS_COUNT | 621 | ETH_SS_COUNT |
| @@ -1330,6 +1336,7 @@ enum ethtool_fec_config_bits { · 714 unmodified lines | |||
| 1330 | ETHTOOL_FEC_OFF_BIT, | 1336 | ETHTOOL_FEC_OFF_BIT, |
| 1331 | ETHTOOL_FEC_RS_BIT, | 1337 | ETHTOOL_FEC_RS_BIT, |
| 1332 | ETHTOOL_FEC_BASER_BIT, | 1338 | ETHTOOL_FEC_BASER_BIT, |
| 1339 | ETHTOOL_FEC_LLRS_BIT, | ||
| 1333 | }; | 1340 | }; |
| 1334 | 1341 | ||
| 1335 | #define ETHTOOL_FEC_NONE (1 << ETHTOOL_FEC_NONE_BIT) | 1342 | #define ETHTOOL_FEC_NONE (1 << ETHTOOL_FEC_NONE_BIT) |
| @@ -1337,6 +1344,7 @@ enum ethtool_fec_config_bits { · 1 unmodified line | |||
| 1337 | #define ETHTOOL_FEC_OFF (1 << ETHTOOL_FEC_OFF_BIT) | 1344 | #define ETHTOOL_FEC_OFF (1 << ETHTOOL_FEC_OFF_BIT) |
| 1338 | #define ETHTOOL_FEC_RS (1 << ETHTOOL_FEC_RS_BIT) | 1345 | #define ETHTOOL_FEC_RS (1 << ETHTOOL_FEC_RS_BIT) |
| 1339 | #define ETHTOOL_FEC_BASER (1 << ETHTOOL_FEC_BASER_BIT) | 1346 | #define ETHTOOL_FEC_BASER (1 << ETHTOOL_FEC_BASER_BIT) |
| 1347 | #define ETHTOOL_FEC_LLRS (1 << ETHTOOL_FEC_LLRS_BIT) | ||
| 1340 | 1348 | ||
| 1341 | /* CMDs currently supported */ | 1349 | /* CMDs currently supported */ |
| 1342 | #define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings. | 1350 | #define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings. |
| @@ -1521,7 +1529,7 @@ enum ethtool_link_mode_bit_indices { · 178 unmodified lines | |||
| 1521 | ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 71, | 1529 | ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 71, |
| 1522 | ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 72, | 1530 | ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 72, |
| 1523 | ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 73, | 1531 | ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 73, |
| 1524 | 1532 | ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 74, | |
| 1525 | /* must be last entry */ | 1533 | /* must be last entry */ |
| 1526 | __ETHTOOL_LINK_MODE_MASK_NBITS | 1534 | __ETHTOOL_LINK_MODE_MASK_NBITS |
| 1527 | }; | 1535 | }; |
| @@ -24,6 +24,21 @@ enum { · 23 unmodified lines | |||
| 24 | ETHTOOL_MSG_DEBUG_SET, | 24 | ETHTOOL_MSG_DEBUG_SET, |
| 25 | ETHTOOL_MSG_WOL_GET, | 25 | ETHTOOL_MSG_WOL_GET, |
| 26 | ETHTOOL_MSG_WOL_SET, | 26 | ETHTOOL_MSG_WOL_SET, |
| 27 | ETHTOOL_MSG_FEATURES_GET, | ||
| 28 | ETHTOOL_MSG_FEATURES_SET, | ||
| 29 | ETHTOOL_MSG_PRIVFLAGS_GET, | ||
| 30 | ETHTOOL_MSG_PRIVFLAGS_SET, | ||
| 31 | ETHTOOL_MSG_RINGS_GET, | ||
| 32 | ETHTOOL_MSG_RINGS_SET, | ||
| 33 | ETHTOOL_MSG_CHANNELS_GET, | ||
| 34 | ETHTOOL_MSG_CHANNELS_SET, | ||
| 35 | ETHTOOL_MSG_COALESCE_GET, | ||
| 36 | ETHTOOL_MSG_COALESCE_SET, | ||
| 37 | ETHTOOL_MSG_PAUSE_GET, | ||
| 38 | ETHTOOL_MSG_PAUSE_SET, | ||
| 39 | ETHTOOL_MSG_EEE_GET, | ||
| 40 | ETHTOOL_MSG_EEE_SET, | ||
| 41 | ETHTOOL_MSG_TSINFO_GET, | ||
| 27 | 42 | ||
| 28 | /* add new constants above here */ | 43 | /* add new constants above here */ |
| 29 | __ETHTOOL_MSG_USER_CNT, | 44 | __ETHTOOL_MSG_USER_CNT, |
| @@ -43,6 +58,22 @@ enum { · 13 unmodified lines | |||
| 43 | ETHTOOL_MSG_DEBUG_NTF, | 58 | ETHTOOL_MSG_DEBUG_NTF, |
| 44 | ETHTOOL_MSG_WOL_GET_REPLY, | 59 | ETHTOOL_MSG_WOL_GET_REPLY, |
| 45 | ETHTOOL_MSG_WOL_NTF, | 60 | ETHTOOL_MSG_WOL_NTF, |
| 61 | ETHTOOL_MSG_FEATURES_GET_REPLY, | ||
| 62 | ETHTOOL_MSG_FEATURES_SET_REPLY, | ||
| 63 | ETHTOOL_MSG_FEATURES_NTF, | ||
| 64 | ETHTOOL_MSG_PRIVFLAGS_GET_REPLY, | ||
| 65 | ETHTOOL_MSG_PRIVFLAGS_NTF, | ||
| 66 | ETHTOOL_MSG_RINGS_GET_REPLY, | ||
| 67 | ETHTOOL_MSG_RINGS_NTF, | ||
| 68 | ETHTOOL_MSG_CHANNELS_GET_REPLY, | ||
| 69 | ETHTOOL_MSG_CHANNELS_NTF, | ||
| 70 | ETHTOOL_MSG_COALESCE_GET_REPLY, | ||
| 71 | ETHTOOL_MSG_COALESCE_NTF, | ||
| 72 | ETHTOOL_MSG_PAUSE_GET_REPLY, | ||
| 73 | ETHTOOL_MSG_PAUSE_NTF, | ||
| 74 | ETHTOOL_MSG_EEE_GET_REPLY, | ||
| 75 | ETHTOOL_MSG_EEE_NTF, | ||
| 76 | ETHTOOL_MSG_TSINFO_GET_REPLY, | ||
| 46 | 77 | ||
| 47 | /* add new constants above here */ | 78 | /* add new constants above here */ |
| 48 | __ETHTOOL_MSG_KERNEL_CNT, | 79 | __ETHTOOL_MSG_KERNEL_CNT, |
| @@ -228,6 +259,150 @@ enum { · 179 unmodified lines | |||
| 228 | ETHTOOL_A_WOL_MAX = __ETHTOOL_A_WOL_CNT - 1 | 259 | ETHTOOL_A_WOL_MAX = __ETHTOOL_A_WOL_CNT - 1 |
| 229 | }; | 260 | }; |
| 230 | 261 | ||
| 262 | /* FEATURES */ | ||
| 263 | |||
| 264 | enum { | ||
| 265 | ETHTOOL_A_FEATURES_UNSPEC, | ||
| 266 | ETHTOOL_A_FEATURES_HEADER, /* nest - _A_HEADER_* */ | ||
| 267 | ETHTOOL_A_FEATURES_HW, /* bitset */ | ||
| 268 | ETHTOOL_A_FEATURES_WANTED, /* bitset */ | ||
| 269 | ETHTOOL_A_FEATURES_ACTIVE, /* bitset */ | ||
| 270 | ETHTOOL_A_FEATURES_NOCHANGE, /* bitset */ | ||
| 271 | |||
| 272 | /* add new constants above here */ | ||
| 273 | __ETHTOOL_A_FEATURES_CNT, | ||
| 274 | ETHTOOL_A_FEATURES_MAX = __ETHTOOL_A_FEATURES_CNT - 1 | ||
| 275 | }; | ||
| 276 | |||
| 277 | /* PRIVFLAGS */ | ||
| 278 | |||
| 279 | enum { | ||
| 280 | ETHTOOL_A_PRIVFLAGS_UNSPEC, | ||
| 281 | ETHTOOL_A_PRIVFLAGS_HEADER, /* nest - _A_HEADER_* */ | ||
| 282 | ETHTOOL_A_PRIVFLAGS_FLAGS, /* bitset */ | ||
| 283 | |||
| 284 | /* add new constants above here */ | ||
| 285 | __ETHTOOL_A_PRIVFLAGS_CNT, | ||
| 286 | ETHTOOL_A_PRIVFLAGS_MAX = __ETHTOOL_A_PRIVFLAGS_CNT - 1 | ||
| 287 | }; | ||
| 288 | |||
| 289 | /* RINGS */ | ||
| 290 | |||
| 291 | enum { | ||
| 292 | ETHTOOL_A_RINGS_UNSPEC, | ||
| 293 | ETHTOOL_A_RINGS_HEADER, /* nest - _A_HEADER_* */ | ||
| 294 | ETHTOOL_A_RINGS_RX_MAX, /* u32 */ | ||
| 295 | ETHTOOL_A_RINGS_RX_MINI_MAX, /* u32 */ | ||
| 296 | ETHTOOL_A_RINGS_RX_JUMBO_MAX, /* u32 */ | ||
| 297 | ETHTOOL_A_RINGS_TX_MAX, /* u32 */ | ||
| 298 | ETHTOOL_A_RINGS_RX, /* u32 */ | ||
| 299 | ETHTOOL_A_RINGS_RX_MINI, /* u32 */ | ||
| 300 | ETHTOOL_A_RINGS_RX_JUMBO, /* u32 */ | ||
| 301 | ETHTOOL_A_RINGS_TX, /* u32 */ | ||
| 302 | |||
| 303 | /* add new constants above here */ | ||
| 304 | __ETHTOOL_A_RINGS_CNT, | ||
| 305 | ETHTOOL_A_RINGS_MAX = (__ETHTOOL_A_RINGS_CNT - 1) | ||
| 306 | }; | ||
| 307 | |||
| 308 | /* CHANNELS */ | ||
| 309 | |||
| 310 | enum { | ||
| 311 | ETHTOOL_A_CHANNELS_UNSPEC, | ||
| 312 | ETHTOOL_A_CHANNELS_HEADER, /* nest - _A_HEADER_* */ | ||
| 313 | ETHTOOL_A_CHANNELS_RX_MAX, /* u32 */ | ||
| 314 | ETHTOOL_A_CHANNELS_TX_MAX, /* u32 */ | ||
| 315 | ETHTOOL_A_CHANNELS_OTHER_MAX, /* u32 */ | ||
| 316 | ETHTOOL_A_CHANNELS_COMBINED_MAX, /* u32 */ | ||
| 317 | ETHTOOL_A_CHANNELS_RX_COUNT, /* u32 */ | ||
| 318 | ETHTOOL_A_CHANNELS_TX_COUNT, /* u32 */ | ||
| 319 | ETHTOOL_A_CHANNELS_OTHER_COUNT, /* u32 */ | ||
| 320 | ETHTOOL_A_CHANNELS_COMBINED_COUNT, /* u32 */ | ||
| 321 | |||
| 322 | /* add new constants above here */ | ||
| 323 | __ETHTOOL_A_CHANNELS_CNT, | ||
| 324 | ETHTOOL_A_CHANNELS_MAX = (__ETHTOOL_A_CHANNELS_CNT - 1) | ||
| 325 | }; | ||
| 326 | |||
| 327 | /* COALESCE */ | ||
| 328 | |||
| 329 | enum { | ||
| 330 | ETHTOOL_A_COALESCE_UNSPEC, | ||
| 331 | ETHTOOL_A_COALESCE_HEADER, /* nest - _A_HEADER_* */ | ||
| 332 | ETHTOOL_A_COALESCE_RX_USECS, /* u32 */ | ||
| 333 | ETHTOOL_A_COALESCE_RX_MAX_FRAMES, /* u32 */ | ||
| 334 | ETHTOOL_A_COALESCE_RX_USECS_IRQ, /* u32 */ | ||
| 335 | ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ, /* u32 */ | ||
| 336 | ETHTOOL_A_COALESCE_TX_USECS, /* u32 */ | ||
| 337 | ETHTOOL_A_COALESCE_TX_MAX_FRAMES, /* u32 */ | ||
| 338 | ETHTOOL_A_COALESCE_TX_USECS_IRQ, /* u32 */ | ||
| 339 | ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ, /* u32 */ | ||
| 340 | ETHTOOL_A_COALESCE_STATS_BLOCK_USECS, /* u32 */ | ||
| 341 | ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX, /* u8 */ | ||
| 342 | ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX, /* u8 */ | ||
| 343 | ETHTOOL_A_COALESCE_PKT_RATE_LOW, /* u32 */ | ||
| 344 | ETHTOOL_A_COALESCE_RX_USECS_LOW, /* u32 */ | ||
| 345 | ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW, /* u32 */ | ||
| 346 | ETHTOOL_A_COALESCE_TX_USECS_LOW, /* u32 */ | ||
| 347 | ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW, /* u32 */ | ||
| 348 | ETHTOOL_A_COALESCE_PKT_RATE_HIGH, /* u32 */ | ||
| 349 | ETHTOOL_A_COALESCE_RX_USECS_HIGH, /* u32 */ | ||
| 350 | ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH, /* u32 */ | ||
| 351 | ETHTOOL_A_COALESCE_TX_USECS_HIGH, /* u32 */ | ||
| 352 | ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH, /* u32 */ | ||
| 353 | ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL, /* u32 */ | ||
| 354 | |||
| 355 | /* add new constants above here */ | ||
| 356 | __ETHTOOL_A_COALESCE_CNT, | ||
| 357 | ETHTOOL_A_COALESCE_MAX = (__ETHTOOL_A_COALESCE_CNT - 1) | ||
| 358 | }; | ||
| 359 | |||
| 360 | /* PAUSE */ | ||
| 361 | |||
| 362 | enum { | ||
| 363 | ETHTOOL_A_PAUSE_UNSPEC, | ||
| 364 | ETHTOOL_A_PAUSE_HEADER, /* nest - _A_HEADER_* */ | ||
| 365 | ETHTOOL_A_PAUSE_AUTONEG, /* u8 */ | ||
| 366 | ETHTOOL_A_PAUSE_RX, /* u8 */ | ||
| 367 | ETHTOOL_A_PAUSE_TX, /* u8 */ | ||
| 368 | |||
| 369 | /* add new constants above here */ | ||
| 370 | __ETHTOOL_A_PAUSE_CNT, | ||
| 371 | ETHTOOL_A_PAUSE_MAX = (__ETHTOOL_A_PAUSE_CNT - 1) | ||
| 372 | }; | ||
| 373 | |||
| 374 | /* EEE */ | ||
| 375 | |||
| 376 | enum { | ||
| 377 | ETHTOOL_A_EEE_UNSPEC, | ||
| 378 | ETHTOOL_A_EEE_HEADER, /* nest - _A_HEADER_* */ | ||
| 379 | ETHTOOL_A_EEE_MODES_OURS, /* bitset */ | ||
| 380 | ETHTOOL_A_EEE_MODES_PEER, /* bitset */ | ||
| 381 | ETHTOOL_A_EEE_ACTIVE, /* u8 */ | ||
| 382 | ETHTOOL_A_EEE_ENABLED, /* u8 */ | ||
| 383 | ETHTOOL_A_EEE_TX_LPI_ENABLED, /* u8 */ | ||
| 384 | ETHTOOL_A_EEE_TX_LPI_TIMER, /* u32 */ | ||
| 385 | |||
| 386 | /* add new constants above here */ | ||
| 387 | __ETHTOOL_A_EEE_CNT, | ||
| 388 | ETHTOOL_A_EEE_MAX = (__ETHTOOL_A_EEE_CNT - 1) | ||
| 389 | }; | ||
| 390 | |||
| 391 | /* TSINFO */ | ||
| 392 | |||
| 393 | enum { | ||
| 394 | ETHTOOL_A_TSINFO_UNSPEC, | ||
| 395 | ETHTOOL_A_TSINFO_HEADER, /* nest - _A_HEADER_* */ | ||
| 396 | ETHTOOL_A_TSINFO_TIMESTAMPING, /* bitset */ | ||
| 397 | ETHTOOL_A_TSINFO_TX_TYPES, /* bitset */ | ||
| 398 | ETHTOOL_A_TSINFO_RX_FILTERS, /* bitset */ | ||
| 399 | ETHTOOL_A_TSINFO_PHC_INDEX, /* u32 */ | ||
| 400 | |||
| 401 | /* add new constants above here */ | ||
| 402 | __ETHTOOL_A_TSINFO_CNT, | ||
| 403 | ETHTOOL_A_TSINFO_MAX = (__ETHTOOL_A_TSINFO_CNT - 1) | ||
| 404 | }; | ||
| 405 | |||
| 231 | /* generic netlink info */ | 406 | /* generic netlink info */ |
| 232 | #define ETHTOOL_GENL_NAME "ethtool" | 407 | #define ETHTOOL_GENL_NAME "ethtool" |
| 233 | #define ETHTOOL_GENL_VERSION 1 | 408 | #define ETHTOOL_GENL_VERSION 1 |
| @@ -24,10 +24,11 @@ · 23 unmodified lines | |||
| 24 | #define FAN_OPEN_PERM 0x00010000 /* File open in perm check */ | 24 | #define FAN_OPEN_PERM 0x00010000 /* File open in perm check */ |
| 25 | #define FAN_ACCESS_PERM 0x00020000 /* File accessed in perm check */ | 25 | #define FAN_ACCESS_PERM 0x00020000 /* File accessed in perm check */ |
| 26 | #define FAN_OPEN_EXEC_PERM 0x00040000 /* File open/exec in perm check */ | 26 | #define FAN_OPEN_EXEC_PERM 0x00040000 /* File open/exec in perm check */ |
| 27 | #define FAN_DIR_MODIFY 0x00080000 /* Directory entry was modified */ | ||
| 27 | 28 | ||
| 28 | #define FAN_ONDIR 0x40000000 /* event occurred against dir */ | 29 | #define FAN_EVENT_ON_CHILD 0x08000000 /* Interested in child events */ |
| 29 | 30 | ||
| 30 | #define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */ | 31 | #define FAN_ONDIR 0x40000000 /* Event occurred against dir */ |
| 31 | 32 | ||
| 32 | /* helper events */ | 33 | /* helper events */ |
| 33 | #define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */ | 34 | #define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */ |
| @@ -116,6 +117,7 @@ struct fanotify_event_metadata { · 82 unmodified lines | |||
| 116 | }; | 117 | }; |
| 117 | 118 | ||
| 118 | #define FAN_EVENT_INFO_TYPE_FID 1 | 119 | #define FAN_EVENT_INFO_TYPE_FID 1 |
| 120 | #define FAN_EVENT_INFO_TYPE_DFID_NAME 2 | ||
| 119 | 121 | ||
| 120 | /* Variable length info record following event metadata */ | 122 | /* Variable length info record following event metadata */ |
| 121 | struct fanotify_event_info_header { | 123 | struct fanotify_event_info_header { |
| @@ -124,7 +126,12 @@ struct fanotify_event_info_header { · 2 unmodified lines | |||
| 124 | __u16 len; | 126 | __u16 len; |
| 125 | }; | 127 | }; |
| 126 | 128 | ||
| 127 | /* Unique file identifier info record */ | 129 | /* |
| 130 | * Unique file identifier info record. This is used both for | ||
| 131 | * FAN_EVENT_INFO_TYPE_FID records and for FAN_EVENT_INFO_TYPE_DFID_NAME | ||
| 132 | * records. For FAN_EVENT_INFO_TYPE_DFID_NAME there is additionally a null | ||
| 133 | * terminated name immediately after the file handle. | ||
| 134 | */ | ||
| 128 | struct fanotify_event_info_fid { | 135 | struct fanotify_event_info_fid { |
| 129 | struct fanotify_event_info_header hdr; | 136 | struct fanotify_event_info_header hdr; |
| 130 | __kernel_fsid_t fsid; | 137 | __kernel_fsid_t fsid; |
| @@ -7,26 +7,18 @@ · 6 unmodified lines | |||
| 7 | * Handbook", Sanches and Canton. | 7 | * Handbook", Sanches and Canton. |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | #ifdef FDPATCHES | ||
| 11 | #define FD_IOPORT fdc_state[fdc].address | ||
| 12 | #else | ||
| 13 | /* It would be a lot saner just to force fdc_state[fdc].address to always | ||
| 14 | be set ! FIXME */ | ||
| 15 | #define FD_IOPORT 0x3f0 | ||
| 16 | #endif | ||
| 17 | |||
| 18 | /* Fd controller regs. S&C, about page 340 */ | 10 | /* Fd controller regs. S&C, about page 340 */ |
| 19 | #define FD_STATUS (4 + FD_IOPORT ) | 11 | #define FD_STATUS 4 |
| 20 | #define FD_DATA (5 + FD_IOPORT ) | 12 | #define FD_DATA 5 |
| 21 | 13 | ||
| 22 | /* Digital Output Register */ | 14 | /* Digital Output Register */ |
| 23 | #define FD_DOR (2 + FD_IOPORT ) | 15 | #define FD_DOR 2 |
| 24 | 16 | ||
| 25 | /* Digital Input Register (read) */ | 17 | /* Digital Input Register (read) */ |
| 26 | #define FD_DIR (7 + FD_IOPORT ) | 18 | #define FD_DIR 7 |
| 27 | 19 | ||
| 28 | /* Diskette Control Register (write)*/ | 20 | /* Diskette Control Register (write)*/ |
| 29 | #define FD_DCR (7 + FD_IOPORT ) | 21 | #define FD_DCR 7 |
| 30 | 22 | ||
| 31 | /* Bits of main status register */ | 23 | /* Bits of main status register */ |
| 32 | #define STATUS_BUSYMASK 0x0F /* drive busy mask */ | 24 | #define STATUS_BUSYMASK 0x0F /* drive busy mask */ |
| @@ -163,6 +163,7 @@ struct fscrypt_get_key_status_arg { · 162 unmodified lines | |||
| 163 | #define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg) | 163 | #define FS_IOC_REMOVE_ENCRYPTION_KEY _IOWR('f', 24, struct fscrypt_remove_key_arg) |
| 164 | #define FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS _IOWR('f', 25, struct fscrypt_remove_key_arg) | 164 | #define FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS _IOWR('f', 25, struct fscrypt_remove_key_arg) |
| 165 | #define FS_IOC_GET_ENCRYPTION_KEY_STATUS _IOWR('f', 26, struct fscrypt_get_key_status_arg) | 165 | #define FS_IOC_GET_ENCRYPTION_KEY_STATUS _IOWR('f', 26, struct fscrypt_get_key_status_arg) |
| 166 | #define FS_IOC_GET_ENCRYPTION_NONCE _IOR('f', 27, __u8[16]) | ||
| 166 | 167 | ||
| 167 | /**********************************************************************/ | 168 | /**********************************************************************/ |
| 168 | 169 | ||
| @@ -18,7 +18,7 @@ · 17 unmodified lines | |||
| 18 | * struct gpiochip_info - Information about a certain GPIO chip | 18 | * struct gpiochip_info - Information about a certain GPIO chip |
| 19 | * @name: the Linux kernel name of this GPIO chip | 19 | * @name: the Linux kernel name of this GPIO chip |
| 20 | * @label: a functional name for this GPIO chip, such as a product | 20 | * @label: a functional name for this GPIO chip, such as a product |
| 21 | * number, may be NULL | 21 | * number, may be empty |
| 22 | * @lines: number of GPIO lines on this chip | 22 | * @lines: number of GPIO lines on this chip |
| 23 | */ | 23 | */ |
| 24 | struct gpiochip_info { | 24 | struct gpiochip_info { |
| @@ -44,10 +44,10 @@ struct gpiochip_info { · 19 unmodified lines | |||
| 44 | * @flags: various flags for this line | 44 | * @flags: various flags for this line |
| 45 | * @name: the name of this GPIO line, such as the output pin of the line on the | 45 | * @name: the name of this GPIO line, such as the output pin of the line on the |
| 46 | * chip, a rail or a pin header name on a board, as specified by the gpio | 46 | * chip, a rail or a pin header name on a board, as specified by the gpio |
| 47 | * chip, may be NULL | 47 | * chip, may be empty |
| 48 | * @consumer: a functional name for the consumer of this GPIO line as set by | 48 | * @consumer: a functional name for the consumer of this GPIO line as set by |
| 49 | * whatever is using it, will be NULL if there is no current user but may | 49 | * whatever is using it, will be empty if there is no current user but may |
| 50 | * also be NULL if the consumer doesn't set this up | 50 | * also be empty if the consumer doesn't set this up |
| 51 | */ | 51 | */ |
| 52 | struct gpioline_info { | 52 | struct gpioline_info { |
| 53 | __u32 line_offset; | 53 | __u32 line_offset; |
| @@ -59,6 +59,34 @@ struct gpioline_info { · 5 unmodified lines | |||
| 59 | /* Maximum number of requested handles */ | 59 | /* Maximum number of requested handles */ |
| 60 | #define GPIOHANDLES_MAX 64 | 60 | #define GPIOHANDLES_MAX 64 |
| 61 | 61 | ||
| 62 | /* Possible line status change events */ | ||
| 63 | enum { | ||
| 64 | GPIOLINE_CHANGED_REQUESTED = 1, | ||
| 65 | GPIOLINE_CHANGED_RELEASED, | ||
| 66 | GPIOLINE_CHANGED_CONFIG, | ||
| 67 | }; | ||
| 68 | |||
| 69 | /** | ||
| 70 | * struct gpioline_info_changed - Information about a change in status | ||
| 71 | * of a GPIO line | ||
| 72 | * @info: updated line information | ||
| 73 | * @timestamp: estimate of time of status change occurrence, in nanoseconds | ||
| 74 | * and GPIOLINE_CHANGED_CONFIG | ||
| 75 | * @event_type: one of GPIOLINE_CHANGED_REQUESTED, GPIOLINE_CHANGED_RELEASED | ||
| 76 | * | ||
| 77 | * Note: struct gpioline_info embedded here has 32-bit alignment on its own, | ||
| 78 | * but it works fine with 64-bit alignment too. With its 72 byte size, we can | ||
| 79 | * guarantee there are no implicit holes between it and subsequent members. | ||
| 80 | * The 20-byte padding at the end makes sure we don't add any implicit padding | ||
| 81 | * at the end of the structure on 64-bit architectures. | ||
| 82 | */ | ||
| 83 | struct gpioline_info_changed { | ||
| 84 | struct gpioline_info info; | ||
| 85 | __u64 timestamp; | ||
| 86 | __u32 event_type; | ||
| 87 | __u32 padding[5]; /* for future use */ | ||
| 88 | }; | ||
| 89 | |||
| 62 | /* Linerequest flags */ | 90 | /* Linerequest flags */ |
| 63 | #define GPIOHANDLE_REQUEST_INPUT (1UL << 0) | 91 | #define GPIOHANDLE_REQUEST_INPUT (1UL << 0) |
| 64 | #define GPIOHANDLE_REQUEST_OUTPUT (1UL << 1) | 92 | #define GPIOHANDLE_REQUEST_OUTPUT (1UL << 1) |
| @@ -176,6 +204,8 @@ struct gpioevent_data { · 111 unmodified lines | |||
| 176 | 204 | ||
| 177 | #define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info) | 205 | #define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info) |
| 178 | #define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info) | 206 | #define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info) |
| 207 | #define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0b, struct gpioline_info) | ||
| 208 | #define GPIO_GET_LINEINFO_UNWATCH_IOCTL _IOWR(0xB4, 0x0c, __u32) | ||
| 179 | #define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request) | 209 | #define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request) |
| 180 | #define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request) | 210 | #define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request) |
| 181 | 211 | ||
| @@ -83,21 +83,6 @@ enum dsa_completion_status { · 82 unmodified lines | |||
| 83 | #define DSA_COMP_STATUS_MASK 0x7f | 83 | #define DSA_COMP_STATUS_MASK 0x7f |
| 84 | #define DSA_COMP_STATUS_WRITE 0x80 | 84 | #define DSA_COMP_STATUS_WRITE 0x80 |
| 85 | 85 | ||
| 86 | struct dsa_batch_desc { | ||
| 87 | uint32_t pasid:20; | ||
| 88 | uint32_t rsvd:11; | ||
| 89 | uint32_t priv:1; | ||
| 90 | uint32_t flags:24; | ||
| 91 | uint32_t opcode:8; | ||
| 92 | uint64_t completion_addr; | ||
| 93 | uint64_t desc_list_addr; | ||
| 94 | uint64_t rsvd1; | ||
| 95 | uint32_t desc_count; | ||
| 96 | uint16_t interrupt_handle; | ||
| 97 | uint16_t rsvd2; | ||
| 98 | uint8_t rsvd3[24]; | ||
| 99 | } __attribute__((packed)); | ||
| 100 | |||
| 101 | struct dsa_hw_desc { | 86 | struct dsa_hw_desc { |
| 102 | uint32_t pasid:20; | 87 | uint32_t pasid:20; |
| 103 | uint32_t rsvd:11; | 88 | uint32_t rsvd:11; |
| @@ -109,6 +94,7 @@ struct dsa_hw_desc { · 5 unmodified lines | |||
| 109 | uint64_t src_addr; | 94 | uint64_t src_addr; |
| 110 | uint64_t rdback_addr; | 95 | uint64_t rdback_addr; |
| 111 | uint64_t pattern; | 96 | uint64_t pattern; |
| 97 | uint64_t desc_list_addr; | ||
| 112 | }; | 98 | }; |
| 113 | union { | 99 | union { |
| 114 | uint64_t dst_addr; | 100 | uint64_t dst_addr; |
| @@ -116,7 +102,10 @@ struct dsa_hw_desc { · 1 unmodified line | |||
| 116 | uint64_t src2_addr; | 102 | uint64_t src2_addr; |
| 117 | uint64_t comp_pattern; | 103 | uint64_t comp_pattern; |
| 118 | }; | 104 | }; |
| 119 | uint32_t xfer_size; | 105 | union { |
| 106 | uint32_t xfer_size; | ||
| 107 | uint32_t desc_count; | ||
| 108 | }; | ||
| 120 | uint16_t int_handle; | 109 | uint16_t int_handle; |
| 121 | uint16_t rsvd1; | 110 | uint16_t rsvd1; |
| 122 | union { | 111 | union { |
| @@ -60,7 +60,7 @@ struct arc_rfc1201 { · 59 unmodified lines | |||
| 60 | __u8 proto; /* protocol ID field - varies */ | 60 | __u8 proto; /* protocol ID field - varies */ |
| 61 | __u8 split_flag; /* for use with split packets */ | 61 | __u8 split_flag; /* for use with split packets */ |
| 62 | __be16 sequence; /* sequence number */ | 62 | __be16 sequence; /* sequence number */ |
| 63 | __u8 payload[0]; /* space remaining in packet (504 bytes)*/ | 63 | __u8 payload[]; /* space remaining in packet (504 bytes)*/ |
| 64 | }; | 64 | }; |
| 65 | #define RFC1201_HDR_SIZE 4 | 65 | #define RFC1201_HDR_SIZE 4 |
| 66 | 66 | ||
| @@ -69,7 +69,7 @@ struct arc_rfc1201 { · 2 unmodified lines | |||
| 69 | */ | 69 | */ |
| 70 | struct arc_rfc1051 { | 70 | struct arc_rfc1051 { |
| 71 | __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ | 71 | __u8 proto; /* ARC_P_RFC1051_ARP/RFC1051_IP */ |
| 72 | __u8 payload[0]; /* 507 bytes */ | 72 | __u8 payload[]; /* 507 bytes */ |
| 73 | }; | 73 | }; |
| 74 | #define RFC1051_HDR_SIZE 1 | 74 | #define RFC1051_HDR_SIZE 1 |
| 75 | 75 | ||
| @@ -80,7 +80,7 @@ struct arc_rfc1051 { · 4 unmodified lines | |||
| 80 | struct arc_eth_encap { | 80 | struct arc_eth_encap { |
| 81 | __u8 proto; /* Always ARC_P_ETHER */ | 81 | __u8 proto; /* Always ARC_P_ETHER */ |
| 82 | struct ethhdr eth; /* standard ethernet header (yuck!) */ | 82 | struct ethhdr eth; /* standard ethernet header (yuck!) */ |
| 83 | __u8 payload[0]; /* 493 bytes */ | 83 | __u8 payload[]; /* 493 bytes */ |
| 84 | }; | 84 | }; |
| 85 | #define ETH_ENCAP_HDR_SIZE 14 | 85 | #define ETH_ENCAP_HDR_SIZE 14 |
| 86 | 86 | ||
| @@ -174,6 +174,16 @@ struct br_vlan_msg { · 173 unmodified lines | |||
| 174 | __u32 ifindex; | 174 | __u32 ifindex; |
| 175 | }; | 175 | }; |
| 176 | 176 | ||
| 177 | enum { | ||
| 178 | BRIDGE_VLANDB_DUMP_UNSPEC, | ||
| 179 | BRIDGE_VLANDB_DUMP_FLAGS, | ||
| 180 | __BRIDGE_VLANDB_DUMP_MAX, | ||
| 181 | }; | ||
| 182 | #define BRIDGE_VLANDB_DUMP_MAX (__BRIDGE_VLANDB_DUMP_MAX - 1) | ||
| 183 | |||
| 184 | /* flags used in BRIDGE_VLANDB_DUMP_FLAGS attribute to affect dumps */ | ||
| 185 | #define BRIDGE_VLANDB_DUMPF_STATS (1 << 0) /* Include stats in the dump */ | ||
| 186 | |||
| 177 | /* Bridge vlan RTM attributes | 187 | /* Bridge vlan RTM attributes |
| 178 | * [BRIDGE_VLANDB_ENTRY] = { | 188 | * [BRIDGE_VLANDB_ENTRY] = { |
| 179 | * [BRIDGE_VLANDB_ENTRY_INFO] | 189 | * [BRIDGE_VLANDB_ENTRY_INFO] |
| @@ -192,10 +202,46 @@ enum { · 12 unmodified lines | |||
| 192 | BRIDGE_VLANDB_ENTRY_INFO, | 202 | BRIDGE_VLANDB_ENTRY_INFO, |
| 193 | BRIDGE_VLANDB_ENTRY_RANGE, | 203 | BRIDGE_VLANDB_ENTRY_RANGE, |
| 194 | BRIDGE_VLANDB_ENTRY_STATE, | 204 | BRIDGE_VLANDB_ENTRY_STATE, |
| 205 | BRIDGE_VLANDB_ENTRY_TUNNEL_INFO, | ||
| 206 | BRIDGE_VLANDB_ENTRY_STATS, | ||
| 195 | __BRIDGE_VLANDB_ENTRY_MAX, | 207 | __BRIDGE_VLANDB_ENTRY_MAX, |
| 196 | }; | 208 | }; |
| 197 | #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1) | 209 | #define BRIDGE_VLANDB_ENTRY_MAX (__BRIDGE_VLANDB_ENTRY_MAX - 1) |
| 198 | 210 | ||
| 211 | /* [BRIDGE_VLANDB_ENTRY] = { | ||
| 212 | * [BRIDGE_VLANDB_ENTRY_TUNNEL_INFO] = { | ||
| 213 | * [BRIDGE_VLANDB_TINFO_ID] | ||
| 214 | * ... | ||
| 215 | * } | ||
| 216 | * } | ||
| 217 | */ | ||
| 218 | enum { | ||
| 219 | BRIDGE_VLANDB_TINFO_UNSPEC, | ||
| 220 | BRIDGE_VLANDB_TINFO_ID, | ||
| 221 | BRIDGE_VLANDB_TINFO_CMD, | ||
| 222 | __BRIDGE_VLANDB_TINFO_MAX, | ||
| 223 | }; | ||
| 224 | #define BRIDGE_VLANDB_TINFO_MAX (__BRIDGE_VLANDB_TINFO_MAX - 1) | ||
| 225 | |||
| 226 | /* [BRIDGE_VLANDB_ENTRY] = { | ||
| 227 | * [BRIDGE_VLANDB_ENTRY_STATS] = { | ||
| 228 | * [BRIDGE_VLANDB_STATS_RX_BYTES] | ||
| 229 | * ... | ||
| 230 | * } | ||
| 231 | * ... | ||
| 232 | * } | ||
| 233 | */ | ||
| 234 | enum { | ||
| 235 | BRIDGE_VLANDB_STATS_UNSPEC, | ||
| 236 | BRIDGE_VLANDB_STATS_RX_BYTES, | ||
| 237 | BRIDGE_VLANDB_STATS_RX_PACKETS, | ||
| 238 | BRIDGE_VLANDB_STATS_TX_BYTES, | ||
| 239 | BRIDGE_VLANDB_STATS_TX_PACKETS, | ||
| 240 | BRIDGE_VLANDB_STATS_PAD, | ||
| 241 | __BRIDGE_VLANDB_STATS_MAX, | ||
| 242 | }; | ||
| 243 | #define BRIDGE_VLANDB_STATS_MAX (__BRIDGE_VLANDB_STATS_MAX - 1) | ||
| 244 | |||
| 199 | /* Bridge multicast database attributes | 245 | /* Bridge multicast database attributes |
| 200 | * [MDBA_MDB] = { | 246 | * [MDBA_MDB] = { |
| 201 | * [MDBA_MDB_ENTRY] = { | 247 | * [MDBA_MDB_ENTRY] = { |
| @@ -463,6 +463,7 @@ enum { · 462 unmodified lines | |||
| 463 | IFLA_MACSEC_REPLAY_PROTECT, | 463 | IFLA_MACSEC_REPLAY_PROTECT, |
| 464 | IFLA_MACSEC_VALIDATION, | 464 | IFLA_MACSEC_VALIDATION, |
| 465 | IFLA_MACSEC_PAD, | 465 | IFLA_MACSEC_PAD, |
| 466 | IFLA_MACSEC_OFFLOAD, | ||
| 466 | __IFLA_MACSEC_MAX, | 467 | __IFLA_MACSEC_MAX, |
| 467 | }; | 468 | }; |
| 468 | 469 | ||
| @@ -489,6 +490,7 @@ enum macsec_validation_type { · 20 unmodified lines | |||
| 489 | enum macsec_offload { | 490 | enum macsec_offload { |
| 490 | MACSEC_OFFLOAD_OFF = 0, | 491 | MACSEC_OFFLOAD_OFF = 0, |
| 491 | MACSEC_OFFLOAD_PHY = 1, | 492 | MACSEC_OFFLOAD_PHY = 1, |
| 493 | MACSEC_OFFLOAD_MAC = 2, | ||
| 492 | __MACSEC_OFFLOAD_END, | 494 | __MACSEC_OFFLOAD_END, |
| 493 | MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1, | 495 | MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1, |
| 494 | }; | 496 | }; |
| @@ -590,6 +592,18 @@ enum ifla_geneve_df { · 95 unmodified lines | |||
| 590 | GENEVE_DF_MAX = __GENEVE_DF_END - 1, | 592 | GENEVE_DF_MAX = __GENEVE_DF_END - 1, |
| 591 | }; | 593 | }; |
| 592 | 594 | ||
| 595 | /* Bareudp section */ | ||
| 596 | enum { | ||
| 597 | IFLA_BAREUDP_UNSPEC, | ||
| 598 | IFLA_BAREUDP_PORT, | ||
| 599 | IFLA_BAREUDP_ETHERTYPE, | ||
| 600 | IFLA_BAREUDP_SRCPORT_MIN, | ||
| 601 | IFLA_BAREUDP_MULTIPROTO_MODE, | ||
| 602 | __IFLA_BAREUDP_MAX | ||
| 603 | }; | ||
| 604 | |||
| 605 | #define IFLA_BAREUDP_MAX (__IFLA_BAREUDP_MAX - 1) | ||
| 606 | |||
| 593 | /* PPP section */ | 607 | /* PPP section */ |
| 594 | enum { | 608 | enum { |
| 595 | IFLA_PPP_UNSPEC, | 609 | IFLA_PPP_UNSPEC, |
| @@ -960,11 +974,12 @@ enum { · 364 unmodified lines | |||
| 960 | #define XDP_FLAGS_SKB_MODE (1U << 1) | 974 | #define XDP_FLAGS_SKB_MODE (1U << 1) |
| 961 | #define XDP_FLAGS_DRV_MODE (1U << 2) | 975 | #define XDP_FLAGS_DRV_MODE (1U << 2) |
| 962 | #define XDP_FLAGS_HW_MODE (1U << 3) | 976 | #define XDP_FLAGS_HW_MODE (1U << 3) |
| 977 | #define XDP_FLAGS_REPLACE (1U << 4) | ||
| 963 | #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \ | 978 | #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \ |
| 964 | XDP_FLAGS_DRV_MODE | \ | 979 | XDP_FLAGS_DRV_MODE | \ |
| 965 | XDP_FLAGS_HW_MODE) | 980 | XDP_FLAGS_HW_MODE) |
| 966 | #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \ | 981 | #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \ |
| 967 | XDP_FLAGS_MODES) | 982 | XDP_FLAGS_MODES | XDP_FLAGS_REPLACE) |
| 968 | 983 | ||
| 969 | /* These are stored into IFLA_XDP_ATTACHED on dump. */ | 984 | /* These are stored into IFLA_XDP_ATTACHED on dump. */ |
| 970 | enum { | 985 | enum { |
| @@ -984,6 +999,7 @@ enum { · 13 unmodified lines | |||
| 984 | IFLA_XDP_DRV_PROG_ID, | 999 | IFLA_XDP_DRV_PROG_ID, |
| 985 | IFLA_XDP_SKB_PROG_ID, | 1000 | IFLA_XDP_SKB_PROG_ID, |
| 986 | IFLA_XDP_HW_PROG_ID, | 1001 | IFLA_XDP_HW_PROG_ID, |
| 1002 | IFLA_XDP_EXPECTED_FD, | ||
| 987 | __IFLA_XDP_MAX, | 1003 | __IFLA_XDP_MAX, |
| 988 | }; | 1004 | }; |
| 989 | 1005 | ||
| @@ -22,9 +22,11 @@ · 21 unmodified lines | |||
| 22 | 22 | ||
| 23 | #define MACSEC_KEYID_LEN 16 | 23 | #define MACSEC_KEYID_LEN 16 |
| 24 | 24 | ||
| 25 | /* cipher IDs as per IEEE802.1AEbn-2011 */ | 25 | /* cipher IDs as per IEEE802.1AE-2018 (Table 14-1) */ |
| 26 | #define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL | 26 | #define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL |
| 27 | #define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL | 27 | #define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL |
| 28 | #define MACSEC_CIPHER_ID_GCM_AES_XPN_128 0x0080C20001000003ULL | ||
| 29 | #define MACSEC_CIPHER_ID_GCM_AES_XPN_256 0x0080C20001000004ULL | ||
| 28 | 30 | ||
| 29 | /* deprecated cipher ID for GCM-AES-128 */ | 31 | /* deprecated cipher ID for GCM-AES-128 */ |
| 30 | #define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL | 32 | #define MACSEC_DEFAULT_CIPHER_ID 0x0080020001000001ULL |
| @@ -88,11 +90,13 @@ enum macsec_sa_attrs { · 57 unmodified lines | |||
| 88 | MACSEC_SA_ATTR_UNSPEC, | 90 | MACSEC_SA_ATTR_UNSPEC, |
| 89 | MACSEC_SA_ATTR_AN, /* config/dump, u8 0..3 */ | 91 | MACSEC_SA_ATTR_AN, /* config/dump, u8 0..3 */ |
| 90 | MACSEC_SA_ATTR_ACTIVE, /* config/dump, u8 0..1 */ | 92 | MACSEC_SA_ATTR_ACTIVE, /* config/dump, u8 0..1 */ |
| 91 | MACSEC_SA_ATTR_PN, /* config/dump, u32 */ | 93 | MACSEC_SA_ATTR_PN, /* config/dump, u32/u64 (u64 if XPN) */ |
| 92 | MACSEC_SA_ATTR_KEY, /* config, data */ | 94 | MACSEC_SA_ATTR_KEY, /* config, data */ |
| 93 | MACSEC_SA_ATTR_KEYID, /* config/dump, 128-bit */ | 95 | MACSEC_SA_ATTR_KEYID, /* config/dump, 128-bit */ |
| 94 | MACSEC_SA_ATTR_STATS, /* dump, nested, macsec_sa_stats_attr */ | 96 | MACSEC_SA_ATTR_STATS, /* dump, nested, macsec_sa_stats_attr */ |
| 95 | MACSEC_SA_ATTR_PAD, | 97 | MACSEC_SA_ATTR_PAD, |
| 98 | MACSEC_SA_ATTR_SSCI, /* config/dump, u32 - XPN only */ | ||
| 99 | MACSEC_SA_ATTR_SALT, /* config, 96-bit - XPN only */ | ||
| 96 | __MACSEC_SA_ATTR_END, | 100 | __MACSEC_SA_ATTR_END, |
| 97 | NUM_MACSEC_SA_ATTR = __MACSEC_SA_ATTR_END, | 101 | NUM_MACSEC_SA_ATTR = __MACSEC_SA_ATTR_END, |
| 98 | MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1, | 102 | MACSEC_SA_ATTR_MAX = __MACSEC_SA_ATTR_END - 1, |
| @@ -74,6 +74,8 @@ enum { · 73 unmodified lines | |||
| 74 | #define IPPROTO_UDPLITE IPPROTO_UDPLITE | 74 | #define IPPROTO_UDPLITE IPPROTO_UDPLITE |
| 75 | IPPROTO_MPLS = 137, /* MPLS in IP (RFC 4023) */ | 75 | IPPROTO_MPLS = 137, /* MPLS in IP (RFC 4023) */ |
| 76 | #define IPPROTO_MPLS IPPROTO_MPLS | 76 | #define IPPROTO_MPLS IPPROTO_MPLS |
| 77 | IPPROTO_ETHERNET = 143, /* Ethernet-within-IPv6 Encapsulation */ | ||
| 78 | #define IPPROTO_ETHERNET IPPROTO_ETHERNET | ||
| 77 | IPPROTO_RAW = 255, /* Raw IP packets */ | 79 | IPPROTO_RAW = 255, /* Raw IP packets */ |
| 78 | #define IPPROTO_RAW IPPROTO_RAW | 80 | #define IPPROTO_RAW IPPROTO_RAW |
| 79 | IPPROTO_MPTCP = 262, /* Multipath TCP connection */ | 81 | IPPROTO_MPTCP = 262, /* Multipath TCP connection */ |
| @@ -64,9 +64,11 @@ struct inet_diag_req_raw { · 63 unmodified lines | |||
| 64 | enum { | 64 | enum { |
| 65 | INET_DIAG_REQ_NONE, | 65 | INET_DIAG_REQ_NONE, |
| 66 | INET_DIAG_REQ_BYTECODE, | 66 | INET_DIAG_REQ_BYTECODE, |
| 67 | INET_DIAG_REQ_SK_BPF_STORAGES, | ||
| 68 | __INET_DIAG_REQ_MAX, | ||
| 67 | }; | 69 | }; |
| 68 | 70 | ||
| 69 | #define INET_DIAG_REQ_MAX INET_DIAG_REQ_BYTECODE | 71 | #define INET_DIAG_REQ_MAX (__INET_DIAG_REQ_MAX - 1) |
| 70 | 72 | ||
| 71 | /* Bytecode is sequence of 4 byte commands followed by variable arguments. | 73 | /* Bytecode is sequence of 4 byte commands followed by variable arguments. |
| 72 | * All the commands identified by "code" are conditional jumps forward: | 74 | * All the commands identified by "code" are conditional jumps forward: |
| @@ -154,6 +156,7 @@ enum { · 81 unmodified lines | |||
| 154 | INET_DIAG_CLASS_ID, /* request as INET_DIAG_TCLASS */ | 156 | INET_DIAG_CLASS_ID, /* request as INET_DIAG_TCLASS */ |
| 155 | INET_DIAG_MD5SIG, | 157 | INET_DIAG_MD5SIG, |
| 156 | INET_DIAG_ULP_INFO, | 158 | INET_DIAG_ULP_INFO, |
| 159 | INET_DIAG_SK_BPF_STORAGES, | ||
| 157 | __INET_DIAG_MAX, | 160 | __INET_DIAG_MAX, |
| 158 | }; | 161 | }; |
| 159 | 162 | ||
| @@ -163,6 +166,7 @@ enum { · 3 unmodified lines | |||
| 163 | INET_ULP_INFO_UNSPEC, | 166 | INET_ULP_INFO_UNSPEC, |
| 164 | INET_ULP_INFO_NAME, | 167 | INET_ULP_INFO_NAME, |
| 165 | INET_ULP_INFO_TLS, | 168 | INET_ULP_INFO_TLS, |
| 169 | INET_ULP_INFO_MPTCP, | ||
| 166 | __INET_ULP_INFO_MAX, | 170 | __INET_ULP_INFO_MAX, |
| 167 | }; | 171 | }; |
| 168 | #define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1) | 172 | #define INET_ULP_INFO_MAX (__INET_ULP_INFO_MAX - 1) |
| @@ -1,4 +1,4 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ |
| 2 | /* | 2 | /* |
| 3 | * Input event codes | 3 | * Input event codes |
| 4 | * | 4 | * |
| @@ -652,6 +652,9 @@ · 647 unmodified lines | |||
| 652 | /* Electronic privacy screen control */ | 652 | /* Electronic privacy screen control */ |
| 653 | #define KEY_PRIVACY_SCREEN_TOGGLE 0x279 | 653 | #define KEY_PRIVACY_SCREEN_TOGGLE 0x279 |
| 654 | 654 | ||
| 655 | /* Select an area of screen to be copied */ | ||
| 656 | #define KEY_SELECTIVE_SCREENSHOT 0x27a | ||
| 657 | |||
| 655 | /* | 658 | /* |
| 656 | * Some keyboards have keys which do not have a defined meaning, these keys | 659 | * Some keyboards have keys which do not have a defined meaning, these keys |
| 657 | * are intended to be programmed / bound to macros by the user. For most | 660 | * are intended to be programmed / bound to macros by the user. For most |
| @@ -1,4 +1,4 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */ |
| 2 | /* | 2 | /* |
| 3 | * Header file for the io_uring interface. | 3 | * Header file for the io_uring interface. |
| 4 | * | 4 | * |
| @@ -23,7 +23,10 @@ struct io_uring_sqe { · 18 unmodified lines | |||
| 23 | __u64 off; /* offset into file */ | 23 | __u64 off; /* offset into file */ |
| 24 | __u64 addr2; | 24 | __u64 addr2; |
| 25 | }; | 25 | }; |
| 26 | __u64 addr; /* pointer to buffer or iovecs */ | 26 | union { |
| 27 | __u64 addr; /* pointer to buffer or iovecs */ | ||
| 28 | __u64 splice_off_in; | ||
| 29 | }; | ||
| 27 | __u32 len; /* buffer size or number of iovecs */ | 30 | __u32 len; /* buffer size or number of iovecs */ |
| 28 | union { | 31 | union { |
| 29 | __kernel_rwf_t rw_flags; | 32 | __kernel_rwf_t rw_flags; |
| @@ -37,14 +40,21 @@ struct io_uring_sqe { · 7 unmodified lines | |||
| 37 | __u32 open_flags; | 40 | __u32 open_flags; |
| 38 | __u32 statx_flags; | 41 | __u32 statx_flags; |
| 39 | __u32 fadvise_advice; | 42 | __u32 fadvise_advice; |
| 43 | __u32 splice_flags; | ||
| 40 | }; | 44 | }; |
| 41 | __u64 user_data; /* data to be passed back at completion time */ | 45 | __u64 user_data; /* data to be passed back at completion time */ |
| 42 | union { | 46 | union { |
| 43 | struct { | 47 | struct { |
| 44 | /* index into fixed buffers, if used */ | 48 | /* pack this to avoid bogus arm OABI complaints */ |
| 45 | __u16 buf_index; | 49 | union { |
| 50 | /* index into fixed buffers, if used */ | ||
| 51 | __u16 buf_index; | ||
| 52 | /* for grouped buffer selection */ | ||
| 53 | __u16 buf_group; | ||
| 54 | } __attribute__((packed)); | ||
| 46 | /* personality to use, if used */ | 55 | /* personality to use, if used */ |
| 47 | __u16 personality; | 56 | __u16 personality; |
| 57 | __s32 splice_fd_in; | ||
| 48 | }; | 58 | }; |
| 49 | __u64 __pad2[3]; | 59 | __u64 __pad2[3]; |
| 50 | }; | 60 | }; |
| @@ -56,6 +66,7 @@ enum { · 5 unmodified lines | |||
| 56 | IOSQE_IO_LINK_BIT, | 66 | IOSQE_IO_LINK_BIT, |
| 57 | IOSQE_IO_HARDLINK_BIT, | 67 | IOSQE_IO_HARDLINK_BIT, |
| 58 | IOSQE_ASYNC_BIT, | 68 | IOSQE_ASYNC_BIT, |
| 69 | IOSQE_BUFFER_SELECT_BIT, | ||
| 59 | }; | 70 | }; |
| 60 | 71 | ||
| 61 | /* | 72 | /* |
| @@ -71,6 +82,8 @@ enum { · 9 unmodified lines | |||
| 71 | #define IOSQE_IO_HARDLINK (1U << IOSQE_IO_HARDLINK_BIT) | 82 | #define IOSQE_IO_HARDLINK (1U << IOSQE_IO_HARDLINK_BIT) |
| 72 | /* always go async */ | 83 | /* always go async */ |
| 73 | #define IOSQE_ASYNC (1U << IOSQE_ASYNC_BIT) | 84 | #define IOSQE_ASYNC (1U << IOSQE_ASYNC_BIT) |
| 85 | /* select buffer from sqe->buf_group */ | ||
| 86 | #define IOSQE_BUFFER_SELECT (1U << IOSQE_BUFFER_SELECT_BIT) | ||
| 74 | 87 | ||
| 75 | /* | 88 | /* |
| 76 | * io_uring_setup() flags | 89 | * io_uring_setup() flags |
| @@ -113,6 +126,9 @@ enum { · 36 unmodified lines | |||
| 113 | IORING_OP_RECV, | 126 | IORING_OP_RECV, |
| 114 | IORING_OP_OPENAT2, | 127 | IORING_OP_OPENAT2, |
| 115 | IORING_OP_EPOLL_CTL, | 128 | IORING_OP_EPOLL_CTL, |
| 129 | IORING_OP_SPLICE, | ||
| 130 | IORING_OP_PROVIDE_BUFFERS, | ||
| 131 | IORING_OP_REMOVE_BUFFERS, | ||
| 116 | 132 | ||
| 117 | /* this goes last, obviously */ | 133 | /* this goes last, obviously */ |
| 118 | IORING_OP_LAST, | 134 | IORING_OP_LAST, |
| @@ -128,6 +144,12 @@ enum { · 9 unmodified lines | |||
| 128 | */ | 144 | */ |
| 129 | #define IORING_TIMEOUT_ABS (1U << 0) | 145 | #define IORING_TIMEOUT_ABS (1U << 0) |
| 130 | 146 | ||
| 147 | /* | ||
| 148 | * sqe->splice_flags | ||
| 149 | * extends splice(2) flags | ||
| 150 | */ | ||
| 151 | #define SPLICE_F_FD_IN_FIXED (1U << 31) /* the last bit of __u32 */ | ||
| 152 | |||
| 131 | /* | 153 | /* |
| 132 | * IO completion data structure (Completion Queue Entry) | 154 | * IO completion data structure (Completion Queue Entry) |
| 133 | */ | 155 | */ |
| @@ -137,6 +159,17 @@ struct io_uring_cqe { · 3 unmodified lines | |||
| 137 | __u32 flags; | 159 | __u32 flags; |
| 138 | }; | 160 | }; |
| 139 | 161 | ||
| 162 | /* | ||
| 163 | * cqe->flags | ||
| 164 | * | ||
| 165 | * IORING_CQE_F_BUFFER If set, the upper 16 bits are the buffer ID | ||
| 166 | */ | ||
| 167 | #define IORING_CQE_F_BUFFER (1U << 0) | ||
| 168 | |||
| 169 | enum { | ||
| 170 | IORING_CQE_BUFFER_SHIFT = 16, | ||
| 171 | }; | ||
| 172 | |||
| 140 | /* | 173 | /* |
| 141 | * Magic offsets for the application to mmap the data it needs | 174 | * Magic offsets for the application to mmap the data it needs |
| 142 | */ | 175 | */ |
| @@ -204,6 +237,7 @@ struct io_uring_params { · 61 unmodified lines | |||
| 204 | #define IORING_FEAT_SUBMIT_STABLE (1U << 2) | 237 | #define IORING_FEAT_SUBMIT_STABLE (1U << 2) |
| 205 | #define IORING_FEAT_RW_CUR_POS (1U << 3) | 238 | #define IORING_FEAT_RW_CUR_POS (1U << 3) |
| 206 | #define IORING_FEAT_CUR_PERSONALITY (1U << 4) | 239 | #define IORING_FEAT_CUR_PERSONALITY (1U << 4) |
| 240 | #define IORING_FEAT_FAST_POLL (1U << 5) | ||
| 207 | 241 | ||
| 208 | /* | 242 | /* |
| 209 | * io_uring_register(2) opcodes and arguments | 243 | * io_uring_register(2) opcodes and arguments |
| @@ -40,6 +40,7 @@ struct in6_ifreq { · 39 unmodified lines | |||
| 40 | #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */ | 40 | #define IPV6_SRCRT_STRICT 0x01 /* Deprecated; will be removed */ |
| 41 | #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */ | 41 | #define IPV6_SRCRT_TYPE_0 0 /* Deprecated; will be removed */ |
| 42 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ | 42 | #define IPV6_SRCRT_TYPE_2 2 /* IPv6 type 2 Routing Header */ |
| 43 | #define IPV6_SRCRT_TYPE_3 3 /* RPL Segment Routing with IPv6 */ | ||
| 43 | #define IPV6_SRCRT_TYPE_4 4 /* Segment Routing with IPv6 */ | 44 | #define IPV6_SRCRT_TYPE_4 4 /* Segment Routing with IPv6 */ |
| 44 | 45 | ||
| 45 | /* | 46 | /* |
| @@ -187,6 +188,7 @@ enum { · 141 unmodified lines | |||
| 187 | DEVCONF_DISABLE_POLICY, | 188 | DEVCONF_DISABLE_POLICY, |
| 188 | DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN, | 189 | DEVCONF_ACCEPT_RA_RT_INFO_MIN_PLEN, |
| 189 | DEVCONF_NDISC_TCLASS, | 190 | DEVCONF_NDISC_TCLASS, |
| 191 | DEVCONF_RPL_SEG_ENABLED, | ||
| 190 | DEVCONF_MAX | 192 | DEVCONF_MAX |
| 191 | }; | 193 | }; |
| 192 | 194 | ||
| @@ -474,12 +474,17 @@ struct kvm_s390_mem_op { · 473 unmodified lines | |||
| 474 | __u32 size; /* amount of bytes */ | 474 | __u32 size; /* amount of bytes */ |
| 475 | __u32 op; /* type of operation */ | 475 | __u32 op; /* type of operation */ |
| 476 | __u64 buf; /* buffer in userspace */ | 476 | __u64 buf; /* buffer in userspace */ |
| 477 | __u8 ar; /* the access register number */ | 477 | union { |
| 478 | __u8 reserved[31]; /* should be set to 0 */ | 478 | __u8 ar; /* the access register number */ |
| 479 | __u32 sida_offset; /* offset into the sida */ | ||
| 480 | __u8 reserved[32]; /* should be set to 0 */ | ||
| 481 | }; | ||
| 479 | }; | 482 | }; |
| 480 | /* types for kvm_s390_mem_op->op */ | 483 | /* types for kvm_s390_mem_op->op */ |
| 481 | #define KVM_S390_MEMOP_LOGICAL_READ 0 | 484 | #define KVM_S390_MEMOP_LOGICAL_READ 0 |
| 482 | #define KVM_S390_MEMOP_LOGICAL_WRITE 1 | 485 | #define KVM_S390_MEMOP_LOGICAL_WRITE 1 |
| 486 | #define KVM_S390_MEMOP_SIDA_READ 2 | ||
| 487 | #define KVM_S390_MEMOP_SIDA_WRITE 3 | ||
| 483 | /* flags for kvm_s390_mem_op->flags */ | 488 | /* flags for kvm_s390_mem_op->flags */ |
| 484 | #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0) | 489 | #define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0) |
| 485 | #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1) | 490 | #define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1) |
| @@ -1010,6 +1015,8 @@ struct kvm_ppc_resize_hpt { · 524 unmodified lines | |||
| 1010 | #define KVM_CAP_ARM_NISV_TO_USER 177 | 1015 | #define KVM_CAP_ARM_NISV_TO_USER 177 |
| 1011 | #define KVM_CAP_ARM_INJECT_EXT_DABT 178 | 1016 | #define KVM_CAP_ARM_INJECT_EXT_DABT 178 |
| 1012 | #define KVM_CAP_S390_VCPU_RESETS 179 | 1017 | #define KVM_CAP_S390_VCPU_RESETS 179 |
| 1018 | #define KVM_CAP_S390_PROTECTED 180 | ||
| 1019 | #define KVM_CAP_PPC_SECURE_GUEST 181 | ||
| 1013 | 1020 | ||
| 1014 | #ifdef KVM_CAP_IRQ_ROUTING | 1021 | #ifdef KVM_CAP_IRQ_ROUTING |
| 1015 | 1022 | ||
| @@ -1478,6 +1485,39 @@ struct kvm_enc_region { · 462 unmodified lines | |||
| 1478 | #define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3) | 1485 | #define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3) |
| 1479 | #define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4) | 1486 | #define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4) |
| 1480 | 1487 | ||
| 1488 | struct kvm_s390_pv_sec_parm { | ||
| 1489 | __u64 origin; | ||
| 1490 | __u64 length; | ||
| 1491 | }; | ||
| 1492 | |||
| 1493 | struct kvm_s390_pv_unp { | ||
| 1494 | __u64 addr; | ||
| 1495 | __u64 size; | ||
| 1496 | __u64 tweak; | ||
| 1497 | }; | ||
| 1498 | |||
| 1499 | enum pv_cmd_id { | ||
| 1500 | KVM_PV_ENABLE, | ||
| 1501 | KVM_PV_DISABLE, | ||
| 1502 | KVM_PV_SET_SEC_PARMS, | ||
| 1503 | KVM_PV_UNPACK, | ||
| 1504 | KVM_PV_VERIFY, | ||
| 1505 | KVM_PV_PREP_RESET, | ||
| 1506 | KVM_PV_UNSHARE_ALL, | ||
| 1507 | }; | ||
| 1508 | |||
| 1509 | struct kvm_pv_cmd { | ||
| 1510 | __u32 cmd; /* Command to be executed */ | ||
| 1511 | __u16 rc; /* Ultravisor return code */ | ||
| 1512 | __u16 rrc; /* Ultravisor return reason code */ | ||
| 1513 | __u64 data; /* Data or address */ | ||
| 1514 | __u32 flags; /* flags for future extensions. Must be 0 for now */ | ||
| 1515 | __u32 reserved[3]; | ||
| 1516 | }; | ||
| 1517 | |||
| 1518 | /* Available with KVM_CAP_S390_PROTECTED */ | ||
| 1519 | #define KVM_S390_PV_COMMAND _IOWR(KVMIO, 0xc5, struct kvm_pv_cmd) | ||
| 1520 | |||
| 1481 | /* Secure Encrypted Virtualization command */ | 1521 | /* Secure Encrypted Virtualization command */ |
| 1482 | enum sev_cmd_id { | 1522 | enum sev_cmd_id { |
| 1483 | /* Guest initialization commands */ | 1523 | /* Guest initialization commands */ |
| @@ -1628,4 +1668,7 @@ struct kvm_hyperv_eventfd { · 144 unmodified lines | |||
| 1628 | #define KVM_HYPERV_CONN_ID_MASK 0x00ffffff | 1668 | #define KVM_HYPERV_CONN_ID_MASK 0x00ffffff |
| 1629 | #define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0) | 1669 | #define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0) |
| 1630 | 1670 | ||
| 1671 | #define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0) | ||
| 1672 | #define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1) | ||
| 1673 | |||
| 1631 | #endif /* __LINUX_KVM_H */ | 1674 | #endif /* __LINUX_KVM_H */ |
| @@ -13,6 +13,7 @@ enum lwtunnel_encap_types { · 12 unmodified lines | |||
| 13 | LWTUNNEL_ENCAP_SEG6, | 13 | LWTUNNEL_ENCAP_SEG6, |
| 14 | LWTUNNEL_ENCAP_BPF, | 14 | LWTUNNEL_ENCAP_BPF, |
| 15 | LWTUNNEL_ENCAP_SEG6_LOCAL, | 15 | LWTUNNEL_ENCAP_SEG6_LOCAL, |
| 16 | LWTUNNEL_ENCAP_RPL, | ||
| 16 | __LWTUNNEL_ENCAP_MAX, | 17 | __LWTUNNEL_ENCAP_MAX, |
| 17 | }; | 18 | }; |
| 18 | 19 | ||
| @@ -64,7 +64,7 @@ · 63 unmodified lines | |||
| 64 | #define MEDIA_BUS_FMT_RGB121212_1X36 0x1019 | 64 | #define MEDIA_BUS_FMT_RGB121212_1X36 0x1019 |
| 65 | #define MEDIA_BUS_FMT_RGB161616_1X48 0x101a | 65 | #define MEDIA_BUS_FMT_RGB161616_1X48 0x101a |
| 66 | 66 | ||
| 67 | /* YUV (including grey) - next is 0x202d */ | 67 | /* YUV (including grey) - next is 0x202e */ |
| 68 | #define MEDIA_BUS_FMT_Y8_1X8 0x2001 | 68 | #define MEDIA_BUS_FMT_Y8_1X8 0x2001 |
| 69 | #define MEDIA_BUS_FMT_UV8_1X8 0x2015 | 69 | #define MEDIA_BUS_FMT_UV8_1X8 0x2015 |
| 70 | #define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002 | 70 | #define MEDIA_BUS_FMT_UYVY8_1_5X8 0x2002 |
| @@ -86,6 +86,7 @@ · 15 unmodified lines | |||
| 86 | #define MEDIA_BUS_FMT_VYUY12_2X12 0x201d | 86 | #define MEDIA_BUS_FMT_VYUY12_2X12 0x201d |
| 87 | #define MEDIA_BUS_FMT_YUYV12_2X12 0x201e | 87 | #define MEDIA_BUS_FMT_YUYV12_2X12 0x201e |
| 88 | #define MEDIA_BUS_FMT_YVYU12_2X12 0x201f | 88 | #define MEDIA_BUS_FMT_YVYU12_2X12 0x201f |
| 89 | #define MEDIA_BUS_FMT_Y14_1X14 0x202d | ||
| 89 | #define MEDIA_BUS_FMT_UYVY8_1X16 0x200f | 90 | #define MEDIA_BUS_FMT_UYVY8_1X16 0x200f |
| 90 | #define MEDIA_BUS_FMT_VYUY8_1X16 0x2010 | 91 | #define MEDIA_BUS_FMT_VYUY8_1X16 0x2010 |
| 91 | #define MEDIA_BUS_FMT_YUYV8_1X16 0x2011 | 92 | #define MEDIA_BUS_FMT_YUYV8_1X16 0x2011 |
| @@ -134,11 +134,16 @@ · 133 unmodified lines | |||
| 134 | /* MAC and PHY tx_config_Reg[15:0] for SGMII in-band auto-negotiation.*/ | 134 | /* MAC and PHY tx_config_Reg[15:0] for SGMII in-band auto-negotiation.*/ |
| 135 | #define ADVERTISE_SGMII 0x0001 /* MAC can do SGMII */ | 135 | #define ADVERTISE_SGMII 0x0001 /* MAC can do SGMII */ |
| 136 | #define LPA_SGMII 0x0001 /* PHY can do SGMII */ | 136 | #define LPA_SGMII 0x0001 /* PHY can do SGMII */ |
| 137 | #define LPA_SGMII_SPD_MASK 0x0c00 /* SGMII speed mask */ | ||
| 138 | #define LPA_SGMII_FULL_DUPLEX 0x1000 /* SGMII full duplex */ | ||
| 137 | #define LPA_SGMII_DPX_SPD_MASK 0x1C00 /* SGMII duplex and speed bits */ | 139 | #define LPA_SGMII_DPX_SPD_MASK 0x1C00 /* SGMII duplex and speed bits */ |
| 140 | #define LPA_SGMII_10 0x0000 /* 10Mbps */ | ||
| 138 | #define LPA_SGMII_10HALF 0x0000 /* Can do 10mbps half-duplex */ | 141 | #define LPA_SGMII_10HALF 0x0000 /* Can do 10mbps half-duplex */ |
| 139 | #define LPA_SGMII_10FULL 0x1000 /* Can do 10mbps full-duplex */ | 142 | #define LPA_SGMII_10FULL 0x1000 /* Can do 10mbps full-duplex */ |
| 143 | #define LPA_SGMII_100 0x0400 /* 100Mbps */ | ||
| 140 | #define LPA_SGMII_100HALF 0x0400 /* Can do 100mbps half-duplex */ | 144 | #define LPA_SGMII_100HALF 0x0400 /* Can do 100mbps half-duplex */ |
| 141 | #define LPA_SGMII_100FULL 0x1400 /* Can do 100mbps full-duplex */ | 145 | #define LPA_SGMII_100FULL 0x1400 /* Can do 100mbps full-duplex */ |
| 146 | #define LPA_SGMII_1000 0x0800 /* 1000Mbps */ | ||
| 142 | #define LPA_SGMII_1000HALF 0x0800 /* Can do 1000mbps half-duplex */ | 147 | #define LPA_SGMII_1000HALF 0x0800 /* Can do 1000mbps half-duplex */ |
| 143 | #define LPA_SGMII_1000FULL 0x1800 /* Can do 1000mbps full-duplex */ | 148 | #define LPA_SGMII_1000FULL 0x1800 /* Can do 1000mbps full-duplex */ |
| 144 | #define LPA_SGMII_LINK 0x8000 /* PHY link with copper-side partner */ | 149 | #define LPA_SGMII_LINK 0x8000 /* PHY link with copper-side partner */ |
| @@ -5,8 +5,9 @@ · 4 unmodified lines | |||
| 5 | #include <asm/mman.h> | 5 | #include <asm/mman.h> |
| 6 | #include <asm-generic/hugetlb_encode.h> | 6 | #include <asm-generic/hugetlb_encode.h> |
| 7 | 7 | ||
| 8 | #define MREMAP_MAYMOVE 1 | 8 | #define MREMAP_MAYMOVE 1 |
| 9 | #define MREMAP_FIXED 2 | 9 | #define MREMAP_FIXED 2 |
| 10 | #define MREMAP_DONTUNMAP 4 | ||
| 10 | 11 | ||
| 11 | #define OVERCOMMIT_GUESS 0 | 12 | #define OVERCOMMIT_GUESS 0 |
| 12 | #define OVERCOMMIT_ALWAYS 1 | 13 | #define OVERCOMMIT_ALWAYS 1 |
| @@ -57,7 +57,7 @@ struct mmc_ioc_cmd { · 56 unmodified lines | |||
| 57 | */ | 57 | */ |
| 58 | struct mmc_ioc_multi_cmd { | 58 | struct mmc_ioc_multi_cmd { |
| 59 | __u64 num_of_cmds; | 59 | __u64 num_of_cmds; |
| 60 | struct mmc_ioc_cmd cmds[0]; | 60 | struct mmc_ioc_cmd cmds[]; |
| 61 | }; | 61 | }; |
| 62 | 62 | ||
| 63 | #define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) | 63 | #define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) |
| @@ -0,0 +1,89 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPI_MPTCP_H | ||
| 3 | #define _UAPI_MPTCP_H | ||
| 4 | |||
| 5 | #include <linux/const.h> | ||
| 6 | #include <linux/types.h> | ||
| 7 | |||
| 8 | #define MPTCP_SUBFLOW_FLAG_MCAP_REM _BITUL(0) | ||
| 9 | #define MPTCP_SUBFLOW_FLAG_MCAP_LOC _BITUL(1) | ||
| 10 | #define MPTCP_SUBFLOW_FLAG_JOIN_REM _BITUL(2) | ||
| 11 | #define MPTCP_SUBFLOW_FLAG_JOIN_LOC _BITUL(3) | ||
| 12 | #define MPTCP_SUBFLOW_FLAG_BKUP_REM _BITUL(4) | ||
| 13 | #define MPTCP_SUBFLOW_FLAG_BKUP_LOC _BITUL(5) | ||
| 14 | #define MPTCP_SUBFLOW_FLAG_FULLY_ESTABLISHED _BITUL(6) | ||
| 15 | #define MPTCP_SUBFLOW_FLAG_CONNECTED _BITUL(7) | ||
| 16 | #define MPTCP_SUBFLOW_FLAG_MAPVALID _BITUL(8) | ||
| 17 | |||
| 18 | enum { | ||
| 19 | MPTCP_SUBFLOW_ATTR_UNSPEC, | ||
| 20 | MPTCP_SUBFLOW_ATTR_TOKEN_REM, | ||
| 21 | MPTCP_SUBFLOW_ATTR_TOKEN_LOC, | ||
| 22 | MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ, | ||
| 23 | MPTCP_SUBFLOW_ATTR_MAP_SEQ, | ||
| 24 | MPTCP_SUBFLOW_ATTR_MAP_SFSEQ, | ||
| 25 | MPTCP_SUBFLOW_ATTR_SSN_OFFSET, | ||
| 26 | MPTCP_SUBFLOW_ATTR_MAP_DATALEN, | ||
| 27 | MPTCP_SUBFLOW_ATTR_FLAGS, | ||
| 28 | MPTCP_SUBFLOW_ATTR_ID_REM, | ||
| 29 | MPTCP_SUBFLOW_ATTR_ID_LOC, | ||
| 30 | MPTCP_SUBFLOW_ATTR_PAD, | ||
| 31 | __MPTCP_SUBFLOW_ATTR_MAX | ||
| 32 | }; | ||
| 33 | |||
| 34 | #define MPTCP_SUBFLOW_ATTR_MAX (__MPTCP_SUBFLOW_ATTR_MAX - 1) | ||
| 35 | |||
| 36 | /* netlink interface */ | ||
| 37 | #define MPTCP_PM_NAME "mptcp_pm" | ||
| 38 | #define MPTCP_PM_CMD_GRP_NAME "mptcp_pm_cmds" | ||
| 39 | #define MPTCP_PM_VER 0x1 | ||
| 40 | |||
| 41 | /* | ||
| 42 | * ATTR types defined for MPTCP | ||
| 43 | */ | ||
| 44 | enum { | ||
| 45 | MPTCP_PM_ATTR_UNSPEC, | ||
| 46 | |||
| 47 | MPTCP_PM_ATTR_ADDR, /* nested address */ | ||
| 48 | MPTCP_PM_ATTR_RCV_ADD_ADDRS, /* u32 */ | ||
| 49 | MPTCP_PM_ATTR_SUBFLOWS, /* u32 */ | ||
| 50 | |||
| 51 | __MPTCP_PM_ATTR_MAX | ||
| 52 | }; | ||
| 53 | |||
| 54 | #define MPTCP_PM_ATTR_MAX (__MPTCP_PM_ATTR_MAX - 1) | ||
| 55 | |||
| 56 | enum { | ||
| 57 | MPTCP_PM_ADDR_ATTR_UNSPEC, | ||
| 58 | |||
| 59 | MPTCP_PM_ADDR_ATTR_FAMILY, /* u16 */ | ||
| 60 | MPTCP_PM_ADDR_ATTR_ID, /* u8 */ | ||
| 61 | MPTCP_PM_ADDR_ATTR_ADDR4, /* struct in_addr */ | ||
| 62 | MPTCP_PM_ADDR_ATTR_ADDR6, /* struct in6_addr */ | ||
| 63 | MPTCP_PM_ADDR_ATTR_PORT, /* u16 */ | ||
| 64 | MPTCP_PM_ADDR_ATTR_FLAGS, /* u32 */ | ||
| 65 | MPTCP_PM_ADDR_ATTR_IF_IDX, /* s32 */ | ||
| 66 | |||
| 67 | __MPTCP_PM_ADDR_ATTR_MAX | ||
| 68 | }; | ||
| 69 | |||
| 70 | #define MPTCP_PM_ADDR_ATTR_MAX (__MPTCP_PM_ADDR_ATTR_MAX - 1) | ||
| 71 | |||
| 72 | #define MPTCP_PM_ADDR_FLAG_SIGNAL (1 << 0) | ||
| 73 | #define MPTCP_PM_ADDR_FLAG_SUBFLOW (1 << 1) | ||
| 74 | #define MPTCP_PM_ADDR_FLAG_BACKUP (1 << 2) | ||
| 75 | |||
| 76 | enum { | ||
| 77 | MPTCP_PM_CMD_UNSPEC, | ||
| 78 | |||
| 79 | MPTCP_PM_CMD_ADD_ADDR, | ||
| 80 | MPTCP_PM_CMD_DEL_ADDR, | ||
| 81 | MPTCP_PM_CMD_GET_ADDR, | ||
| 82 | MPTCP_PM_CMD_FLUSH_ADDRS, | ||
| 83 | MPTCP_PM_CMD_SET_LIMITS, | ||
| 84 | MPTCP_PM_CMD_GET_LIMITS, | ||
| 85 | |||
| 86 | __MPTCP_PM_CMD_AFTER_LAST | ||
| 87 | }; | ||
| 88 | |||
| 89 | #endif /* _UAPI_MPTCP_H */ | ||
| @@ -29,12 +29,12 @@ struct net_dm_config_entry { · 28 unmodified lines | |||
| 29 | 29 | ||
| 30 | struct net_dm_config_msg { | 30 | struct net_dm_config_msg { |
| 31 | __u32 entries; | 31 | __u32 entries; |
| 32 | struct net_dm_config_entry options[0]; | 32 | struct net_dm_config_entry options[]; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | struct net_dm_alert_msg { | 35 | struct net_dm_alert_msg { |
| 36 | __u32 entries; | 36 | __u32 entries; |
| 37 | struct net_dm_drop_point points[0]; | 37 | struct net_dm_drop_point points[]; |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | struct net_dm_user_msg { | 40 | struct net_dm_user_msg { |
| @@ -92,6 +92,7 @@ enum net_dm_attr { · 51 unmodified lines | |||
| 92 | NET_DM_ATTR_HW_TRAP_COUNT, /* u32 */ | 92 | NET_DM_ATTR_HW_TRAP_COUNT, /* u32 */ |
| 93 | NET_DM_ATTR_SW_DROPS, /* flag */ | 93 | NET_DM_ATTR_SW_DROPS, /* flag */ |
| 94 | NET_DM_ATTR_HW_DROPS, /* flag */ | 94 | NET_DM_ATTR_HW_DROPS, /* flag */ |
| 95 | NET_DM_ATTR_FLOW_ACTION_COOKIE, /* binary */ | ||
| 95 | 96 | ||
| 96 | __NET_DM_ATTR_MAX, | 97 | __NET_DM_ATTR_MAX, |
| 97 | NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1 | 98 | NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1 |
| @@ -98,6 +98,9 @@ enum hwtstamp_tx_types { · 97 unmodified lines | |||
| 98 | * receive a time stamp via the socket error queue. | 98 | * receive a time stamp via the socket error queue. |
| 99 | */ | 99 | */ |
| 100 | HWTSTAMP_TX_ONESTEP_P2P, | 100 | HWTSTAMP_TX_ONESTEP_P2P, |
| 101 | |||
| 102 | /* add new constants above here */ | ||
| 103 | __HWTSTAMP_TX_CNT | ||
| 101 | }; | 104 | }; |
| 102 | 105 | ||
| 103 | /* possible values for hwtstamp_config->rx_filter */ | 106 | /* possible values for hwtstamp_config->rx_filter */ |
| @@ -140,6 +143,9 @@ enum hwtstamp_rx_filters { · 36 unmodified lines | |||
| 140 | 143 | ||
| 141 | /* NTP, UDP, all versions and packet modes */ | 144 | /* NTP, UDP, all versions and packet modes */ |
| 142 | HWTSTAMP_FILTER_NTP_ALL, | 145 | HWTSTAMP_FILTER_NTP_ALL, |
| 146 | |||
| 147 | /* add new constants above here */ | ||
| 148 | __HWTSTAMP_FILTER_CNT | ||
| 143 | }; | 149 | }; |
| 144 | 150 | ||
| 145 | /* SCM_TIMESTAMPING_PKTINFO control message */ | 151 | /* SCM_TIMESTAMPING_PKTINFO control message */ |
| @@ -97,6 +97,15 @@ enum ip_conntrack_status { · 96 unmodified lines | |||
| 97 | IPS_UNTRACKED_BIT = 12, | 97 | IPS_UNTRACKED_BIT = 12, |
| 98 | IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT), | 98 | IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT), |
| 99 | 99 | ||
| 100 | #ifdef __KERNEL__ | ||
| 101 | /* Re-purposed for in-kernel use: | ||
| 102 | * Tags a conntrack entry that clashed with an existing entry | ||
| 103 | * on insert. | ||
| 104 | */ | ||
| 105 | IPS_NAT_CLASH_BIT = IPS_UNTRACKED_BIT, | ||
| 106 | IPS_NAT_CLASH = IPS_UNTRACKED, | ||
| 107 | #endif | ||
| 108 | |||
| 100 | /* Conntrack got a helper explicitly attached via CT target. */ | 109 | /* Conntrack got a helper explicitly attached via CT target. */ |
| 101 | IPS_HELPER_BIT = 13, | 110 | IPS_HELPER_BIT = 13, |
| 102 | IPS_HELPER = (1 << IPS_HELPER_BIT), | 111 | IPS_HELPER = (1 << IPS_HELPER_BIT), |
| @@ -110,7 +119,8 @@ enum ip_conntrack_status { · 7 unmodified lines | |||
| 110 | */ | 119 | */ |
| 111 | IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK | | 120 | IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK | |
| 112 | IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | | 121 | IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | |
| 113 | IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD), | 122 | IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_UNTRACKED | |
| 123 | IPS_OFFLOAD), | ||
| 114 | 124 | ||
| 115 | __IPS_MAX_BIT = 15, | 125 | __IPS_MAX_BIT = 15, |
| 116 | }; | 126 | }; |
| @@ -342,6 +342,7 @@ enum nft_set_field_attributes { · 341 unmodified lines | |||
| 342 | * @NFTA_SET_USERDATA: user data (NLA_BINARY) | 342 | * @NFTA_SET_USERDATA: user data (NLA_BINARY) |
| 343 | * @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*) | 343 | * @NFTA_SET_OBJ_TYPE: stateful object type (NLA_U32: NFT_OBJECT_*) |
| 344 | * @NFTA_SET_HANDLE: set handle (NLA_U64) | 344 | * @NFTA_SET_HANDLE: set handle (NLA_U64) |
| 345 | * @NFTA_SET_EXPR: set expression (NLA_NESTED: nft_expr_attributes) | ||
| 345 | */ | 346 | */ |
| 346 | enum nft_set_attributes { | 347 | enum nft_set_attributes { |
| 347 | NFTA_SET_UNSPEC, | 348 | NFTA_SET_UNSPEC, |
| @@ -361,6 +362,7 @@ enum nft_set_attributes { · 13 unmodified lines | |||
| 361 | NFTA_SET_PAD, | 362 | NFTA_SET_PAD, |
| 362 | NFTA_SET_OBJ_TYPE, | 363 | NFTA_SET_OBJ_TYPE, |
| 363 | NFTA_SET_HANDLE, | 364 | NFTA_SET_HANDLE, |
| 365 | NFTA_SET_EXPR, | ||
| 364 | __NFTA_SET_MAX | 366 | __NFTA_SET_MAX |
| 365 | }; | 367 | }; |
| 366 | #define NFTA_SET_MAX (__NFTA_SET_MAX - 1) | 368 | #define NFTA_SET_MAX (__NFTA_SET_MAX - 1) |
| @@ -1551,6 +1553,19 @@ enum nft_object_attributes { · 1184 unmodified lines | |||
| 1551 | }; | 1553 | }; |
| 1552 | #define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1) | 1554 | #define NFTA_OBJ_MAX (__NFTA_OBJ_MAX - 1) |
| 1553 | 1555 | ||
| 1556 | /** | ||
| 1557 | * enum nft_flowtable_flags - nf_tables flowtable flags | ||
| 1558 | * | ||
| 1559 | * @NFT_FLOWTABLE_HW_OFFLOAD: flowtable hardware offload is enabled | ||
| 1560 | * @NFT_FLOWTABLE_COUNTER: enable flow counters | ||
| 1561 | */ | ||
| 1562 | enum nft_flowtable_flags { | ||
| 1563 | NFT_FLOWTABLE_HW_OFFLOAD = 0x1, | ||
| 1564 | NFT_FLOWTABLE_COUNTER = 0x2, | ||
| 1565 | NFT_FLOWTABLE_MASK = (NFT_FLOWTABLE_HW_OFFLOAD | | ||
| 1566 | NFT_FLOWTABLE_COUNTER) | ||
| 1567 | }; | ||
| 1568 | |||
| 1554 | /** | 1569 | /** |
| 1555 | * enum nft_flowtable_attributes - nf_tables flow table netlink attributes | 1570 | * enum nft_flowtable_attributes - nf_tables flow table netlink attributes |
| 1556 | * | 1571 | * |
| @@ -1770,6 +1785,7 @@ enum nft_tunnel_opts_attributes { · 213 unmodified lines | |||
| 1770 | NFTA_TUNNEL_KEY_OPTS_UNSPEC, | 1785 | NFTA_TUNNEL_KEY_OPTS_UNSPEC, |
| 1771 | NFTA_TUNNEL_KEY_OPTS_VXLAN, | 1786 | NFTA_TUNNEL_KEY_OPTS_VXLAN, |
| 1772 | NFTA_TUNNEL_KEY_OPTS_ERSPAN, | 1787 | NFTA_TUNNEL_KEY_OPTS_ERSPAN, |
| 1788 | NFTA_TUNNEL_KEY_OPTS_GENEVE, | ||
| 1773 | __NFTA_TUNNEL_KEY_OPTS_MAX | 1789 | __NFTA_TUNNEL_KEY_OPTS_MAX |
| 1774 | }; | 1790 | }; |
| 1775 | #define NFTA_TUNNEL_KEY_OPTS_MAX (__NFTA_TUNNEL_KEY_OPTS_MAX - 1) | 1791 | #define NFTA_TUNNEL_KEY_OPTS_MAX (__NFTA_TUNNEL_KEY_OPTS_MAX - 1) |
| @@ -1791,6 +1807,15 @@ enum nft_tunnel_opts_erspan_attributes { · 15 unmodified lines | |||
| 1791 | }; | 1807 | }; |
| 1792 | #define NFTA_TUNNEL_KEY_ERSPAN_MAX (__NFTA_TUNNEL_KEY_ERSPAN_MAX - 1) | 1808 | #define NFTA_TUNNEL_KEY_ERSPAN_MAX (__NFTA_TUNNEL_KEY_ERSPAN_MAX - 1) |
| 1793 | 1809 | ||
| 1810 | enum nft_tunnel_opts_geneve_attributes { | ||
| 1811 | NFTA_TUNNEL_KEY_GENEVE_UNSPEC, | ||
| 1812 | NFTA_TUNNEL_KEY_GENEVE_CLASS, | ||
| 1813 | NFTA_TUNNEL_KEY_GENEVE_TYPE, | ||
| 1814 | NFTA_TUNNEL_KEY_GENEVE_DATA, | ||
| 1815 | __NFTA_TUNNEL_KEY_GENEVE_MAX | ||
| 1816 | }; | ||
| 1817 | #define NFTA_TUNNEL_KEY_GENEVE_MAX (__NFTA_TUNNEL_KEY_GENEVE_MAX - 1) | ||
| 1818 | |||
| 1794 | enum nft_tunnel_flags { | 1819 | enum nft_tunnel_flags { |
| 1795 | NFT_TUNNEL_F_ZERO_CSUM_TX = (1 << 0), | 1820 | NFT_TUNNEL_F_ZERO_CSUM_TX = (1 << 0), |
| 1796 | NFT_TUNNEL_F_DONT_FRAGMENT = (1 << 1), | 1821 | NFT_TUNNEL_F_DONT_FRAGMENT = (1 << 1), |
| @@ -1,4 +1,3 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | 1 | /* |
| 3 | * linux/include/linux/netfilter/xt_IDLETIMER.h | 2 | * linux/include/linux/netfilter/xt_IDLETIMER.h |
| 4 | * | 3 | * |
| @@ -33,6 +32,7 @@ · 28 unmodified lines | |||
| 33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
| 34 | 33 | ||
| 35 | #define MAX_IDLETIMER_LABEL_SIZE 28 | 34 | #define MAX_IDLETIMER_LABEL_SIZE 28 |
| 35 | #define XT_IDLETIMER_ALARM 0x01 | ||
| 36 | 36 | ||
| 37 | struct idletimer_tg_info { | 37 | struct idletimer_tg_info { |
| 38 | __u32 timeout; | 38 | __u32 timeout; |
| @@ -43,4 +43,14 @@ struct idletimer_tg_info { · 4 unmodified lines | |||
| 43 | struct idletimer_tg *timer __attribute__((aligned(8))); | 43 | struct idletimer_tg *timer __attribute__((aligned(8))); |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | struct idletimer_tg_info_v1 { | ||
| 47 | __u32 timeout; | ||
| 48 | |||
| 49 | char label[MAX_IDLETIMER_LABEL_SIZE]; | ||
| 50 | |||
| 51 | __u8 timer_type; | ||
| 52 | |||
| 53 | /* for kernel module internal use only */ | ||
| 54 | struct idletimer_tg *timer __attribute__((aligned(8))); | ||
| 55 | }; | ||
| 46 | #endif | 56 | #endif |
| @@ -40,7 +40,7 @@ struct ebt_mac_wormhash_tuple { · 39 unmodified lines | |||
| 40 | struct ebt_mac_wormhash { | 40 | struct ebt_mac_wormhash { |
| 41 | int table[257]; | 41 | int table[257]; |
| 42 | int poolsize; | 42 | int poolsize; |
| 43 | struct ebt_mac_wormhash_tuple pool[0]; | 43 | struct ebt_mac_wormhash_tuple pool[]; |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | #define ebt_mac_wormhash_size(x) ((x) ? sizeof(struct ebt_mac_wormhash) \ | 46 | #define ebt_mac_wormhash_size(x) ((x) ? sizeof(struct ebt_mac_wormhash) \ |
| @@ -11,7 +11,7 @@ · 10 unmodified lines | |||
| 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> | 11 | * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com> |
| 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> | 12 | * Copyright 2008 Colin McCabe <colin@cozybit.com> |
| 13 | * Copyright 2015-2017 Intel Deutschland GmbH | 13 | * Copyright 2015-2017 Intel Deutschland GmbH |
| 14 | * Copyright (C) 2018-2019 Intel Corporation | 14 | * Copyright (C) 2018-2020 Intel Corporation |
| 15 | * | 15 | * |
| 16 | * Permission to use, copy, modify, and/or distribute this software for any | 16 | * Permission to use, copy, modify, and/or distribute this software for any |
| 17 | * purpose with or without fee is hereby granted, provided that the above | 17 | * purpose with or without fee is hereby granted, provided that the above |
| @@ -264,6 +264,29 @@ · 246 unmodified lines | |||
| 264 | * %NL80211_ATTR_VLAN_ID. | 264 | * %NL80211_ATTR_VLAN_ID. |
| 265 | */ | 265 | */ |
| 266 | 266 | ||
| 267 | /** | ||
| 268 | * DOC: TID configuration | ||
| 269 | * | ||
| 270 | * TID config support can be checked in the %NL80211_ATTR_TID_CONFIG | ||
| 271 | * attribute given in wiphy capabilities. | ||
| 272 | * | ||
| 273 | * The necessary configuration parameters are mentioned in | ||
| 274 | * &enum nl80211_tid_config_attr and it will be passed to the | ||
| 275 | * %NL80211_CMD_SET_TID_CONFIG command in %NL80211_ATTR_TID_CONFIG. | ||
| 276 | * | ||
| 277 | * If the configuration needs to be applied for specific peer then the MAC | ||
| 278 | * address of the peer needs to be passed in %NL80211_ATTR_MAC, otherwise the | ||
| 279 | * configuration will be applied for all the connected peers in the vif except | ||
| 280 | * any peers that have peer specific configuration for the TID by default; if | ||
| 281 | * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer specific values | ||
| 282 | * will be overwritten. | ||
| 283 | * | ||
| 284 | * All this configuration is valid only for STA's current connection | ||
| 285 | * i.e. the configuration will be reset to default when the STA connects back | ||
| 286 | * after disconnection/roaming, and this configuration will be cleared when | ||
| 287 | * the interface goes down. | ||
| 288 | */ | ||
| 289 | |||
| 267 | /** | 290 | /** |
| 268 | * enum nl80211_commands - supported nl80211 commands | 291 | * enum nl80211_commands - supported nl80211 commands |
| 269 | * | 292 | * |
| @@ -1125,6 +1148,9 @@ · 855 unmodified lines | |||
| 1125 | * peer MAC address and %NL80211_ATTR_FRAME is used to specify the frame | 1148 | * peer MAC address and %NL80211_ATTR_FRAME is used to specify the frame |
| 1126 | * content. The frame is ethernet data. | 1149 | * content. The frame is ethernet data. |
| 1127 | * | 1150 | * |
| 1151 | * @NL80211_CMD_SET_TID_CONFIG: Data frame TID specific configuration | ||
| 1152 | * is passed using %NL80211_ATTR_TID_CONFIG attribute. | ||
| 1153 | * | ||
| 1128 | * @NL80211_CMD_MAX: highest used command number | 1154 | * @NL80211_CMD_MAX: highest used command number |
| 1129 | * @__NL80211_CMD_AFTER_LAST: internal use | 1155 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 1130 | */ | 1156 | */ |
| @@ -1349,6 +1375,8 @@ enum nl80211_commands { · 218 unmodified lines | |||
| 1349 | 1375 | ||
| 1350 | NL80211_CMD_PROBE_MESH_LINK, | 1376 | NL80211_CMD_PROBE_MESH_LINK, |
| 1351 | 1377 | ||
| 1378 | NL80211_CMD_SET_TID_CONFIG, | ||
| 1379 | |||
| 1352 | /* add new commands above here */ | 1380 | /* add new commands above here */ |
| 1353 | 1381 | ||
| 1354 | /* used to define NL80211_CMD_MAX below */ | 1382 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1604,7 +1632,8 @@ enum nl80211_commands { · 249 unmodified lines | |||
| 1604 | * flag is included, then control port frames are sent over NL80211 instead | 1632 | * flag is included, then control port frames are sent over NL80211 instead |
| 1605 | * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is | 1633 | * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is |
| 1606 | * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER | 1634 | * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER |
| 1607 | * flag. | 1635 | * flag. When used with %NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, pre-auth |
| 1636 | * frames are not forwared over the control port. | ||
| 1608 | * | 1637 | * |
| 1609 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. | 1638 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. |
| 1610 | * We recommend using nested, driver-specific attributes within this. | 1639 | * We recommend using nested, driver-specific attributes within this. |
| @@ -2400,6 +2429,47 @@ enum nl80211_commands { · 789 unmodified lines | |||
| 2400 | * @NL80211_ATTR_VLAN_ID: VLAN ID (1..4094) for the station and VLAN group key | 2429 | * @NL80211_ATTR_VLAN_ID: VLAN ID (1..4094) for the station and VLAN group key |
| 2401 | * (u16). | 2430 | * (u16). |
| 2402 | * | 2431 | * |
| 2432 | * @NL80211_ATTR_HE_BSS_COLOR: nested attribute for BSS Color Settings. | ||
| 2433 | * | ||
| 2434 | * @NL80211_ATTR_IFTYPE_AKM_SUITES: nested array attribute, with each entry | ||
| 2435 | * using attributes from &enum nl80211_iftype_akm_attributes. This | ||
| 2436 | * attribute is sent in a response to %NL80211_CMD_GET_WIPHY indicating | ||
| 2437 | * supported AKM suites capability per interface. AKMs advertised in | ||
| 2438 | * %NL80211_ATTR_AKM_SUITES are default capabilities if AKM suites not | ||
| 2439 | * advertised for a specific interface type. | ||
| 2440 | * | ||
| 2441 | * @NL80211_ATTR_TID_CONFIG: TID specific configuration in a | ||
| 2442 | * nested attribute with &enum nl80211_tid_config_attr sub-attributes; | ||
| 2443 | * on output (in wiphy attributes) it contains only the feature sub- | ||
| 2444 | * attributes. | ||
| 2445 | * | ||
| 2446 | * @NL80211_ATTR_CONTROL_PORT_NO_PREAUTH: disable preauth frame rx on control | ||
| 2447 | * port in order to forward/receive them as ordinary data frames. | ||
| 2448 | * | ||
| 2449 | * @NL80211_ATTR_PMK_LIFETIME: Maximum lifetime for PMKSA in seconds (u32, | ||
| 2450 | * dot11RSNAConfigPMKReauthThreshold; 0 is not a valid value). | ||
| 2451 | * An optional parameter configured through %NL80211_CMD_SET_PMKSA. | ||
| 2452 | * Drivers that trigger roaming need to know the lifetime of the | ||
| 2453 | * configured PMKSA for triggering the full vs. PMKSA caching based | ||
| 2454 | * authentication. This timeout helps authentication methods like SAE, | ||
| 2455 | * where PMK gets updated only by going through a full (new SAE) | ||
| 2456 | * authentication instead of getting updated during an association for EAP | ||
| 2457 | * authentication. No new full authentication within the PMK expiry shall | ||
| 2458 | * result in a disassociation at the end of the lifetime. | ||
| 2459 | * | ||
| 2460 | * @NL80211_ATTR_PMK_REAUTH_THRESHOLD: Reauthentication threshold time, in | ||
| 2461 | * terms of percentage of %NL80211_ATTR_PMK_LIFETIME | ||
| 2462 | * (u8, dot11RSNAConfigPMKReauthThreshold, 1..100). This is an optional | ||
| 2463 | * parameter configured through %NL80211_CMD_SET_PMKSA. Requests the | ||
| 2464 | * driver to trigger a full authentication roam (without PMKSA caching) | ||
| 2465 | * after the reauthentication threshold time, but before the PMK lifetime | ||
| 2466 | * has expired. | ||
| 2467 | * | ||
| 2468 | * Authentication methods like SAE need to be able to generate a new PMKSA | ||
| 2469 | * entry without having to force a disconnection after the PMK timeout. If | ||
| 2470 | * no roaming occurs between the reauth threshold and PMK expiration, | ||
| 2471 | * disassociation is still forced. | ||
| 2472 | * | ||
| 2403 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2473 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2404 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2474 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2405 | * @__NL80211_ATTR_AFTER_LAST: internal use | 2475 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2864,6 +2934,17 @@ enum nl80211_attrs { · 458 unmodified lines | |||
| 2864 | 2934 | ||
| 2865 | NL80211_ATTR_VLAN_ID, | 2935 | NL80211_ATTR_VLAN_ID, |
| 2866 | 2936 | ||
| 2937 | NL80211_ATTR_HE_BSS_COLOR, | ||
| 2938 | |||
| 2939 | NL80211_ATTR_IFTYPE_AKM_SUITES, | ||
| 2940 | |||
| 2941 | NL80211_ATTR_TID_CONFIG, | ||
| 2942 | |||
| 2943 | NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, | ||
| 2944 | |||
| 2945 | NL80211_ATTR_PMK_LIFETIME, | ||
| 2946 | NL80211_ATTR_PMK_REAUTH_THRESHOLD, | ||
| 2947 | |||
| 2867 | /* add attributes here, update the policy in nl80211.c */ | 2948 | /* add attributes here, update the policy in nl80211.c */ |
| 2868 | 2949 | ||
| 2869 | __NL80211_ATTR_AFTER_LAST, | 2950 | __NL80211_ATTR_AFTER_LAST, |
| @@ -3583,6 +3664,8 @@ enum nl80211_wmm_rule { · 713 unmodified lines | |||
| 3583 | * @NL80211_FREQUENCY_ATTR_WMM: this channel has wmm limitations. | 3664 | * @NL80211_FREQUENCY_ATTR_WMM: this channel has wmm limitations. |
| 3584 | * This is a nested attribute that contains the wmm limitation per AC. | 3665 | * This is a nested attribute that contains the wmm limitation per AC. |
| 3585 | * (see &enum nl80211_wmm_rule) | 3666 | * (see &enum nl80211_wmm_rule) |
| 3667 | * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel | ||
| 3668 | * in current regulatory domain. | ||
| 3586 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number | 3669 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number |
| 3587 | * currently defined | 3670 | * currently defined |
| 3588 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use | 3671 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use |
| @@ -3612,6 +3695,7 @@ enum nl80211_frequency_attr { · 23 unmodified lines | |||
| 3612 | NL80211_FREQUENCY_ATTR_NO_20MHZ, | 3695 | NL80211_FREQUENCY_ATTR_NO_20MHZ, |
| 3613 | NL80211_FREQUENCY_ATTR_NO_10MHZ, | 3696 | NL80211_FREQUENCY_ATTR_NO_10MHZ, |
| 3614 | NL80211_FREQUENCY_ATTR_WMM, | 3697 | NL80211_FREQUENCY_ATTR_WMM, |
| 3698 | NL80211_FREQUENCY_ATTR_NO_HE, | ||
| 3615 | 3699 | ||
| 3616 | /* keep last */ | 3700 | /* keep last */ |
| 3617 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, | 3701 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, |
| @@ -3809,6 +3893,7 @@ enum nl80211_sched_scan_match_attr { · 191 unmodified lines | |||
| 3809 | * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation | 3893 | * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation |
| 3810 | * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed | 3894 | * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed |
| 3811 | * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed | 3895 | * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed |
| 3896 | * @NL80211_RRF_NO_HE: HE operation not allowed | ||
| 3812 | */ | 3897 | */ |
| 3813 | enum nl80211_reg_rule_flags { | 3898 | enum nl80211_reg_rule_flags { |
| 3814 | NL80211_RRF_NO_OFDM = 1<<0, | 3899 | NL80211_RRF_NO_OFDM = 1<<0, |
| @@ -3826,6 +3911,7 @@ enum nl80211_reg_rule_flags { · 11 unmodified lines | |||
| 3826 | NL80211_RRF_NO_HT40PLUS = 1<<14, | 3911 | NL80211_RRF_NO_HT40PLUS = 1<<14, |
| 3827 | NL80211_RRF_NO_80MHZ = 1<<15, | 3912 | NL80211_RRF_NO_80MHZ = 1<<15, |
| 3828 | NL80211_RRF_NO_160MHZ = 1<<16, | 3913 | NL80211_RRF_NO_160MHZ = 1<<16, |
| 3914 | NL80211_RRF_NO_HE = 1<<17, | ||
| 3829 | }; | 3915 | }; |
| 3830 | 3916 | ||
| 3831 | #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR | 3917 | #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR |
| @@ -4532,6 +4618,7 @@ enum nl80211_key_default_types { · 700 unmodified lines | |||
| 4532 | * See &enum nl80211_key_default_types. | 4618 | * See &enum nl80211_key_default_types. |
| 4533 | * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode. | 4619 | * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode. |
| 4534 | * Defaults to @NL80211_KEY_RX_TX. | 4620 | * Defaults to @NL80211_KEY_RX_TX. |
| 4621 | * @NL80211_KEY_DEFAULT_BEACON: flag indicating default Beacon frame key | ||
| 4535 | * | 4622 | * |
| 4536 | * @__NL80211_KEY_AFTER_LAST: internal | 4623 | * @__NL80211_KEY_AFTER_LAST: internal |
| 4537 | * @NL80211_KEY_MAX: highest key attribute | 4624 | * @NL80211_KEY_MAX: highest key attribute |
| @@ -4547,6 +4634,7 @@ enum nl80211_key_attributes { · 9 unmodified lines | |||
| 4547 | NL80211_KEY_TYPE, | 4634 | NL80211_KEY_TYPE, |
| 4548 | NL80211_KEY_DEFAULT_TYPES, | 4635 | NL80211_KEY_DEFAULT_TYPES, |
| 4549 | NL80211_KEY_MODE, | 4636 | NL80211_KEY_MODE, |
| 4637 | NL80211_KEY_DEFAULT_BEACON, | ||
| 4550 | 4638 | ||
| 4551 | /* keep last */ | 4639 | /* keep last */ |
| 4552 | __NL80211_KEY_AFTER_LAST, | 4640 | __NL80211_KEY_AFTER_LAST, |
| @@ -4702,6 +4790,69 @@ enum nl80211_tx_power_setting { · 149 unmodified lines | |||
| 4702 | NL80211_TX_POWER_FIXED, | 4790 | NL80211_TX_POWER_FIXED, |
| 4703 | }; | 4791 | }; |
| 4704 | 4792 | ||
| 4793 | /** | ||
| 4794 | * enum nl80211_tid_config - TID config state | ||
| 4795 | * @NL80211_TID_CONFIG_ENABLE: Enable config for the TID | ||
| 4796 | * @NL80211_TID_CONFIG_DISABLE: Disable config for the TID | ||
| 4797 | */ | ||
| 4798 | enum nl80211_tid_config { | ||
| 4799 | NL80211_TID_CONFIG_ENABLE, | ||
| 4800 | NL80211_TID_CONFIG_DISABLE, | ||
| 4801 | }; | ||
| 4802 | |||
| 4803 | /* enum nl80211_tid_config_attr - TID specific configuration. | ||
| 4804 | * @NL80211_TID_CONFIG_ATTR_PAD: pad attribute for 64-bit values | ||
| 4805 | * @NL80211_TID_CONFIG_ATTR_VIF_SUPP: a bitmap (u64) of attributes supported | ||
| 4806 | * for per-vif configuration; doesn't list the ones that are generic | ||
| 4807 | * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE). | ||
| 4808 | * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but | ||
| 4809 | * per peer instead. | ||
| 4810 | * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if no peer | ||
| 4811 | * is selected, if set indicates that the new configuration overrides | ||
| 4812 | * all previous peer configurations, otherwise previous peer specific | ||
| 4813 | * configurations should be left untouched. If peer is selected then | ||
| 4814 | * it will reset particular TID configuration of that peer and it will | ||
| 4815 | * not accept other TID config attributes along with peer. | ||
| 4816 | * @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7) | ||
| 4817 | * Its type is u16. | ||
| 4818 | * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID. | ||
| 4819 | * specified in %NL80211_TID_CONFIG_ATTR_TID. see %enum nl80211_tid_config. | ||
| 4820 | * Its type is u8. | ||
| 4821 | * @NL80211_TID_CONFIG_ATTR_RETRY_SHORT: Number of retries used with data frame | ||
| 4822 | * transmission, user-space sets this configuration in | ||
| 4823 | * &NL80211_CMD_SET_TID_CONFIG. It is u8 type, min value is 1 and | ||
| 4824 | * the max value is advertised by the driver in this attribute on | ||
| 4825 | * output in wiphy capabilities. | ||
| 4826 | * @NL80211_TID_CONFIG_ATTR_RETRY_LONG: Number of retries used with data frame | ||
| 4827 | * transmission, user-space sets this configuration in | ||
| 4828 | * &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and | ||
| 4829 | * the max value is advertised by the driver in this attribute on | ||
| 4830 | * output in wiphy capabilities. | ||
| 4831 | * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable aggregation for the TIDs | ||
| 4832 | * specified in %NL80211_TID_CONFIG_ATTR_TIDS. Its type is u8, using | ||
| 4833 | * the values from &nl80211_tid_config. | ||
| 4834 | * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs | ||
| 4835 | * specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using | ||
| 4836 | * the values from &nl80211_tid_config. | ||
| 4837 | */ | ||
| 4838 | enum nl80211_tid_config_attr { | ||
| 4839 | __NL80211_TID_CONFIG_ATTR_INVALID, | ||
| 4840 | NL80211_TID_CONFIG_ATTR_PAD, | ||
| 4841 | NL80211_TID_CONFIG_ATTR_VIF_SUPP, | ||
| 4842 | NL80211_TID_CONFIG_ATTR_PEER_SUPP, | ||
| 4843 | NL80211_TID_CONFIG_ATTR_OVERRIDE, | ||
| 4844 | NL80211_TID_CONFIG_ATTR_TIDS, | ||
| 4845 | NL80211_TID_CONFIG_ATTR_NOACK, | ||
| 4846 | NL80211_TID_CONFIG_ATTR_RETRY_SHORT, | ||
| 4847 | NL80211_TID_CONFIG_ATTR_RETRY_LONG, | ||
| 4848 | NL80211_TID_CONFIG_ATTR_AMPDU_CTRL, | ||
| 4849 | NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL, | ||
| 4850 | |||
| 4851 | /* keep last */ | ||
| 4852 | __NL80211_TID_CONFIG_ATTR_AFTER_LAST, | ||
| 4853 | NL80211_TID_CONFIG_ATTR_MAX = __NL80211_TID_CONFIG_ATTR_AFTER_LAST - 1 | ||
| 4854 | }; | ||
| 4855 | |||
| 4705 | /** | 4856 | /** |
| 4706 | * enum nl80211_packet_pattern_attr - packet pattern attribute | 4857 | * enum nl80211_packet_pattern_attr - packet pattern attribute |
| 4707 | * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute | 4858 | * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute |
| @@ -5521,6 +5672,18 @@ enum nl80211_feature_flags { · 813 unmodified lines | |||
| 5521 | * feature, which prevents bufferbloat by using the expected transmission | 5672 | * feature, which prevents bufferbloat by using the expected transmission |
| 5522 | * time to limit the amount of data buffered in the hardware. | 5673 | * time to limit the amount of data buffered in the hardware. |
| 5523 | * | 5674 | * |
| 5675 | * @NL80211_EXT_FEATURE_BEACON_PROTECTION: The driver supports Beacon protection | ||
| 5676 | * and can receive key configuration for BIGTK using key indexes 6 and 7. | ||
| 5677 | * | ||
| 5678 | * @NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH: The driver can disable the | ||
| 5679 | * forwarding of preauth frames over the control port. They are then | ||
| 5680 | * handled as ordinary data frames. | ||
| 5681 | * | ||
| 5682 | * @NL80211_EXT_FEATURE_PROTECTED_TWT: Driver supports protected TWT frames | ||
| 5683 | * | ||
| 5684 | * @NL80211_EXT_FEATURE_DEL_IBSS_STA: The driver supports removing stations | ||
| 5685 | * in IBSS mode, essentially by dropping their state. | ||
| 5686 | * | ||
| 5524 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 5687 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 5525 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 5688 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 5526 | */ | 5689 | */ |
| @@ -5568,6 +5731,10 @@ enum nl80211_ext_feature_index { · 41 unmodified lines | |||
| 5568 | NL80211_EXT_FEATURE_SAE_OFFLOAD, | 5731 | NL80211_EXT_FEATURE_SAE_OFFLOAD, |
| 5569 | NL80211_EXT_FEATURE_VLAN_OFFLOAD, | 5732 | NL80211_EXT_FEATURE_VLAN_OFFLOAD, |
| 5570 | NL80211_EXT_FEATURE_AQL, | 5733 | NL80211_EXT_FEATURE_AQL, |
| 5734 | NL80211_EXT_FEATURE_BEACON_PROTECTION, | ||
| 5735 | NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH, | ||
| 5736 | NL80211_EXT_FEATURE_PROTECTED_TWT, | ||
| 5737 | NL80211_EXT_FEATURE_DEL_IBSS_STA, | ||
| 5571 | 5738 | ||
| 5572 | /* add new features before the definition below */ | 5739 | /* add new features before the definition below */ |
| 5573 | NUM_NL80211_EXT_FEATURES, | 5740 | NUM_NL80211_EXT_FEATURES, |
| @@ -6190,12 +6357,14 @@ enum nl80211_ftm_responder_stats { · 616 unmodified lines | |||
| 6190 | * @NL80211_PREAMBLE_HT: HT preamble | 6357 | * @NL80211_PREAMBLE_HT: HT preamble |
| 6191 | * @NL80211_PREAMBLE_VHT: VHT preamble | 6358 | * @NL80211_PREAMBLE_VHT: VHT preamble |
| 6192 | * @NL80211_PREAMBLE_DMG: DMG preamble | 6359 | * @NL80211_PREAMBLE_DMG: DMG preamble |
| 6360 | * @NL80211_PREAMBLE_HE: HE preamble | ||
| 6193 | */ | 6361 | */ |
| 6194 | enum nl80211_preamble { | 6362 | enum nl80211_preamble { |
| 6195 | NL80211_PREAMBLE_LEGACY, | 6363 | NL80211_PREAMBLE_LEGACY, |
| 6196 | NL80211_PREAMBLE_HT, | 6364 | NL80211_PREAMBLE_HT, |
| 6197 | NL80211_PREAMBLE_VHT, | 6365 | NL80211_PREAMBLE_VHT, |
| 6198 | NL80211_PREAMBLE_DMG, | 6366 | NL80211_PREAMBLE_DMG, |
| 6367 | NL80211_PREAMBLE_HE, | ||
| 6199 | }; | 6368 | }; |
| 6200 | 6369 | ||
| 6201 | /** | 6370 | /** |
| @@ -6388,6 +6557,10 @@ enum nl80211_peer_measurement_attrs { · 186 unmodified lines | |||
| 6388 | * is valid) | 6557 | * is valid) |
| 6389 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST: u32 attribute indicating | 6558 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST: u32 attribute indicating |
| 6390 | * the maximum FTMs per burst (if not present anything is valid) | 6559 | * the maximum FTMs per burst (if not present anything is valid) |
| 6560 | * @NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED: flag attribute indicating if | ||
| 6561 | * trigger based ranging measurement is supported | ||
| 6562 | * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating | ||
| 6563 | * if non trigger based ranging measurement is supported | ||
| 6391 | * | 6564 | * |
| 6392 | * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal | 6565 | * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal |
| 6393 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number | 6566 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number |
| @@ -6403,6 +6576,8 @@ enum nl80211_peer_measurement_ftm_capa { · 9 unmodified lines | |||
| 6403 | NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS, | 6576 | NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS, |
| 6404 | NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT, | 6577 | NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT, |
| 6405 | NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST, | 6578 | NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST, |
| 6579 | NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED, | ||
| 6580 | NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED, | ||
| 6406 | 6581 | ||
| 6407 | /* keep last */ | 6582 | /* keep last */ |
| 6408 | NUM_NL80211_PMSR_FTM_CAPA_ATTR, | 6583 | NUM_NL80211_PMSR_FTM_CAPA_ATTR, |
| @@ -6432,6 +6607,20 @@ enum nl80211_peer_measurement_ftm_capa { · 23 unmodified lines | |||
| 6432 | * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI: request LCI data (flag) | 6607 | * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI: request LCI data (flag) |
| 6433 | * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC: request civic location data | 6608 | * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC: request civic location data |
| 6434 | * (flag) | 6609 | * (flag) |
| 6610 | * @NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED: request trigger based ranging | ||
| 6611 | * measurement (flag). | ||
| 6612 | * This attribute and %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED are | ||
| 6613 | * mutually exclusive. | ||
| 6614 | * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor | ||
| 6615 | * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based | ||
| 6616 | * ranging will be used. | ||
| 6617 | * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non trigger based | ||
| 6618 | * ranging measurement (flag) | ||
| 6619 | * This attribute and %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED are | ||
| 6620 | * mutually exclusive. | ||
| 6621 | * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor | ||
| 6622 | * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based | ||
| 6623 | * ranging will be used. | ||
| 6435 | * | 6624 | * |
| 6436 | * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal | 6625 | * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal |
| 6437 | * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number | 6626 | * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number |
| @@ -6448,6 +6637,8 @@ enum nl80211_peer_measurement_ftm_req { · 10 unmodified lines | |||
| 6448 | NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES, | 6637 | NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES, |
| 6449 | NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI, | 6638 | NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI, |
| 6450 | NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC, | 6639 | NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC, |
| 6640 | NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED, | ||
| 6641 | NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED, | ||
| 6451 | 6642 | ||
| 6452 | /* keep last */ | 6643 | /* keep last */ |
| 6453 | NUM_NL80211_PMSR_FTM_REQ_ATTR, | 6644 | NUM_NL80211_PMSR_FTM_REQ_ATTR, |
| @@ -6587,5 +6778,51 @@ enum nl80211_obss_pd_attributes { · 133 unmodified lines | |||
| 6587 | NL80211_HE_OBSS_PD_ATTR_MAX = __NL80211_HE_OBSS_PD_ATTR_LAST - 1, | 6778 | NL80211_HE_OBSS_PD_ATTR_MAX = __NL80211_HE_OBSS_PD_ATTR_LAST - 1, |
| 6588 | }; | 6779 | }; |
| 6589 | 6780 | ||
| 6781 | /** | ||
| 6782 | * enum nl80211_bss_color_attributes - BSS Color attributes | ||
| 6783 | * @__NL80211_HE_BSS_COLOR_ATTR_INVALID: Invalid | ||
| 6784 | * | ||
| 6785 | * @NL80211_HE_BSS_COLOR_ATTR_COLOR: the current BSS Color. | ||
| 6786 | * @NL80211_HE_BSS_COLOR_ATTR_DISABLED: is BSS coloring disabled. | ||
| 6787 | * @NL80211_HE_BSS_COLOR_ATTR_PARTIAL: the AID equation to be used.. | ||
| 6788 | * | ||
| 6789 | * @__NL80211_HE_BSS_COLOR_ATTR_LAST: Internal | ||
| 6790 | * @NL80211_HE_BSS_COLOR_ATTR_MAX: highest BSS Color attribute. | ||
| 6791 | */ | ||
| 6792 | enum nl80211_bss_color_attributes { | ||
| 6793 | __NL80211_HE_BSS_COLOR_ATTR_INVALID, | ||
| 6794 | |||
| 6795 | NL80211_HE_BSS_COLOR_ATTR_COLOR, | ||
| 6796 | NL80211_HE_BSS_COLOR_ATTR_DISABLED, | ||
| 6797 | NL80211_HE_BSS_COLOR_ATTR_PARTIAL, | ||
| 6798 | |||
| 6799 | /* keep last */ | ||
| 6800 | __NL80211_HE_BSS_COLOR_ATTR_LAST, | ||
| 6801 | NL80211_HE_BSS_COLOR_ATTR_MAX = __NL80211_HE_BSS_COLOR_ATTR_LAST - 1, | ||
| 6802 | }; | ||
| 6803 | |||
| 6804 | /** | ||
| 6805 | * enum nl80211_iftype_akm_attributes - interface type AKM attributes | ||
| 6806 | * @__NL80211_IFTYPE_AKM_ATTR_INVALID: Invalid | ||
| 6807 | * | ||
| 6808 | * @NL80211_IFTYPE_AKM_ATTR_IFTYPES: nested attribute containing a flag | ||
| 6809 | * attribute for each interface type that supports AKM suites specified in | ||
| 6810 | * %NL80211_IFTYPE_AKM_ATTR_SUITES | ||
| 6811 | * @NL80211_IFTYPE_AKM_ATTR_SUITES: an array of u32. Used to indicate supported | ||
| 6812 | * AKM suites for the specified interface types. | ||
| 6813 | * | ||
| 6814 | * @__NL80211_IFTYPE_AKM_ATTR_LAST: Internal | ||
| 6815 | * @NL80211_IFTYPE_AKM_ATTR_MAX: highest interface type AKM attribute. | ||
| 6816 | */ | ||
| 6817 | enum nl80211_iftype_akm_attributes { | ||
| 6818 | __NL80211_IFTYPE_AKM_ATTR_INVALID, | ||
| 6819 | |||
| 6820 | NL80211_IFTYPE_AKM_ATTR_IFTYPES, | ||
| 6821 | NL80211_IFTYPE_AKM_ATTR_SUITES, | ||
| 6822 | |||
| 6823 | /* keep last */ | ||
| 6824 | __NL80211_IFTYPE_AKM_ATTR_LAST, | ||
| 6825 | NL80211_IFTYPE_AKM_ATTR_MAX = __NL80211_IFTYPE_AKM_ATTR_LAST - 1, | ||
| 6826 | }; | ||
| 6590 | 6827 | ||
| 6591 | #endif /* __LINUX_NL80211_H */ | 6828 | #endif /* __LINUX_NL80211_H */ |
| @@ -958,6 +958,7 @@ enum ovs_action_attr { · 957 unmodified lines | |||
| 958 | OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */ | 958 | OVS_ACTION_ATTR_CLONE, /* Nested OVS_CLONE_ATTR_*. */ |
| 959 | OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */ | 959 | OVS_ACTION_ATTR_CHECK_PKT_LEN, /* Nested OVS_CHECK_PKT_LEN_ATTR_*. */ |
| 960 | OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */ | 960 | OVS_ACTION_ATTR_ADD_MPLS, /* struct ovs_action_add_mpls. */ |
| 961 | OVS_ACTION_ATTR_DEC_TTL, /* Nested OVS_DEC_TTL_ATTR_*. */ | ||
| 961 | 962 | ||
| 962 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted | 963 | __OVS_ACTION_ATTR_MAX, /* Nothing past this will be accepted |
| 963 | * from userspace. */ | 964 | * from userspace. */ |
| @@ -1050,4 +1051,10 @@ struct ovs_zone_limit { · 86 unmodified lines | |||
| 1050 | __u32 count; | 1051 | __u32 count; |
| 1051 | }; | 1052 | }; |
| 1052 | 1053 | ||
| 1054 | enum ovs_dec_ttl_attr { | ||
| 1055 | OVS_DEC_TTL_ATTR_UNSPEC, | ||
| 1056 | OVS_DEC_TTL_ATTR_ACTION, /* Nested struct nlattr */ | ||
| 1057 | __OVS_DEC_TTL_ATTR_MAX | ||
| 1058 | }; | ||
| 1059 | |||
| 1053 | #endif /* _LINUX_OPENVSWITCH_H */ | 1060 | #endif /* _LINUX_OPENVSWITCH_H */ |
| @@ -605,6 +605,7 @@ · 604 unmodified lines | |||
| 605 | #define PCI_EXP_SLTCTL_PWR_OFF 0x0400 /* Power Off */ | 605 | #define PCI_EXP_SLTCTL_PWR_OFF 0x0400 /* Power Off */ |
| 606 | #define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */ | 606 | #define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */ |
| 607 | #define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */ | 607 | #define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */ |
| 608 | #define PCI_EXP_SLTCTL_IBPD_DISABLE 0x4000 /* In-band PD disable */ | ||
| 608 | #define PCI_EXP_SLTSTA 26 /* Slot Status */ | 609 | #define PCI_EXP_SLTSTA 26 /* Slot Status */ |
| 609 | #define PCI_EXP_SLTSTA_ABP 0x0001 /* Attention Button Pressed */ | 610 | #define PCI_EXP_SLTSTA_ABP 0x0001 /* Attention Button Pressed */ |
| 610 | #define PCI_EXP_SLTSTA_PFD 0x0002 /* Power Fault Detected */ | 611 | #define PCI_EXP_SLTSTA_PFD 0x0002 /* Power Fault Detected */ |
| @@ -680,6 +681,7 @@ · 69 unmodified lines | |||
| 680 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ | 681 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ |
| 681 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */ | 682 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */ |
| 682 | #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ | 683 | #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ |
| 684 | #define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */ | ||
| 683 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ | 685 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ |
| 684 | #define PCI_EXP_SLTSTA2 58 /* Slot Status 2 */ | 686 | #define PCI_EXP_SLTSTA2 58 /* Slot Status 2 */ |
| 685 | 687 | ||
| @@ -19,5 +19,13 @@ · 18 unmodified lines | |||
| 19 | #define PCITEST_MSIX _IOW('P', 0x7, int) | 19 | #define PCITEST_MSIX _IOW('P', 0x7, int) |
| 20 | #define PCITEST_SET_IRQTYPE _IOW('P', 0x8, int) | 20 | #define PCITEST_SET_IRQTYPE _IOW('P', 0x8, int) |
| 21 | #define PCITEST_GET_IRQTYPE _IO('P', 0x9) | 21 | #define PCITEST_GET_IRQTYPE _IO('P', 0x9) |
| 22 | #define PCITEST_CLEAR_IRQ _IO('P', 0x10) | ||
| 23 | |||
| 24 | #define PCITEST_FLAGS_USE_DMA 0x00000001 | ||
| 25 | |||
| 26 | struct pci_endpoint_test_xfer_param { | ||
| 27 | unsigned long size; | ||
| 28 | unsigned char flags; | ||
| 29 | }; | ||
| 22 | 30 | ||
| 23 | #endif /* __UAPI_LINUX_PCITEST_H */ | 31 | #endif /* __UAPI_LINUX_PCITEST_H */ |
| @@ -142,8 +142,9 @@ enum perf_event_sample_format { · 141 unmodified lines | |||
| 142 | PERF_SAMPLE_REGS_INTR = 1U << 18, | 142 | PERF_SAMPLE_REGS_INTR = 1U << 18, |
| 143 | PERF_SAMPLE_PHYS_ADDR = 1U << 19, | 143 | PERF_SAMPLE_PHYS_ADDR = 1U << 19, |
| 144 | PERF_SAMPLE_AUX = 1U << 20, | 144 | PERF_SAMPLE_AUX = 1U << 20, |
| 145 | PERF_SAMPLE_CGROUP = 1U << 21, | ||
| 145 | 146 | ||
| 146 | PERF_SAMPLE_MAX = 1U << 21, /* non-ABI */ | 147 | PERF_SAMPLE_MAX = 1U << 22, /* non-ABI */ |
| 147 | 148 | ||
| 148 | __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */ | 149 | __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /* non-ABI; internal use */ |
| 149 | }; | 150 | }; |
| @@ -181,6 +182,8 @@ enum perf_branch_sample_type_shift { · 31 unmodified lines | |||
| 181 | 182 | ||
| 182 | PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, /* save branch type */ | 183 | PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, /* save branch type */ |
| 183 | 184 | ||
| 185 | PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 17, /* save low level index of raw branch records */ | ||
| 186 | |||
| 184 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ | 187 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ |
| 185 | }; | 188 | }; |
| 186 | 189 | ||
| @@ -208,6 +211,8 @@ enum perf_branch_sample_type { · 21 unmodified lines | |||
| 208 | PERF_SAMPLE_BRANCH_TYPE_SAVE = | 211 | PERF_SAMPLE_BRANCH_TYPE_SAVE = |
| 209 | 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, | 212 | 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, |
| 210 | 213 | ||
| 214 | PERF_SAMPLE_BRANCH_HW_INDEX = 1U << PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT, | ||
| 215 | |||
| 211 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | 216 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, |
| 212 | }; | 217 | }; |
| 213 | 218 | ||
| @@ -377,7 +382,8 @@ struct perf_event_attr { · 163 unmodified lines | |||
| 377 | ksymbol : 1, /* include ksymbol events */ | 382 | ksymbol : 1, /* include ksymbol events */ |
| 378 | bpf_event : 1, /* include bpf events */ | 383 | bpf_event : 1, /* include bpf events */ |
| 379 | aux_output : 1, /* generate AUX records instead of events */ | 384 | aux_output : 1, /* generate AUX records instead of events */ |
| 380 | __reserved_1 : 32; | 385 | cgroup : 1, /* include cgroup events */ |
| 386 | __reserved_1 : 31; | ||
| 381 | 387 | ||
| 382 | union { | 388 | union { |
| 383 | __u32 wakeup_events; /* wakeup every n events */ | 389 | __u32 wakeup_events; /* wakeup every n events */ |
| @@ -853,7 +859,9 @@ enum perf_event_type { · 469 unmodified lines | |||
| 853 | * char data[size];}&& PERF_SAMPLE_RAW | 859 | * char data[size];}&& PERF_SAMPLE_RAW |
| 854 | * | 860 | * |
| 855 | * { u64 nr; | 861 | * { u64 nr; |
| 856 | * { u64 from, to, flags } lbr[nr];} && PERF_SAMPLE_BRANCH_STACK | 862 | * { u64 hw_idx; } && PERF_SAMPLE_BRANCH_HW_INDEX |
| 863 | * { u64 from, to, flags } lbr[nr]; | ||
| 864 | * } && PERF_SAMPLE_BRANCH_STACK | ||
| 857 | * | 865 | * |
| 858 | * { u64 abi; # enum perf_sample_regs_abi | 866 | * { u64 abi; # enum perf_sample_regs_abi |
| 859 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER | 867 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_USER |
| @@ -1006,6 +1014,16 @@ enum perf_event_type { · 146 unmodified lines | |||
| 1006 | */ | 1014 | */ |
| 1007 | PERF_RECORD_BPF_EVENT = 18, | 1015 | PERF_RECORD_BPF_EVENT = 18, |
| 1008 | 1016 | ||
| 1017 | /* | ||
| 1018 | * struct { | ||
| 1019 | * struct perf_event_header header; | ||
| 1020 | * u64 id; | ||
| 1021 | * char path[]; | ||
| 1022 | * struct sample_id sample_id; | ||
| 1023 | * }; | ||
| 1024 | */ | ||
| 1025 | PERF_RECORD_CGROUP = 19, | ||
| 1026 | |||
| 1009 | PERF_RECORD_MAX, /* non-ABI */ | 1027 | PERF_RECORD_MAX, /* non-ABI */ |
| 1010 | }; | 1028 | }; |
| 1011 | 1029 | ||
| @@ -17,6 +17,8 @@ enum { · 16 unmodified lines | |||
| 17 | TCA_ACT_PAD, | 17 | TCA_ACT_PAD, |
| 18 | TCA_ACT_COOKIE, | 18 | TCA_ACT_COOKIE, |
| 19 | TCA_ACT_FLAGS, | 19 | TCA_ACT_FLAGS, |
| 20 | TCA_ACT_HW_STATS, | ||
| 21 | TCA_ACT_USED_HW_STATS, | ||
| 20 | __TCA_ACT_MAX | 22 | __TCA_ACT_MAX |
| 21 | }; | 23 | }; |
| 22 | 24 | ||
| @@ -24,6 +26,26 @@ enum { · 1 unmodified line | |||
| 24 | * actions stats. | 26 | * actions stats. |
| 25 | */ | 27 | */ |
| 26 | 28 | ||
| 29 | /* tca HW stats type | ||
| 30 | * When user does not pass the attribute, he does not care. | ||
| 31 | * It is the same as if he would pass the attribute with | ||
| 32 | * all supported bits set. | ||
| 33 | * In case no bits are set, user is not interested in getting any HW statistics. | ||
| 34 | */ | ||
| 35 | #define TCA_ACT_HW_STATS_IMMEDIATE (1 << 0) /* Means that in dump, user | ||
| 36 | * gets the current HW stats | ||
| 37 | * state from the device | ||
| 38 | * queried at the dump time. | ||
| 39 | */ | ||
| 40 | #define TCA_ACT_HW_STATS_DELAYED (1 << 1) /* Means that in dump, user gets | ||
| 41 | * HW stats that might be out of date | ||
| 42 | * for some time, maybe couple of | ||
| 43 | * seconds. This is the case when | ||
| 44 | * driver polls stats updates | ||
| 45 | * periodically or when it gets async | ||
| 46 | * stats update from the device. | ||
| 47 | */ | ||
| 48 | |||
| 27 | #define TCA_ACT_MAX __TCA_ACT_MAX | 49 | #define TCA_ACT_MAX __TCA_ACT_MAX |
| 28 | #define TCA_OLD_COMPAT (TCA_ACT_MAX+1) | 50 | #define TCA_OLD_COMPAT (TCA_ACT_MAX+1) |
| 29 | #define TCA_ACT_MAX_PRIO 32 | 51 | #define TCA_ACT_MAX_PRIO 32 |
| @@ -256,6 +256,7 @@ enum { · 255 unmodified lines | |||
| 256 | TCA_RED_PARMS, | 256 | TCA_RED_PARMS, |
| 257 | TCA_RED_STAB, | 257 | TCA_RED_STAB, |
| 258 | TCA_RED_MAX_P, | 258 | TCA_RED_MAX_P, |
| 259 | TCA_RED_FLAGS, /* bitfield32 */ | ||
| 259 | __TCA_RED_MAX, | 260 | __TCA_RED_MAX, |
| 260 | }; | 261 | }; |
| 261 | 262 | ||
| @@ -268,12 +269,28 @@ struct tc_red_qopt { · 6 unmodified lines | |||
| 268 | unsigned char Wlog; /* log(W) */ | 269 | unsigned char Wlog; /* log(W) */ |
| 269 | unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ | 270 | unsigned char Plog; /* log(P_max/(qth_max-qth_min)) */ |
| 270 | unsigned char Scell_log; /* cell size for idle damping */ | 271 | unsigned char Scell_log; /* cell size for idle damping */ |
| 272 | |||
| 273 | /* This field can be used for flags that a RED-like qdisc has | ||
| 274 | * historically supported. E.g. when configuring RED, it can be used for | ||
| 275 | * ECN, HARDDROP and ADAPTATIVE. For SFQ it can be used for ECN, | ||
| 276 | * HARDDROP. Etc. Because this field has not been validated, and is | ||
| 277 | * copied back on dump, any bits besides those to which a given qdisc | ||
| 278 | * has assigned a historical meaning need to be considered for free use | ||
| 279 | * by userspace tools. | ||
| 280 | * | ||
| 281 | * Any further flags need to be passed differently, e.g. through an | ||
| 282 | * attribute (such as TCA_RED_FLAGS above). Such attribute should allow | ||
| 283 | * passing both recent and historic flags in one value. | ||
| 284 | */ | ||
| 271 | unsigned char flags; | 285 | unsigned char flags; |
| 272 | #define TC_RED_ECN 1 | 286 | #define TC_RED_ECN 1 |
| 273 | #define TC_RED_HARDDROP 2 | 287 | #define TC_RED_HARDDROP 2 |
| 274 | #define TC_RED_ADAPTATIVE 4 | 288 | #define TC_RED_ADAPTATIVE 4 |
| 289 | #define TC_RED_NODROP 8 | ||
| 275 | }; | 290 | }; |
| 276 | 291 | ||
| 292 | #define TC_RED_HISTORIC_FLAGS (TC_RED_ECN | TC_RED_HARDDROP | TC_RED_ADAPTATIVE) | ||
| 293 | |||
| 277 | struct tc_red_xstats { | 294 | struct tc_red_xstats { |
| 278 | __u32 early; /* Early drops */ | 295 | __u32 early; /* Early drops */ |
| 279 | __u32 pdrop; /* Drops due to queue limits */ | 296 | __u32 pdrop; /* Drops due to queue limits */ |
| @@ -894,6 +911,8 @@ enum { · 614 unmodified lines | |||
| 894 | 911 | ||
| 895 | TCA_FQ_CE_THRESHOLD, /* DCTCP-like CE-marking threshold */ | 912 | TCA_FQ_CE_THRESHOLD, /* DCTCP-like CE-marking threshold */ |
| 896 | 913 | ||
| 914 | TCA_FQ_TIMER_SLACK, /* timer slack */ | ||
| 915 | |||
| 897 | __TCA_FQ_MAX | 916 | __TCA_FQ_MAX |
| 898 | }; | 917 | }; |
| 899 | 918 | ||
| @@ -1197,8 +1216,8 @@ enum { · 297 unmodified lines | |||
| 1197 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL] | 1216 | * [TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL] |
| 1198 | */ | 1217 | */ |
| 1199 | 1218 | ||
| 1200 | #define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST BIT(0) | 1219 | #define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST _BITUL(0) |
| 1201 | #define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD BIT(1) | 1220 | #define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD _BITUL(1) |
| 1202 | 1221 | ||
| 1203 | enum { | 1222 | enum { |
| 1204 | TCA_TAPRIO_ATTR_UNSPEC, | 1223 | TCA_TAPRIO_ATTR_UNSPEC, |
| @@ -0,0 +1,48 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * IPv6 RPL-SR implementation | ||
| 4 | * | ||
| 5 | * Author: | ||
| 6 | * (C) 2020 Alexander Aring <alex.aring@gmail.com> | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _UAPI_LINUX_RPL_H | ||
| 10 | #define _UAPI_LINUX_RPL_H | ||
| 11 | |||
| 12 | #include <asm/byteorder.h> | ||
| 13 | #include <linux/types.h> | ||
| 14 | #include <linux/in6.h> | ||
| 15 | |||
| 16 | /* | ||
| 17 | * RPL SR Header | ||
| 18 | */ | ||
| 19 | struct ipv6_rpl_sr_hdr { | ||
| 20 | __u8 nexthdr; | ||
| 21 | __u8 hdrlen; | ||
| 22 | __u8 type; | ||
| 23 | __u8 segments_left; | ||
| 24 | #if defined(__LITTLE_ENDIAN_BITFIELD) | ||
| 25 | __u32 cmpre:4, | ||
| 26 | cmpri:4, | ||
| 27 | reserved:4, | ||
| 28 | pad:4, | ||
| 29 | reserved1:16; | ||
| 30 | #elif defined(__BIG_ENDIAN_BITFIELD) | ||
| 31 | __u32 reserved:20, | ||
| 32 | pad:4, | ||
| 33 | cmpri:4, | ||
| 34 | cmpre:4; | ||
| 35 | #else | ||
| 36 | #error "Please fix <asm/byteorder.h>" | ||
| 37 | #endif | ||
| 38 | |||
| 39 | union { | ||
| 40 | struct in6_addr addr[0]; | ||
| 41 | __u8 data[0]; | ||
| 42 | } segments; | ||
| 43 | } __attribute__((packed)); | ||
| 44 | |||
| 45 | #define rpl_segaddr segments.addr | ||
| 46 | #define rpl_segdata segments.data | ||
| 47 | |||
| 48 | #endif | ||
| @@ -0,0 +1,21 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * IPv6 RPL-SR implementation | ||
| 4 | * | ||
| 5 | * Author: | ||
| 6 | * (C) 2020 Alexander Aring <alex.aring@gmail.com> | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _UAPI_LINUX_RPL_IPTUNNEL_H | ||
| 10 | #define _UAPI_LINUX_RPL_IPTUNNEL_H | ||
| 11 | |||
| 12 | enum { | ||
| 13 | RPL_IPTUNNEL_UNSPEC, | ||
| 14 | RPL_IPTUNNEL_SRH, | ||
| 15 | __RPL_IPTUNNEL_MAX, | ||
| 16 | }; | ||
| 17 | #define RPL_IPTUNNEL_MAX (__RPL_IPTUNNEL_MAX - 1) | ||
| 18 | |||
| 19 | #define RPL_IPTUNNEL_SRH_SIZE(srh) (((srh)->hdrlen + 1) << 3) | ||
| 20 | |||
| 21 | #endif | ||
| @@ -12,6 +12,9 @@ · 11 unmodified lines | |||
| 12 | #ifndef _UAPI_LINUX_RTC_H_ | 12 | #ifndef _UAPI_LINUX_RTC_H_ |
| 13 | #define _UAPI_LINUX_RTC_H_ | 13 | #define _UAPI_LINUX_RTC_H_ |
| 14 | 14 | ||
| 15 | #include <linux/const.h> | ||
| 16 | #include <linux/ioctl.h> | ||
| 17 | |||
| 15 | /* | 18 | /* |
| 16 | * The struct used to pass data via the following ioctl. Similar to the | 19 | * The struct used to pass data via the following ioctl. Similar to the |
| 17 | * struct tm in <time.h>, but it needs to be here so that the kernel | 20 | * struct tm in <time.h>, but it needs to be here so that the kernel |
| @@ -92,10 +95,10 @@ struct rtc_pll_info { · 74 unmodified lines | |||
| 92 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ | 95 | #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ |
| 93 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ | 96 | #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ |
| 94 | 97 | ||
| 95 | #define RTC_VL_DATA_INVALID BIT(0) /* Voltage too low, RTC data is invalid */ | 98 | #define RTC_VL_DATA_INVALID _BITUL(0) /* Voltage too low, RTC data is invalid */ |
| 96 | #define RTC_VL_BACKUP_LOW BIT(1) /* Backup voltage is low */ | 99 | #define RTC_VL_BACKUP_LOW _BITUL(1) /* Backup voltage is low */ |
| 97 | #define RTC_VL_BACKUP_EMPTY BIT(2) /* Backup empty or not present */ | 100 | #define RTC_VL_BACKUP_EMPTY _BITUL(2) /* Backup empty or not present */ |
| 98 | #define RTC_VL_ACCURACY_LOW BIT(3) /* Voltage is low, RTC accuracy is reduced */ | 101 | #define RTC_VL_ACCURACY_LOW _BITUL(3) /* Voltage is low, RTC accuracy is reduced */ |
| 99 | 102 | ||
| 100 | #define RTC_VL_READ _IOR('p', 0x13, unsigned int) /* Voltage low detection */ | 103 | #define RTC_VL_READ _IOR('p', 0x13, unsigned int) /* Voltage low detection */ |
| 101 | #define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */ | 104 | #define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */ |
| @@ -35,6 +35,7 @@ · 34 unmodified lines | |||
| 35 | 35 | ||
| 36 | /* Flags for the clone3() syscall. */ | 36 | /* Flags for the clone3() syscall. */ |
| 37 | #define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ | 37 | #define CLONE_CLEAR_SIGHAND 0x100000000ULL /* Clear any signal handler and reset to SIG_DFL. */ |
| 38 | #define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */ | ||
| 38 | 39 | ||
| 39 | /* | 40 | /* |
| 40 | * cloning flags intersect with CSIGNAL so can be used with unshare and clone3 | 41 | * cloning flags intersect with CSIGNAL so can be used with unshare and clone3 |
| @@ -81,6 +82,8 @@ · 40 unmodified lines | |||
| 81 | * @set_tid_size: This defines the size of the array referenced | 82 | * @set_tid_size: This defines the size of the array referenced |
| 82 | * in @set_tid. This cannot be larger than the | 83 | * in @set_tid. This cannot be larger than the |
| 83 | * kernel's limit of nested PID namespaces. | 84 | * kernel's limit of nested PID namespaces. |
| 85 | * @cgroup: If CLONE_INTO_CGROUP is specified set this to | ||
| 86 | * a file descriptor for the cgroup. | ||
| 84 | * | 87 | * |
| 85 | * The structure is versioned by size and thus extensible. | 88 | * The structure is versioned by size and thus extensible. |
| 86 | * New struct members must go at the end of the struct and | 89 | * New struct members must go at the end of the struct and |
| @@ -97,11 +100,13 @@ struct clone_args { · 10 unmodified lines | |||
| 97 | __aligned_u64 tls; | 100 | __aligned_u64 tls; |
| 98 | __aligned_u64 set_tid; | 101 | __aligned_u64 set_tid; |
| 99 | __aligned_u64 set_tid_size; | 102 | __aligned_u64 set_tid_size; |
| 103 | __aligned_u64 cgroup; | ||
| 100 | }; | 104 | }; |
| 101 | #endif | 105 | #endif |
| 102 | 106 | ||
| 103 | #define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */ | 107 | #define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */ |
| 104 | #define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */ | 108 | #define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */ |
| 109 | #define CLONE_ARGS_SIZE_VER2 88 /* sizeof third published struct */ | ||
| 105 | 110 | ||
| 106 | /* | 111 | /* |
| 107 | * Scheduling policies | 112 | * Scheduling policies |
| @@ -22,6 +22,7 @@ · 21 unmodified lines | |||
| 22 | #define SECCOMP_FILTER_FLAG_LOG (1UL << 1) | 22 | #define SECCOMP_FILTER_FLAG_LOG (1UL << 1) |
| 23 | #define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1UL << 2) | 23 | #define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1UL << 2) |
| 24 | #define SECCOMP_FILTER_FLAG_NEW_LISTENER (1UL << 3) | 24 | #define SECCOMP_FILTER_FLAG_NEW_LISTENER (1UL << 3) |
| 25 | #define SECCOMP_FILTER_FLAG_TSYNC_ESRCH (1UL << 4) | ||
| 25 | 26 | ||
| 26 | /* | 27 | /* |
| 27 | * All BPF programs must return a 32-bit value. | 28 | * All BPF programs must return a 32-bit value. |
| @@ -9,7 +9,7 @@ · 8 unmodified lines | |||
| 9 | #ifndef _UAPI_SERIO_H | 9 | #ifndef _UAPI_SERIO_H |
| 10 | #define _UAPI_SERIO_H | 10 | #define _UAPI_SERIO_H |
| 11 | 11 | ||
| 12 | 12 | #include <linux/const.h> | |
| 13 | #include <linux/ioctl.h> | 13 | #include <linux/ioctl.h> |
| 14 | 14 | ||
| 15 | #define SPIOCSTYPE _IOW('q', 0x01, unsigned long) | 15 | #define SPIOCSTYPE _IOW('q', 0x01, unsigned long) |
| @@ -18,10 +18,10 @@ · 2 unmodified lines | |||
| 18 | /* | 18 | /* |
| 19 | * bit masks for use in "interrupt" flags (3rd argument) | 19 | * bit masks for use in "interrupt" flags (3rd argument) |
| 20 | */ | 20 | */ |
| 21 | #define SERIO_TIMEOUT BIT(0) | 21 | #define SERIO_TIMEOUT _BITUL(0) |
| 22 | #define SERIO_PARITY BIT(1) | 22 | #define SERIO_PARITY _BITUL(1) |
| 23 | #define SERIO_FRAME BIT(2) | 23 | #define SERIO_FRAME _BITUL(2) |
| 24 | #define SERIO_OOB_DATA BIT(3) | 24 | #define SERIO_OOB_DATA _BITUL(3) |
| 25 | 25 | ||
| 26 | /* | 26 | /* |
| 27 | * Serio types | 27 | * Serio types |
| @@ -36,4 +36,30 @@ enum sknetlink_groups { · 35 unmodified lines | |||
| 36 | }; | 36 | }; |
| 37 | #define SKNLGRP_MAX (__SKNLGRP_MAX - 1) | 37 | #define SKNLGRP_MAX (__SKNLGRP_MAX - 1) |
| 38 | 38 | ||
| 39 | enum { | ||
| 40 | SK_DIAG_BPF_STORAGE_REQ_NONE, | ||
| 41 | SK_DIAG_BPF_STORAGE_REQ_MAP_FD, | ||
| 42 | __SK_DIAG_BPF_STORAGE_REQ_MAX, | ||
| 43 | }; | ||
| 44 | |||
| 45 | #define SK_DIAG_BPF_STORAGE_REQ_MAX (__SK_DIAG_BPF_STORAGE_REQ_MAX - 1) | ||
| 46 | |||
| 47 | enum { | ||
| 48 | SK_DIAG_BPF_STORAGE_REP_NONE, | ||
| 49 | SK_DIAG_BPF_STORAGE, | ||
| 50 | __SK_DIAG_BPF_STORAGE_REP_MAX, | ||
| 51 | }; | ||
| 52 | |||
| 53 | #define SK_DIAB_BPF_STORAGE_REP_MAX (__SK_DIAG_BPF_STORAGE_REP_MAX - 1) | ||
| 54 | |||
| 55 | enum { | ||
| 56 | SK_DIAG_BPF_STORAGE_NONE, | ||
| 57 | SK_DIAG_BPF_STORAGE_PAD, | ||
| 58 | SK_DIAG_BPF_STORAGE_MAP_ID, | ||
| 59 | SK_DIAG_BPF_STORAGE_MAP_VALUE, | ||
| 60 | __SK_DIAG_BPF_STORAGE_MAX, | ||
| 61 | }; | ||
| 62 | |||
| 63 | #define SK_DIAG_BPF_STORAGE_MAX (__SK_DIAG_BPF_STORAGE_MAX - 1) | ||
| 64 | |||
| 39 | #endif /* _UAPI__SOCK_DIAG_H__ */ | 65 | #endif /* _UAPI__SOCK_DIAG_H__ */ |
| @@ -135,9 +135,9 @@ static inline __attribute_const__ __u32 __fswahb32(__u32 val) · 134 unmodified lines | |||
| 135 | 135 | ||
| 136 | static __always_inline unsigned long __swab(const unsigned long y) | 136 | static __always_inline unsigned long __swab(const unsigned long y) |
| 137 | { | 137 | { |
| 138 | #if BITS_PER_LONG == 64 | 138 | #if __BITS_PER_LONG == 64 |
| 139 | return __swab64(y); | 139 | return __swab64(y); |
| 140 | #else /* BITS_PER_LONG == 32 */ | 140 | #else /* __BITS_PER_LONG == 32 */ |
| 141 | return __swab32(y); | 141 | return __swab32(y); |
| 142 | #endif | 142 | #endif |
| 143 | } | 143 | } |
| @@ -312,6 +312,7 @@ enum { · 311 unmodified lines | |||
| 312 | TCP_NLA_REORD_SEEN, /* reordering events seen */ | 312 | TCP_NLA_REORD_SEEN, /* reordering events seen */ |
| 313 | TCP_NLA_SRTT, /* smoothed RTT in usecs */ | 313 | TCP_NLA_SRTT, /* smoothed RTT in usecs */ |
| 314 | TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */ | 314 | TCP_NLA_TIMEOUT_REHASH, /* Timeout-triggered rehash attempts */ |
| 315 | TCP_NLA_BYTES_NOTSENT, /* Bytes in write queue not yet sent */ | ||
| 315 | }; | 316 | }; |
| 316 | 317 | ||
| 317 | /* for TCP_MD5SIG socket option */ | 318 | /* for TCP_MD5SIG socket option */ |
| @@ -345,5 +346,7 @@ struct tcp_zerocopy_receive { · 27 unmodified lines | |||
| 345 | __u64 address; /* in: address of mapping */ | 346 | __u64 address; /* in: address of mapping */ |
| 346 | __u32 length; /* in/out: number of bytes to map/mapped */ | 347 | __u32 length; /* in/out: number of bytes to map/mapped */ |
| 347 | __u32 recv_skip_hint; /* out: amount of bytes to skip */ | 348 | __u32 recv_skip_hint; /* out: amount of bytes to skip */ |
| 349 | __u32 inq; /* out: amount of bytes in read queue */ | ||
| 350 | __s32 err; /* out: socket error */ | ||
| 348 | }; | 351 | }; |
| 349 | #endif /* _UAPI_LINUX_TCP_H */ | 352 | #endif /* _UAPI_LINUX_TCP_H */ |
| @@ -5,6 +5,7 @@ · 4 unmodified lines | |||
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | #include <linux/time_types.h> | 6 | #include <linux/time_types.h> |
| 7 | 7 | ||
| 8 | #ifndef __KERNEL__ | ||
| 8 | #ifndef _STRUCT_TIMESPEC | 9 | #ifndef _STRUCT_TIMESPEC |
| 9 | #define _STRUCT_TIMESPEC | 10 | #define _STRUCT_TIMESPEC |
| 10 | struct timespec { | 11 | struct timespec { |
| @@ -18,6 +19,17 @@ struct timeval { · 7 unmodified lines | |||
| 18 | __kernel_suseconds_t tv_usec; /* microseconds */ | 19 | __kernel_suseconds_t tv_usec; /* microseconds */ |
| 19 | }; | 20 | }; |
| 20 | 21 | ||
| 22 | struct itimerspec { | ||
| 23 | struct timespec it_interval;/* timer period */ | ||
| 24 | struct timespec it_value; /* timer expiration */ | ||
| 25 | }; | ||
| 26 | |||
| 27 | struct itimerval { | ||
| 28 | struct timeval it_interval;/* timer interval */ | ||
| 29 | struct timeval it_value; /* current value */ | ||
| 30 | }; | ||
| 31 | #endif | ||
| 32 | |||
| 21 | struct timezone { | 33 | struct timezone { |
| 22 | int tz_minuteswest; /* minutes west of Greenwich */ | 34 | int tz_minuteswest; /* minutes west of Greenwich */ |
| 23 | int tz_dsttime; /* type of dst correction */ | 35 | int tz_dsttime; /* type of dst correction */ |
| @@ -31,16 +43,6 @@ struct timezone { · 7 unmodified lines | |||
| 31 | #define ITIMER_VIRTUAL 1 | 43 | #define ITIMER_VIRTUAL 1 |
| 32 | #define ITIMER_PROF 2 | 44 | #define ITIMER_PROF 2 |
| 33 | 45 | ||
| 34 | struct itimerspec { | ||
| 35 | struct timespec it_interval; /* timer period */ | ||
| 36 | struct timespec it_value; /* timer expiration */ | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct itimerval { | ||
| 40 | struct timeval it_interval; /* timer interval */ | ||
| 41 | struct timeval it_value; /* current value */ | ||
| 42 | }; | ||
| 43 | |||
| 44 | /* | 46 | /* |
| 45 | * The IDs of the various system clocks (for POSIX.1b interval timers): | 47 | * The IDs of the various system clocks (for POSIX.1b interval timers): |
| 46 | */ | 48 | */ |
| @@ -0,0 +1,128 @@ | |||
| 1 | /* | ||
| 2 | * Permission to use, copy, modify, and/or distribute this software for any | ||
| 3 | * purpose with or without fee is hereby granted, provided that the above | ||
| 4 | * copyright notice and this permission notice appear in all copies. | ||
| 5 | * | ||
| 6 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 7 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 8 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 9 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 10 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 11 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 12 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 13 | * | ||
| 14 | * Copyright (C) 2019 Intel Corporation | ||
| 15 | */ | ||
| 16 | #ifndef _UAPI_LINUX_UM_TIMETRAVEL_H | ||
| 17 | #define _UAPI_LINUX_UM_TIMETRAVEL_H | ||
| 18 | #include <linux/types.h> | ||
| 19 | |||
| 20 | /** | ||
| 21 | * struct um_timetravel_msg - UM time travel message | ||
| 22 | * | ||
| 23 | * This is the basic message type, going in both directions. | ||
| 24 | * | ||
| 25 | * This is the message passed between the host (user-mode Linux instance) | ||
| 26 | * and the calendar (the application on the other side of the socket) in | ||
| 27 | * order to implement common scheduling. | ||
| 28 | * | ||
| 29 | * Whenever UML has an event it will request runtime for it from the | ||
| 30 | * calendar, and then wait for its turn until it can run, etc. Note | ||
| 31 | * that it will only ever request the single next runtime, i.e. multiple | ||
| 32 | * REQUEST messages override each other. | ||
| 33 | */ | ||
| 34 | struct um_timetravel_msg { | ||
| 35 | /** | ||
| 36 | * @op: operation value from &enum um_timetravel_ops | ||
| 37 | */ | ||
| 38 | __u32 op; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * @seq: sequence number for the message - shall be reflected in | ||
| 42 | * the ACK response, and should be checked while processing | ||
| 43 | * the response to see if it matches | ||
| 44 | */ | ||
| 45 | __u32 seq; | ||
| 46 | |||
| 47 | /** | ||
| 48 | * @time: time in nanoseconds | ||
| 49 | */ | ||
| 50 | __u64 time; | ||
| 51 | }; | ||
| 52 | |||
| 53 | /** | ||
| 54 | * enum um_timetravel_ops - Operation codes | ||
| 55 | */ | ||
| 56 | enum um_timetravel_ops { | ||
| 57 | /** | ||
| 58 | * @UM_TIMETRAVEL_ACK: response (ACK) to any previous message, | ||
| 59 | * this usually doesn't carry any data in the 'time' field | ||
| 60 | * unless otherwise specified below | ||
| 61 | */ | ||
| 62 | UM_TIMETRAVEL_ACK = 0, | ||
| 63 | |||
| 64 | /** | ||
| 65 | * @UM_TIMETRAVEL_START: initialize the connection, the time | ||
| 66 | * field contains an (arbitrary) ID to possibly be able | ||
| 67 | * to distinguish the connections. | ||
| 68 | */ | ||
| 69 | UM_TIMETRAVEL_START = 1, | ||
| 70 | |||
| 71 | /** | ||
| 72 | * @UM_TIMETRAVEL_REQUEST: request to run at the given time | ||
| 73 | * (host -> calendar) | ||
| 74 | */ | ||
| 75 | UM_TIMETRAVEL_REQUEST = 2, | ||
| 76 | |||
| 77 | /** | ||
| 78 | * @UM_TIMETRAVEL_WAIT: Indicate waiting for the previously requested | ||
| 79 | * runtime, new requests may be made while waiting (e.g. due to | ||
| 80 | * interrupts); the time field is ignored. The calendar must process | ||
| 81 | * this message and later send a %UM_TIMETRAVEL_RUN message when | ||
| 82 | * the host can run again. | ||
| 83 | * (host -> calendar) | ||
| 84 | */ | ||
| 85 | UM_TIMETRAVEL_WAIT = 3, | ||
| 86 | |||
| 87 | /** | ||
| 88 | * @UM_TIMETRAVEL_GET: return the current time from the calendar in the | ||
| 89 | * ACK message, the time in the request message is ignored | ||
| 90 | * (host -> calendar) | ||
| 91 | */ | ||
| 92 | UM_TIMETRAVEL_GET = 4, | ||
| 93 | |||
| 94 | /** | ||
| 95 | * @UM_TIMETRAVEL_UPDATE: time update to the calendar, must be sent e.g. | ||
| 96 | * before kicking an interrupt to another calendar | ||
| 97 | * (host -> calendar) | ||
| 98 | */ | ||
| 99 | UM_TIMETRAVEL_UPDATE = 5, | ||
| 100 | |||
| 101 | /** | ||
| 102 | * @UM_TIMETRAVEL_RUN: run time request granted, current time is in | ||
| 103 | * the time field | ||
| 104 | * (calendar -> host) | ||
| 105 | */ | ||
| 106 | UM_TIMETRAVEL_RUN = 6, | ||
| 107 | |||
| 108 | /** | ||
| 109 | * @UM_TIMETRAVEL_FREE_UNTIL: Enable free-running until the given time, | ||
| 110 | * this is a message from the calendar telling the host that it can | ||
| 111 | * freely do its own scheduling for anything before the indicated | ||
| 112 | * time. | ||
| 113 | * Note that if a calendar sends this message once, the host may | ||
| 114 | * assume that it will also do so in the future, if it implements | ||
| 115 | * wraparound semantics for the time field. | ||
| 116 | * (calendar -> host) | ||
| 117 | */ | ||
| 118 | UM_TIMETRAVEL_FREE_UNTIL = 7, | ||
| 119 | |||
| 120 | /** | ||
| 121 | * @UM_TIMETRAVEL_GET_TOD: Return time of day, typically used once at | ||
| 122 | * boot by the virtual machines to get a synchronized time from | ||
| 123 | * the simulation. | ||
| 124 | */ | ||
| 125 | UM_TIMETRAVEL_GET_TOD = 8, | ||
| 126 | }; | ||
| 127 | |||
| 128 | #endif /* _UAPI_LINUX_UM_TIMETRAVEL_H */ | ||
| @@ -14,18 +14,18 @@ · 13 unmodified lines | |||
| 14 | * ACA (Accessory Charger Adapters) | 14 | * ACA (Accessory Charger Adapters) |
| 15 | */ | 15 | */ |
| 16 | enum usb_charger_type { | 16 | enum usb_charger_type { |
| 17 | UNKNOWN_TYPE, | 17 | UNKNOWN_TYPE = 0, |
| 18 | SDP_TYPE, | 18 | SDP_TYPE = 1, |
| 19 | DCP_TYPE, | 19 | DCP_TYPE = 2, |
| 20 | CDP_TYPE, | 20 | CDP_TYPE = 3, |
| 21 | ACA_TYPE, | 21 | ACA_TYPE = 4, |
| 22 | }; | 22 | }; |
| 23 | 23 | ||
| 24 | /* USB charger state */ | 24 | /* USB charger state */ |
| 25 | enum usb_charger_state { | 25 | enum usb_charger_state { |
| 26 | USB_CHARGER_DEFAULT, | 26 | USB_CHARGER_DEFAULT = 0, |
| 27 | USB_CHARGER_PRESENT, | 27 | USB_CHARGER_PRESENT = 1, |
| 28 | USB_CHARGER_ABSENT, | 28 | USB_CHARGER_ABSENT = 2, |
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | #endif /* _UAPI__LINUX_USB_CHARGER_H */ | 31 | #endif /* _UAPI__LINUX_USB_CHARGER_H */ |
| @@ -0,0 +1,167 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * USB Raw Gadget driver. | ||
| 4 | * | ||
| 5 | * See Documentation/usb/raw-gadget.rst for more details. | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _UAPI__LINUX_USB_RAW_GADGET_H | ||
| 9 | #define _UAPI__LINUX_USB_RAW_GADGET_H | ||
| 10 | |||
| 11 | #include <asm/ioctl.h> | ||
| 12 | #include <linux/types.h> | ||
| 13 | #include <linux/usb/ch9.h> | ||
| 14 | |||
| 15 | /* Maximum length of driver_name/device_name in the usb_raw_init struct. */ | ||
| 16 | #define UDC_NAME_LENGTH_MAX 128 | ||
| 17 | |||
| 18 | /* | ||
| 19 | * struct usb_raw_init - argument for USB_RAW_IOCTL_INIT ioctl. | ||
| 20 | * @speed: The speed of the emulated USB device, takes the same values as | ||
| 21 | * the usb_device_speed enum: USB_SPEED_FULL, USB_SPEED_HIGH, etc. | ||
| 22 | * @driver_name: The name of the UDC driver. | ||
| 23 | * @device_name: The name of a UDC instance. | ||
| 24 | * | ||
| 25 | * The last two fields identify a UDC the gadget driver should bind to. | ||
| 26 | * For example, Dummy UDC has "dummy_udc" as its driver_name and "dummy_udc.N" | ||
| 27 | * as its device_name, where N in the index of the Dummy UDC instance. | ||
| 28 | * At the same time the dwc2 driver that is used on Raspberry Pi Zero, has | ||
| 29 | * "20980000.usb" as both driver_name and device_name. | ||
| 30 | */ | ||
| 31 | struct usb_raw_init { | ||
| 32 | __u8 driver_name[UDC_NAME_LENGTH_MAX]; | ||
| 33 | __u8 device_name[UDC_NAME_LENGTH_MAX]; | ||
| 34 | __u8 speed; | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* The type of event fetched with the USB_RAW_IOCTL_EVENT_FETCH ioctl. */ | ||
| 38 | enum usb_raw_event_type { | ||
| 39 | USB_RAW_EVENT_INVALID = 0, | ||
| 40 | |||
| 41 | /* This event is queued when the driver has bound to a UDC. */ | ||
| 42 | USB_RAW_EVENT_CONNECT = 1, | ||
| 43 | |||
| 44 | /* This event is queued when a new control request arrived to ep0. */ | ||
| 45 | USB_RAW_EVENT_CONTROL = 2, | ||
| 46 | |||
| 47 | /* The list might grow in the future. */ | ||
| 48 | }; | ||
| 49 | |||
| 50 | /* | ||
| 51 | * struct usb_raw_event - argument for USB_RAW_IOCTL_EVENT_FETCH ioctl. | ||
| 52 | * @type: The type of the fetched event. | ||
| 53 | * @length: Length of the data buffer. Updated by the driver and set to the | ||
| 54 | * actual length of the fetched event data. | ||
| 55 | * @data: A buffer to store the fetched event data. | ||
| 56 | * | ||
| 57 | * Currently the fetched data buffer is empty for USB_RAW_EVENT_CONNECT, | ||
| 58 | * and contains struct usb_ctrlrequest for USB_RAW_EVENT_CONTROL. | ||
| 59 | */ | ||
| 60 | struct usb_raw_event { | ||
| 61 | __u32 type; | ||
| 62 | __u32 length; | ||
| 63 | __u8 data[0]; | ||
| 64 | }; | ||
| 65 | |||
| 66 | #define USB_RAW_IO_FLAGS_ZERO 0x0001 | ||
| 67 | #define USB_RAW_IO_FLAGS_MASK 0x0001 | ||
| 68 | |||
| 69 | static inline int usb_raw_io_flags_valid(__u16 flags) | ||
| 70 | { | ||
| 71 | return (flags & ~USB_RAW_IO_FLAGS_MASK) == 0; | ||
| 72 | } | ||
| 73 | |||
| 74 | static inline int usb_raw_io_flags_zero(__u16 flags) | ||
| 75 | { | ||
| 76 | return (flags & USB_RAW_IO_FLAGS_ZERO); | ||
| 77 | } | ||
| 78 | |||
| 79 | /* | ||
| 80 | * struct usb_raw_ep_io - argument for USB_RAW_IOCTL_EP0/EP_WRITE/READ ioctls. | ||
| 81 | * @ep: Endpoint handle as returned by USB_RAW_IOCTL_EP_ENABLE for | ||
| 82 | * USB_RAW_IOCTL_EP_WRITE/READ. Ignored for USB_RAW_IOCTL_EP0_WRITE/READ. | ||
| 83 | * @flags: When USB_RAW_IO_FLAGS_ZERO is specified, the zero flag is set on | ||
| 84 | * the submitted USB request, see include/linux/usb/gadget.h for details. | ||
| 85 | * @length: Length of data. | ||
| 86 | * @data: Data to send for USB_RAW_IOCTL_EP0/EP_WRITE. Buffer to store received | ||
| 87 | * data for USB_RAW_IOCTL_EP0/EP_READ. | ||
| 88 | */ | ||
| 89 | struct usb_raw_ep_io { | ||
| 90 | __u16 ep; | ||
| 91 | __u16 flags; | ||
| 92 | __u32 length; | ||
| 93 | __u8 data[0]; | ||
| 94 | }; | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Initializes a Raw Gadget instance. | ||
| 98 | * Accepts a pointer to the usb_raw_init struct as an argument. | ||
| 99 | * Returns 0 on success or negative error code on failure. | ||
| 100 | */ | ||
| 101 | #define USB_RAW_IOCTL_INIT _IOW('U', 0, struct usb_raw_init) | ||
| 102 | |||
| 103 | /* | ||
| 104 | * Instructs Raw Gadget to bind to a UDC and start emulating a USB device. | ||
| 105 | * Returns 0 on success or negative error code on failure. | ||
| 106 | */ | ||
| 107 | #define USB_RAW_IOCTL_RUN _IO('U', 1) | ||
| 108 | |||
| 109 | /* | ||
| 110 | * A blocking ioctl that waits for an event and returns fetched event data to | ||
| 111 | * the user. | ||
| 112 | * Accepts a pointer to the usb_raw_event struct. | ||
| 113 | * Returns 0 on success or negative error code on failure. | ||
| 114 | */ | ||
| 115 | #define USB_RAW_IOCTL_EVENT_FETCH _IOR('U', 2, struct usb_raw_event) | ||
| 116 | |||
| 117 | /* | ||
| 118 | * Queues an IN (OUT for READ) urb as a response to the last control request | ||
| 119 | * received on endpoint 0, provided that was an IN (OUT for READ) request and | ||
| 120 | * waits until the urb is completed. Copies received data to user for READ. | ||
| 121 | * Accepts a pointer to the usb_raw_ep_io struct as an argument. | ||
| 122 | * Returns length of trasferred data on success or negative error code on | ||
| 123 | * failure. | ||
| 124 | */ | ||
| 125 | #define USB_RAW_IOCTL_EP0_WRITE _IOW('U', 3, struct usb_raw_ep_io) | ||
| 126 | #define USB_RAW_IOCTL_EP0_READ _IOWR('U', 4, struct usb_raw_ep_io) | ||
| 127 | |||
| 128 | /* | ||
| 129 | * Finds an endpoint that supports the transfer type specified in the | ||
| 130 | * descriptor and enables it. | ||
| 131 | * Accepts a pointer to the usb_endpoint_descriptor struct as an argument. | ||
| 132 | * Returns enabled endpoint handle on success or negative error code on failure. | ||
| 133 | */ | ||
| 134 | #define USB_RAW_IOCTL_EP_ENABLE _IOW('U', 5, struct usb_endpoint_descriptor) | ||
| 135 | |||
| 136 | /* Disables specified endpoint. | ||
| 137 | * Accepts endpoint handle as an argument. | ||
| 138 | * Returns 0 on success or negative error code on failure. | ||
| 139 | */ | ||
| 140 | #define USB_RAW_IOCTL_EP_DISABLE _IOW('U', 6, __u32) | ||
| 141 | |||
| 142 | /* | ||
| 143 | * Queues an IN (OUT for READ) urb as a response to the last control request | ||
| 144 | * received on endpoint usb_raw_ep_io.ep, provided that was an IN (OUT for READ) | ||
| 145 | * request and waits until the urb is completed. Copies received data to user | ||
| 146 | * for READ. | ||
| 147 | * Accepts a pointer to the usb_raw_ep_io struct as an argument. | ||
| 148 | * Returns length of trasferred data on success or negative error code on | ||
| 149 | * failure. | ||
| 150 | */ | ||
| 151 | #define USB_RAW_IOCTL_EP_WRITE _IOW('U', 7, struct usb_raw_ep_io) | ||
| 152 | #define USB_RAW_IOCTL_EP_READ _IOWR('U', 8, struct usb_raw_ep_io) | ||
| 153 | |||
| 154 | /* | ||
| 155 | * Switches the gadget into the configured state. | ||
| 156 | * Returns 0 on success or negative error code on failure. | ||
| 157 | */ | ||
| 158 | #define USB_RAW_IOCTL_CONFIGURE _IO('U', 9) | ||
| 159 | |||
| 160 | /* | ||
| 161 | * Constrains UDC VBUS power usage. | ||
| 162 | * Accepts current limit in 2 mA units as an argument. | ||
| 163 | * Returns 0 on success or negative error code on failure. | ||
| 164 | */ | ||
| 165 | #define USB_RAW_IOCTL_VBUS_DRAW _IOW('U', 10, __u32) | ||
| 166 | |||
| 167 | #endif /* _UAPI__LINUX_USB_RAW_GADGET_H */ | ||
| @@ -19,7 +19,8 @@ · 18 unmodified lines | |||
| 19 | * means the userland is reading). | 19 | * means the userland is reading). |
| 20 | */ | 20 | */ |
| 21 | #define UFFD_API ((__u64)0xAA) | 21 | #define UFFD_API ((__u64)0xAA) |
| 22 | #define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_FORK | \ | 22 | #define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | \ |
| 23 | UFFD_FEATURE_EVENT_FORK | \ | ||
| 23 | UFFD_FEATURE_EVENT_REMAP | \ | 24 | UFFD_FEATURE_EVENT_REMAP | \ |
| 24 | UFFD_FEATURE_EVENT_REMOVE | \ | 25 | UFFD_FEATURE_EVENT_REMOVE | \ |
| 25 | UFFD_FEATURE_EVENT_UNMAP | \ | 26 | UFFD_FEATURE_EVENT_UNMAP | \ |
| @@ -34,7 +35,8 @@ · 8 unmodified lines | |||
| 34 | #define UFFD_API_RANGE_IOCTLS \ | 35 | #define UFFD_API_RANGE_IOCTLS \ |
| 35 | ((__u64)1 << _UFFDIO_WAKE | \ | 36 | ((__u64)1 << _UFFDIO_WAKE | \ |
| 36 | (__u64)1 << _UFFDIO_COPY | \ | 37 | (__u64)1 << _UFFDIO_COPY | \ |
| 37 | (__u64)1 << _UFFDIO_ZEROPAGE) | 38 | (__u64)1 << _UFFDIO_ZEROPAGE | \ |
| 39 | (__u64)1 << _UFFDIO_WRITEPROTECT) | ||
| 38 | #define UFFD_API_RANGE_IOCTLS_BASIC \ | 40 | #define UFFD_API_RANGE_IOCTLS_BASIC \ |
| 39 | ((__u64)1 << _UFFDIO_WAKE | \ | 41 | ((__u64)1 << _UFFDIO_WAKE | \ |
| 40 | (__u64)1 << _UFFDIO_COPY) | 42 | (__u64)1 << _UFFDIO_COPY) |
| @@ -52,6 +54,7 @@ · 11 unmodified lines | |||
| 52 | #define _UFFDIO_WAKE (0x02) | 54 | #define _UFFDIO_WAKE (0x02) |
| 53 | #define _UFFDIO_COPY (0x03) | 55 | #define _UFFDIO_COPY (0x03) |
| 54 | #define _UFFDIO_ZEROPAGE (0x04) | 56 | #define _UFFDIO_ZEROPAGE (0x04) |
| 57 | #define _UFFDIO_WRITEPROTECT (0x06) | ||
| 55 | #define _UFFDIO_API (0x3F) | 58 | #define _UFFDIO_API (0x3F) |
| 56 | 59 | ||
| 57 | /* userfaultfd ioctl ids */ | 60 | /* userfaultfd ioctl ids */ |
| @@ -68,6 +71,8 @@ · 10 unmodified lines | |||
| 68 | struct uffdio_copy) | 71 | struct uffdio_copy) |
| 69 | #define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, \ | 72 | #define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, \ |
| 70 | struct uffdio_zeropage) | 73 | struct uffdio_zeropage) |
| 74 | #define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \ | ||
| 75 | struct uffdio_writeprotect) | ||
| 71 | 76 | ||
| 72 | /* read() structure */ | 77 | /* read() structure */ |
| 73 | struct uffd_msg { | 78 | struct uffd_msg { |
| @@ -203,13 +208,14 @@ struct uffdio_copy { · 129 unmodified lines | |||
| 203 | __u64 dst; | 208 | __u64 dst; |
| 204 | __u64 src; | 209 | __u64 src; |
| 205 | __u64 len; | 210 | __u64 len; |
| 211 | #define UFFDIO_COPY_MODE_DONTWAKE ((__u64)1<<0) | ||
| 206 | /* | 212 | /* |
| 207 | * There will be a wrprotection flag later that allows to map | 213 | * UFFDIO_COPY_MODE_WP will map the page write protected on |
| 208 | * pages wrprotected on the fly. And such a flag will be | 214 | * the fly. UFFDIO_COPY_MODE_WP is available only if the |
| 209 | * available if the wrprotection ioctl are implemented for the | 215 | * write protected ioctl is implemented for the range |
| 210 | * range according to the uffdio_register.ioctls. | 216 | * according to the uffdio_register.ioctls. |
| 211 | */ | 217 | */ |
| 212 | #define UFFDIO_COPY_MODE_DONTWAKE ((__u64)1<<0) | 218 | #define UFFDIO_COPY_MODE_WP ((__u64)1<<1) |
| 213 | __u64 mode; | 219 | __u64 mode; |
| 214 | 220 | ||
| 215 | /* | 221 | /* |
| @@ -231,4 +237,24 @@ struct uffdio_zeropage { · 15 unmodified lines | |||
| 231 | __s64 zeropage; | 237 | __s64 zeropage; |
| 232 | }; | 238 | }; |
| 233 | 239 | ||
| 240 | struct uffdio_writeprotect { | ||
| 241 | struct uffdio_range range; | ||
| 242 | /* | ||
| 243 | * UFFDIO_WRITEPROTECT_MODE_WP: set the flag to write protect a range, | ||
| 244 | * unset the flag to undo protection of a range which was previously | ||
| 245 | * write protected. | ||
| 246 | * | ||
| 247 | * UFFDIO_WRITEPROTECT_MODE_DONTWAKE: set the flag to avoid waking up | ||
| 248 | * any wait thread after the operation succeeds. | ||
| 249 | * | ||
| 250 | * NOTE: Write protecting a region (WP=1) is unrelated to page faults, | ||
| 251 | * therefore DONTWAKE flag is meaningless with WP=1. Removing write | ||
| 252 | * protection (WP=0) in response to a page fault wakes the faulting | ||
| 253 | * task unless DONTWAKE is set. | ||
| 254 | */ | ||
| 255 | #define UFFDIO_WRITEPROTECT_MODE_WP ((__u64)1<<0) | ||
| 256 | #define UFFDIO_WRITEPROTECT_MODE_DONTWAKE ((__u64)1<<1) | ||
| 257 | __u64 mode; | ||
| 258 | }; | ||
| 259 | |||
| 234 | #endif /* _LINUX_USERFAULTFD_H */ | 260 | #endif /* _LINUX_USERFAULTFD_H */ |
| @@ -192,6 +192,12 @@ enum v4l2_colorfx { · 191 unmodified lines | |||
| 192 | * We reserve 16 controls for this driver. */ | 192 | * We reserve 16 controls for this driver. */ |
| 193 | #define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0) | 193 | #define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0) |
| 194 | 194 | ||
| 195 | /* | ||
| 196 | * The base for the atmel isc driver controls. | ||
| 197 | * We reserve 32 controls for this driver. | ||
| 198 | */ | ||
| 199 | #define V4L2_CID_USER_ATMEL_ISC_BASE (V4L2_CID_USER_BASE + 0x10c0) | ||
| 200 | |||
| 195 | /* MPEG-class control IDs */ | 201 | /* MPEG-class control IDs */ |
| 196 | /* The MPEG controls are applicable to all codec controls | 202 | /* The MPEG controls are applicable to all codec controls |
| 197 | * and the 'MPEG' part of the define is historical */ | 203 | * and the 'MPEG' part of the define is historical */ |
| @@ -707,6 +707,43 @@ struct vfio_device_ioeventfd { · 706 unmodified lines | |||
| 707 | 707 | ||
| 708 | #define VFIO_DEVICE_IOEVENTFD _IO(VFIO_TYPE, VFIO_BASE + 16) | 708 | #define VFIO_DEVICE_IOEVENTFD _IO(VFIO_TYPE, VFIO_BASE + 16) |
| 709 | 709 | ||
| 710 | /** | ||
| 711 | * VFIO_DEVICE_FEATURE - _IORW(VFIO_TYPE, VFIO_BASE + 17, | ||
| 712 | * struct vfio_device_feature) | ||
| 713 | * | ||
| 714 | * Get, set, or probe feature data of the device. The feature is selected | ||
| 715 | * using the FEATURE_MASK portion of the flags field. Support for a feature | ||
| 716 | * can be probed by setting both the FEATURE_MASK and PROBE bits. A probe | ||
| 717 | * may optionally include the GET and/or SET bits to determine read vs write | ||
| 718 | * access of the feature respectively. Probing a feature will return success | ||
| 719 | * if the feature is supported and all of the optionally indicated GET/SET | ||
| 720 | * methods are supported. The format of the data portion of the structure is | ||
| 721 | * specific to the given feature. The data portion is not required for | ||
| 722 | * probing. GET and SET are mutually exclusive, except for use with PROBE. | ||
| 723 | * | ||
| 724 | * Return 0 on success, -errno on failure. | ||
| 725 | */ | ||
| 726 | struct vfio_device_feature { | ||
| 727 | __u32 argsz; | ||
| 728 | __u32 flags; | ||
| 729 | #define VFIO_DEVICE_FEATURE_MASK (0xffff) /* 16-bit feature index */ | ||
| 730 | #define VFIO_DEVICE_FEATURE_GET (1 << 16) /* Get feature into data[] */ | ||
| 731 | #define VFIO_DEVICE_FEATURE_SET (1 << 17) /* Set feature from data[] */ | ||
| 732 | #define VFIO_DEVICE_FEATURE_PROBE (1 << 18) /* Probe feature support */ | ||
| 733 | __u8 data[]; | ||
| 734 | }; | ||
| 735 | |||
| 736 | #define VFIO_DEVICE_FEATURE _IO(VFIO_TYPE, VFIO_BASE + 17) | ||
| 737 | |||
| 738 | /* | ||
| 739 | * Provide support for setting a PCI VF Token, which is used as a shared | ||
| 740 | * secret between PF and VF drivers. This feature may only be set on a | ||
| 741 | * PCI SR-IOV PF when SR-IOV is enabled on the PF and there are no existing | ||
| 742 | * open VFs. Data provided when setting this feature is a 16-byte array | ||
| 743 | * (__u8 b[16]), representing a UUID. | ||
| 744 | */ | ||
| 745 | #define VFIO_DEVICE_FEATURE_PCI_VF_TOKEN (0) | ||
| 746 | |||
| 710 | /* -------- API for Type1 VFIO IOMMU -------- */ | 747 | /* -------- API for Type1 VFIO IOMMU -------- */ |
| 711 | 748 | ||
| 712 | /** | 749 | /** |
| @@ -116,4 +116,28 @@ · 115 unmodified lines | |||
| 116 | #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) | 116 | #define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64) |
| 117 | #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) | 117 | #define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int) |
| 118 | 118 | ||
| 119 | /* VHOST_VDPA specific defines */ | ||
| 120 | |||
| 121 | /* Get the device id. The device ids follow the same definition of | ||
| 122 | * the device id defined in virtio-spec. | ||
| 123 | */ | ||
| 124 | #define VHOST_VDPA_GET_DEVICE_ID _IOR(VHOST_VIRTIO, 0x70, __u32) | ||
| 125 | /* Get and set the status. The status bits follow the same definition | ||
| 126 | * of the device status defined in virtio-spec. | ||
| 127 | */ | ||
| 128 | #define VHOST_VDPA_GET_STATUS _IOR(VHOST_VIRTIO, 0x71, __u8) | ||
| 129 | #define VHOST_VDPA_SET_STATUS _IOW(VHOST_VIRTIO, 0x72, __u8) | ||
| 130 | /* Get and set the device config. The device config follows the same | ||
| 131 | * definition of the device config defined in virtio-spec. | ||
| 132 | */ | ||
| 133 | #define VHOST_VDPA_GET_CONFIG _IOR(VHOST_VIRTIO, 0x73, \ | ||
| 134 | struct vhost_vdpa_config) | ||
| 135 | #define VHOST_VDPA_SET_CONFIG _IOW(VHOST_VIRTIO, 0x74, \ | ||
| 136 | struct vhost_vdpa_config) | ||
| 137 | /* Enable/disable the ring. */ | ||
| 138 | #define VHOST_VDPA_SET_VRING_ENABLE _IOW(VHOST_VIRTIO, 0x75, \ | ||
| 139 | struct vhost_vring_state) | ||
| 140 | /* Get the max ring size. */ | ||
| 141 | #define VHOST_VDPA_GET_VRING_NUM _IOR(VHOST_VIRTIO, 0x76, __u16) | ||
| 142 | |||
| 119 | #endif | 143 | #endif |
| @@ -119,6 +119,14 @@ struct vhost_scsi_target { · 118 unmodified lines | |||
| 119 | unsigned short reserved; | 119 | unsigned short reserved; |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | /* VHOST_VDPA specific definitions */ | ||
| 123 | |||
| 124 | struct vhost_vdpa_config { | ||
| 125 | __u32 off; | ||
| 126 | __u32 len; | ||
| 127 | __u8 buf[0]; | ||
| 128 | }; | ||
| 129 | |||
| 122 | /* Feature bits */ | 130 | /* Feature bits */ |
| 123 | /* Log all write descriptors. Can be changed while device is active. */ | 131 | /* Log all write descriptors. Can be changed while device is active. */ |
| 124 | #define VHOST_F_LOG_ALL 26 | 132 | #define VHOST_F_LOG_ALL 26 |
| @@ -565,6 +565,7 @@ struct v4l2_pix_format { · 564 unmodified lines | |||
| 565 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ | 565 | #define V4L2_PIX_FMT_Y6 v4l2_fourcc('Y', '0', '6', ' ') /* 6 Greyscale */ |
| 566 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ | 566 | #define V4L2_PIX_FMT_Y10 v4l2_fourcc('Y', '1', '0', ' ') /* 10 Greyscale */ |
| 567 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ | 567 | #define V4L2_PIX_FMT_Y12 v4l2_fourcc('Y', '1', '2', ' ') /* 12 Greyscale */ |
| 568 | #define V4L2_PIX_FMT_Y14 v4l2_fourcc('Y', '1', '4', ' ') /* 14 Greyscale */ | ||
| 568 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ | 569 | #define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y', '1', '6', ' ') /* 16 Greyscale */ |
| 569 | #define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ | 570 | #define V4L2_PIX_FMT_Y16_BE v4l2_fourcc_be('Y', '1', '6', ' ') /* 16 Greyscale BE */ |
| 570 | 571 | ||
| @@ -662,6 +663,10 @@ struct v4l2_pix_format { · 91 unmodified lines | |||
| 662 | #define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') | 663 | #define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') |
| 663 | #define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') | 664 | #define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') |
| 664 | #define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') | 665 | #define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') |
| 666 | #define V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.. GRGR.. */ | ||
| 667 | #define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.. RGRG.. */ | ||
| 668 | #define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('G', 'R', '1', '4') /* 14 GRGR.. BGBG.. */ | ||
| 669 | #define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.. GBGB.. */ | ||
| 665 | /* 14bit raw bayer packed, 7 bytes for every 4 pixels */ | 670 | /* 14bit raw bayer packed, 7 bytes for every 4 pixels */ |
| 666 | #define V4L2_PIX_FMT_SBGGR14P v4l2_fourcc('p', 'B', 'E', 'E') | 671 | #define V4L2_PIX_FMT_SBGGR14P v4l2_fourcc('p', 'B', 'E', 'E') |
| 667 | #define V4L2_PIX_FMT_SGBRG14P v4l2_fourcc('p', 'G', 'E', 'E') | 672 | #define V4L2_PIX_FMT_SGBRG14P v4l2_fourcc('p', 'G', 'E', 'E') |
| @@ -1242,6 +1247,10 @@ struct v4l2_selection { · 574 unmodified lines | |||
| 1242 | 1247 | ||
| 1243 | typedef __u64 v4l2_std_id; | 1248 | typedef __u64 v4l2_std_id; |
| 1244 | 1249 | ||
| 1250 | /* | ||
| 1251 | * Attention: Keep the V4L2_STD_* bit definitions in sync with | ||
| 1252 | * include/dt-bindings/display/sdtv-standards.h SDTV_STD_* bit definitions. | ||
| 1253 | */ | ||
| 1245 | /* one bit for each */ | 1254 | /* one bit for each */ |
| 1246 | #define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) | 1255 | #define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) |
| 1247 | #define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) | 1256 | #define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) |
| @@ -36,6 +36,7 @@ · 35 unmodified lines | |||
| 36 | #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */ | 36 | #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */ |
| 37 | #define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */ | 37 | #define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */ |
| 38 | #define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */ | 38 | #define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */ |
| 39 | #define VIRTIO_BALLOON_F_REPORTING 5 /* Page reporting virtqueue */ | ||
| 39 | 40 | ||
| 40 | /* Size of a PFN in the balloon interface. */ | 41 | /* Size of a PFN in the balloon interface. */ |
| 41 | #define VIRTIO_BALLOON_PFN_SHIFT 12 | 42 | #define VIRTIO_BALLOON_PFN_SHIFT 12 |
| @@ -46,5 +46,6 @@ · 45 unmodified lines | |||
| 46 | #define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */ | 46 | #define VIRTIO_ID_IOMMU 23 /* virtio IOMMU */ |
| 47 | #define VIRTIO_ID_FS 26 /* virtio filesystem */ | 47 | #define VIRTIO_ID_FS 26 /* virtio filesystem */ |
| 48 | #define VIRTIO_ID_PMEM 27 /* virtio pmem */ | 48 | #define VIRTIO_ID_PMEM 27 /* virtio pmem */ |
| 49 | #define VIRTIO_ID_MAC80211_HWSIM 29 /* virtio mac80211-hwsim */ | ||
| 49 | 50 | ||
| 50 | #endif /* _LINUX_VIRTIO_IDS_H */ | 51 | #endif /* _LINUX_VIRTIO_IDS_H */ |
| @@ -18,24 +18,24 @@ · 17 unmodified lines | |||
| 18 | #define VIRTIO_IOMMU_F_MMIO 5 | 18 | #define VIRTIO_IOMMU_F_MMIO 5 |
| 19 | 19 | ||
| 20 | struct virtio_iommu_range_64 { | 20 | struct virtio_iommu_range_64 { |
| 21 | __le64 start; | 21 | __u64 start; |
| 22 | __le64 end; | 22 | __u64 end; |
| 23 | }; | 23 | }; |
| 24 | 24 | ||
| 25 | struct virtio_iommu_range_32 { | 25 | struct virtio_iommu_range_32 { |
| 26 | __le32 start; | 26 | __u32 start; |
| 27 | __le32 end; | 27 | __u32 end; |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | struct virtio_iommu_config { | 30 | struct virtio_iommu_config { |
| 31 | /* Supported page sizes */ | 31 | /* Supported page sizes */ |
| 32 | __le64 page_size_mask; | 32 | __u64 page_size_mask; |
| 33 | /* Supported IOVA range */ | 33 | /* Supported IOVA range */ |
| 34 | struct virtio_iommu_range_64 input_range; | 34 | struct virtio_iommu_range_64 input_range; |
| 35 | /* Max domain ID size */ | 35 | /* Max domain ID size */ |
| 36 | struct virtio_iommu_range_32 domain_range; | 36 | struct virtio_iommu_range_32 domain_range; |
| 37 | /* Probe buffer size */ | 37 | /* Probe buffer size */ |
| 38 | __le32 probe_size; | 38 | __u32 probe_size; |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | /* Request types */ | 41 | /* Request types */ |
| @@ -57,6 +57,9 @@ · 56 unmodified lines | |||
| 57 | * Steering */ | 57 | * Steering */ |
| 58 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ | 58 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ |
| 59 | 59 | ||
| 60 | #define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */ | ||
| 61 | #define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */ | ||
| 62 | #define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */ | ||
| 60 | #define VIRTIO_NET_F_STANDBY 62 /* Act as standby for another device | 63 | #define VIRTIO_NET_F_STANDBY 62 /* Act as standby for another device |
| 61 | * with the same MAC. | 64 | * with the same MAC. |
| 62 | */ | 65 | */ |
| @@ -69,6 +72,17 @@ · 6 unmodified lines | |||
| 69 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 72 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
| 70 | #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ | 73 | #define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ |
| 71 | 74 | ||
| 75 | /* supported/enabled hash types */ | ||
| 76 | #define VIRTIO_NET_RSS_HASH_TYPE_IPv4 (1 << 0) | ||
| 77 | #define VIRTIO_NET_RSS_HASH_TYPE_TCPv4 (1 << 1) | ||
| 78 | #define VIRTIO_NET_RSS_HASH_TYPE_UDPv4 (1 << 2) | ||
| 79 | #define VIRTIO_NET_RSS_HASH_TYPE_IPv6 (1 << 3) | ||
| 80 | #define VIRTIO_NET_RSS_HASH_TYPE_TCPv6 (1 << 4) | ||
| 81 | #define VIRTIO_NET_RSS_HASH_TYPE_UDPv6 (1 << 5) | ||
| 82 | #define VIRTIO_NET_RSS_HASH_TYPE_IP_EX (1 << 6) | ||
| 83 | #define VIRTIO_NET_RSS_HASH_TYPE_TCP_EX (1 << 7) | ||
| 84 | #define VIRTIO_NET_RSS_HASH_TYPE_UDP_EX (1 << 8) | ||
| 85 | |||
| 72 | struct virtio_net_config { | 86 | struct virtio_net_config { |
| 73 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 87 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
| 74 | __u8 mac[ETH_ALEN]; | 88 | __u8 mac[ETH_ALEN]; |
| @@ -92,6 +106,12 @@ struct virtio_net_config { · 17 unmodified lines | |||
| 92 | * Any other value stands for unknown. | 106 | * Any other value stands for unknown. |
| 93 | */ | 107 | */ |
| 94 | __u8 duplex; | 108 | __u8 duplex; |
| 109 | /* maximum size of RSS key */ | ||
| 110 | __u8 rss_max_key_size; | ||
| 111 | /* maximum number of indirection table entries */ | ||
| 112 | __le16 rss_max_indirection_table_length; | ||
| 113 | /* bitmask of supported VIRTIO_NET_RSS_HASH_ types */ | ||
| 114 | __le32 supported_hash_types; | ||
| 95 | } __attribute__((packed)); | 115 | } __attribute__((packed)); |
| 96 | 116 | ||
| 97 | /* | 117 | /* |
| @@ -104,6 +124,7 @@ struct virtio_net_config { · 6 unmodified lines | |||
| 104 | struct virtio_net_hdr_v1 { | 124 | struct virtio_net_hdr_v1 { |
| 105 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 /* Use csum_start, csum_offset */ | 125 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 /* Use csum_start, csum_offset */ |
| 106 | #define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */ | 126 | #define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */ |
| 127 | #define VIRTIO_NET_HDR_F_RSC_INFO 4 /* rsc info in csum_ fields */ | ||
| 107 | __u8 flags; | 128 | __u8 flags; |
| 108 | #define VIRTIO_NET_HDR_GSO_NONE 0 /* Not a GSO frame */ | 129 | #define VIRTIO_NET_HDR_GSO_NONE 0 /* Not a GSO frame */ |
| 109 | #define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */ | 130 | #define VIRTIO_NET_HDR_GSO_TCPV4 1 /* GSO frame, IPv4 TCP (TSO) */ |
| @@ -113,11 +134,46 @@ struct virtio_net_hdr_v1 { · 3 unmodified lines | |||
| 113 | __u8 gso_type; | 134 | __u8 gso_type; |
| 114 | __virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ | 135 | __virtio16 hdr_len; /* Ethernet + IP + tcp/udp hdrs */ |
| 115 | __virtio16 gso_size; /* Bytes to append to hdr_len per frame */ | 136 | __virtio16 gso_size; /* Bytes to append to hdr_len per frame */ |
| 116 | __virtio16 csum_start; /* Position to start checksumming from */ | 137 | union { |
| 117 | __virtio16 csum_offset; /* Offset after that to place checksum */ | 138 | struct { |
| 139 | __virtio16 csum_start; | ||
| 140 | __virtio16 csum_offset; | ||
| 141 | }; | ||
| 142 | /* Checksum calculation */ | ||
| 143 | struct { | ||
| 144 | /* Position to start checksumming from */ | ||
| 145 | __virtio16 start; | ||
| 146 | /* Offset after that to place checksum */ | ||
| 147 | __virtio16 offset; | ||
| 148 | } csum; | ||
| 149 | /* Receive Segment Coalescing */ | ||
| 150 | struct { | ||
| 151 | /* Number of coalesced segments */ | ||
| 152 | __le16 segments; | ||
| 153 | /* Number of duplicated acks */ | ||
| 154 | __le16 dup_acks; | ||
| 155 | } rsc; | ||
| 156 | }; | ||
| 118 | __virtio16 num_buffers; /* Number of merged rx buffers */ | 157 | __virtio16 num_buffers; /* Number of merged rx buffers */ |
| 119 | }; | 158 | }; |
| 120 | 159 | ||
| 160 | struct virtio_net_hdr_v1_hash { | ||
| 161 | struct virtio_net_hdr_v1 hdr; | ||
| 162 | __le32 hash_value; | ||
| 163 | #define VIRTIO_NET_HASH_REPORT_NONE 0 | ||
| 164 | #define VIRTIO_NET_HASH_REPORT_IPv4 1 | ||
| 165 | #define VIRTIO_NET_HASH_REPORT_TCPv4 2 | ||
| 166 | #define VIRTIO_NET_HASH_REPORT_UDPv4 3 | ||
| 167 | #define VIRTIO_NET_HASH_REPORT_IPv6 4 | ||
| 168 | #define VIRTIO_NET_HASH_REPORT_TCPv6 5 | ||
| 169 | #define VIRTIO_NET_HASH_REPORT_UDPv6 6 | ||
| 170 | #define VIRTIO_NET_HASH_REPORT_IPv6_EX 7 | ||
| 171 | #define VIRTIO_NET_HASH_REPORT_TCPv6_EX 8 | ||
| 172 | #define VIRTIO_NET_HASH_REPORT_UDPv6_EX 9 | ||
| 173 | __le16 hash_report; | ||
| 174 | __le16 padding; | ||
| 175 | }; | ||
| 176 | |||
| 121 | #ifndef VIRTIO_NET_NO_LEGACY | 177 | #ifndef VIRTIO_NET_NO_LEGACY |
| 122 | /* This header comes first in the scatter-gather list. | 178 | /* This header comes first in the scatter-gather list. |
| 123 | * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated, it must | 179 | * For legacy virtio, if VIRTIO_F_ANY_LAYOUT is not negotiated, it must |
| @@ -228,7 +284,9 @@ struct virtio_net_ctrl_mac { · 104 unmodified lines | |||
| 228 | 284 | ||
| 229 | /* | 285 | /* |
| 230 | * Control Receive Flow Steering | 286 | * Control Receive Flow Steering |
| 231 | * | 287 | */ |
| 288 | #define VIRTIO_NET_CTRL_MQ 4 | ||
| 289 | /* | ||
| 232 | * The command VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET | 290 | * The command VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET |
| 233 | * enables Receive Flow Steering, specifying the number of the transmit and | 291 | * enables Receive Flow Steering, specifying the number of the transmit and |
| 234 | * receive queues that will be used. After the command is consumed and acked by | 292 | * receive queues that will be used. After the command is consumed and acked by |
| @@ -241,11 +299,47 @@ struct virtio_net_ctrl_mq { · 6 unmodified lines | |||
| 241 | __virtio16 virtqueue_pairs; | 299 | __virtio16 virtqueue_pairs; |
| 242 | }; | 300 | }; |
| 243 | 301 | ||
| 244 | #define VIRTIO_NET_CTRL_MQ 4 | ||
| 245 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET 0 | 302 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET 0 |
| 246 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1 | 303 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1 |
| 247 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000 | 304 | #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000 |
| 248 | 305 | ||
| 306 | /* | ||
| 307 | * The command VIRTIO_NET_CTRL_MQ_RSS_CONFIG has the same effect as | ||
| 308 | * VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET does and additionally configures | ||
| 309 | * the receive steering to use a hash calculated for incoming packet | ||
| 310 | * to decide on receive virtqueue to place the packet. The command | ||
| 311 | * also provides parameters to calculate a hash and receive virtqueue. | ||
| 312 | */ | ||
| 313 | struct virtio_net_rss_config { | ||
| 314 | __le32 hash_types; | ||
| 315 | __le16 indirection_table_mask; | ||
| 316 | __le16 unclassified_queue; | ||
| 317 | __le16 indirection_table[1/* + indirection_table_mask */]; | ||
| 318 | __le16 max_tx_vq; | ||
| 319 | __u8 hash_key_length; | ||
| 320 | __u8 hash_key_data[/* hash_key_length */]; | ||
| 321 | }; | ||
| 322 | |||
| 323 | #define VIRTIO_NET_CTRL_MQ_RSS_CONFIG 1 | ||
| 324 | |||
| 325 | /* | ||
| 326 | * The command VIRTIO_NET_CTRL_MQ_HASH_CONFIG requests the device | ||
| 327 | * to include in the virtio header of the packet the value of the | ||
| 328 | * calculated hash and the report type of hash. It also provides | ||
| 329 | * parameters for hash calculation. The command requires feature | ||
| 330 | * VIRTIO_NET_F_HASH_REPORT to be negotiated to extend the | ||
| 331 | * layout of virtio header as defined in virtio_net_hdr_v1_hash. | ||
| 332 | */ | ||
| 333 | struct virtio_net_hash_config { | ||
| 334 | __le32 hash_types; | ||
| 335 | /* for compatibility with virtio_net_rss_config */ | ||
| 336 | __le16 reserved[4]; | ||
| 337 | __u8 hash_key_length; | ||
| 338 | __u8 hash_key_data[/* hash_key_length */]; | ||
| 339 | }; | ||
| 340 | |||
| 341 | #define VIRTIO_NET_CTRL_MQ_HASH_CONFIG 2 | ||
| 342 | |||
| 249 | /* | 343 | /* |
| 250 | * Control network offloads | 344 | * Control network offloads |
| 251 | * | 345 | * |
| @@ -74,6 +74,8 @@ · 73 unmodified lines | |||
| 74 | #include <linux/socket.h> /* for "struct sockaddr" et al */ | 74 | #include <linux/socket.h> /* for "struct sockaddr" et al */ |
| 75 | #include <linux/if.h> /* for IFNAMSIZ and co... */ | 75 | #include <linux/if.h> /* for IFNAMSIZ and co... */ |
| 76 | 76 | ||
| 77 | #include <stddef.h> /* for offsetof */ | ||
| 78 | |||
| 77 | /***************************** VERSION *****************************/ | 79 | /***************************** VERSION *****************************/ |
| 78 | /* | 80 | /* |
| 79 | * This constant is used to know the availability of the wireless | 81 | * This constant is used to know the availability of the wireless |
| @@ -1090,8 +1092,7 @@ struct iw_event { · 1010 unmodified lines | |||
| 1090 | /* iw_point events are special. First, the payload (extra data) come at | 1092 | /* iw_point events are special. First, the payload (extra data) come at |
| 1091 | * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second, | 1093 | * the end of the event, so they are bigger than IW_EV_POINT_LEN. Second, |
| 1092 | * we omit the pointer, so start at an offset. */ | 1094 | * we omit the pointer, so start at an offset. */ |
| 1093 | #define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \ | 1095 | #define IW_EV_POINT_OFF offsetof(struct iw_point, length) |
| 1094 | (char *) NULL) | ||
| 1095 | #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \ | 1096 | #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \ |
| 1096 | IW_EV_POINT_OFF) | 1097 | IW_EV_POINT_OFF) |
| 1097 | 1098 | ||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPI_HISI_QM_H | ||
| 3 | #define _UAPI_HISI_QM_H | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 7 | /** | ||
| 8 | * struct hisi_qp_ctx - User data for hisi qp. | ||
| 9 | * @id: qp_index return to user space | ||
| 10 | * @qc_type: Accelerator algorithm type | ||
| 11 | */ | ||
| 12 | struct hisi_qp_ctx { | ||
| 13 | __u16 id; | ||
| 14 | __u16 qc_type; | ||
| 15 | }; | ||
| 16 | |||
| 17 | #define HISI_QM_API_VER_BASE "hisi_qm_v1" | ||
| 18 | #define HISI_QM_API_VER2_BASE "hisi_qm_v2" | ||
| 19 | |||
| 20 | /* UACCE_CMD_QM_SET_QP_CTX: Set qp algorithm type */ | ||
| 21 | #define UACCE_CMD_QM_SET_QP_CTX _IOWR('H', 10, struct hisi_qp_ctx) | ||
| 22 | |||
| 23 | #endif | ||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPIUUACCE_H | ||
| 3 | #define _UAPIUUACCE_H | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | #include <linux/ioctl.h> | ||
| 7 | |||
| 8 | /* | ||
| 9 | * UACCE_CMD_START_Q: Start queue | ||
| 10 | */ | ||
| 11 | #define UACCE_CMD_START_Q _IO('W', 0) | ||
| 12 | |||
| 13 | /* | ||
| 14 | * UACCE_CMD_PUT_Q: | ||
| 15 | * User actively stop queue and free queue resource immediately | ||
| 16 | * Optimization method since close fd may delay | ||
| 17 | */ | ||
| 18 | #define UACCE_CMD_PUT_Q _IO('W', 1) | ||
| 19 | |||
| 20 | /* | ||
| 21 | * UACCE Device flags: | ||
| 22 | * UACCE_DEV_SVA: Shared Virtual Addresses | ||
| 23 | * Support PASID | ||
| 24 | * Support device page faults (PCI PRI or SMMU Stall) | ||
| 25 | */ | ||
| 26 | #define UACCE_DEV_SVA BIT(0) | ||
| 27 | |||
| 28 | /** | ||
| 29 | * enum uacce_qfrt: queue file region type | ||
| 30 | * @UACCE_QFRT_MMIO: device mmio region | ||
| 31 | * @UACCE_QFRT_DUS: device user share region | ||
| 32 | */ | ||
| 33 | enum uacce_qfrt { | ||
| 34 | UACCE_QFRT_MMIO = 0, | ||
| 35 | UACCE_QFRT_DUS = 1, | ||
| 36 | }; | ||
| 37 | |||
| 38 | #endif | ||
| @@ -49,6 +49,7 @@ enum { · 48 unmodified lines | |||
| 49 | MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC = 1 << 7, | 49 | MLX5_QP_FLAG_TIR_ALLOW_SELF_LB_MC = 1 << 7, |
| 50 | MLX5_QP_FLAG_ALLOW_SCATTER_CQE = 1 << 8, | 50 | MLX5_QP_FLAG_ALLOW_SCATTER_CQE = 1 << 8, |
| 51 | MLX5_QP_FLAG_PACKET_BASED_CREDIT_MODE = 1 << 9, | 51 | MLX5_QP_FLAG_PACKET_BASED_CREDIT_MODE = 1 << 9, |
| 52 | MLX5_QP_FLAG_UAR_PAGE_INDEX = 1 << 10, | ||
| 52 | }; | 53 | }; |
| 53 | 54 | ||
| 54 | enum { | 55 | enum { |
| @@ -78,6 +79,7 @@ struct mlx5_ib_alloc_ucontext_req { · 23 unmodified lines | |||
| 78 | 79 | ||
| 79 | enum mlx5_lib_caps { | 80 | enum mlx5_lib_caps { |
| 80 | MLX5_LIB_CAP_4K_UAR = (__u64)1 << 0, | 81 | MLX5_LIB_CAP_4K_UAR = (__u64)1 << 0, |
| 82 | MLX5_LIB_CAP_DYN_UAR = (__u64)1 << 1, | ||
| 81 | }; | 83 | }; |
| 82 | 84 | ||
| 83 | enum mlx5_ib_alloc_uctx_v2_flags { | 85 | enum mlx5_ib_alloc_uctx_v2_flags { |
| @@ -266,6 +268,7 @@ struct mlx5_ib_query_device_resp { · 182 unmodified lines | |||
| 266 | 268 | ||
| 267 | enum mlx5_ib_create_cq_flags { | 269 | enum mlx5_ib_create_cq_flags { |
| 268 | MLX5_IB_CREATE_CQ_FLAGS_CQE_128B_PAD = 1 << 0, | 270 | MLX5_IB_CREATE_CQ_FLAGS_CQE_128B_PAD = 1 << 0, |
| 271 | MLX5_IB_CREATE_CQ_FLAGS_UAR_PAGE_INDEX = 1 << 1, | ||
| 269 | }; | 272 | }; |
| 270 | 273 | ||
| 271 | struct mlx5_ib_create_cq { | 274 | struct mlx5_ib_create_cq { |
| @@ -275,6 +278,9 @@ struct mlx5_ib_create_cq { · 3 unmodified lines | |||
| 275 | __u8 cqe_comp_en; | 278 | __u8 cqe_comp_en; |
| 276 | __u8 cqe_comp_res_format; | 279 | __u8 cqe_comp_res_format; |
| 277 | __u16 flags; | 280 | __u16 flags; |
| 281 | __u16 uar_page_index; | ||
| 282 | __u16 reserved0; | ||
| 283 | __u32 reserved1; | ||
| 278 | }; | 284 | }; |
| 279 | 285 | ||
| 280 | struct mlx5_ib_create_cq_resp { | 286 | struct mlx5_ib_create_cq_resp { |
| @@ -131,6 +131,23 @@ enum mlx5_ib_var_obj_methods { · 130 unmodified lines | |||
| 131 | MLX5_IB_METHOD_VAR_OBJ_DESTROY, | 131 | MLX5_IB_METHOD_VAR_OBJ_DESTROY, |
| 132 | }; | 132 | }; |
| 133 | 133 | ||
| 134 | enum mlx5_ib_uar_alloc_attrs { | ||
| 135 | MLX5_IB_ATTR_UAR_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 136 | MLX5_IB_ATTR_UAR_OBJ_ALLOC_TYPE, | ||
| 137 | MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_OFFSET, | ||
| 138 | MLX5_IB_ATTR_UAR_OBJ_ALLOC_MMAP_LENGTH, | ||
| 139 | MLX5_IB_ATTR_UAR_OBJ_ALLOC_PAGE_ID, | ||
| 140 | }; | ||
| 141 | |||
| 142 | enum mlx5_ib_uar_obj_destroy_attrs { | ||
| 143 | MLX5_IB_ATTR_UAR_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 144 | }; | ||
| 145 | |||
| 146 | enum mlx5_ib_uar_obj_methods { | ||
| 147 | MLX5_IB_METHOD_UAR_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), | ||
| 148 | MLX5_IB_METHOD_UAR_OBJ_DESTROY, | ||
| 149 | }; | ||
| 150 | |||
| 134 | enum mlx5_ib_devx_umem_reg_attrs { | 151 | enum mlx5_ib_devx_umem_reg_attrs { |
| 135 | MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | 152 | MLX5_IB_ATTR_DEVX_UMEM_REG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), |
| 136 | MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, | 153 | MLX5_IB_ATTR_DEVX_UMEM_REG_ADDR, |
| @@ -143,6 +160,22 @@ enum mlx5_ib_devx_umem_dereg_attrs { · 6 unmodified lines | |||
| 143 | MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | 160 | MLX5_IB_ATTR_DEVX_UMEM_DEREG_HANDLE = (1U << UVERBS_ID_NS_SHIFT), |
| 144 | }; | 161 | }; |
| 145 | 162 | ||
| 163 | enum mlx5_ib_pp_obj_methods { | ||
| 164 | MLX5_IB_METHOD_PP_OBJ_ALLOC = (1U << UVERBS_ID_NS_SHIFT), | ||
| 165 | MLX5_IB_METHOD_PP_OBJ_DESTROY, | ||
| 166 | }; | ||
| 167 | |||
| 168 | enum mlx5_ib_pp_alloc_attrs { | ||
| 169 | MLX5_IB_ATTR_PP_OBJ_ALLOC_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 170 | MLX5_IB_ATTR_PP_OBJ_ALLOC_CTX, | ||
| 171 | MLX5_IB_ATTR_PP_OBJ_ALLOC_FLAGS, | ||
| 172 | MLX5_IB_ATTR_PP_OBJ_ALLOC_INDEX, | ||
| 173 | }; | ||
| 174 | |||
| 175 | enum mlx5_ib_pp_obj_destroy_attrs { | ||
| 176 | MLX5_IB_ATTR_PP_OBJ_DESTROY_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 177 | }; | ||
| 178 | |||
| 146 | enum mlx5_ib_devx_umem_methods { | 179 | enum mlx5_ib_devx_umem_methods { |
| 147 | MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << UVERBS_ID_NS_SHIFT), | 180 | MLX5_IB_METHOD_DEVX_UMEM_REG = (1U << UVERBS_ID_NS_SHIFT), |
| 148 | MLX5_IB_METHOD_DEVX_UMEM_DEREG, | 181 | MLX5_IB_METHOD_DEVX_UMEM_DEREG, |
| @@ -173,6 +206,8 @@ enum mlx5_ib_objects { · 24 unmodified lines | |||
| 173 | MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD, | 206 | MLX5_IB_OBJECT_DEVX_ASYNC_CMD_FD, |
| 174 | MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD, | 207 | MLX5_IB_OBJECT_DEVX_ASYNC_EVENT_FD, |
| 175 | MLX5_IB_OBJECT_VAR, | 208 | MLX5_IB_OBJECT_VAR, |
| 209 | MLX5_IB_OBJECT_PP, | ||
| 210 | MLX5_IB_OBJECT_UAR, | ||
| 176 | }; | 211 | }; |
| 177 | 212 | ||
| 178 | enum mlx5_ib_flow_matcher_create_attrs { | 213 | enum mlx5_ib_flow_matcher_create_attrs { |
| @@ -44,6 +44,7 @@ enum mlx5_ib_uapi_flow_table_type { · 43 unmodified lines | |||
| 44 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, | 44 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX = 0x1, |
| 45 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB = 0x2, | 45 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_FDB = 0x2, |
| 46 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX = 0x3, | 46 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_RX = 0x3, |
| 47 | MLX5_IB_UAPI_FLOW_TABLE_TYPE_RDMA_TX = 0x4, | ||
| 47 | }; | 48 | }; |
| 48 | 49 | ||
| 49 | enum mlx5_ib_uapi_flow_action_packet_reformat_type { | 50 | enum mlx5_ib_uapi_flow_action_packet_reformat_type { |
| @@ -73,5 +74,14 @@ struct mlx5_ib_uapi_devx_async_event_hdr { · 23 unmodified lines | |||
| 73 | __u8 out_data[]; | 74 | __u8 out_data[]; |
| 74 | }; | 75 | }; |
| 75 | 76 | ||
| 77 | enum mlx5_ib_uapi_pp_alloc_flags { | ||
| 78 | MLX5_IB_UAPI_PP_ALLOC_FLAGS_DEDICATED_INDEX = 1 << 0, | ||
| 79 | }; | ||
| 80 | |||
| 81 | enum mlx5_ib_uapi_uar_alloc_type { | ||
| 82 | MLX5_IB_UAPI_UAR_ALLOC_TYPE_BF = 0x0, | ||
| 83 | MLX5_IB_UAPI_UAR_ALLOC_TYPE_NC = 0x1, | ||
| 84 | }; | ||
| 85 | |||
| 76 | #endif | 86 | #endif |
| 77 | 87 | ||
| @@ -9,6 +9,7 @@ · 8 unmodified lines | |||
| 9 | #define _FC_ELS_H_ | 9 | #define _FC_ELS_H_ |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 12 | #include <asm/byteorder.h> | ||
| 12 | 13 | ||
| 13 | /* | 14 | /* |
| 14 | * Fibre Channel Switch - Enhanced Link Services definitions. | 15 | * Fibre Channel Switch - Enhanced Link Services definitions. |
| @@ -40,6 +41,7 @@ enum fc_els_cmd { · 25 unmodified lines | |||
| 40 | ELS_REC = 0x13, /* read exchange concise */ | 41 | ELS_REC = 0x13, /* read exchange concise */ |
| 41 | ELS_SRR = 0x14, /* sequence retransmission request */ | 42 | ELS_SRR = 0x14, /* sequence retransmission request */ |
| 42 | ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */ | 43 | ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */ |
| 44 | ELS_RDF = 0x19, /* Register Diagnostic Functions */ | ||
| 43 | ELS_PRLI = 0x20, /* process login */ | 45 | ELS_PRLI = 0x20, /* process login */ |
| 44 | ELS_PRLO = 0x21, /* process logout */ | 46 | ELS_PRLO = 0x21, /* process logout */ |
| 45 | ELS_SCN = 0x22, /* state change notification */ | 47 | ELS_SCN = 0x22, /* state change notification */ |
| @@ -108,6 +110,7 @@ enum fc_els_cmd { · 62 unmodified lines | |||
| 108 | [ELS_REC] = "REC", \ | 110 | [ELS_REC] = "REC", \ |
| 109 | [ELS_SRR] = "SRR", \ | 111 | [ELS_SRR] = "SRR", \ |
| 110 | [ELS_FPIN] = "FPIN", \ | 112 | [ELS_FPIN] = "FPIN", \ |
| 113 | [ELS_RDF] = "RDF", \ | ||
| 111 | [ELS_PRLI] = "PRLI", \ | 114 | [ELS_PRLI] = "PRLI", \ |
| 112 | [ELS_PRLO] = "PRLO", \ | 115 | [ELS_PRLO] = "PRLO", \ |
| 113 | [ELS_SCN] = "SCN", \ | 116 | [ELS_SCN] = "SCN", \ |
| @@ -207,6 +210,99 @@ enum fc_els_rjt_explan { · 93 unmodified lines | |||
| 207 | /* TBD - above definitions incomplete */ | 210 | /* TBD - above definitions incomplete */ |
| 208 | }; | 211 | }; |
| 209 | 212 | ||
| 213 | /* | ||
| 214 | * Link Service TLV Descriptor Tag Values | ||
| 215 | */ | ||
| 216 | enum fc_ls_tlv_dtag { | ||
| 217 | ELS_DTAG_LS_REQ_INFO = 0x00000001, | ||
| 218 | /* Link Service Request Information Descriptor */ | ||
| 219 | ELS_DTAG_LNK_INTEGRITY = 0x00020001, | ||
| 220 | /* Link Integrity Notification Descriptor */ | ||
| 221 | ELS_DTAG_DELIVERY = 0x00020002, | ||
| 222 | /* Delivery Notification Descriptor */ | ||
| 223 | ELS_DTAG_PEER_CONGEST = 0x00020003, | ||
| 224 | /* Peer Congestion Notification Descriptor */ | ||
| 225 | ELS_DTAG_CONGESTION = 0x00020004, | ||
| 226 | /* Congestion Notification Descriptor */ | ||
| 227 | ELS_DTAG_FPIN_REGISTER = 0x00030001, | ||
| 228 | /* FPIN Registration Descriptor */ | ||
| 229 | }; | ||
| 230 | |||
| 231 | /* | ||
| 232 | * Initializer useful for decoding table. | ||
| 233 | * Please keep this in sync with the above definitions. | ||
| 234 | */ | ||
| 235 | #define FC_LS_TLV_DTAG_INIT { \ | ||
| 236 | { ELS_DTAG_LS_REQ_INFO, "Link Service Request Information" }, \ | ||
| 237 | { ELS_DTAG_LNK_INTEGRITY, "Link Integrity Notification" }, \ | ||
| 238 | { ELS_DTAG_DELIVERY, "Delivery Notification Present" }, \ | ||
| 239 | { ELS_DTAG_PEER_CONGEST, "Peer Congestion Notification" }, \ | ||
| 240 | { ELS_DTAG_CONGESTION, "Congestion Notification" }, \ | ||
| 241 | { ELS_DTAG_FPIN_REGISTER, "FPIN Registration" }, \ | ||
| 242 | } | ||
| 243 | |||
| 244 | |||
| 245 | /* | ||
| 246 | * Generic Link Service TLV Descriptor format | ||
| 247 | * | ||
| 248 | * This structure, as it defines no payload, will also be referred to | ||
| 249 | * as the "tlv header" - which contains the tag and len fields. | ||
| 250 | */ | ||
| 251 | struct fc_tlv_desc { | ||
| 252 | __be32 desc_tag; /* Notification Descriptor Tag */ | ||
| 253 | __be32 desc_len; /* Length of Descriptor (in bytes). | ||
| 254 | * Size of descriptor excluding | ||
| 255 | * desc_tag and desc_len fields. | ||
| 256 | */ | ||
| 257 | __u8 desc_value[0]; /* Descriptor Value */ | ||
| 258 | }; | ||
| 259 | |||
| 260 | /* Descriptor tag and len fields are considered the mandatory header | ||
| 261 | * for a descriptor | ||
| 262 | */ | ||
| 263 | #define FC_TLV_DESC_HDR_SZ sizeof(struct fc_tlv_desc) | ||
| 264 | |||
| 265 | /* | ||
| 266 | * Macro, used when initializing payloads, to return the descriptor length. | ||
| 267 | * Length is size of descriptor minus the tag and len fields. | ||
| 268 | */ | ||
| 269 | #define FC_TLV_DESC_LENGTH_FROM_SZ(desc) \ | ||
| 270 | (sizeof(desc) - FC_TLV_DESC_HDR_SZ) | ||
| 271 | |||
| 272 | /* Macro, used on received payloads, to return the descriptor length */ | ||
| 273 | #define FC_TLV_DESC_SZ_FROM_LENGTH(tlv) \ | ||
| 274 | (__be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ) | ||
| 275 | |||
| 276 | /* | ||
| 277 | * This helper is used to walk descriptors in a descriptor list. | ||
| 278 | * Given the address of the current descriptor, which minimally contains a | ||
| 279 | * tag and len field, calculate the address of the next descriptor based | ||
| 280 | * on the len field. | ||
| 281 | */ | ||
| 282 | static inline void *fc_tlv_next_desc(void *desc) | ||
| 283 | { | ||
| 284 | struct fc_tlv_desc *tlv = desc; | ||
| 285 | |||
| 286 | return (desc + FC_TLV_DESC_SZ_FROM_LENGTH(tlv)); | ||
| 287 | } | ||
| 288 | |||
| 289 | |||
| 290 | /* | ||
| 291 | * Link Service Request Information Descriptor | ||
| 292 | */ | ||
| 293 | struct fc_els_lsri_desc { | ||
| 294 | __be32 desc_tag; /* descriptor tag (0x0000 0001) */ | ||
| 295 | __be32 desc_len; /* Length of Descriptor (in bytes) (4). | ||
| 296 | * Size of descriptor excluding | ||
| 297 | * desc_tag and desc_len fields. | ||
| 298 | */ | ||
| 299 | struct { | ||
| 300 | __u8 cmd; /* ELS cmd byte */ | ||
| 301 | __u8 bytes[3]; /* bytes 1..3 */ | ||
| 302 | } rqst_w0; /* Request word 0 */ | ||
| 303 | }; | ||
| 304 | |||
| 305 | |||
| 210 | /* | 306 | /* |
| 211 | * Common service parameters (N ports). | 307 | * Common service parameters (N ports). |
| 212 | */ | 308 | */ |
| @@ -819,24 +915,61 @@ enum fc_els_clid_ic { · 606 unmodified lines | |||
| 819 | }; | 915 | }; |
| 820 | 916 | ||
| 821 | 917 | ||
| 918 | enum fc_fpin_li_event_types { | ||
| 919 | FPIN_LI_UNKNOWN = 0x0, | ||
| 920 | FPIN_LI_LINK_FAILURE = 0x1, | ||
| 921 | FPIN_LI_LOSS_OF_SYNC = 0x2, | ||
| 922 | FPIN_LI_LOSS_OF_SIG = 0x3, | ||
| 923 | FPIN_LI_PRIM_SEQ_ERR = 0x4, | ||
| 924 | FPIN_LI_INVALID_TX_WD = 0x5, | ||
| 925 | FPIN_LI_INVALID_CRC = 0x6, | ||
| 926 | FPIN_LI_DEVICE_SPEC = 0xF, | ||
| 927 | }; | ||
| 928 | |||
| 822 | /* | 929 | /* |
| 823 | * Fabric Notification Descriptor Tag values | 930 | * Initializer useful for decoding table. |
| 931 | * Please keep this in sync with the above definitions. | ||
| 824 | */ | 932 | */ |
| 825 | enum fc_fn_dtag { | 933 | #define FC_FPIN_LI_EVT_TYPES_INIT { \ |
| 826 | ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001, /* Link Integrity */ | 934 | { FPIN_LI_UNKNOWN, "Unknown" }, \ |
| 827 | ELS_FN_DTAG_PEER_CONGEST = 0x00020003, /* Peer Congestion */ | 935 | { FPIN_LI_LINK_FAILURE, "Link Failure" }, \ |
| 828 | ELS_FN_DTAG_CONGESTION = 0x00020004, /* Congestion */ | 936 | { FPIN_LI_LOSS_OF_SYNC, "Loss of Synchronization" }, \ |
| 829 | }; | 937 | { FPIN_LI_LOSS_OF_SIG, "Loss of Signal" }, \ |
| 938 | { FPIN_LI_PRIM_SEQ_ERR, "Primitive Sequence Protocol Error" }, \ | ||
| 939 | { FPIN_LI_INVALID_TX_WD, "Invalid Transmission Word" }, \ | ||
| 940 | { FPIN_LI_INVALID_CRC, "Invalid CRC" }, \ | ||
| 941 | { FPIN_LI_DEVICE_SPEC, "Device Specific" }, \ | ||
| 942 | } | ||
| 943 | |||
| 830 | 944 | ||
| 831 | /* | 945 | /* |
| 832 | * Fabric Notification Descriptor | 946 | * Link Integrity Notification Descriptor |
| 833 | */ | 947 | */ |
| 834 | struct fc_fn_desc { | 948 | struct fc_fn_li_desc { |
| 835 | __be32 fn_desc_tag; /* Notification Descriptor Tag */ | 949 | __be32 desc_tag; /* Descriptor Tag (0x00020001) */ |
| 836 | __be32 fn_desc_value_len; /* Length of Descriptor Value field | 950 | __be32 desc_len; /* Length of Descriptor (in bytes). |
| 837 | * (in bytes) | 951 | * Size of descriptor excluding |
| 838 | */ | 952 | * desc_tag and desc_len fields. |
| 839 | __u8 fn_desc_value[0]; /* Descriptor Value */ | 953 | */ |
| 954 | __be64 detecting_wwpn; /* Port Name that detected event */ | ||
| 955 | __be64 attached_wwpn; /* Port Name of device attached to | ||
| 956 | * detecting Port Name | ||
| 957 | */ | ||
| 958 | __be16 event_type; /* see enum fc_fpin_li_event_types */ | ||
| 959 | __be16 event_modifier; /* Implementation specific value | ||
| 960 | * describing the event type | ||
| 961 | */ | ||
| 962 | __be32 event_threshold;/* duration in ms of the link | ||
| 963 | * integrity detection cycle | ||
| 964 | */ | ||
| 965 | __be32 event_count; /* minimum number of event | ||
| 966 | * occurrences during the event | ||
| 967 | * threshold to caause the LI event | ||
| 968 | */ | ||
| 969 | __be32 pname_count; /* number of portname_list elements */ | ||
| 970 | __be64 pname_list[0]; /* list of N_Port_Names accessible | ||
| 971 | * through the attached port | ||
| 972 | */ | ||
| 840 | }; | 973 | }; |
| 841 | 974 | ||
| 842 | /* | 975 | /* |
| @@ -845,8 +978,56 @@ struct fc_fn_desc { · 2 unmodified lines | |||
| 845 | struct fc_els_fpin { | 978 | struct fc_els_fpin { |
| 846 | __u8 fpin_cmd; /* command (0x16) */ | 979 | __u8 fpin_cmd; /* command (0x16) */ |
| 847 | __u8 fpin_zero[3]; /* specified as zero - part of cmd */ | 980 | __u8 fpin_zero[3]; /* specified as zero - part of cmd */ |
| 848 | __be32 fpin_desc_cnt; /* count of descriptors */ | 981 | __be32 desc_len; /* Length of Descriptor List (in bytes). |
| 849 | struct fc_fn_desc fpin_desc[0]; /* Descriptor list */ | 982 | * Size of ELS excluding fpin_cmd, |
| 983 | * fpin_zero and desc_len fields. | ||
| 984 | */ | ||
| 985 | struct fc_tlv_desc fpin_desc[0]; /* Descriptor list */ | ||
| 986 | }; | ||
| 987 | |||
| 988 | /* Diagnostic Function Descriptor - FPIN Registration */ | ||
| 989 | struct fc_df_desc_fpin_reg { | ||
| 990 | __be32 desc_tag; /* FPIN Registration (0x00030001) */ | ||
| 991 | __be32 desc_len; /* Length of Descriptor (in bytes). | ||
| 992 | * Size of descriptor excluding | ||
| 993 | * desc_tag and desc_len fields. | ||
| 994 | */ | ||
| 995 | __be32 count; /* Number of desc_tags elements */ | ||
| 996 | __be32 desc_tags[0]; /* Array of Descriptor Tags. | ||
| 997 | * Each tag indicates a function | ||
| 998 | * supported by the N_Port (request) | ||
| 999 | * or by the N_Port and Fabric | ||
| 1000 | * Controller (reply; may be a subset | ||
| 1001 | * of the request). | ||
| 1002 | * See ELS_FN_DTAG_xxx for tag values. | ||
| 1003 | */ | ||
| 850 | }; | 1004 | }; |
| 851 | 1005 | ||
| 1006 | /* | ||
| 1007 | * ELS_RDF - Register Diagnostic Functions | ||
| 1008 | */ | ||
| 1009 | struct fc_els_rdf { | ||
| 1010 | __u8 fpin_cmd; /* command (0x19) */ | ||
| 1011 | __u8 fpin_zero[3]; /* specified as zero - part of cmd */ | ||
| 1012 | __be32 desc_len; /* Length of Descriptor List (in bytes). | ||
| 1013 | * Size of ELS excluding fpin_cmd, | ||
| 1014 | * fpin_zero and desc_len fields. | ||
| 1015 | */ | ||
| 1016 | struct fc_tlv_desc desc[0]; /* Descriptor list */ | ||
| 1017 | }; | ||
| 1018 | |||
| 1019 | /* | ||
| 1020 | * ELS RDF LS_ACC Response. | ||
| 1021 | */ | ||
| 1022 | struct fc_els_rdf_resp { | ||
| 1023 | struct fc_els_ls_acc acc_hdr; | ||
| 1024 | __be32 desc_list_len; /* Length of response (in | ||
| 1025 | * bytes). Excludes acc_hdr | ||
| 1026 | * and desc_list_len fields. | ||
| 1027 | */ | ||
| 1028 | struct fc_els_lsri_desc lsri; | ||
| 1029 | struct fc_tlv_desc desc[0]; /* Supported Descriptor list */ | ||
| 1030 | }; | ||
| 1031 | |||
| 1032 | |||
| 852 | #endif /* _FC_ELS_H_ */ | 1033 | #endif /* _FC_ELS_H_ */ |
| @@ -209,7 +209,7 @@ struct fc_bsg_host_vendor { · 208 unmodified lines | |||
| 209 | __u64 vendor_id; | 209 | __u64 vendor_id; |
| 210 | 210 | ||
| 211 | /* start of vendor command area */ | 211 | /* start of vendor command area */ |
| 212 | __u32 vendor_cmd[0]; | 212 | __u32 vendor_cmd[]; |
| 213 | }; | 213 | }; |
| 214 | 214 | ||
| 215 | /* Response: | 215 | /* Response: |
| @@ -17,6 +17,7 @@ · 16 unmodified lines | |||
| 17 | #define __LINUX_UAPI_SND_ASOC_H | 17 | #define __LINUX_UAPI_SND_ASOC_H |
| 18 | 18 | ||
| 19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
| 20 | #include <sound/asound.h> | ||
| 20 | 21 | ||
| 21 | /* | 22 | /* |
| 22 | * Maximum number of channels topology kcontrol can represent. | 23 | * Maximum number of channels topology kcontrol can represent. |
| @@ -31,7 +31,7 @@ · 30 unmodified lines | |||
| 31 | #include <sound/compress_params.h> | 31 | #include <sound/compress_params.h> |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | #define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 2) | 34 | #define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 2, 0) |
| 35 | /** | 35 | /** |
| 36 | * struct snd_compressed_buffer - compressed buffer | 36 | * struct snd_compressed_buffer - compressed buffer |
| 37 | * @fragment_size: size of buffer fragment in bytes | 37 | * @fragment_size: size of buffer fragment in bytes |
| @@ -75,7 +75,9 @@ · 74 unmodified lines | |||
| 75 | #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C) | 75 | #define SND_AUDIOCODEC_G723_1 ((__u32) 0x0000000C) |
| 76 | #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D) | 76 | #define SND_AUDIOCODEC_G729 ((__u32) 0x0000000D) |
| 77 | #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E) | 77 | #define SND_AUDIOCODEC_BESPOKE ((__u32) 0x0000000E) |
| 78 | #define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_BESPOKE | 78 | #define SND_AUDIOCODEC_ALAC ((__u32) 0x0000000F) |
| 79 | #define SND_AUDIOCODEC_APE ((__u32) 0x00000010) | ||
| 80 | #define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_APE | ||
| 79 | 81 | ||
| 80 | /* | 82 | /* |
| 81 | * Profile and modes are listed with bit masks. This allows for a | 83 | * Profile and modes are listed with bit masks. This allows for a |
| @@ -142,6 +144,9 @@ · 60 unmodified lines | |||
| 142 | #define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002) | 144 | #define SND_AUDIOPROFILE_WMA8 ((__u32) 0x00000002) |
| 143 | #define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004) | 145 | #define SND_AUDIOPROFILE_WMA9 ((__u32) 0x00000004) |
| 144 | #define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008) | 146 | #define SND_AUDIOPROFILE_WMA10 ((__u32) 0x00000008) |
| 147 | #define SND_AUDIOPROFILE_WMA9_PRO ((__u32) 0x00000010) | ||
| 148 | #define SND_AUDIOPROFILE_WMA9_LOSSLESS ((__u32) 0x00000020) | ||
| 149 | #define SND_AUDIOPROFILE_WMA10_LOSSLESS ((__u32) 0x00000040) | ||
| 145 | 150 | ||
| 146 | #define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001) | 151 | #define SND_AUDIOMODE_WMA_LEVEL1 ((__u32) 0x00000001) |
| 147 | #define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002) | 152 | #define SND_AUDIOMODE_WMA_LEVEL2 ((__u32) 0x00000002) |
| @@ -326,6 +331,33 @@ struct snd_dec_flac { · 178 unmodified lines | |||
| 326 | __u16 reserved; | 331 | __u16 reserved; |
| 327 | } __attribute__((packed, aligned(4))); | 332 | } __attribute__((packed, aligned(4))); |
| 328 | 333 | ||
| 334 | struct snd_dec_wma { | ||
| 335 | __u32 encoder_option; | ||
| 336 | __u32 adv_encoder_option; | ||
| 337 | __u32 adv_encoder_option2; | ||
| 338 | __u32 reserved; | ||
| 339 | } __attribute__((packed, aligned(4))); | ||
| 340 | |||
| 341 | struct snd_dec_alac { | ||
| 342 | __u32 frame_length; | ||
| 343 | __u8 compatible_version; | ||
| 344 | __u8 pb; | ||
| 345 | __u8 mb; | ||
| 346 | __u8 kb; | ||
| 347 | __u32 max_run; | ||
| 348 | __u32 max_frame_bytes; | ||
| 349 | } __attribute__((packed, aligned(4))); | ||
| 350 | |||
| 351 | struct snd_dec_ape { | ||
| 352 | __u16 compatible_version; | ||
| 353 | __u16 compression_level; | ||
| 354 | __u32 format_flags; | ||
| 355 | __u32 blocks_per_frame; | ||
| 356 | __u32 final_frame_blocks; | ||
| 357 | __u32 total_frames; | ||
| 358 | __u32 seek_table_present; | ||
| 359 | } __attribute__((packed, aligned(4))); | ||
| 360 | |||
| 329 | union snd_codec_options { | 361 | union snd_codec_options { |
| 330 | struct snd_enc_wma wma; | 362 | struct snd_enc_wma wma; |
| 331 | struct snd_enc_vorbis vorbis; | 363 | struct snd_enc_vorbis vorbis; |
| @@ -333,6 +365,9 @@ union snd_codec_options { · 1 unmodified line | |||
| 333 | struct snd_enc_flac flac; | 365 | struct snd_enc_flac flac; |
| 334 | struct snd_enc_generic generic; | 366 | struct snd_enc_generic generic; |
| 335 | struct snd_dec_flac flac_d; | 367 | struct snd_dec_flac flac_d; |
| 368 | struct snd_dec_wma wma_d; | ||
| 369 | struct snd_dec_alac alac_d; | ||
| 370 | struct snd_dec_ape ape_d; | ||
| 336 | } __attribute__((packed, aligned(4))); | 371 | } __attribute__((packed, aligned(4))); |
| 337 | 372 | ||
| 338 | /** struct snd_codec_desc - description of codec capabilities | 373 | /** struct snd_codec_desc - description of codec capabilities |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | |||
| 26 | 26 | ||
| 27 | /* SOF ABI version major, minor and patch numbers */ | 27 | /* SOF ABI version major, minor and patch numbers */ |
| 28 | #define SOF_ABI_MAJOR 3 | 28 | #define SOF_ABI_MAJOR 3 |
| 29 | #define SOF_ABI_MINOR 12 | 29 | #define SOF_ABI_MINOR 13 |
| 30 | #define SOF_ABI_PATCH 0 | 30 | #define SOF_ABI_PATCH 0 |
| 31 | 31 | ||
| 32 | /* SOF ABI version number. Format within 32bit word is MMmmmppp */ | 32 | /* SOF ABI version number. Format within 32bit word is MMmmmppp */ |