Kickstart 6.9 development cycle.
Showing the changes to include/uapi (67 of 11106 files). Show all
Unified · Split
| @@ -829,8 +829,21 @@ __SYSCALL(__NR_futex_wait, sys_futex_wait) · 828 unmodified lines | |||
| 829 | #define __NR_futex_requeue 456 | 829 | #define __NR_futex_requeue 456 |
| 830 | __SYSCALL(__NR_futex_requeue, sys_futex_requeue) | 830 | __SYSCALL(__NR_futex_requeue, sys_futex_requeue) |
| 831 | 831 | ||
| 832 | #define __NR_statmount 457 | ||
| 833 | __SYSCALL(__NR_statmount, sys_statmount) | ||
| 834 | |||
| 835 | #define __NR_listmount 458 | ||
| 836 | __SYSCALL(__NR_listmount, sys_listmount) | ||
| 837 | |||
| 838 | #define __NR_lsm_get_self_attr 459 | ||
| 839 | __SYSCALL(__NR_lsm_get_self_attr, sys_lsm_get_self_attr) | ||
| 840 | #define __NR_lsm_set_self_attr 460 | ||
| 841 | __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr) | ||
| 842 | #define __NR_lsm_list_modules 461 | ||
| 843 | __SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules) | ||
| 844 | |||
| 832 | #undef __NR_syscalls | 845 | #undef __NR_syscalls |
| 833 | #define __NR_syscalls 457 | 846 | #define __NR_syscalls 462 |
| 834 | 847 | ||
| 835 | /* | 848 | /* |
| 836 | * 32 bit systems traditionally used different | 849 | * 32 bit systems traditionally used different |
| @@ -846,6 +846,14 @@ struct drm_color_ctm { · 845 unmodified lines | |||
| 846 | __u64 matrix[9]; | 846 | __u64 matrix[9]; |
| 847 | }; | 847 | }; |
| 848 | 848 | ||
| 849 | struct drm_color_ctm_3x4 { | ||
| 850 | /* | ||
| 851 | * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude | ||
| 852 | * (not two's complement!) format. | ||
| 853 | */ | ||
| 854 | __u64 matrix[12]; | ||
| 855 | }; | ||
| 856 | |||
| 849 | struct drm_color_lut { | 857 | struct drm_color_lut { |
| 850 | /* | 858 | /* |
| 851 | * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and | 859 | * Values are mapped linearly to 0.0 - 1.0 range, with 0x0 == 0.0 and |
| @@ -846,6 +846,7 @@ enum hl_server_type { · 845 unmodified lines | |||
| 846 | #define HL_INFO_HW_ERR_EVENT 36 | 846 | #define HL_INFO_HW_ERR_EVENT 36 |
| 847 | #define HL_INFO_FW_ERR_EVENT 37 | 847 | #define HL_INFO_FW_ERR_EVENT 37 |
| 848 | #define HL_INFO_USER_ENGINE_ERR_EVENT 38 | 848 | #define HL_INFO_USER_ENGINE_ERR_EVENT 38 |
| 849 | #define HL_INFO_DEV_SIGNED 40 | ||
| 849 | 850 | ||
| 850 | #define HL_INFO_VERSION_MAX_LEN 128 | 851 | #define HL_INFO_VERSION_MAX_LEN 128 |
| 851 | #define HL_INFO_CARD_NAME_MAX_LEN 16 | 852 | #define HL_INFO_CARD_NAME_MAX_LEN 16 |
| @@ -1256,6 +1257,7 @@ struct hl_info_dev_memalloc_page_sizes { · 404 unmodified lines | |||
| 1256 | #define SEC_SIGNATURE_BUF_SZ 255 /* (256 - 1) 1 byte used for size */ | 1257 | #define SEC_SIGNATURE_BUF_SZ 255 /* (256 - 1) 1 byte used for size */ |
| 1257 | #define SEC_PUB_DATA_BUF_SZ 510 /* (512 - 2) 2 bytes used for size */ | 1258 | #define SEC_PUB_DATA_BUF_SZ 510 /* (512 - 2) 2 bytes used for size */ |
| 1258 | #define SEC_CERTIFICATE_BUF_SZ 2046 /* (2048 - 2) 2 bytes used for size */ | 1259 | #define SEC_CERTIFICATE_BUF_SZ 2046 /* (2048 - 2) 2 bytes used for size */ |
| 1260 | #define SEC_DEV_INFO_BUF_SZ 5120 | ||
| 1259 | 1261 | ||
| 1260 | /* | 1262 | /* |
| 1261 | * struct hl_info_sec_attest - attestation report of the boot | 1263 | * struct hl_info_sec_attest - attestation report of the boot |
| @@ -1290,6 +1292,32 @@ struct hl_info_sec_attest { · 28 unmodified lines | |||
| 1290 | __u8 pad0[2]; | 1292 | __u8 pad0[2]; |
| 1291 | }; | 1293 | }; |
| 1292 | 1294 | ||
| 1295 | /* | ||
| 1296 | * struct hl_info_signed - device information signed by a secured device. | ||
| 1297 | * @nonce: number only used once. random number provided by host. this also passed to the quote | ||
| 1298 | * command as a qualifying data. | ||
| 1299 | * @pub_data_len: length of the public data (bytes) | ||
| 1300 | * @certificate_len: length of the certificate (bytes) | ||
| 1301 | * @info_sig_len: length of the attestation signature (bytes) | ||
| 1302 | * @public_data: public key info signed info data (outPublic + name + qualifiedName) | ||
| 1303 | * @certificate: certificate for the signing key | ||
| 1304 | * @info_sig: signature of the info + nonce data. | ||
| 1305 | * @dev_info_len: length of device info (bytes) | ||
| 1306 | * @dev_info: device info as byte array. | ||
| 1307 | */ | ||
| 1308 | struct hl_info_signed { | ||
| 1309 | __u32 nonce; | ||
| 1310 | __u16 pub_data_len; | ||
| 1311 | __u16 certificate_len; | ||
| 1312 | __u8 info_sig_len; | ||
| 1313 | __u8 public_data[SEC_PUB_DATA_BUF_SZ]; | ||
| 1314 | __u8 certificate[SEC_CERTIFICATE_BUF_SZ]; | ||
| 1315 | __u8 info_sig[SEC_SIGNATURE_BUF_SZ]; | ||
| 1316 | __u16 dev_info_len; | ||
| 1317 | __u8 dev_info[SEC_DEV_INFO_BUF_SZ]; | ||
| 1318 | __u8 pad[2]; | ||
| 1319 | }; | ||
| 1320 | |||
| 1293 | /** | 1321 | /** |
| 1294 | * struct hl_page_fault_info - page fault information. | 1322 | * struct hl_page_fault_info - page fault information. |
| 1295 | * @timestamp: timestamp of page fault. | 1323 | * @timestamp: timestamp of page fault. |
| @@ -693,7 +693,7 @@ typedef struct drm_i915_irq_wait { · 692 unmodified lines | |||
| 693 | #define I915_PARAM_HAS_EXEC_FENCE 44 | 693 | #define I915_PARAM_HAS_EXEC_FENCE 44 |
| 694 | 694 | ||
| 695 | /* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to capture | 695 | /* Query whether DRM_I915_GEM_EXECBUFFER2 supports the ability to capture |
| 696 | * user specified bufffers for post-mortem debugging of GPU hangs. See | 696 | * user-specified buffers for post-mortem debugging of GPU hangs. See |
| 697 | * EXEC_OBJECT_CAPTURE. | 697 | * EXEC_OBJECT_CAPTURE. |
| 698 | */ | 698 | */ |
| 699 | #define I915_PARAM_HAS_EXEC_CAPTURE 45 | 699 | #define I915_PARAM_HAS_EXEC_CAPTURE 45 |
| @@ -1606,7 +1606,7 @@ struct drm_i915_gem_busy { · 906 unmodified lines | |||
| 1606 | * is accurate. | 1606 | * is accurate. |
| 1607 | * | 1607 | * |
| 1608 | * The returned dword is split into two fields to indicate both | 1608 | * The returned dword is split into two fields to indicate both |
| 1609 | * the engine classess on which the object is being read, and the | 1609 | * the engine classes on which the object is being read, and the |
| 1610 | * engine class on which it is currently being written (if any). | 1610 | * engine class on which it is currently being written (if any). |
| 1611 | * | 1611 | * |
| 1612 | * The low word (bits 0:15) indicate if the object is being written | 1612 | * The low word (bits 0:15) indicate if the object is being written |
| @@ -1815,7 +1815,7 @@ struct drm_i915_gem_madvise { · 202 unmodified lines | |||
| 1815 | __u32 handle; | 1815 | __u32 handle; |
| 1816 | 1816 | ||
| 1817 | /* Advice: either the buffer will be needed again in the near future, | 1817 | /* Advice: either the buffer will be needed again in the near future, |
| 1818 | * or wont be and could be discarded under memory pressure. | 1818 | * or won't be and could be discarded under memory pressure. |
| 1819 | */ | 1819 | */ |
| 1820 | __u32 madv; | 1820 | __u32 madv; |
| 1821 | 1821 | ||
| @@ -3246,7 +3246,7 @@ struct drm_i915_query_topology_info { · 1424 unmodified lines | |||
| 3246 | * // enough to hold our array of engines. The kernel will fill out the | 3246 | * // enough to hold our array of engines. The kernel will fill out the |
| 3247 | * // item.length for us, which is the number of bytes we need. | 3247 | * // item.length for us, which is the number of bytes we need. |
| 3248 | * // | 3248 | * // |
| 3249 | * // Alternatively a large buffer can be allocated straight away enabling | 3249 | * // Alternatively a large buffer can be allocated straightaway enabling |
| 3250 | * // querying in one pass, in which case item.length should contain the | 3250 | * // querying in one pass, in which case item.length should contain the |
| 3251 | * // length of the provided buffer. | 3251 | * // length of the provided buffer. |
| 3252 | * err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); | 3252 | * err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); |
| @@ -3256,7 +3256,7 @@ struct drm_i915_query_topology_info { · 3 unmodified lines | |||
| 3256 | * // Now that we allocated the required number of bytes, we call the ioctl | 3256 | * // Now that we allocated the required number of bytes, we call the ioctl |
| 3257 | * // again, this time with the data_ptr pointing to our newly allocated | 3257 | * // again, this time with the data_ptr pointing to our newly allocated |
| 3258 | * // blob, which the kernel can then populate with info on all engines. | 3258 | * // blob, which the kernel can then populate with info on all engines. |
| 3259 | * item.data_ptr = (uintptr_t)&info, | 3259 | * item.data_ptr = (uintptr_t)&info; |
| 3260 | * | 3260 | * |
| 3261 | * err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); | 3261 | * err = ioctl(fd, DRM_IOCTL_I915_QUERY, &query); |
| 3262 | * if (err) ... | 3262 | * if (err) ... |
| @@ -3286,7 +3286,7 @@ struct drm_i915_query_topology_info { · 23 unmodified lines | |||
| 3286 | /** | 3286 | /** |
| 3287 | * struct drm_i915_engine_info | 3287 | * struct drm_i915_engine_info |
| 3288 | * | 3288 | * |
| 3289 | * Describes one engine and it's capabilities as known to the driver. | 3289 | * Describes one engine and its capabilities as known to the driver. |
| 3290 | */ | 3290 | */ |
| 3291 | struct drm_i915_engine_info { | 3291 | struct drm_i915_engine_info { |
| 3292 | /** @engine: Engine class and instance. */ | 3292 | /** @engine: Engine class and instance. */ |
| @@ -86,6 +86,7 @@ struct drm_msm_timespec { · 85 unmodified lines | |||
| 86 | #define MSM_PARAM_CMDLINE 0x0d /* WO: override for task cmdline */ | 86 | #define MSM_PARAM_CMDLINE 0x0d /* WO: override for task cmdline */ |
| 87 | #define MSM_PARAM_VA_START 0x0e /* RO: start of valid GPU iova range */ | 87 | #define MSM_PARAM_VA_START 0x0e /* RO: start of valid GPU iova range */ |
| 88 | #define MSM_PARAM_VA_SIZE 0x0f /* RO: size of valid GPU iova range (bytes) */ | 88 | #define MSM_PARAM_VA_SIZE 0x0f /* RO: size of valid GPU iova range (bytes) */ |
| 89 | #define MSM_PARAM_HIGHEST_BANK_BIT 0x10 /* RO */ | ||
| 89 | 90 | ||
| 90 | /* For backwards compat. The original support for preemption was based on | 91 | /* For backwards compat. The original support for preemption was based on |
| 91 | * a single ring per priority level so # of priority levels equals the # | 92 | * a single ring per priority level so # of priority levels equals the # |
| @@ -139,6 +140,8 @@ struct drm_msm_gem_new { · 47 unmodified lines | |||
| 139 | #define MSM_INFO_GET_NAME 0x03 /* get debug name, returned by pointer */ | 140 | #define MSM_INFO_GET_NAME 0x03 /* get debug name, returned by pointer */ |
| 140 | #define MSM_INFO_SET_IOVA 0x04 /* set the iova, passed by value */ | 141 | #define MSM_INFO_SET_IOVA 0x04 /* set the iova, passed by value */ |
| 141 | #define MSM_INFO_GET_FLAGS 0x05 /* get the MSM_BO_x flags */ | 142 | #define MSM_INFO_GET_FLAGS 0x05 /* get the MSM_BO_x flags */ |
| 143 | #define MSM_INFO_SET_METADATA 0x06 /* set userspace metadata */ | ||
| 144 | #define MSM_INFO_GET_METADATA 0x07 /* get userspace metadata */ | ||
| 142 | 145 | ||
| 143 | struct drm_msm_gem_info { | 146 | struct drm_msm_gem_info { |
| 144 | __u32 handle; /* in */ | 147 | __u32 handle; /* in */ |
| @@ -0,0 +1,1347 @@ | |||
| 1 | /* SPDX-License-Identifier: MIT */ | ||
| 2 | /* | ||
| 3 | * Copyright © 2023 Intel Corporation | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _UAPI_XE_DRM_H_ | ||
| 7 | #define _UAPI_XE_DRM_H_ | ||
| 8 | |||
| 9 | #include "drm.h" | ||
| 10 | |||
| 11 | #if defined(__cplusplus) | ||
| 12 | extern "C" { | ||
| 13 | #endif | ||
| 14 | |||
| 15 | /* | ||
| 16 | * Please note that modifications to all structs defined here are | ||
| 17 | * subject to backwards-compatibility constraints. | ||
| 18 | * Sections in this file are organized as follows: | ||
| 19 | * 1. IOCTL definition | ||
| 20 | * 2. Extension definition and helper structs | ||
| 21 | * 3. IOCTL's Query structs in the order of the Query's entries. | ||
| 22 | * 4. The rest of IOCTL structs in the order of IOCTL declaration. | ||
| 23 | */ | ||
| 24 | |||
| 25 | /** | ||
| 26 | * DOC: Xe Device Block Diagram | ||
| 27 | * | ||
| 28 | * The diagram below represents a high-level simplification of a discrete | ||
| 29 | * GPU supported by the Xe driver. It shows some device components which | ||
| 30 | * are necessary to understand this API, as well as how their relations | ||
| 31 | * to each other. This diagram does not represent real hardware:: | ||
| 32 | * | ||
| 33 | * ┌──────────────────────────────────────────────────────────────────┐ | ||
| 34 | * │ ┌──────────────────────────────────────────────────┐ ┌─────────┐ │ | ||
| 35 | * │ │ ┌───────────────────────┐ ┌─────┐ │ │ ┌─────┐ │ │ | ||
| 36 | * │ │ │ VRAM0 ├───┤ ... │ │ │ │VRAM1│ │ │ | ||
| 37 | * │ │ └───────────┬───────────┘ └─GT1─┘ │ │ └──┬──┘ │ │ | ||
| 38 | * │ │ ┌──────────────────┴───────────────────────────┐ │ │ ┌──┴──┐ │ │ | ||
| 39 | * │ │ │ ┌─────────────────────┐ ┌─────────────────┐ │ │ │ │ │ │ │ | ||
| 40 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 41 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │RCS0 │ │BCS0 │ │ │ │ │ │ │ │ │ | ||
| 42 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 43 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 44 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │VCS0 │ │VCS1 │ │ │ │ │ │ │ │ │ | ||
| 45 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 46 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 47 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │VECS0│ │VECS1│ │ │ │ │ │ ... │ │ │ | ||
| 48 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 49 | * │ │ │ │ ┌──┐ ┌──┐ ┌──┐ ┌──┐ │ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 50 | * │ │ │ │ │EU│ │EU│ │EU│ │EU│ │ │ │CCS0 │ │CCS1 │ │ │ │ │ │ │ │ │ | ||
| 51 | * │ │ │ │ └──┘ └──┘ └──┘ └──┘ │ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 52 | * │ │ │ └─────────DSS─────────┘ │ ┌─────┐ ┌─────┐ │ │ │ │ │ │ │ │ | ||
| 53 | * │ │ │ │ │CCS2 │ │CCS3 │ │ │ │ │ │ │ │ │ | ||
| 54 | * │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ └─────┘ └─────┘ │ │ │ │ │ │ │ │ | ||
| 55 | * │ │ │ │ ... │ │ ... │ │ ... │ │ │ │ │ │ │ │ │ │ | ||
| 56 | * │ │ │ └─DSS─┘ └─DSS─┘ └─DSS─┘ └─────Engines─────┘ │ │ │ │ │ │ │ | ||
| 57 | * │ │ └───────────────────────────GT0────────────────┘ │ │ └─GT2─┘ │ │ | ||
| 58 | * │ └────────────────────────────Tile0─────────────────┘ └─ Tile1──┘ │ | ||
| 59 | * └─────────────────────────────Device0───────┬──────────────────────┘ | ||
| 60 | * │ | ||
| 61 | * ───────────────────────┴────────── PCI bus | ||
| 62 | */ | ||
| 63 | |||
| 64 | /** | ||
| 65 | * DOC: Xe uAPI Overview | ||
| 66 | * | ||
| 67 | * This section aims to describe the Xe's IOCTL entries, its structs, and other | ||
| 68 | * Xe related uAPI such as uevents and PMU (Platform Monitoring Unit) related | ||
| 69 | * entries and usage. | ||
| 70 | * | ||
| 71 | * List of supported IOCTLs: | ||
| 72 | * - &DRM_IOCTL_XE_DEVICE_QUERY | ||
| 73 | * - &DRM_IOCTL_XE_GEM_CREATE | ||
| 74 | * - &DRM_IOCTL_XE_GEM_MMAP_OFFSET | ||
| 75 | * - &DRM_IOCTL_XE_VM_CREATE | ||
| 76 | * - &DRM_IOCTL_XE_VM_DESTROY | ||
| 77 | * - &DRM_IOCTL_XE_VM_BIND | ||
| 78 | * - &DRM_IOCTL_XE_EXEC_QUEUE_CREATE | ||
| 79 | * - &DRM_IOCTL_XE_EXEC_QUEUE_DESTROY | ||
| 80 | * - &DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY | ||
| 81 | * - &DRM_IOCTL_XE_EXEC | ||
| 82 | * - &DRM_IOCTL_XE_WAIT_USER_FENCE | ||
| 83 | */ | ||
| 84 | |||
| 85 | /* | ||
| 86 | * xe specific ioctls. | ||
| 87 | * | ||
| 88 | * The device specific ioctl range is [DRM_COMMAND_BASE, DRM_COMMAND_END) ie | ||
| 89 | * [0x40, 0xa0) (a0 is excluded). The numbers below are defined as offset | ||
| 90 | * against DRM_COMMAND_BASE and should be between [0x0, 0x60). | ||
| 91 | */ | ||
| 92 | #define DRM_XE_DEVICE_QUERY 0x00 | ||
| 93 | #define DRM_XE_GEM_CREATE 0x01 | ||
| 94 | #define DRM_XE_GEM_MMAP_OFFSET 0x02 | ||
| 95 | #define DRM_XE_VM_CREATE 0x03 | ||
| 96 | #define DRM_XE_VM_DESTROY 0x04 | ||
| 97 | #define DRM_XE_VM_BIND 0x05 | ||
| 98 | #define DRM_XE_EXEC_QUEUE_CREATE 0x06 | ||
| 99 | #define DRM_XE_EXEC_QUEUE_DESTROY 0x07 | ||
| 100 | #define DRM_XE_EXEC_QUEUE_GET_PROPERTY 0x08 | ||
| 101 | #define DRM_XE_EXEC 0x09 | ||
| 102 | #define DRM_XE_WAIT_USER_FENCE 0x0a | ||
| 103 | /* Must be kept compact -- no holes */ | ||
| 104 | |||
| 105 | #define DRM_IOCTL_XE_DEVICE_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_DEVICE_QUERY, struct drm_xe_device_query) | ||
| 106 | #define DRM_IOCTL_XE_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_CREATE, struct drm_xe_gem_create) | ||
| 107 | #define DRM_IOCTL_XE_GEM_MMAP_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_GEM_MMAP_OFFSET, struct drm_xe_gem_mmap_offset) | ||
| 108 | #define DRM_IOCTL_XE_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_VM_CREATE, struct drm_xe_vm_create) | ||
| 109 | #define DRM_IOCTL_XE_VM_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_DESTROY, struct drm_xe_vm_destroy) | ||
| 110 | #define DRM_IOCTL_XE_VM_BIND DRM_IOW(DRM_COMMAND_BASE + DRM_XE_VM_BIND, struct drm_xe_vm_bind) | ||
| 111 | #define DRM_IOCTL_XE_EXEC_QUEUE_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_CREATE, struct drm_xe_exec_queue_create) | ||
| 112 | #define DRM_IOCTL_XE_EXEC_QUEUE_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_DESTROY, struct drm_xe_exec_queue_destroy) | ||
| 113 | #define DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_EXEC_QUEUE_GET_PROPERTY, struct drm_xe_exec_queue_get_property) | ||
| 114 | #define DRM_IOCTL_XE_EXEC DRM_IOW(DRM_COMMAND_BASE + DRM_XE_EXEC, struct drm_xe_exec) | ||
| 115 | #define DRM_IOCTL_XE_WAIT_USER_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence) | ||
| 116 | |||
| 117 | /** | ||
| 118 | * DOC: Xe IOCTL Extensions | ||
| 119 | * | ||
| 120 | * Before detailing the IOCTLs and its structs, it is important to highlight | ||
| 121 | * that every IOCTL in Xe is extensible. | ||
| 122 | * | ||
| 123 | * Many interfaces need to grow over time. In most cases we can simply | ||
| 124 | * extend the struct and have userspace pass in more data. Another option, | ||
| 125 | * as demonstrated by Vulkan's approach to providing extensions for forward | ||
| 126 | * and backward compatibility, is to use a list of optional structs to | ||
| 127 | * provide those extra details. | ||
| 128 | * | ||
| 129 | * The key advantage to using an extension chain is that it allows us to | ||
| 130 | * redefine the interface more easily than an ever growing struct of | ||
| 131 | * increasing complexity, and for large parts of that interface to be | ||
| 132 | * entirely optional. The downside is more pointer chasing; chasing across | ||
| 133 | * the __user boundary with pointers encapsulated inside u64. | ||
| 134 | * | ||
| 135 | * Example chaining: | ||
| 136 | * | ||
| 137 | * .. code-block:: C | ||
| 138 | * | ||
| 139 | * struct drm_xe_user_extension ext3 { | ||
| 140 | * .next_extension = 0, // end | ||
| 141 | * .name = ..., | ||
| 142 | * }; | ||
| 143 | * struct drm_xe_user_extension ext2 { | ||
| 144 | * .next_extension = (uintptr_t)&ext3, | ||
| 145 | * .name = ..., | ||
| 146 | * }; | ||
| 147 | * struct drm_xe_user_extension ext1 { | ||
| 148 | * .next_extension = (uintptr_t)&ext2, | ||
| 149 | * .name = ..., | ||
| 150 | * }; | ||
| 151 | * | ||
| 152 | * Typically the struct drm_xe_user_extension would be embedded in some uAPI | ||
| 153 | * struct, and in this case we would feed it the head of the chain(i.e ext1), | ||
| 154 | * which would then apply all of the above extensions. | ||
| 155 | */ | ||
| 156 | |||
| 157 | /** | ||
| 158 | * struct drm_xe_user_extension - Base class for defining a chain of extensions | ||
| 159 | */ | ||
| 160 | struct drm_xe_user_extension { | ||
| 161 | /** | ||
| 162 | * @next_extension: | ||
| 163 | * | ||
| 164 | * Pointer to the next struct drm_xe_user_extension, or zero if the end. | ||
| 165 | */ | ||
| 166 | __u64 next_extension; | ||
| 167 | |||
| 168 | /** | ||
| 169 | * @name: Name of the extension. | ||
| 170 | * | ||
| 171 | * Note that the name here is just some integer. | ||
| 172 | * | ||
| 173 | * Also note that the name space for this is not global for the whole | ||
| 174 | * driver, but rather its scope/meaning is limited to the specific piece | ||
| 175 | * of uAPI which has embedded the struct drm_xe_user_extension. | ||
| 176 | */ | ||
| 177 | __u32 name; | ||
| 178 | |||
| 179 | /** | ||
| 180 | * @pad: MBZ | ||
| 181 | * | ||
| 182 | * All undefined bits must be zero. | ||
| 183 | */ | ||
| 184 | __u32 pad; | ||
| 185 | }; | ||
| 186 | |||
| 187 | /** | ||
| 188 | * struct drm_xe_ext_set_property - Generic set property extension | ||
| 189 | * | ||
| 190 | * A generic struct that allows any of the Xe's IOCTL to be extended | ||
| 191 | * with a set_property operation. | ||
| 192 | */ | ||
| 193 | struct drm_xe_ext_set_property { | ||
| 194 | /** @base: base user extension */ | ||
| 195 | struct drm_xe_user_extension base; | ||
| 196 | |||
| 197 | /** @property: property to set */ | ||
| 198 | __u32 property; | ||
| 199 | |||
| 200 | /** @pad: MBZ */ | ||
| 201 | __u32 pad; | ||
| 202 | |||
| 203 | /** @value: property value */ | ||
| 204 | __u64 value; | ||
| 205 | |||
| 206 | /** @reserved: Reserved */ | ||
| 207 | __u64 reserved[2]; | ||
| 208 | }; | ||
| 209 | |||
| 210 | /** | ||
| 211 | * struct drm_xe_engine_class_instance - instance of an engine class | ||
| 212 | * | ||
| 213 | * It is returned as part of the @drm_xe_engine, but it also is used as | ||
| 214 | * the input of engine selection for both @drm_xe_exec_queue_create and | ||
| 215 | * @drm_xe_query_engine_cycles | ||
| 216 | * | ||
| 217 | * The @engine_class can be: | ||
| 218 | * - %DRM_XE_ENGINE_CLASS_RENDER | ||
| 219 | * - %DRM_XE_ENGINE_CLASS_COPY | ||
| 220 | * - %DRM_XE_ENGINE_CLASS_VIDEO_DECODE | ||
| 221 | * - %DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE | ||
| 222 | * - %DRM_XE_ENGINE_CLASS_COMPUTE | ||
| 223 | * - %DRM_XE_ENGINE_CLASS_VM_BIND - Kernel only classes (not actual | ||
| 224 | * hardware engine class). Used for creating ordered queues of VM | ||
| 225 | * bind operations. | ||
| 226 | */ | ||
| 227 | struct drm_xe_engine_class_instance { | ||
| 228 | #define DRM_XE_ENGINE_CLASS_RENDER 0 | ||
| 229 | #define DRM_XE_ENGINE_CLASS_COPY 1 | ||
| 230 | #define DRM_XE_ENGINE_CLASS_VIDEO_DECODE 2 | ||
| 231 | #define DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE 3 | ||
| 232 | #define DRM_XE_ENGINE_CLASS_COMPUTE 4 | ||
| 233 | #define DRM_XE_ENGINE_CLASS_VM_BIND 5 | ||
| 234 | /** @engine_class: engine class id */ | ||
| 235 | __u16 engine_class; | ||
| 236 | /** @engine_instance: engine instance id */ | ||
| 237 | __u16 engine_instance; | ||
| 238 | /** @gt_id: Unique ID of this GT within the PCI Device */ | ||
| 239 | __u16 gt_id; | ||
| 240 | /** @pad: MBZ */ | ||
| 241 | __u16 pad; | ||
| 242 | }; | ||
| 243 | |||
| 244 | /** | ||
| 245 | * struct drm_xe_engine - describe hardware engine | ||
| 246 | */ | ||
| 247 | struct drm_xe_engine { | ||
| 248 | /** @instance: The @drm_xe_engine_class_instance */ | ||
| 249 | struct drm_xe_engine_class_instance instance; | ||
| 250 | |||
| 251 | /** @reserved: Reserved */ | ||
| 252 | __u64 reserved[3]; | ||
| 253 | }; | ||
| 254 | |||
| 255 | /** | ||
| 256 | * struct drm_xe_query_engines - describe engines | ||
| 257 | * | ||
| 258 | * If a query is made with a struct @drm_xe_device_query where .query | ||
| 259 | * is equal to %DRM_XE_DEVICE_QUERY_ENGINES, then the reply uses an array of | ||
| 260 | * struct @drm_xe_query_engines in .data. | ||
| 261 | */ | ||
| 262 | struct drm_xe_query_engines { | ||
| 263 | /** @num_engines: number of engines returned in @engines */ | ||
| 264 | __u32 num_engines; | ||
| 265 | /** @pad: MBZ */ | ||
| 266 | __u32 pad; | ||
| 267 | /** @engines: The returned engines for this device */ | ||
| 268 | struct drm_xe_engine engines[]; | ||
| 269 | }; | ||
| 270 | |||
| 271 | /** | ||
| 272 | * enum drm_xe_memory_class - Supported memory classes. | ||
| 273 | */ | ||
| 274 | enum drm_xe_memory_class { | ||
| 275 | /** @DRM_XE_MEM_REGION_CLASS_SYSMEM: Represents system memory. */ | ||
| 276 | DRM_XE_MEM_REGION_CLASS_SYSMEM = 0, | ||
| 277 | /** | ||
| 278 | * @DRM_XE_MEM_REGION_CLASS_VRAM: On discrete platforms, this | ||
| 279 | * represents the memory that is local to the device, which we | ||
| 280 | * call VRAM. Not valid on integrated platforms. | ||
| 281 | */ | ||
| 282 | DRM_XE_MEM_REGION_CLASS_VRAM | ||
| 283 | }; | ||
| 284 | |||
| 285 | /** | ||
| 286 | * struct drm_xe_mem_region - Describes some region as known to | ||
| 287 | * the driver. | ||
| 288 | */ | ||
| 289 | struct drm_xe_mem_region { | ||
| 290 | /** | ||
| 291 | * @mem_class: The memory class describing this region. | ||
| 292 | * | ||
| 293 | * See enum drm_xe_memory_class for supported values. | ||
| 294 | */ | ||
| 295 | __u16 mem_class; | ||
| 296 | /** | ||
| 297 | * @instance: The unique ID for this region, which serves as the | ||
| 298 | * index in the placement bitmask used as argument for | ||
| 299 | * &DRM_IOCTL_XE_GEM_CREATE | ||
| 300 | */ | ||
| 301 | __u16 instance; | ||
| 302 | /** | ||
| 303 | * @min_page_size: Min page-size in bytes for this region. | ||
| 304 | * | ||
| 305 | * When the kernel allocates memory for this region, the | ||
| 306 | * underlying pages will be at least @min_page_size in size. | ||
| 307 | * Buffer objects with an allowable placement in this region must be | ||
| 308 | * created with a size aligned to this value. | ||
| 309 | * GPU virtual address mappings of (parts of) buffer objects that | ||
| 310 | * may be placed in this region must also have their GPU virtual | ||
| 311 | * address and range aligned to this value. | ||
| 312 | * Affected IOCTLS will return %-EINVAL if alignment restrictions are | ||
| 313 | * not met. | ||
| 314 | */ | ||
| 315 | __u32 min_page_size; | ||
| 316 | /** | ||
| 317 | * @total_size: The usable size in bytes for this region. | ||
| 318 | */ | ||
| 319 | __u64 total_size; | ||
| 320 | /** | ||
| 321 | * @used: Estimate of the memory used in bytes for this region. | ||
| 322 | * | ||
| 323 | * Requires CAP_PERFMON or CAP_SYS_ADMIN to get reliable | ||
| 324 | * accounting. Without this the value here will always equal | ||
| 325 | * zero. | ||
| 326 | */ | ||
| 327 | __u64 used; | ||
| 328 | /** | ||
| 329 | * @cpu_visible_size: How much of this region can be CPU | ||
| 330 | * accessed, in bytes. | ||
| 331 | * | ||
| 332 | * This will always be <= @total_size, and the remainder (if | ||
| 333 | * any) will not be CPU accessible. If the CPU accessible part | ||
| 334 | * is smaller than @total_size then this is referred to as a | ||
| 335 | * small BAR system. | ||
| 336 | * | ||
| 337 | * On systems without small BAR (full BAR), the probed_size will | ||
| 338 | * always equal the @total_size, since all of it will be CPU | ||
| 339 | * accessible. | ||
| 340 | * | ||
| 341 | * Note this is only tracked for DRM_XE_MEM_REGION_CLASS_VRAM | ||
| 342 | * regions (for other types the value here will always equal | ||
| 343 | * zero). | ||
| 344 | */ | ||
| 345 | __u64 cpu_visible_size; | ||
| 346 | /** | ||
| 347 | * @cpu_visible_used: Estimate of CPU visible memory used, in | ||
| 348 | * bytes. | ||
| 349 | * | ||
| 350 | * Requires CAP_PERFMON or CAP_SYS_ADMIN to get reliable | ||
| 351 | * accounting. Without this the value here will always equal | ||
| 352 | * zero. Note this is only currently tracked for | ||
| 353 | * DRM_XE_MEM_REGION_CLASS_VRAM regions (for other types the value | ||
| 354 | * here will always be zero). | ||
| 355 | */ | ||
| 356 | __u64 cpu_visible_used; | ||
| 357 | /** @reserved: Reserved */ | ||
| 358 | __u64 reserved[6]; | ||
| 359 | }; | ||
| 360 | |||
| 361 | /** | ||
| 362 | * struct drm_xe_query_mem_regions - describe memory regions | ||
| 363 | * | ||
| 364 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 365 | * is equal to DRM_XE_DEVICE_QUERY_MEM_REGIONS, then the reply uses | ||
| 366 | * struct drm_xe_query_mem_regions in .data. | ||
| 367 | */ | ||
| 368 | struct drm_xe_query_mem_regions { | ||
| 369 | /** @num_mem_regions: number of memory regions returned in @mem_regions */ | ||
| 370 | __u32 num_mem_regions; | ||
| 371 | /** @pad: MBZ */ | ||
| 372 | __u32 pad; | ||
| 373 | /** @mem_regions: The returned memory regions for this device */ | ||
| 374 | struct drm_xe_mem_region mem_regions[]; | ||
| 375 | }; | ||
| 376 | |||
| 377 | /** | ||
| 378 | * struct drm_xe_query_config - describe the device configuration | ||
| 379 | * | ||
| 380 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 381 | * is equal to DRM_XE_DEVICE_QUERY_CONFIG, then the reply uses | ||
| 382 | * struct drm_xe_query_config in .data. | ||
| 383 | * | ||
| 384 | * The index in @info can be: | ||
| 385 | * - %DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID - Device ID (lower 16 bits) | ||
| 386 | * and the device revision (next 8 bits) | ||
| 387 | * - %DRM_XE_QUERY_CONFIG_FLAGS - Flags describing the device | ||
| 388 | * configuration, see list below | ||
| 389 | * | ||
| 390 | * - %DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM - Flag is set if the device | ||
| 391 | * has usable VRAM | ||
| 392 | * - %DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT - Minimal memory alignment | ||
| 393 | * required by this device, typically SZ_4K or SZ_64K | ||
| 394 | * - %DRM_XE_QUERY_CONFIG_VA_BITS - Maximum bits of a virtual address | ||
| 395 | * - %DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY - Value of the highest | ||
| 396 | * available exec queue priority | ||
| 397 | */ | ||
| 398 | struct drm_xe_query_config { | ||
| 399 | /** @num_params: number of parameters returned in info */ | ||
| 400 | __u32 num_params; | ||
| 401 | |||
| 402 | /** @pad: MBZ */ | ||
| 403 | __u32 pad; | ||
| 404 | |||
| 405 | #define DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID 0 | ||
| 406 | #define DRM_XE_QUERY_CONFIG_FLAGS 1 | ||
| 407 | #define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM (1 << 0) | ||
| 408 | #define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT 2 | ||
| 409 | #define DRM_XE_QUERY_CONFIG_VA_BITS 3 | ||
| 410 | #define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 4 | ||
| 411 | /** @info: array of elements containing the config info */ | ||
| 412 | __u64 info[]; | ||
| 413 | }; | ||
| 414 | |||
| 415 | /** | ||
| 416 | * struct drm_xe_gt - describe an individual GT. | ||
| 417 | * | ||
| 418 | * To be used with drm_xe_query_gt_list, which will return a list with all the | ||
| 419 | * existing GT individual descriptions. | ||
| 420 | * Graphics Technology (GT) is a subset of a GPU/tile that is responsible for | ||
| 421 | * implementing graphics and/or media operations. | ||
| 422 | * | ||
| 423 | * The index in @type can be: | ||
| 424 | * - %DRM_XE_QUERY_GT_TYPE_MAIN | ||
| 425 | * - %DRM_XE_QUERY_GT_TYPE_MEDIA | ||
| 426 | */ | ||
| 427 | struct drm_xe_gt { | ||
| 428 | #define DRM_XE_QUERY_GT_TYPE_MAIN 0 | ||
| 429 | #define DRM_XE_QUERY_GT_TYPE_MEDIA 1 | ||
| 430 | /** @type: GT type: Main or Media */ | ||
| 431 | __u16 type; | ||
| 432 | /** @tile_id: Tile ID where this GT lives (Information only) */ | ||
| 433 | __u16 tile_id; | ||
| 434 | /** @gt_id: Unique ID of this GT within the PCI Device */ | ||
| 435 | __u16 gt_id; | ||
| 436 | /** @pad: MBZ */ | ||
| 437 | __u16 pad[3]; | ||
| 438 | /** @reference_clock: A clock frequency for timestamp */ | ||
| 439 | __u32 reference_clock; | ||
| 440 | /** | ||
| 441 | * @near_mem_regions: Bit mask of instances from | ||
| 442 | * drm_xe_query_mem_regions that are nearest to the current engines | ||
| 443 | * of this GT. | ||
| 444 | * Each index in this mask refers directly to the struct | ||
| 445 | * drm_xe_query_mem_regions' instance, no assumptions should | ||
| 446 | * be made about order. The type of each region is described | ||
| 447 | * by struct drm_xe_query_mem_regions' mem_class. | ||
| 448 | */ | ||
| 449 | __u64 near_mem_regions; | ||
| 450 | /** | ||
| 451 | * @far_mem_regions: Bit mask of instances from | ||
| 452 | * drm_xe_query_mem_regions that are far from the engines of this GT. | ||
| 453 | * In general, they have extra indirections when compared to the | ||
| 454 | * @near_mem_regions. For a discrete device this could mean system | ||
| 455 | * memory and memory living in a different tile. | ||
| 456 | * Each index in this mask refers directly to the struct | ||
| 457 | * drm_xe_query_mem_regions' instance, no assumptions should | ||
| 458 | * be made about order. The type of each region is described | ||
| 459 | * by struct drm_xe_query_mem_regions' mem_class. | ||
| 460 | */ | ||
| 461 | __u64 far_mem_regions; | ||
| 462 | /** @reserved: Reserved */ | ||
| 463 | __u64 reserved[8]; | ||
| 464 | }; | ||
| 465 | |||
| 466 | /** | ||
| 467 | * struct drm_xe_query_gt_list - A list with GT description items. | ||
| 468 | * | ||
| 469 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 470 | * is equal to DRM_XE_DEVICE_QUERY_GT_LIST, then the reply uses struct | ||
| 471 | * drm_xe_query_gt_list in .data. | ||
| 472 | */ | ||
| 473 | struct drm_xe_query_gt_list { | ||
| 474 | /** @num_gt: number of GT items returned in gt_list */ | ||
| 475 | __u32 num_gt; | ||
| 476 | /** @pad: MBZ */ | ||
| 477 | __u32 pad; | ||
| 478 | /** @gt_list: The GT list returned for this device */ | ||
| 479 | struct drm_xe_gt gt_list[]; | ||
| 480 | }; | ||
| 481 | |||
| 482 | /** | ||
| 483 | * struct drm_xe_query_topology_mask - describe the topology mask of a GT | ||
| 484 | * | ||
| 485 | * This is the hardware topology which reflects the internal physical | ||
| 486 | * structure of the GPU. | ||
| 487 | * | ||
| 488 | * If a query is made with a struct drm_xe_device_query where .query | ||
| 489 | * is equal to DRM_XE_DEVICE_QUERY_GT_TOPOLOGY, then the reply uses | ||
| 490 | * struct drm_xe_query_topology_mask in .data. | ||
| 491 | * | ||
| 492 | * The @type can be: | ||
| 493 | * - %DRM_XE_TOPO_DSS_GEOMETRY - To query the mask of Dual Sub Slices | ||
| 494 | * (DSS) available for geometry operations. For example a query response | ||
| 495 | * containing the following in mask: | ||
| 496 | * ``DSS_GEOMETRY ff ff ff ff 00 00 00 00`` | ||
| 497 | * means 32 DSS are available for geometry. | ||
| 498 | * - %DRM_XE_TOPO_DSS_COMPUTE - To query the mask of Dual Sub Slices | ||
| 499 | * (DSS) available for compute operations. For example a query response | ||
| 500 | * containing the following in mask: | ||
| 501 | * ``DSS_COMPUTE ff ff ff ff 00 00 00 00`` | ||
| 502 | * means 32 DSS are available for compute. | ||
| 503 | * - %DRM_XE_TOPO_EU_PER_DSS - To query the mask of Execution Units (EU) | ||
| 504 | * available per Dual Sub Slices (DSS). For example a query response | ||
| 505 | * containing the following in mask: | ||
| 506 | * ``EU_PER_DSS ff ff 00 00 00 00 00 00`` | ||
| 507 | * means each DSS has 16 EU. | ||
| 508 | */ | ||
| 509 | struct drm_xe_query_topology_mask { | ||
| 510 | /** @gt_id: GT ID the mask is associated with */ | ||
| 511 | __u16 gt_id; | ||
| 512 | |||
| 513 | #define DRM_XE_TOPO_DSS_GEOMETRY (1 << 0) | ||
| 514 | #define DRM_XE_TOPO_DSS_COMPUTE (1 << 1) | ||
| 515 | #define DRM_XE_TOPO_EU_PER_DSS (1 << 2) | ||
| 516 | /** @type: type of mask */ | ||
| 517 | __u16 type; | ||
| 518 | |||
| 519 | /** @num_bytes: number of bytes in requested mask */ | ||
| 520 | __u32 num_bytes; | ||
| 521 | |||
| 522 | /** @mask: little-endian mask of @num_bytes */ | ||
| 523 | __u8 mask[]; | ||
| 524 | }; | ||
| 525 | |||
| 526 | /** | ||
| 527 | * struct drm_xe_query_engine_cycles - correlate CPU and GPU timestamps | ||
| 528 | * | ||
| 529 | * If a query is made with a struct drm_xe_device_query where .query is equal to | ||
| 530 | * DRM_XE_DEVICE_QUERY_ENGINE_CYCLES, then the reply uses struct drm_xe_query_engine_cycles | ||
| 531 | * in .data. struct drm_xe_query_engine_cycles is allocated by the user and | ||
| 532 | * .data points to this allocated structure. | ||
| 533 | * | ||
| 534 | * The query returns the engine cycles, which along with GT's @reference_clock, | ||
| 535 | * can be used to calculate the engine timestamp. In addition the | ||
| 536 | * query returns a set of cpu timestamps that indicate when the command | ||
| 537 | * streamer cycle count was captured. | ||
| 538 | */ | ||
| 539 | struct drm_xe_query_engine_cycles { | ||
| 540 | /** | ||
| 541 | * @eci: This is input by the user and is the engine for which command | ||
| 542 | * streamer cycles is queried. | ||
| 543 | */ | ||
| 544 | struct drm_xe_engine_class_instance eci; | ||
| 545 | |||
| 546 | /** | ||
| 547 | * @clockid: This is input by the user and is the reference clock id for | ||
| 548 | * CPU timestamp. For definition, see clock_gettime(2) and | ||
| 549 | * perf_event_open(2). Supported clock ids are CLOCK_MONOTONIC, | ||
| 550 | * CLOCK_MONOTONIC_RAW, CLOCK_REALTIME, CLOCK_BOOTTIME, CLOCK_TAI. | ||
| 551 | */ | ||
| 552 | __s32 clockid; | ||
| 553 | |||
| 554 | /** @width: Width of the engine cycle counter in bits. */ | ||
| 555 | __u32 width; | ||
| 556 | |||
| 557 | /** | ||
| 558 | * @engine_cycles: Engine cycles as read from its register | ||
| 559 | * at 0x358 offset. | ||
| 560 | */ | ||
| 561 | __u64 engine_cycles; | ||
| 562 | |||
| 563 | /** | ||
| 564 | * @cpu_timestamp: CPU timestamp in ns. The timestamp is captured before | ||
| 565 | * reading the engine_cycles register using the reference clockid set by the | ||
| 566 | * user. | ||
| 567 | */ | ||
| 568 | __u64 cpu_timestamp; | ||
| 569 | |||
| 570 | /** | ||
| 571 | * @cpu_delta: Time delta in ns captured around reading the lower dword | ||
| 572 | * of the engine_cycles register. | ||
| 573 | */ | ||
| 574 | __u64 cpu_delta; | ||
| 575 | }; | ||
| 576 | |||
| 577 | /** | ||
| 578 | * struct drm_xe_device_query - Input of &DRM_IOCTL_XE_DEVICE_QUERY - main | ||
| 579 | * structure to query device information | ||
| 580 | * | ||
| 581 | * The user selects the type of data to query among DRM_XE_DEVICE_QUERY_* | ||
| 582 | * and sets the value in the query member. This determines the type of | ||
| 583 | * the structure provided by the driver in data, among struct drm_xe_query_*. | ||
| 584 | * | ||
| 585 | * The @query can be: | ||
| 586 | * - %DRM_XE_DEVICE_QUERY_ENGINES | ||
| 587 | * - %DRM_XE_DEVICE_QUERY_MEM_REGIONS | ||
| 588 | * - %DRM_XE_DEVICE_QUERY_CONFIG | ||
| 589 | * - %DRM_XE_DEVICE_QUERY_GT_LIST | ||
| 590 | * - %DRM_XE_DEVICE_QUERY_HWCONFIG - Query type to retrieve the hardware | ||
| 591 | * configuration of the device such as information on slices, memory, | ||
| 592 | * caches, and so on. It is provided as a table of key / value | ||
| 593 | * attributes. | ||
| 594 | * - %DRM_XE_DEVICE_QUERY_GT_TOPOLOGY | ||
| 595 | * - %DRM_XE_DEVICE_QUERY_ENGINE_CYCLES | ||
| 596 | * | ||
| 597 | * If size is set to 0, the driver fills it with the required size for | ||
| 598 | * the requested type of data to query. If size is equal to the required | ||
| 599 | * size, the queried information is copied into data. If size is set to | ||
| 600 | * a value different from 0 and different from the required size, the | ||
| 601 | * IOCTL call returns -EINVAL. | ||
| 602 | * | ||
| 603 | * For example the following code snippet allows retrieving and printing | ||
| 604 | * information about the device engines with DRM_XE_DEVICE_QUERY_ENGINES: | ||
| 605 | * | ||
| 606 | * .. code-block:: C | ||
| 607 | * | ||
| 608 | * struct drm_xe_query_engines *engines; | ||
| 609 | * struct drm_xe_device_query query = { | ||
| 610 | * .extensions = 0, | ||
| 611 | * .query = DRM_XE_DEVICE_QUERY_ENGINES, | ||
| 612 | * .size = 0, | ||
| 613 | * .data = 0, | ||
| 614 | * }; | ||
| 615 | * ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query); | ||
| 616 | * engines = malloc(query.size); | ||
| 617 | * query.data = (uintptr_t)engines; | ||
| 618 | * ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query); | ||
| 619 | * for (int i = 0; i < engines->num_engines; i++) { | ||
| 620 | * printf("Engine %d: %s\n", i, | ||
| 621 | * engines->engines[i].instance.engine_class == | ||
| 622 | * DRM_XE_ENGINE_CLASS_RENDER ? "RENDER": | ||
| 623 | * engines->engines[i].instance.engine_class == | ||
| 624 | * DRM_XE_ENGINE_CLASS_COPY ? "COPY": | ||
| 625 | * engines->engines[i].instance.engine_class == | ||
| 626 | * DRM_XE_ENGINE_CLASS_VIDEO_DECODE ? "VIDEO_DECODE": | ||
| 627 | * engines->engines[i].instance.engine_class == | ||
| 628 | * DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE ? "VIDEO_ENHANCE": | ||
| 629 | * engines->engines[i].instance.engine_class == | ||
| 630 | * DRM_XE_ENGINE_CLASS_COMPUTE ? "COMPUTE": | ||
| 631 | * "UNKNOWN"); | ||
| 632 | * } | ||
| 633 | * free(engines); | ||
| 634 | */ | ||
| 635 | struct drm_xe_device_query { | ||
| 636 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 637 | __u64 extensions; | ||
| 638 | |||
| 639 | #define DRM_XE_DEVICE_QUERY_ENGINES 0 | ||
| 640 | #define DRM_XE_DEVICE_QUERY_MEM_REGIONS 1 | ||
| 641 | #define DRM_XE_DEVICE_QUERY_CONFIG 2 | ||
| 642 | #define DRM_XE_DEVICE_QUERY_GT_LIST 3 | ||
| 643 | #define DRM_XE_DEVICE_QUERY_HWCONFIG 4 | ||
| 644 | #define DRM_XE_DEVICE_QUERY_GT_TOPOLOGY 5 | ||
| 645 | #define DRM_XE_DEVICE_QUERY_ENGINE_CYCLES 6 | ||
| 646 | /** @query: The type of data to query */ | ||
| 647 | __u32 query; | ||
| 648 | |||
| 649 | /** @size: Size of the queried data */ | ||
| 650 | __u32 size; | ||
| 651 | |||
| 652 | /** @data: Queried data is placed here */ | ||
| 653 | __u64 data; | ||
| 654 | |||
| 655 | /** @reserved: Reserved */ | ||
| 656 | __u64 reserved[2]; | ||
| 657 | }; | ||
| 658 | |||
| 659 | /** | ||
| 660 | * struct drm_xe_gem_create - Input of &DRM_IOCTL_XE_GEM_CREATE - A structure for | ||
| 661 | * gem creation | ||
| 662 | * | ||
| 663 | * The @flags can be: | ||
| 664 | * - %DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING | ||
| 665 | * - %DRM_XE_GEM_CREATE_FLAG_SCANOUT | ||
| 666 | * - %DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM - When using VRAM as a | ||
| 667 | * possible placement, ensure that the corresponding VRAM allocation | ||
| 668 | * will always use the CPU accessible part of VRAM. This is important | ||
| 669 | * for small-bar systems (on full-bar systems this gets turned into a | ||
| 670 | * noop). | ||
| 671 | * Note1: System memory can be used as an extra placement if the kernel | ||
| 672 | * should spill the allocation to system memory, if space can't be made | ||
| 673 | * available in the CPU accessible part of VRAM (giving the same | ||
| 674 | * behaviour as the i915 interface, see | ||
| 675 | * I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS). | ||
| 676 | * Note2: For clear-color CCS surfaces the kernel needs to read the | ||
| 677 | * clear-color value stored in the buffer, and on discrete platforms we | ||
| 678 | * need to use VRAM for display surfaces, therefore the kernel requires | ||
| 679 | * setting this flag for such objects, otherwise an error is thrown on | ||
| 680 | * small-bar systems. | ||
| 681 | * | ||
| 682 | * @cpu_caching supports the following values: | ||
| 683 | * - %DRM_XE_GEM_CPU_CACHING_WB - Allocate the pages with write-back | ||
| 684 | * caching. On iGPU this can't be used for scanout surfaces. Currently | ||
| 685 | * not allowed for objects placed in VRAM. | ||
| 686 | * - %DRM_XE_GEM_CPU_CACHING_WC - Allocate the pages as write-combined. This | ||
| 687 | * is uncached. Scanout surfaces should likely use this. All objects | ||
| 688 | * that can be placed in VRAM must use this. | ||
| 689 | */ | ||
| 690 | struct drm_xe_gem_create { | ||
| 691 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 692 | __u64 extensions; | ||
| 693 | |||
| 694 | /** | ||
| 695 | * @size: Size of the object to be created, must match region | ||
| 696 | * (system or vram) minimum alignment (&min_page_size). | ||
| 697 | */ | ||
| 698 | __u64 size; | ||
| 699 | |||
| 700 | /** | ||
| 701 | * @placement: A mask of memory instances of where BO can be placed. | ||
| 702 | * Each index in this mask refers directly to the struct | ||
| 703 | * drm_xe_query_mem_regions' instance, no assumptions should | ||
| 704 | * be made about order. The type of each region is described | ||
| 705 | * by struct drm_xe_query_mem_regions' mem_class. | ||
| 706 | */ | ||
| 707 | __u32 placement; | ||
| 708 | |||
| 709 | #define DRM_XE_GEM_CREATE_FLAG_DEFER_BACKING (1 << 0) | ||
| 710 | #define DRM_XE_GEM_CREATE_FLAG_SCANOUT (1 << 1) | ||
| 711 | #define DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM (1 << 2) | ||
| 712 | /** | ||
| 713 | * @flags: Flags, currently a mask of memory instances of where BO can | ||
| 714 | * be placed | ||
| 715 | */ | ||
| 716 | __u32 flags; | ||
| 717 | |||
| 718 | /** | ||
| 719 | * @vm_id: Attached VM, if any | ||
| 720 | * | ||
| 721 | * If a VM is specified, this BO must: | ||
| 722 | * | ||
| 723 | * 1. Only ever be bound to that VM. | ||
| 724 | * 2. Cannot be exported as a PRIME fd. | ||
| 725 | */ | ||
| 726 | __u32 vm_id; | ||
| 727 | |||
| 728 | /** | ||
| 729 | * @handle: Returned handle for the object. | ||
| 730 | * | ||
| 731 | * Object handles are nonzero. | ||
| 732 | */ | ||
| 733 | __u32 handle; | ||
| 734 | |||
| 735 | #define DRM_XE_GEM_CPU_CACHING_WB 1 | ||
| 736 | #define DRM_XE_GEM_CPU_CACHING_WC 2 | ||
| 737 | /** | ||
| 738 | * @cpu_caching: The CPU caching mode to select for this object. If | ||
| 739 | * mmaping the object the mode selected here will also be used. | ||
| 740 | */ | ||
| 741 | __u16 cpu_caching; | ||
| 742 | /** @pad: MBZ */ | ||
| 743 | __u16 pad[3]; | ||
| 744 | |||
| 745 | /** @reserved: Reserved */ | ||
| 746 | __u64 reserved[2]; | ||
| 747 | }; | ||
| 748 | |||
| 749 | /** | ||
| 750 | * struct drm_xe_gem_mmap_offset - Input of &DRM_IOCTL_XE_GEM_MMAP_OFFSET | ||
| 751 | */ | ||
| 752 | struct drm_xe_gem_mmap_offset { | ||
| 753 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 754 | __u64 extensions; | ||
| 755 | |||
| 756 | /** @handle: Handle for the object being mapped. */ | ||
| 757 | __u32 handle; | ||
| 758 | |||
| 759 | /** @flags: Must be zero */ | ||
| 760 | __u32 flags; | ||
| 761 | |||
| 762 | /** @offset: The fake offset to use for subsequent mmap call */ | ||
| 763 | __u64 offset; | ||
| 764 | |||
| 765 | /** @reserved: Reserved */ | ||
| 766 | __u64 reserved[2]; | ||
| 767 | }; | ||
| 768 | |||
| 769 | /** | ||
| 770 | * struct drm_xe_vm_create - Input of &DRM_IOCTL_XE_VM_CREATE | ||
| 771 | * | ||
| 772 | * The @flags can be: | ||
| 773 | * - %DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE | ||
| 774 | * - %DRM_XE_VM_CREATE_FLAG_LR_MODE - An LR, or Long Running VM accepts | ||
| 775 | * exec submissions to its exec_queues that don't have an upper time | ||
| 776 | * limit on the job execution time. But exec submissions to these | ||
| 777 | * don't allow any of the flags DRM_XE_SYNC_FLAG_SYNCOBJ, | ||
| 778 | * DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ, DRM_XE_SYNC_FLAG_DMA_BUF, | ||
| 779 | * used as out-syncobjs, that is, together with DRM_XE_SYNC_FLAG_SIGNAL. | ||
| 780 | * LR VMs can be created in recoverable page-fault mode using | ||
| 781 | * DRM_XE_VM_CREATE_FLAG_FAULT_MODE, if the device supports it. | ||
| 782 | * If that flag is omitted, the UMD can not rely on the slightly | ||
| 783 | * different per-VM overcommit semantics that are enabled by | ||
| 784 | * DRM_XE_VM_CREATE_FLAG_FAULT_MODE (see below), but KMD may | ||
| 785 | * still enable recoverable pagefaults if supported by the device. | ||
| 786 | * - %DRM_XE_VM_CREATE_FLAG_FAULT_MODE - Requires also | ||
| 787 | * DRM_XE_VM_CREATE_FLAG_LR_MODE. It allows memory to be allocated on | ||
| 788 | * demand when accessed, and also allows per-VM overcommit of memory. | ||
| 789 | * The xe driver internally uses recoverable pagefaults to implement | ||
| 790 | * this. | ||
| 791 | */ | ||
| 792 | struct drm_xe_vm_create { | ||
| 793 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 794 | __u64 extensions; | ||
| 795 | |||
| 796 | #define DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE (1 << 0) | ||
| 797 | #define DRM_XE_VM_CREATE_FLAG_LR_MODE (1 << 1) | ||
| 798 | #define DRM_XE_VM_CREATE_FLAG_FAULT_MODE (1 << 2) | ||
| 799 | /** @flags: Flags */ | ||
| 800 | __u32 flags; | ||
| 801 | |||
| 802 | /** @vm_id: Returned VM ID */ | ||
| 803 | __u32 vm_id; | ||
| 804 | |||
| 805 | /** @reserved: Reserved */ | ||
| 806 | __u64 reserved[2]; | ||
| 807 | }; | ||
| 808 | |||
| 809 | /** | ||
| 810 | * struct drm_xe_vm_destroy - Input of &DRM_IOCTL_XE_VM_DESTROY | ||
| 811 | */ | ||
| 812 | struct drm_xe_vm_destroy { | ||
| 813 | /** @vm_id: VM ID */ | ||
| 814 | __u32 vm_id; | ||
| 815 | |||
| 816 | /** @pad: MBZ */ | ||
| 817 | __u32 pad; | ||
| 818 | |||
| 819 | /** @reserved: Reserved */ | ||
| 820 | __u64 reserved[2]; | ||
| 821 | }; | ||
| 822 | |||
| 823 | /** | ||
| 824 | * struct drm_xe_vm_bind_op - run bind operations | ||
| 825 | * | ||
| 826 | * The @op can be: | ||
| 827 | * - %DRM_XE_VM_BIND_OP_MAP | ||
| 828 | * - %DRM_XE_VM_BIND_OP_UNMAP | ||
| 829 | * - %DRM_XE_VM_BIND_OP_MAP_USERPTR | ||
| 830 | * - %DRM_XE_VM_BIND_OP_UNMAP_ALL | ||
| 831 | * - %DRM_XE_VM_BIND_OP_PREFETCH | ||
| 832 | * | ||
| 833 | * and the @flags can be: | ||
| 834 | * - %DRM_XE_VM_BIND_FLAG_READONLY | ||
| 835 | * - %DRM_XE_VM_BIND_FLAG_ASYNC | ||
| 836 | * - %DRM_XE_VM_BIND_FLAG_IMMEDIATE - Valid on a faulting VM only, do the | ||
| 837 | * MAP operation immediately rather than deferring the MAP to the page | ||
| 838 | * fault handler. | ||
| 839 | * - %DRM_XE_VM_BIND_FLAG_NULL - When the NULL flag is set, the page | ||
| 840 | * tables are setup with a special bit which indicates writes are | ||
| 841 | * dropped and all reads return zero. In the future, the NULL flags | ||
| 842 | * will only be valid for DRM_XE_VM_BIND_OP_MAP operations, the BO | ||
| 843 | * handle MBZ, and the BO offset MBZ. This flag is intended to | ||
| 844 | * implement VK sparse bindings. | ||
| 845 | */ | ||
| 846 | struct drm_xe_vm_bind_op { | ||
| 847 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 848 | __u64 extensions; | ||
| 849 | |||
| 850 | /** | ||
| 851 | * @obj: GEM object to operate on, MBZ for MAP_USERPTR, MBZ for UNMAP | ||
| 852 | */ | ||
| 853 | __u32 obj; | ||
| 854 | |||
| 855 | /** | ||
| 856 | * @pat_index: The platform defined @pat_index to use for this mapping. | ||
| 857 | * The index basically maps to some predefined memory attributes, | ||
| 858 | * including things like caching, coherency, compression etc. The exact | ||
| 859 | * meaning of the pat_index is platform specific and defined in the | ||
| 860 | * Bspec and PRMs. When the KMD sets up the binding the index here is | ||
| 861 | * encoded into the ppGTT PTE. | ||
| 862 | * | ||
| 863 | * For coherency the @pat_index needs to be at least 1way coherent when | ||
| 864 | * drm_xe_gem_create.cpu_caching is DRM_XE_GEM_CPU_CACHING_WB. The KMD | ||
| 865 | * will extract the coherency mode from the @pat_index and reject if | ||
| 866 | * there is a mismatch (see note below for pre-MTL platforms). | ||
| 867 | * | ||
| 868 | * Note: On pre-MTL platforms there is only a caching mode and no | ||
| 869 | * explicit coherency mode, but on such hardware there is always a | ||
| 870 | * shared-LLC (or is dgpu) so all GT memory accesses are coherent with | ||
| 871 | * CPU caches even with the caching mode set as uncached. It's only the | ||
| 872 | * display engine that is incoherent (on dgpu it must be in VRAM which | ||
| 873 | * is always mapped as WC on the CPU). However to keep the uapi somewhat | ||
| 874 | * consistent with newer platforms the KMD groups the different cache | ||
| 875 | * levels into the following coherency buckets on all pre-MTL platforms: | ||
| 876 | * | ||
| 877 | * ppGTT UC -> COH_NONE | ||
| 878 | * ppGTT WC -> COH_NONE | ||
| 879 | * ppGTT WT -> COH_NONE | ||
| 880 | * ppGTT WB -> COH_AT_LEAST_1WAY | ||
| 881 | * | ||
| 882 | * In practice UC/WC/WT should only ever used for scanout surfaces on | ||
| 883 | * such platforms (or perhaps in general for dma-buf if shared with | ||
| 884 | * another device) since it is only the display engine that is actually | ||
| 885 | * incoherent. Everything else should typically use WB given that we | ||
| 886 | * have a shared-LLC. On MTL+ this completely changes and the HW | ||
| 887 | * defines the coherency mode as part of the @pat_index, where | ||
| 888 | * incoherent GT access is possible. | ||
| 889 | * | ||
| 890 | * Note: For userptr and externally imported dma-buf the kernel expects | ||
| 891 | * either 1WAY or 2WAY for the @pat_index. | ||
| 892 | * | ||
| 893 | * For DRM_XE_VM_BIND_FLAG_NULL bindings there are no KMD restrictions | ||
| 894 | * on the @pat_index. For such mappings there is no actual memory being | ||
| 895 | * mapped (the address in the PTE is invalid), so the various PAT memory | ||
| 896 | * attributes likely do not apply. Simply leaving as zero is one | ||
| 897 | * option (still a valid pat_index). | ||
| 898 | */ | ||
| 899 | __u16 pat_index; | ||
| 900 | |||
| 901 | /** @pad: MBZ */ | ||
| 902 | __u16 pad; | ||
| 903 | |||
| 904 | union { | ||
| 905 | /** | ||
| 906 | * @obj_offset: Offset into the object, MBZ for CLEAR_RANGE, | ||
| 907 | * ignored for unbind | ||
| 908 | */ | ||
| 909 | __u64 obj_offset; | ||
| 910 | |||
| 911 | /** @userptr: user pointer to bind on */ | ||
| 912 | __u64 userptr; | ||
| 913 | }; | ||
| 914 | |||
| 915 | /** | ||
| 916 | * @range: Number of bytes from the object to bind to addr, MBZ for UNMAP_ALL | ||
| 917 | */ | ||
| 918 | __u64 range; | ||
| 919 | |||
| 920 | /** @addr: Address to operate on, MBZ for UNMAP_ALL */ | ||
| 921 | __u64 addr; | ||
| 922 | |||
| 923 | #define DRM_XE_VM_BIND_OP_MAP 0x0 | ||
| 924 | #define DRM_XE_VM_BIND_OP_UNMAP 0x1 | ||
| 925 | #define DRM_XE_VM_BIND_OP_MAP_USERPTR 0x2 | ||
| 926 | #define DRM_XE_VM_BIND_OP_UNMAP_ALL 0x3 | ||
| 927 | #define DRM_XE_VM_BIND_OP_PREFETCH 0x4 | ||
| 928 | /** @op: Bind operation to perform */ | ||
| 929 | __u32 op; | ||
| 930 | |||
| 931 | #define DRM_XE_VM_BIND_FLAG_READONLY (1 << 0) | ||
| 932 | #define DRM_XE_VM_BIND_FLAG_IMMEDIATE (1 << 1) | ||
| 933 | #define DRM_XE_VM_BIND_FLAG_NULL (1 << 2) | ||
| 934 | /** @flags: Bind flags */ | ||
| 935 | __u32 flags; | ||
| 936 | |||
| 937 | /** | ||
| 938 | * @prefetch_mem_region_instance: Memory region to prefetch VMA to. | ||
| 939 | * It is a region instance, not a mask. | ||
| 940 | * To be used only with %DRM_XE_VM_BIND_OP_PREFETCH operation. | ||
| 941 | */ | ||
| 942 | __u32 prefetch_mem_region_instance; | ||
| 943 | |||
| 944 | /** @pad2: MBZ */ | ||
| 945 | __u32 pad2; | ||
| 946 | |||
| 947 | /** @reserved: Reserved */ | ||
| 948 | __u64 reserved[3]; | ||
| 949 | }; | ||
| 950 | |||
| 951 | /** | ||
| 952 | * struct drm_xe_vm_bind - Input of &DRM_IOCTL_XE_VM_BIND | ||
| 953 | * | ||
| 954 | * Below is an example of a minimal use of @drm_xe_vm_bind to | ||
| 955 | * asynchronously bind the buffer `data` at address `BIND_ADDRESS` to | ||
| 956 | * illustrate `userptr`. It can be synchronized by using the example | ||
| 957 | * provided for @drm_xe_sync. | ||
| 958 | * | ||
| 959 | * .. code-block:: C | ||
| 960 | * | ||
| 961 | * data = aligned_alloc(ALIGNMENT, BO_SIZE); | ||
| 962 | * struct drm_xe_vm_bind bind = { | ||
| 963 | * .vm_id = vm, | ||
| 964 | * .num_binds = 1, | ||
| 965 | * .bind.obj = 0, | ||
| 966 | * .bind.obj_offset = to_user_pointer(data), | ||
| 967 | * .bind.range = BO_SIZE, | ||
| 968 | * .bind.addr = BIND_ADDRESS, | ||
| 969 | * .bind.op = DRM_XE_VM_BIND_OP_MAP_USERPTR, | ||
| 970 | * .bind.flags = 0, | ||
| 971 | * .num_syncs = 1, | ||
| 972 | * .syncs = &sync, | ||
| 973 | * .exec_queue_id = 0, | ||
| 974 | * }; | ||
| 975 | * ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind); | ||
| 976 | * | ||
| 977 | */ | ||
| 978 | struct drm_xe_vm_bind { | ||
| 979 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 980 | __u64 extensions; | ||
| 981 | |||
| 982 | /** @vm_id: The ID of the VM to bind to */ | ||
| 983 | __u32 vm_id; | ||
| 984 | |||
| 985 | /** | ||
| 986 | * @exec_queue_id: exec_queue_id, must be of class DRM_XE_ENGINE_CLASS_VM_BIND | ||
| 987 | * and exec queue must have same vm_id. If zero, the default VM bind engine | ||
| 988 | * is used. | ||
| 989 | */ | ||
| 990 | __u32 exec_queue_id; | ||
| 991 | |||
| 992 | /** @pad: MBZ */ | ||
| 993 | __u32 pad; | ||
| 994 | |||
| 995 | /** @num_binds: number of binds in this IOCTL */ | ||
| 996 | __u32 num_binds; | ||
| 997 | |||
| 998 | union { | ||
| 999 | /** @bind: used if num_binds == 1 */ | ||
| 1000 | struct drm_xe_vm_bind_op bind; | ||
| 1001 | |||
| 1002 | /** | ||
| 1003 | * @vector_of_binds: userptr to array of struct | ||
| 1004 | * drm_xe_vm_bind_op if num_binds > 1 | ||
| 1005 | */ | ||
| 1006 | __u64 vector_of_binds; | ||
| 1007 | }; | ||
| 1008 | |||
| 1009 | /** @pad2: MBZ */ | ||
| 1010 | __u32 pad2; | ||
| 1011 | |||
| 1012 | /** @num_syncs: amount of syncs to wait on */ | ||
| 1013 | __u32 num_syncs; | ||
| 1014 | |||
| 1015 | /** @syncs: pointer to struct drm_xe_sync array */ | ||
| 1016 | __u64 syncs; | ||
| 1017 | |||
| 1018 | /** @reserved: Reserved */ | ||
| 1019 | __u64 reserved[2]; | ||
| 1020 | }; | ||
| 1021 | |||
| 1022 | /** | ||
| 1023 | * struct drm_xe_exec_queue_create - Input of &DRM_IOCTL_XE_EXEC_QUEUE_CREATE | ||
| 1024 | * | ||
| 1025 | * The example below shows how to use @drm_xe_exec_queue_create to create | ||
| 1026 | * a simple exec_queue (no parallel submission) of class | ||
| 1027 | * &DRM_XE_ENGINE_CLASS_RENDER. | ||
| 1028 | * | ||
| 1029 | * .. code-block:: C | ||
| 1030 | * | ||
| 1031 | * struct drm_xe_engine_class_instance instance = { | ||
| 1032 | * .engine_class = DRM_XE_ENGINE_CLASS_RENDER, | ||
| 1033 | * }; | ||
| 1034 | * struct drm_xe_exec_queue_create exec_queue_create = { | ||
| 1035 | * .extensions = 0, | ||
| 1036 | * .vm_id = vm, | ||
| 1037 | * .num_bb_per_exec = 1, | ||
| 1038 | * .num_eng_per_bb = 1, | ||
| 1039 | * .instances = to_user_pointer(&instance), | ||
| 1040 | * }; | ||
| 1041 | * ioctl(fd, DRM_IOCTL_XE_EXEC_QUEUE_CREATE, &exec_queue_create); | ||
| 1042 | * | ||
| 1043 | */ | ||
| 1044 | struct drm_xe_exec_queue_create { | ||
| 1045 | #define DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY 0 | ||
| 1046 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY 0 | ||
| 1047 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE 1 | ||
| 1048 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PREEMPTION_TIMEOUT 2 | ||
| 1049 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_PERSISTENCE 3 | ||
| 1050 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_JOB_TIMEOUT 4 | ||
| 1051 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_ACC_TRIGGER 5 | ||
| 1052 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_ACC_NOTIFY 6 | ||
| 1053 | #define DRM_XE_EXEC_QUEUE_SET_PROPERTY_ACC_GRANULARITY 7 | ||
| 1054 | /* Monitor 128KB contiguous region with 4K sub-granularity */ | ||
| 1055 | #define DRM_XE_ACC_GRANULARITY_128K 0 | ||
| 1056 | /* Monitor 2MB contiguous region with 64KB sub-granularity */ | ||
| 1057 | #define DRM_XE_ACC_GRANULARITY_2M 1 | ||
| 1058 | /* Monitor 16MB contiguous region with 512KB sub-granularity */ | ||
| 1059 | #define DRM_XE_ACC_GRANULARITY_16M 2 | ||
| 1060 | /* Monitor 64MB contiguous region with 2M sub-granularity */ | ||
| 1061 | #define DRM_XE_ACC_GRANULARITY_64M 3 | ||
| 1062 | |||
| 1063 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 1064 | __u64 extensions; | ||
| 1065 | |||
| 1066 | /** @width: submission width (number BB per exec) for this exec queue */ | ||
| 1067 | __u16 width; | ||
| 1068 | |||
| 1069 | /** @num_placements: number of valid placements for this exec queue */ | ||
| 1070 | __u16 num_placements; | ||
| 1071 | |||
| 1072 | /** @vm_id: VM to use for this exec queue */ | ||
| 1073 | __u32 vm_id; | ||
| 1074 | |||
| 1075 | /** @flags: MBZ */ | ||
| 1076 | __u32 flags; | ||
| 1077 | |||
| 1078 | /** @exec_queue_id: Returned exec queue ID */ | ||
| 1079 | __u32 exec_queue_id; | ||
| 1080 | |||
| 1081 | /** | ||
| 1082 | * @instances: user pointer to a 2-d array of struct | ||
| 1083 | * drm_xe_engine_class_instance | ||
| 1084 | * | ||
| 1085 | * length = width (i) * num_placements (j) | ||
| 1086 | * index = j + i * width | ||
| 1087 | */ | ||
| 1088 | __u64 instances; | ||
| 1089 | |||
| 1090 | /** @reserved: Reserved */ | ||
| 1091 | __u64 reserved[2]; | ||
| 1092 | }; | ||
| 1093 | |||
| 1094 | /** | ||
| 1095 | * struct drm_xe_exec_queue_destroy - Input of &DRM_IOCTL_XE_EXEC_QUEUE_DESTROY | ||
| 1096 | */ | ||
| 1097 | struct drm_xe_exec_queue_destroy { | ||
| 1098 | /** @exec_queue_id: Exec queue ID */ | ||
| 1099 | __u32 exec_queue_id; | ||
| 1100 | |||
| 1101 | /** @pad: MBZ */ | ||
| 1102 | __u32 pad; | ||
| 1103 | |||
| 1104 | /** @reserved: Reserved */ | ||
| 1105 | __u64 reserved[2]; | ||
| 1106 | }; | ||
| 1107 | |||
| 1108 | /** | ||
| 1109 | * struct drm_xe_exec_queue_get_property - Input of &DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY | ||
| 1110 | * | ||
| 1111 | * The @property can be: | ||
| 1112 | * - %DRM_XE_EXEC_QUEUE_GET_PROPERTY_BAN | ||
| 1113 | */ | ||
| 1114 | struct drm_xe_exec_queue_get_property { | ||
| 1115 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 1116 | __u64 extensions; | ||
| 1117 | |||
| 1118 | /** @exec_queue_id: Exec queue ID */ | ||
| 1119 | __u32 exec_queue_id; | ||
| 1120 | |||
| 1121 | #define DRM_XE_EXEC_QUEUE_GET_PROPERTY_BAN 0 | ||
| 1122 | /** @property: property to get */ | ||
| 1123 | __u32 property; | ||
| 1124 | |||
| 1125 | /** @value: property value */ | ||
| 1126 | __u64 value; | ||
| 1127 | |||
| 1128 | /** @reserved: Reserved */ | ||
| 1129 | __u64 reserved[2]; | ||
| 1130 | }; | ||
| 1131 | |||
| 1132 | /** | ||
| 1133 | * struct drm_xe_sync - sync object | ||
| 1134 | * | ||
| 1135 | * The @type can be: | ||
| 1136 | * - %DRM_XE_SYNC_TYPE_SYNCOBJ | ||
| 1137 | * - %DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ | ||
| 1138 | * - %DRM_XE_SYNC_TYPE_USER_FENCE | ||
| 1139 | * | ||
| 1140 | * and the @flags can be: | ||
| 1141 | * - %DRM_XE_SYNC_FLAG_SIGNAL | ||
| 1142 | * | ||
| 1143 | * A minimal use of @drm_xe_sync looks like this: | ||
| 1144 | * | ||
| 1145 | * .. code-block:: C | ||
| 1146 | * | ||
| 1147 | * struct drm_xe_sync sync = { | ||
| 1148 | * .flags = DRM_XE_SYNC_FLAG_SIGNAL, | ||
| 1149 | * .type = DRM_XE_SYNC_TYPE_SYNCOBJ, | ||
| 1150 | * }; | ||
| 1151 | * struct drm_syncobj_create syncobj_create = { 0 }; | ||
| 1152 | * ioctl(fd, DRM_IOCTL_SYNCOBJ_CREATE, &syncobj_create); | ||
| 1153 | * sync.handle = syncobj_create.handle; | ||
| 1154 | * ... | ||
| 1155 | * use of &sync in drm_xe_exec or drm_xe_vm_bind | ||
| 1156 | * ... | ||
| 1157 | * struct drm_syncobj_wait wait = { | ||
| 1158 | * .handles = &sync.handle, | ||
| 1159 | * .timeout_nsec = INT64_MAX, | ||
| 1160 | * .count_handles = 1, | ||
| 1161 | * .flags = 0, | ||
| 1162 | * .first_signaled = 0, | ||
| 1163 | * .pad = 0, | ||
| 1164 | * }; | ||
| 1165 | * ioctl(fd, DRM_IOCTL_SYNCOBJ_WAIT, &wait); | ||
| 1166 | */ | ||
| 1167 | struct drm_xe_sync { | ||
| 1168 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 1169 | __u64 extensions; | ||
| 1170 | |||
| 1171 | #define DRM_XE_SYNC_TYPE_SYNCOBJ 0x0 | ||
| 1172 | #define DRM_XE_SYNC_TYPE_TIMELINE_SYNCOBJ 0x1 | ||
| 1173 | #define DRM_XE_SYNC_TYPE_USER_FENCE 0x2 | ||
| 1174 | /** @type: Type of the this sync object */ | ||
| 1175 | __u32 type; | ||
| 1176 | |||
| 1177 | #define DRM_XE_SYNC_FLAG_SIGNAL (1 << 0) | ||
| 1178 | /** @flags: Sync Flags */ | ||
| 1179 | __u32 flags; | ||
| 1180 | |||
| 1181 | union { | ||
| 1182 | /** @handle: Handle for the object */ | ||
| 1183 | __u32 handle; | ||
| 1184 | |||
| 1185 | /** | ||
| 1186 | * @addr: Address of user fence. When sync is passed in via exec | ||
| 1187 | * IOCTL this is a GPU address in the VM. When sync passed in via | ||
| 1188 | * VM bind IOCTL this is a user pointer. In either case, it is | ||
| 1189 | * the users responsibility that this address is present and | ||
| 1190 | * mapped when the user fence is signalled. Must be qword | ||
| 1191 | * aligned. | ||
| 1192 | */ | ||
| 1193 | __u64 addr; | ||
| 1194 | }; | ||
| 1195 | |||
| 1196 | /** | ||
| 1197 | * @timeline_value: Input for the timeline sync object. Needs to be | ||
| 1198 | * different than 0 when used with %DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ. | ||
| 1199 | */ | ||
| 1200 | __u64 timeline_value; | ||
| 1201 | |||
| 1202 | /** @reserved: Reserved */ | ||
| 1203 | __u64 reserved[2]; | ||
| 1204 | }; | ||
| 1205 | |||
| 1206 | /** | ||
| 1207 | * struct drm_xe_exec - Input of &DRM_IOCTL_XE_EXEC | ||
| 1208 | * | ||
| 1209 | * This is an example to use @drm_xe_exec for execution of the object | ||
| 1210 | * at BIND_ADDRESS (see example in @drm_xe_vm_bind) by an exec_queue | ||
| 1211 | * (see example in @drm_xe_exec_queue_create). It can be synchronized | ||
| 1212 | * by using the example provided for @drm_xe_sync. | ||
| 1213 | * | ||
| 1214 | * .. code-block:: C | ||
| 1215 | * | ||
| 1216 | * struct drm_xe_exec exec = { | ||
| 1217 | * .exec_queue_id = exec_queue, | ||
| 1218 | * .syncs = &sync, | ||
| 1219 | * .num_syncs = 1, | ||
| 1220 | * .address = BIND_ADDRESS, | ||
| 1221 | * .num_batch_buffer = 1, | ||
| 1222 | * }; | ||
| 1223 | * ioctl(fd, DRM_IOCTL_XE_EXEC, &exec); | ||
| 1224 | * | ||
| 1225 | */ | ||
| 1226 | struct drm_xe_exec { | ||
| 1227 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 1228 | __u64 extensions; | ||
| 1229 | |||
| 1230 | /** @exec_queue_id: Exec queue ID for the batch buffer */ | ||
| 1231 | __u32 exec_queue_id; | ||
| 1232 | |||
| 1233 | /** @num_syncs: Amount of struct drm_xe_sync in array. */ | ||
| 1234 | __u32 num_syncs; | ||
| 1235 | |||
| 1236 | /** @syncs: Pointer to struct drm_xe_sync array. */ | ||
| 1237 | __u64 syncs; | ||
| 1238 | |||
| 1239 | /** | ||
| 1240 | * @address: address of batch buffer if num_batch_buffer == 1 or an | ||
| 1241 | * array of batch buffer addresses | ||
| 1242 | */ | ||
| 1243 | __u64 address; | ||
| 1244 | |||
| 1245 | /** | ||
| 1246 | * @num_batch_buffer: number of batch buffer in this exec, must match | ||
| 1247 | * the width of the engine | ||
| 1248 | */ | ||
| 1249 | __u16 num_batch_buffer; | ||
| 1250 | |||
| 1251 | /** @pad: MBZ */ | ||
| 1252 | __u16 pad[3]; | ||
| 1253 | |||
| 1254 | /** @reserved: Reserved */ | ||
| 1255 | __u64 reserved[2]; | ||
| 1256 | }; | ||
| 1257 | |||
| 1258 | /** | ||
| 1259 | * struct drm_xe_wait_user_fence - Input of &DRM_IOCTL_XE_WAIT_USER_FENCE | ||
| 1260 | * | ||
| 1261 | * Wait on user fence, XE will wake-up on every HW engine interrupt in the | ||
| 1262 | * instances list and check if user fence is complete:: | ||
| 1263 | * | ||
| 1264 | * (*addr & MASK) OP (VALUE & MASK) | ||
| 1265 | * | ||
| 1266 | * Returns to user on user fence completion or timeout. | ||
| 1267 | * | ||
| 1268 | * The @op can be: | ||
| 1269 | * - %DRM_XE_UFENCE_WAIT_OP_EQ | ||
| 1270 | * - %DRM_XE_UFENCE_WAIT_OP_NEQ | ||
| 1271 | * - %DRM_XE_UFENCE_WAIT_OP_GT | ||
| 1272 | * - %DRM_XE_UFENCE_WAIT_OP_GTE | ||
| 1273 | * - %DRM_XE_UFENCE_WAIT_OP_LT | ||
| 1274 | * - %DRM_XE_UFENCE_WAIT_OP_LTE | ||
| 1275 | * | ||
| 1276 | * and the @flags can be: | ||
| 1277 | * - %DRM_XE_UFENCE_WAIT_FLAG_ABSTIME | ||
| 1278 | * - %DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP | ||
| 1279 | * | ||
| 1280 | * The @mask values can be for example: | ||
| 1281 | * - 0xffu for u8 | ||
| 1282 | * - 0xffffu for u16 | ||
| 1283 | * - 0xffffffffu for u32 | ||
| 1284 | * - 0xffffffffffffffffu for u64 | ||
| 1285 | */ | ||
| 1286 | struct drm_xe_wait_user_fence { | ||
| 1287 | /** @extensions: Pointer to the first extension struct, if any */ | ||
| 1288 | __u64 extensions; | ||
| 1289 | |||
| 1290 | /** | ||
| 1291 | * @addr: user pointer address to wait on, must qword aligned | ||
| 1292 | */ | ||
| 1293 | __u64 addr; | ||
| 1294 | |||
| 1295 | #define DRM_XE_UFENCE_WAIT_OP_EQ 0x0 | ||
| 1296 | #define DRM_XE_UFENCE_WAIT_OP_NEQ 0x1 | ||
| 1297 | #define DRM_XE_UFENCE_WAIT_OP_GT 0x2 | ||
| 1298 | #define DRM_XE_UFENCE_WAIT_OP_GTE 0x3 | ||
| 1299 | #define DRM_XE_UFENCE_WAIT_OP_LT 0x4 | ||
| 1300 | #define DRM_XE_UFENCE_WAIT_OP_LTE 0x5 | ||
| 1301 | /** @op: wait operation (type of comparison) */ | ||
| 1302 | __u16 op; | ||
| 1303 | |||
| 1304 | #define DRM_XE_UFENCE_WAIT_FLAG_ABSTIME (1 << 0) | ||
| 1305 | /** @flags: wait flags */ | ||
| 1306 | __u16 flags; | ||
| 1307 | |||
| 1308 | /** @pad: MBZ */ | ||
| 1309 | __u32 pad; | ||
| 1310 | |||
| 1311 | /** @value: compare value */ | ||
| 1312 | __u64 value; | ||
| 1313 | |||
| 1314 | /** @mask: comparison mask */ | ||
| 1315 | __u64 mask; | ||
| 1316 | |||
| 1317 | /** | ||
| 1318 | * @timeout: how long to wait before bailing, value in nanoseconds. | ||
| 1319 | * Without DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flag set (relative timeout) | ||
| 1320 | * it contains timeout expressed in nanoseconds to wait (fence will | ||
| 1321 | * expire at now() + timeout). | ||
| 1322 | * When DRM_XE_UFENCE_WAIT_FLAG_ABSTIME flat is set (absolute timeout) wait | ||
| 1323 | * will end at timeout (uses system MONOTONIC_CLOCK). | ||
| 1324 | * Passing negative timeout leads to neverending wait. | ||
| 1325 | * | ||
| 1326 | * On relative timeout this value is updated with timeout left | ||
| 1327 | * (for restarting the call in case of signal delivery). | ||
| 1328 | * On absolute timeout this value stays intact (restarted call still | ||
| 1329 | * expire at the same point of time). | ||
| 1330 | */ | ||
| 1331 | __s64 timeout; | ||
| 1332 | |||
| 1333 | /** @exec_queue_id: exec_queue_id returned from xe_exec_queue_create_ioctl */ | ||
| 1334 | __u32 exec_queue_id; | ||
| 1335 | |||
| 1336 | /** @pad2: MBZ */ | ||
| 1337 | __u32 pad2; | ||
| 1338 | |||
| 1339 | /** @reserved: Reserved */ | ||
| 1340 | __u64 reserved[2]; | ||
| 1341 | }; | ||
| 1342 | |||
| 1343 | #if defined(__cplusplus) | ||
| 1344 | } | ||
| 1345 | #endif | ||
| 1346 | |||
| 1347 | #endif /* _UAPI_XE_DRM_H_ */ | ||
| @@ -251,20 +251,22 @@ struct binder_extended_error { · 250 unmodified lines | |||
| 251 | __s32 param; | 251 | __s32 param; |
| 252 | }; | 252 | }; |
| 253 | 253 | ||
| 254 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) | 254 | enum { |
| 255 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) | 255 | BINDER_WRITE_READ = _IOWR('b', 1, struct binder_write_read), |
| 256 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) | 256 | BINDER_SET_IDLE_TIMEOUT = _IOW('b', 3, __s64), |
| 257 | #define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32) | 257 | BINDER_SET_MAX_THREADS = _IOW('b', 5, __u32), |
| 258 | #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) | 258 | BINDER_SET_IDLE_PRIORITY = _IOW('b', 6, __s32), |
| 259 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) | 259 | BINDER_SET_CONTEXT_MGR = _IOW('b', 7, __s32), |
| 260 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) | 260 | BINDER_THREAD_EXIT = _IOW('b', 8, __s32), |
| 261 | #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) | 261 | BINDER_VERSION = _IOWR('b', 9, struct binder_version), |
| 262 | #define BINDER_GET_NODE_INFO_FOR_REF _IOWR('b', 12, struct binder_node_info_for_ref) | 262 | BINDER_GET_NODE_DEBUG_INFO = _IOWR('b', 11, struct binder_node_debug_info), |
| 263 | #define BINDER_SET_CONTEXT_MGR_EXT _IOW('b', 13, struct flat_binder_object) | 263 | BINDER_GET_NODE_INFO_FOR_REF = _IOWR('b', 12, struct binder_node_info_for_ref), |
| 264 | #define BINDER_FREEZE _IOW('b', 14, struct binder_freeze_info) | 264 | BINDER_SET_CONTEXT_MGR_EXT = _IOW('b', 13, struct flat_binder_object), |
| 265 | #define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info) | 265 | BINDER_FREEZE = _IOW('b', 14, struct binder_freeze_info), |
| 266 | #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32) | 266 | BINDER_GET_FROZEN_INFO = _IOWR('b', 15, struct binder_frozen_status_info), |
| 267 | #define BINDER_GET_EXTENDED_ERROR _IOWR('b', 17, struct binder_extended_error) | 267 | BINDER_ENABLE_ONEWAY_SPAM_DETECTION = _IOW('b', 16, __u32), |
| 268 | BINDER_GET_EXTENDED_ERROR = _IOWR('b', 17, struct binder_extended_error), | ||
| 269 | }; | ||
| 268 | 270 | ||
| 269 | /* | 271 | /* |
| 270 | * NOTE: Two special error codes you should check for when calling | 272 | * NOTE: Two special error codes you should check for when calling |
| @@ -116,6 +116,9 @@ enum batadv_icmp_packettype { · 115 unmodified lines | |||
| 116 | * only need routable IPv4 multicast packets we signed up for explicitly | 116 | * only need routable IPv4 multicast packets we signed up for explicitly |
| 117 | * @BATADV_MCAST_WANT_NO_RTR6: we have no IPv6 multicast router and therefore | 117 | * @BATADV_MCAST_WANT_NO_RTR6: we have no IPv6 multicast router and therefore |
| 118 | * only need routable IPv6 multicast packets we signed up for explicitly | 118 | * only need routable IPv6 multicast packets we signed up for explicitly |
| 119 | * @BATADV_MCAST_HAVE_MC_PTYPE_CAPA: we can parse, receive and forward | ||
| 120 | * batman-adv multicast packets with a multicast tracker TVLV. And all our | ||
| 121 | * hard interfaces have an MTU of at least 1280 bytes. | ||
| 119 | */ | 122 | */ |
| 120 | enum batadv_mcast_flags { | 123 | enum batadv_mcast_flags { |
| 121 | BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0, | 124 | BATADV_MCAST_WANT_ALL_UNSNOOPABLES = 1UL << 0, |
| @@ -123,6 +126,7 @@ enum batadv_mcast_flags { · 1 unmodified line | |||
| 123 | BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2, | 126 | BATADV_MCAST_WANT_ALL_IPV6 = 1UL << 2, |
| 124 | BATADV_MCAST_WANT_NO_RTR4 = 1UL << 3, | 127 | BATADV_MCAST_WANT_NO_RTR4 = 1UL << 3, |
| 125 | BATADV_MCAST_WANT_NO_RTR6 = 1UL << 4, | 128 | BATADV_MCAST_WANT_NO_RTR6 = 1UL << 4, |
| 129 | BATADV_MCAST_HAVE_MC_PTYPE_CAPA = 1UL << 5, | ||
| 126 | }; | 130 | }; |
| 127 | 131 | ||
| 128 | /* tt data subtypes */ | 132 | /* tt data subtypes */ |
| @@ -174,14 +178,16 @@ enum batadv_bla_claimframe { · 45 unmodified lines | |||
| 174 | * @BATADV_TVLV_TT: translation table tvlv | 178 | * @BATADV_TVLV_TT: translation table tvlv |
| 175 | * @BATADV_TVLV_ROAM: roaming advertisement tvlv | 179 | * @BATADV_TVLV_ROAM: roaming advertisement tvlv |
| 176 | * @BATADV_TVLV_MCAST: multicast capability tvlv | 180 | * @BATADV_TVLV_MCAST: multicast capability tvlv |
| 181 | * @BATADV_TVLV_MCAST_TRACKER: multicast tracker tvlv | ||
| 177 | */ | 182 | */ |
| 178 | enum batadv_tvlv_type { | 183 | enum batadv_tvlv_type { |
| 179 | BATADV_TVLV_GW = 0x01, | 184 | BATADV_TVLV_GW = 0x01, |
| 180 | BATADV_TVLV_DAT = 0x02, | 185 | BATADV_TVLV_DAT = 0x02, |
| 181 | BATADV_TVLV_NC = 0x03, | 186 | BATADV_TVLV_NC = 0x03, |
| 182 | BATADV_TVLV_TT = 0x04, | 187 | BATADV_TVLV_TT = 0x04, |
| 183 | BATADV_TVLV_ROAM = 0x05, | 188 | BATADV_TVLV_ROAM = 0x05, |
| 184 | BATADV_TVLV_MCAST = 0x06, | 189 | BATADV_TVLV_MCAST = 0x06, |
| 190 | BATADV_TVLV_MCAST_TRACKER = 0x07, | ||
| 185 | }; | 191 | }; |
| 186 | 192 | ||
| 187 | #pragma pack(2) | 193 | #pragma pack(2) |
| @@ -487,6 +493,25 @@ struct batadv_bcast_packet { · 299 unmodified lines | |||
| 487 | */ | 493 | */ |
| 488 | }; | 494 | }; |
| 489 | 495 | ||
| 496 | /** | ||
| 497 | * struct batadv_mcast_packet - multicast packet for network payload | ||
| 498 | * @packet_type: batman-adv packet type, part of the general header | ||
| 499 | * @version: batman-adv protocol version, part of the general header | ||
| 500 | * @ttl: time to live for this packet, part of the general header | ||
| 501 | * @reserved: reserved byte for alignment | ||
| 502 | * @tvlv_len: length of the appended tvlv buffer (in bytes) | ||
| 503 | */ | ||
| 504 | struct batadv_mcast_packet { | ||
| 505 | __u8 packet_type; | ||
| 506 | __u8 version; | ||
| 507 | __u8 ttl; | ||
| 508 | __u8 reserved; | ||
| 509 | __be16 tvlv_len; | ||
| 510 | /* "4 bytes boundary + 2 bytes" long to make the payload after the | ||
| 511 | * following ethernet header again 4 bytes boundary aligned | ||
| 512 | */ | ||
| 513 | }; | ||
| 514 | |||
| 490 | /** | 515 | /** |
| 491 | * struct batadv_coded_packet - network coded packet | 516 | * struct batadv_coded_packet - network coded packet |
| 492 | * @packet_type: batman-adv packet type, part of the general header | 517 | * @packet_type: batman-adv packet type, part of the general header |
| @@ -628,6 +653,14 @@ struct batadv_tvlv_mcast_data { · 135 unmodified lines | |||
| 628 | __u8 reserved[3]; | 653 | __u8 reserved[3]; |
| 629 | }; | 654 | }; |
| 630 | 655 | ||
| 656 | /** | ||
| 657 | * struct batadv_tvlv_mcast_tracker - payload of a multicast tracker tvlv | ||
| 658 | * @num_dests: number of subsequent destination originator MAC addresses | ||
| 659 | */ | ||
| 660 | struct batadv_tvlv_mcast_tracker { | ||
| 661 | __be16 num_dests; | ||
| 662 | }; | ||
| 663 | |||
| 631 | #pragma pack() | 664 | #pragma pack() |
| 632 | 665 | ||
| 633 | #endif /* _UAPI_LINUX_BATADV_PACKET_H_ */ | 666 | #endif /* _UAPI_LINUX_BATADV_PACKET_H_ */ |
| @@ -1074,9 +1074,11 @@ enum bpf_link_type { · 1073 unmodified lines | |||
| 1074 | BPF_LINK_TYPE_TCX = 11, | 1074 | BPF_LINK_TYPE_TCX = 11, |
| 1075 | BPF_LINK_TYPE_UPROBE_MULTI = 12, | 1075 | BPF_LINK_TYPE_UPROBE_MULTI = 12, |
| 1076 | BPF_LINK_TYPE_NETKIT = 13, | 1076 | BPF_LINK_TYPE_NETKIT = 13, |
| 1077 | MAX_BPF_LINK_TYPE, | 1077 | __MAX_BPF_LINK_TYPE, |
| 1078 | }; | 1078 | }; |
| 1079 | 1079 | ||
| 1080 | #define MAX_BPF_LINK_TYPE __MAX_BPF_LINK_TYPE | ||
| 1081 | |||
| 1080 | enum bpf_perf_event_type { | 1082 | enum bpf_perf_event_type { |
| 1081 | BPF_PERF_EVENT_UNSPEC = 0, | 1083 | BPF_PERF_EVENT_UNSPEC = 0, |
| 1082 | BPF_PERF_EVENT_UPROBE = 1, | 1084 | BPF_PERF_EVENT_UPROBE = 1, |
| @@ -1200,6 +1202,9 @@ enum bpf_perf_event_type { · 117 unmodified lines | |||
| 1200 | */ | 1202 | */ |
| 1201 | #define BPF_F_XDP_DEV_BOUND_ONLY (1U << 6) | 1203 | #define BPF_F_XDP_DEV_BOUND_ONLY (1U << 6) |
| 1202 | 1204 | ||
| 1205 | /* The verifier internal test flag. Behavior is undefined */ | ||
| 1206 | #define BPF_F_TEST_REG_INVARIANTS (1U << 7) | ||
| 1207 | |||
| 1203 | /* link_create.kprobe_multi.flags used in LINK_CREATE command for | 1208 | /* link_create.kprobe_multi.flags used in LINK_CREATE command for |
| 1204 | * BPF_TRACE_KPROBE_MULTI attach type to create return probe. | 1209 | * BPF_TRACE_KPROBE_MULTI attach type to create return probe. |
| 1205 | */ | 1210 | */ |
| @@ -4517,6 +4522,8 @@ union bpf_attr { · 3311 unmodified lines | |||
| 4517 | * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags) | 4522 | * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags) |
| 4518 | * Description | 4523 | * Description |
| 4519 | * Return a user or a kernel stack in bpf program provided buffer. | 4524 | * Return a user or a kernel stack in bpf program provided buffer. |
| 4525 | * Note: the user stack will only be populated if the *task* is | ||
| 4526 | * the current task; all other tasks will return -EOPNOTSUPP. | ||
| 4520 | * To achieve this, the helper needs *task*, which is a valid | 4527 | * To achieve this, the helper needs *task*, which is a valid |
| 4521 | * pointer to **struct task_struct**. To store the stacktrace, the | 4528 | * pointer to **struct task_struct**. To store the stacktrace, the |
| 4522 | * bpf program provides *buf* with a nonnegative *size*. | 4529 | * bpf program provides *buf* with a nonnegative *size*. |
| @@ -4528,6 +4535,7 @@ union bpf_attr { · 5 unmodified lines | |||
| 4528 | * | 4535 | * |
| 4529 | * **BPF_F_USER_STACK** | 4536 | * **BPF_F_USER_STACK** |
| 4530 | * Collect a user space stack instead of a kernel stack. | 4537 | * Collect a user space stack instead of a kernel stack. |
| 4538 | * The *task* must be the current task. | ||
| 4531 | * **BPF_F_USER_BUILD_ID** | 4539 | * **BPF_F_USER_BUILD_ID** |
| 4532 | * Collect buildid+offset instead of ips for user stack, | 4540 | * Collect buildid+offset instead of ips for user stack, |
| 4533 | * only valid if **BPF_F_USER_STACK** is also specified. | 4541 | * only valid if **BPF_F_USER_STACK** is also specified. |
| @@ -6556,6 +6564,16 @@ struct bpf_link_info { · 2022 unmodified lines | |||
| 6556 | __u32 flags; | 6564 | __u32 flags; |
| 6557 | __u64 missed; | 6565 | __u64 missed; |
| 6558 | } kprobe_multi; | 6566 | } kprobe_multi; |
| 6567 | struct { | ||
| 6568 | __aligned_u64 path; | ||
| 6569 | __aligned_u64 offsets; | ||
| 6570 | __aligned_u64 ref_ctr_offsets; | ||
| 6571 | __aligned_u64 cookies; | ||
| 6572 | __u32 path_size; /* in/out: real path size on success, including zero byte */ | ||
| 6573 | __u32 count; /* in/out: uprobe_multi offsets/ref_ctr_offsets/cookies count */ | ||
| 6574 | __u32 flags; | ||
| 6575 | __u32 pid; | ||
| 6576 | } uprobe_multi; | ||
| 6559 | struct { | 6577 | struct { |
| 6560 | __u32 type; /* enum bpf_perf_event_type */ | 6578 | __u32 type; /* enum bpf_perf_event_type */ |
| 6561 | __u32 :32; | 6579 | __u32 :32; |
| @@ -6886,6 +6904,7 @@ enum { · 324 unmodified lines | |||
| 6886 | BPF_TCP_LISTEN, | 6904 | BPF_TCP_LISTEN, |
| 6887 | BPF_TCP_CLOSING, /* Now a valid state */ | 6905 | BPF_TCP_CLOSING, /* Now a valid state */ |
| 6888 | BPF_TCP_NEW_SYN_RECV, | 6906 | BPF_TCP_NEW_SYN_RECV, |
| 6907 | BPF_TCP_BOUND_INACTIVE, | ||
| 6889 | 6908 | ||
| 6890 | BPF_TCP_MAX_STATES /* Leave at the end! */ | 6909 | BPF_TCP_MAX_STATES /* Leave at the end! */ |
| 6891 | }; | 6910 | }; |
| @@ -7151,40 +7170,31 @@ struct bpf_spin_lock { · 259 unmodified lines | |||
| 7151 | }; | 7170 | }; |
| 7152 | 7171 | ||
| 7153 | struct bpf_timer { | 7172 | struct bpf_timer { |
| 7154 | __u64 :64; | 7173 | __u64 __opaque[2]; |
| 7155 | __u64 :64; | ||
| 7156 | } __attribute__((aligned(8))); | 7174 | } __attribute__((aligned(8))); |
| 7157 | 7175 | ||
| 7158 | struct bpf_dynptr { | 7176 | struct bpf_dynptr { |
| 7159 | __u64 :64; | 7177 | __u64 __opaque[2]; |
| 7160 | __u64 :64; | ||
| 7161 | } __attribute__((aligned(8))); | 7178 | } __attribute__((aligned(8))); |
| 7162 | 7179 | ||
| 7163 | struct bpf_list_head { | 7180 | struct bpf_list_head { |
| 7164 | __u64 :64; | 7181 | __u64 __opaque[2]; |
| 7165 | __u64 :64; | ||
| 7166 | } __attribute__((aligned(8))); | 7182 | } __attribute__((aligned(8))); |
| 7167 | 7183 | ||
| 7168 | struct bpf_list_node { | 7184 | struct bpf_list_node { |
| 7169 | __u64 :64; | 7185 | __u64 __opaque[3]; |
| 7170 | __u64 :64; | ||
| 7171 | __u64 :64; | ||
| 7172 | } __attribute__((aligned(8))); | 7186 | } __attribute__((aligned(8))); |
| 7173 | 7187 | ||
| 7174 | struct bpf_rb_root { | 7188 | struct bpf_rb_root { |
| 7175 | __u64 :64; | 7189 | __u64 __opaque[2]; |
| 7176 | __u64 :64; | ||
| 7177 | } __attribute__((aligned(8))); | 7190 | } __attribute__((aligned(8))); |
| 7178 | 7191 | ||
| 7179 | struct bpf_rb_node { | 7192 | struct bpf_rb_node { |
| 7180 | __u64 :64; | 7193 | __u64 __opaque[4]; |
| 7181 | __u64 :64; | ||
| 7182 | __u64 :64; | ||
| 7183 | __u64 :64; | ||
| 7184 | } __attribute__((aligned(8))); | 7194 | } __attribute__((aligned(8))); |
| 7185 | 7195 | ||
| 7186 | struct bpf_refcount { | 7196 | struct bpf_refcount { |
| 7187 | __u32 :32; | 7197 | __u32 __opaque[1]; |
| 7188 | } __attribute__((aligned(4))); | 7198 | } __attribute__((aligned(4))); |
| 7189 | 7199 | ||
| 7190 | struct bpf_sysctl { | 7200 | struct bpf_sysctl { |
| @@ -1,21 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef _UAPI_LINUX_BPFILTER_H | ||
| 3 | #define _UAPI_LINUX_BPFILTER_H | ||
| 4 | |||
| 5 | #include <linux/if.h> | ||
| 6 | |||
| 7 | enum { | ||
| 8 | BPFILTER_IPT_SO_SET_REPLACE = 64, | ||
| 9 | BPFILTER_IPT_SO_SET_ADD_COUNTERS = 65, | ||
| 10 | BPFILTER_IPT_SET_MAX, | ||
| 11 | }; | ||
| 12 | |||
| 13 | enum { | ||
| 14 | BPFILTER_IPT_SO_GET_INFO = 64, | ||
| 15 | BPFILTER_IPT_SO_GET_ENTRIES = 65, | ||
| 16 | BPFILTER_IPT_SO_GET_REVISION_MATCH = 66, | ||
| 17 | BPFILTER_IPT_SO_GET_REVISION_TARGET = 67, | ||
| 18 | BPFILTER_IPT_GET_MAX, | ||
| 19 | }; | ||
| 20 | |||
| 21 | #endif /* _UAPI_LINUX_BPFILTER_H */ | ||
| @@ -46,6 +46,7 @@ · 45 unmodified lines | |||
| 46 | ___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), \ | 46 | ___C(GET_SCAN_MEDIA_CAPS, "Get Scan Media Capabilities"), \ |
| 47 | ___DEPRECATED(SCAN_MEDIA, "Scan Media"), \ | 47 | ___DEPRECATED(SCAN_MEDIA, "Scan Media"), \ |
| 48 | ___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), \ | 48 | ___DEPRECATED(GET_SCAN_MEDIA, "Get Scan Media Results"), \ |
| 49 | ___C(GET_TIMESTAMP, "Get Timestamp"), \ | ||
| 49 | ___C(MAX, "invalid / last command") | 50 | ___C(MAX, "invalid / last command") |
| 50 | 51 | ||
| 51 | #define ___C(a, b) CXL_MEM_COMMAND_ID_##a | 52 | #define ___C(a, b) CXL_MEM_COMMAND_ID_##a |
| @@ -139,6 +139,8 @@ enum devlink_command { · 138 unmodified lines | |||
| 139 | DEVLINK_CMD_SELFTESTS_GET, /* can dump */ | 139 | DEVLINK_CMD_SELFTESTS_GET, /* can dump */ |
| 140 | DEVLINK_CMD_SELFTESTS_RUN, | 140 | DEVLINK_CMD_SELFTESTS_RUN, |
| 141 | 141 | ||
| 142 | DEVLINK_CMD_NOTIFY_FILTER_SET, | ||
| 143 | |||
| 142 | /* add new commands above here */ | 144 | /* add new commands above here */ |
| 143 | __DEVLINK_CMD_MAX, | 145 | __DEVLINK_CMD_MAX, |
| 144 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 | 146 | DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1 |
| @@ -179,6 +179,7 @@ enum dpll_a_pin { · 178 unmodified lines | |||
| 179 | DPLL_A_PIN_PHASE_ADJUST_MAX, | 179 | DPLL_A_PIN_PHASE_ADJUST_MAX, |
| 180 | DPLL_A_PIN_PHASE_ADJUST, | 180 | DPLL_A_PIN_PHASE_ADJUST, |
| 181 | DPLL_A_PIN_PHASE_OFFSET, | 181 | DPLL_A_PIN_PHASE_OFFSET, |
| 182 | DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET, | ||
| 182 | 183 | ||
| 183 | __DPLL_A_PIN_MAX, | 184 | __DPLL_A_PIN_MAX, |
| 184 | DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1) | 185 | DPLL_A_PIN_MAX = (__DPLL_A_PIN_MAX - 1) |
| @@ -1266,6 +1266,8 @@ struct ethtool_rxfh_indir { · 1265 unmodified lines | |||
| 1266 | * hardware hash key. | 1266 | * hardware hash key. |
| 1267 | * @hfunc: Defines the current RSS hash function used by HW (or to be set to). | 1267 | * @hfunc: Defines the current RSS hash function used by HW (or to be set to). |
| 1268 | * Valid values are one of the %ETH_RSS_HASH_*. | 1268 | * Valid values are one of the %ETH_RSS_HASH_*. |
| 1269 | * @input_xfrm: Defines how the input data is transformed. Valid values are one | ||
| 1270 | * of %RXH_XFRM_*. | ||
| 1269 | * @rsvd8: Reserved for future use; see the note on reserved space. | 1271 | * @rsvd8: Reserved for future use; see the note on reserved space. |
| 1270 | * @rsvd32: Reserved for future use; see the note on reserved space. | 1272 | * @rsvd32: Reserved for future use; see the note on reserved space. |
| 1271 | * @rss_config: RX ring/queue index for each hash value i.e., indirection table | 1273 | * @rss_config: RX ring/queue index for each hash value i.e., indirection table |
| @@ -1285,7 +1287,8 @@ struct ethtool_rxfh { · 13 unmodified lines | |||
| 1285 | __u32 indir_size; | 1287 | __u32 indir_size; |
| 1286 | __u32 key_size; | 1288 | __u32 key_size; |
| 1287 | __u8 hfunc; | 1289 | __u8 hfunc; |
| 1288 | __u8 rsvd8[3]; | 1290 | __u8 input_xfrm; |
| 1291 | __u8 rsvd8[2]; | ||
| 1289 | __u32 rsvd32; | 1292 | __u32 rsvd32; |
| 1290 | __u32 rss_config[]; | 1293 | __u32 rss_config[]; |
| 1291 | }; | 1294 | }; |
| @@ -1992,6 +1995,15 @@ static inline int ethtool_validate_duplex(__u8 duplex) · 700 unmodified lines | |||
| 1992 | 1995 | ||
| 1993 | #define WOL_MODE_COUNT 8 | 1996 | #define WOL_MODE_COUNT 8 |
| 1994 | 1997 | ||
| 1998 | /* RSS hash function data | ||
| 1999 | * XOR the corresponding source and destination fields of each specified | ||
| 2000 | * protocol. Both copies of the XOR'ed fields are fed into the RSS and RXHASH | ||
| 2001 | * calculation. Note that this XORing reduces the input set entropy and could | ||
| 2002 | * be exploited to reduce the RSS queue spread. | ||
| 2003 | */ | ||
| 2004 | #define RXH_XFRM_SYM_XOR (1 << 0) | ||
| 2005 | #define RXH_XFRM_NO_CHANGE 0xff | ||
| 2006 | |||
| 1995 | /* L2-L4 network traffic flow types */ | 2007 | /* L2-L4 network traffic flow types */ |
| 1996 | #define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */ | 2008 | #define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */ |
| 1997 | #define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */ | 2009 | #define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */ |
| @@ -2128,18 +2140,6 @@ enum ethtool_reset_flags { · 130 unmodified lines | |||
| 2128 | * refused. For drivers: ignore this field (use kernel's | 2140 | * refused. For drivers: ignore this field (use kernel's |
| 2129 | * __ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will | 2141 | * __ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will |
| 2130 | * be overwritten by kernel. | 2142 | * be overwritten by kernel. |
| 2131 | * @supported: Bitmap with each bit meaning given by | ||
| 2132 | * %ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2133 | * connectors and other link features for which the interface | ||
| 2134 | * supports autonegotiation or auto-detection. Read-only. | ||
| 2135 | * @advertising: Bitmap with each bit meaning given by | ||
| 2136 | * %ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2137 | * connectors and other link features that are advertised through | ||
| 2138 | * autonegotiation or enabled for auto-detection. | ||
| 2139 | * @lp_advertising: Bitmap with each bit meaning given by | ||
| 2140 | * %ethtool_link_mode_bit_indices for the link modes, and other | ||
| 2141 | * link features that the link partner advertised through | ||
| 2142 | * autonegotiation; 0 if unknown or not applicable. Read-only. | ||
| 2143 | * @transceiver: Used to distinguish different possible PHY types, | 2143 | * @transceiver: Used to distinguish different possible PHY types, |
| 2144 | * reported consistently by PHYLIB. Read-only. | 2144 | * reported consistently by PHYLIB. Read-only. |
| 2145 | * @master_slave_cfg: Master/slave port mode. | 2145 | * @master_slave_cfg: Master/slave port mode. |
| @@ -2181,6 +2181,21 @@ enum ethtool_reset_flags { · 35 unmodified lines | |||
| 2181 | * %set_link_ksettings() should validate all fields other than @cmd | 2181 | * %set_link_ksettings() should validate all fields other than @cmd |
| 2182 | * and @link_mode_masks_nwords that are not described as read-only or | 2182 | * and @link_mode_masks_nwords that are not described as read-only or |
| 2183 | * deprecated, and must ignore all fields described as read-only. | 2183 | * deprecated, and must ignore all fields described as read-only. |
| 2184 | * | ||
| 2185 | * @link_mode_masks is divided into three bitfields, each of length | ||
| 2186 | * @link_mode_masks_nwords: | ||
| 2187 | * - supported: Bitmap with each bit meaning given by | ||
| 2188 | * %ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2189 | * connectors and other link features for which the interface | ||
| 2190 | * supports autonegotiation or auto-detection. Read-only. | ||
| 2191 | * - advertising: Bitmap with each bit meaning given by | ||
| 2192 | * %ethtool_link_mode_bit_indices for the link modes, physical | ||
| 2193 | * connectors and other link features that are advertised through | ||
| 2194 | * autonegotiation or enabled for auto-detection. | ||
| 2195 | * - lp_advertising: Bitmap with each bit meaning given by | ||
| 2196 | * %ethtool_link_mode_bit_indices for the link modes, and other | ||
| 2197 | * link features that the link partner advertised through | ||
| 2198 | * autonegotiation; 0 if unknown or not applicable. Read-only. | ||
| 2184 | */ | 2199 | */ |
| 2185 | struct ethtool_link_settings { | 2200 | struct ethtool_link_settings { |
| 2186 | __u32 cmd; | 2201 | __u32 cmd; |
| @@ -908,6 +908,7 @@ enum { · 907 unmodified lines | |||
| 908 | ETHTOOL_A_RSS_HFUNC, /* u32 */ | 908 | ETHTOOL_A_RSS_HFUNC, /* u32 */ |
| 909 | ETHTOOL_A_RSS_INDIR, /* binary */ | 909 | ETHTOOL_A_RSS_INDIR, /* binary */ |
| 910 | ETHTOOL_A_RSS_HKEY, /* binary */ | 910 | ETHTOOL_A_RSS_HKEY, /* binary */ |
| 911 | ETHTOOL_A_RSS_INPUT_XFRM, /* u32 */ | ||
| 911 | 912 | ||
| 912 | __ETHTOOL_A_RSS_CNT, | 913 | __ETHTOOL_A_RSS_CNT, |
| 913 | ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1), | 914 | ETHTOOL_A_RSS_MAX = (__ETHTOOL_A_RSS_CNT - 1), |
| @@ -316,6 +316,7 @@ typedef int __bitwise __kernel_rwf_t; · 315 unmodified lines | |||
| 316 | #define PAGE_IS_SWAPPED (1 << 4) | 316 | #define PAGE_IS_SWAPPED (1 << 4) |
| 317 | #define PAGE_IS_PFNZERO (1 << 5) | 317 | #define PAGE_IS_PFNZERO (1 << 5) |
| 318 | #define PAGE_IS_HUGE (1 << 6) | 318 | #define PAGE_IS_HUGE (1 << 6) |
| 319 | #define PAGE_IS_SOFT_DIRTY (1 << 7) | ||
| 319 | 320 | ||
| 320 | /* | 321 | /* |
| 321 | * struct page_region - Page region with flags | 322 | * struct page_region - Page region with flags |
| @@ -209,7 +209,7 @@ · 208 unmodified lines | |||
| 209 | * - add FUSE_HAS_EXPIRE_ONLY | 209 | * - add FUSE_HAS_EXPIRE_ONLY |
| 210 | * | 210 | * |
| 211 | * 7.39 | 211 | * 7.39 |
| 212 | * - add FUSE_DIRECT_IO_RELAX | 212 | * - add FUSE_DIRECT_IO_ALLOW_MMAP |
| 213 | * - add FUSE_STATX and related structures | 213 | * - add FUSE_STATX and related structures |
| 214 | */ | 214 | */ |
| 215 | 215 | ||
| @@ -409,8 +409,7 @@ struct fuse_file_lock { · 193 unmodified lines | |||
| 409 | * FUSE_CREATE_SUPP_GROUP: add supplementary group info to create, mkdir, | 409 | * FUSE_CREATE_SUPP_GROUP: add supplementary group info to create, mkdir, |
| 410 | * symlink and mknod (single group that matches parent) | 410 | * symlink and mknod (single group that matches parent) |
| 411 | * FUSE_HAS_EXPIRE_ONLY: kernel supports expiry-only entry invalidation | 411 | * FUSE_HAS_EXPIRE_ONLY: kernel supports expiry-only entry invalidation |
| 412 | * FUSE_DIRECT_IO_RELAX: relax restrictions in FOPEN_DIRECT_IO mode, for now | 412 | * FUSE_DIRECT_IO_ALLOW_MMAP: allow shared mmap in FOPEN_DIRECT_IO mode. |
| 413 | * allow shared mmap | ||
| 414 | */ | 413 | */ |
| 415 | #define FUSE_ASYNC_READ (1 << 0) | 414 | #define FUSE_ASYNC_READ (1 << 0) |
| 416 | #define FUSE_POSIX_LOCKS (1 << 1) | 415 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -449,7 +448,10 @@ struct fuse_file_lock { · 32 unmodified lines | |||
| 449 | #define FUSE_HAS_INODE_DAX (1ULL << 33) | 448 | #define FUSE_HAS_INODE_DAX (1ULL << 33) |
| 450 | #define FUSE_CREATE_SUPP_GROUP (1ULL << 34) | 449 | #define FUSE_CREATE_SUPP_GROUP (1ULL << 34) |
| 451 | #define FUSE_HAS_EXPIRE_ONLY (1ULL << 35) | 450 | #define FUSE_HAS_EXPIRE_ONLY (1ULL << 35) |
| 452 | #define FUSE_DIRECT_IO_RELAX (1ULL << 36) | 451 | #define FUSE_DIRECT_IO_ALLOW_MMAP (1ULL << 36) |
| 452 | |||
| 453 | /* Obsolete alias for FUSE_DIRECT_IO_ALLOW_MMAP */ | ||
| 454 | #define FUSE_DIRECT_IO_RELAX FUSE_DIRECT_IO_ALLOW_MMAP | ||
| 453 | 455 | ||
| 454 | /** | 456 | /** |
| 455 | * CUSE INIT request/reply flags | 457 | * CUSE INIT request/reply flags |
| @@ -757,6 +757,7 @@ enum { · 756 unmodified lines | |||
| 757 | MDBE_ATTR_VNI, | 757 | MDBE_ATTR_VNI, |
| 758 | MDBE_ATTR_IFINDEX, | 758 | MDBE_ATTR_IFINDEX, |
| 759 | MDBE_ATTR_SRC_VNI, | 759 | MDBE_ATTR_SRC_VNI, |
| 760 | MDBE_ATTR_STATE_MASK, | ||
| 760 | __MDBE_ATTR_MAX, | 761 | __MDBE_ATTR_MAX, |
| 761 | }; | 762 | }; |
| 762 | #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) | 763 | #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1) |
| @@ -461,6 +461,286 @@ enum in6_addr_gen_mode { · 460 unmodified lines | |||
| 461 | 461 | ||
| 462 | /* Bridge section */ | 462 | /* Bridge section */ |
| 463 | 463 | ||
| 464 | /** | ||
| 465 | * DOC: Bridge enum definition | ||
| 466 | * | ||
| 467 | * Please *note* that the timer values in the following section are expected | ||
| 468 | * in clock_t format, which is seconds multiplied by USER_HZ (generally | ||
| 469 | * defined as 100). | ||
| 470 | * | ||
| 471 | * @IFLA_BR_FORWARD_DELAY | ||
| 472 | * The bridge forwarding delay is the time spent in LISTENING state | ||
| 473 | * (before moving to LEARNING) and in LEARNING state (before moving | ||
| 474 | * to FORWARDING). Only relevant if STP is enabled. | ||
| 475 | * | ||
| 476 | * The valid values are between (2 * USER_HZ) and (30 * USER_HZ). | ||
| 477 | * The default value is (15 * USER_HZ). | ||
| 478 | * | ||
| 479 | * @IFLA_BR_HELLO_TIME | ||
| 480 | * The time between hello packets sent by the bridge, when it is a root | ||
| 481 | * bridge or a designated bridge. Only relevant if STP is enabled. | ||
| 482 | * | ||
| 483 | * The valid values are between (1 * USER_HZ) and (10 * USER_HZ). | ||
| 484 | * The default value is (2 * USER_HZ). | ||
| 485 | * | ||
| 486 | * @IFLA_BR_MAX_AGE | ||
| 487 | * The hello packet timeout is the time until another bridge in the | ||
| 488 | * spanning tree is assumed to be dead, after reception of its last hello | ||
| 489 | * message. Only relevant if STP is enabled. | ||
| 490 | * | ||
| 491 | * The valid values are between (6 * USER_HZ) and (40 * USER_HZ). | ||
| 492 | * The default value is (20 * USER_HZ). | ||
| 493 | * | ||
| 494 | * @IFLA_BR_AGEING_TIME | ||
| 495 | * Configure the bridge's FDB entries aging time. It is the time a MAC | ||
| 496 | * address will be kept in the FDB after a packet has been received from | ||
| 497 | * that address. After this time has passed, entries are cleaned up. | ||
| 498 | * Allow values outside the 802.1 standard specification for special cases: | ||
| 499 | * | ||
| 500 | * * 0 - entry never ages (all permanent) | ||
| 501 | * * 1 - entry disappears (no persistence) | ||
| 502 | * | ||
| 503 | * The default value is (300 * USER_HZ). | ||
| 504 | * | ||
| 505 | * @IFLA_BR_STP_STATE | ||
| 506 | * Turn spanning tree protocol on (*IFLA_BR_STP_STATE* > 0) or off | ||
| 507 | * (*IFLA_BR_STP_STATE* == 0) for this bridge. | ||
| 508 | * | ||
| 509 | * The default value is 0 (disabled). | ||
| 510 | * | ||
| 511 | * @IFLA_BR_PRIORITY | ||
| 512 | * Set this bridge's spanning tree priority, used during STP root bridge | ||
| 513 | * election. | ||
| 514 | * | ||
| 515 | * The valid values are between 0 and 65535. | ||
| 516 | * | ||
| 517 | * @IFLA_BR_VLAN_FILTERING | ||
| 518 | * Turn VLAN filtering on (*IFLA_BR_VLAN_FILTERING* > 0) or off | ||
| 519 | * (*IFLA_BR_VLAN_FILTERING* == 0). When disabled, the bridge will not | ||
| 520 | * consider the VLAN tag when handling packets. | ||
| 521 | * | ||
| 522 | * The default value is 0 (disabled). | ||
| 523 | * | ||
| 524 | * @IFLA_BR_VLAN_PROTOCOL | ||
| 525 | * Set the protocol used for VLAN filtering. | ||
| 526 | * | ||
| 527 | * The valid values are 0x8100(802.1Q) or 0x88A8(802.1AD). The default value | ||
| 528 | * is 0x8100(802.1Q). | ||
| 529 | * | ||
| 530 | * @IFLA_BR_GROUP_FWD_MASK | ||
| 531 | * The group forwarding mask. This is the bitmask that is applied to | ||
| 532 | * decide whether to forward incoming frames destined to link-local | ||
| 533 | * addresses (of the form 01:80:C2:00:00:0X). | ||
| 534 | * | ||
| 535 | * The default value is 0, which means the bridge does not forward any | ||
| 536 | * link-local frames coming on this port. | ||
| 537 | * | ||
| 538 | * @IFLA_BR_ROOT_ID | ||
| 539 | * The bridge root id, read only. | ||
| 540 | * | ||
| 541 | * @IFLA_BR_BRIDGE_ID | ||
| 542 | * The bridge id, read only. | ||
| 543 | * | ||
| 544 | * @IFLA_BR_ROOT_PORT | ||
| 545 | * The bridge root port, read only. | ||
| 546 | * | ||
| 547 | * @IFLA_BR_ROOT_PATH_COST | ||
| 548 | * The bridge root path cost, read only. | ||
| 549 | * | ||
| 550 | * @IFLA_BR_TOPOLOGY_CHANGE | ||
| 551 | * The bridge topology change, read only. | ||
| 552 | * | ||
| 553 | * @IFLA_BR_TOPOLOGY_CHANGE_DETECTED | ||
| 554 | * The bridge topology change detected, read only. | ||
| 555 | * | ||
| 556 | * @IFLA_BR_HELLO_TIMER | ||
| 557 | * The bridge hello timer, read only. | ||
| 558 | * | ||
| 559 | * @IFLA_BR_TCN_TIMER | ||
| 560 | * The bridge tcn timer, read only. | ||
| 561 | * | ||
| 562 | * @IFLA_BR_TOPOLOGY_CHANGE_TIMER | ||
| 563 | * The bridge topology change timer, read only. | ||
| 564 | * | ||
| 565 | * @IFLA_BR_GC_TIMER | ||
| 566 | * The bridge gc timer, read only. | ||
| 567 | * | ||
| 568 | * @IFLA_BR_GROUP_ADDR | ||
| 569 | * Set the MAC address of the multicast group this bridge uses for STP. | ||
| 570 | * The address must be a link-local address in standard Ethernet MAC address | ||
| 571 | * format. It is an address of the form 01:80:C2:00:00:0X, with X in [0, 4..f]. | ||
| 572 | * | ||
| 573 | * The default value is 0. | ||
| 574 | * | ||
| 575 | * @IFLA_BR_FDB_FLUSH | ||
| 576 | * Flush bridge's fdb dynamic entries. | ||
| 577 | * | ||
| 578 | * @IFLA_BR_MCAST_ROUTER | ||
| 579 | * Set bridge's multicast router if IGMP snooping is enabled. | ||
| 580 | * The valid values are: | ||
| 581 | * | ||
| 582 | * * 0 - disabled. | ||
| 583 | * * 1 - automatic (queried). | ||
| 584 | * * 2 - permanently enabled. | ||
| 585 | * | ||
| 586 | * The default value is 1. | ||
| 587 | * | ||
| 588 | * @IFLA_BR_MCAST_SNOOPING | ||
| 589 | * Turn multicast snooping on (*IFLA_BR_MCAST_SNOOPING* > 0) or off | ||
| 590 | * (*IFLA_BR_MCAST_SNOOPING* == 0). | ||
| 591 | * | ||
| 592 | * The default value is 1. | ||
| 593 | * | ||
| 594 | * @IFLA_BR_MCAST_QUERY_USE_IFADDR | ||
| 595 | * If enabled use the bridge's own IP address as source address for IGMP | ||
| 596 | * queries (*IFLA_BR_MCAST_QUERY_USE_IFADDR* > 0) or the default of 0.0.0.0 | ||
| 597 | * (*IFLA_BR_MCAST_QUERY_USE_IFADDR* == 0). | ||
| 598 | * | ||
| 599 | * The default value is 0 (disabled). | ||
| 600 | * | ||
| 601 | * @IFLA_BR_MCAST_QUERIER | ||
| 602 | * Enable (*IFLA_BR_MULTICAST_QUERIER* > 0) or disable | ||
| 603 | * (*IFLA_BR_MULTICAST_QUERIER* == 0) IGMP querier, ie sending of multicast | ||
| 604 | * queries by the bridge. | ||
| 605 | * | ||
| 606 | * The default value is 0 (disabled). | ||
| 607 | * | ||
| 608 | * @IFLA_BR_MCAST_HASH_ELASTICITY | ||
| 609 | * Set multicast database hash elasticity, It is the maximum chain length in | ||
| 610 | * the multicast hash table. This attribute is *deprecated* and the value | ||
| 611 | * is always 16. | ||
| 612 | * | ||
| 613 | * @IFLA_BR_MCAST_HASH_MAX | ||
| 614 | * Set maximum size of the multicast hash table | ||
| 615 | * | ||
| 616 | * The default value is 4096, the value must be a power of 2. | ||
| 617 | * | ||
| 618 | * @IFLA_BR_MCAST_LAST_MEMBER_CNT | ||
| 619 | * The Last Member Query Count is the number of Group-Specific Queries | ||
| 620 | * sent before the router assumes there are no local members. The Last | ||
| 621 | * Member Query Count is also the number of Group-and-Source-Specific | ||
| 622 | * Queries sent before the router assumes there are no listeners for a | ||
| 623 | * particular source. | ||
| 624 | * | ||
| 625 | * The default value is 2. | ||
| 626 | * | ||
| 627 | * @IFLA_BR_MCAST_STARTUP_QUERY_CNT | ||
| 628 | * The Startup Query Count is the number of Queries sent out on startup, | ||
| 629 | * separated by the Startup Query Interval. | ||
| 630 | * | ||
| 631 | * The default value is 2. | ||
| 632 | * | ||
| 633 | * @IFLA_BR_MCAST_LAST_MEMBER_INTVL | ||
| 634 | * The Last Member Query Interval is the Max Response Time inserted into | ||
| 635 | * Group-Specific Queries sent in response to Leave Group messages, and | ||
| 636 | * is also the amount of time between Group-Specific Query messages. | ||
| 637 | * | ||
| 638 | * The default value is (1 * USER_HZ). | ||
| 639 | * | ||
| 640 | * @IFLA_BR_MCAST_MEMBERSHIP_INTVL | ||
| 641 | * The interval after which the bridge will leave a group, if no membership | ||
| 642 | * reports for this group are received. | ||
| 643 | * | ||
| 644 | * The default value is (260 * USER_HZ). | ||
| 645 | * | ||
| 646 | * @IFLA_BR_MCAST_QUERIER_INTVL | ||
| 647 | * The interval between queries sent by other routers. if no queries are | ||
| 648 | * seen after this delay has passed, the bridge will start to send its own | ||
| 649 | * queries (as if *IFLA_BR_MCAST_QUERIER_INTVL* was enabled). | ||
| 650 | * | ||
| 651 | * The default value is (255 * USER_HZ). | ||
| 652 | * | ||
| 653 | * @IFLA_BR_MCAST_QUERY_INTVL | ||
| 654 | * The Query Interval is the interval between General Queries sent by | ||
| 655 | * the Querier. | ||
| 656 | * | ||
| 657 | * The default value is (125 * USER_HZ). The minimum value is (1 * USER_HZ). | ||
| 658 | * | ||
| 659 | * @IFLA_BR_MCAST_QUERY_RESPONSE_INTVL | ||
| 660 | * The Max Response Time used to calculate the Max Resp Code inserted | ||
| 661 | * into the periodic General Queries. | ||
| 662 | * | ||
| 663 | * The default value is (10 * USER_HZ). | ||
| 664 | * | ||
| 665 | * @IFLA_BR_MCAST_STARTUP_QUERY_INTVL | ||
| 666 | * The interval between queries in the startup phase. | ||
| 667 | * | ||
| 668 | * The default value is (125 * USER_HZ) / 4. The minimum value is (1 * USER_HZ). | ||
| 669 | * | ||
| 670 | * @IFLA_BR_NF_CALL_IPTABLES | ||
| 671 | * Enable (*NF_CALL_IPTABLES* > 0) or disable (*NF_CALL_IPTABLES* == 0) | ||
| 672 | * iptables hooks on the bridge. | ||
| 673 | * | ||
| 674 | * The default value is 0 (disabled). | ||
| 675 | * | ||
| 676 | * @IFLA_BR_NF_CALL_IP6TABLES | ||
| 677 | * Enable (*NF_CALL_IP6TABLES* > 0) or disable (*NF_CALL_IP6TABLES* == 0) | ||
| 678 | * ip6tables hooks on the bridge. | ||
| 679 | * | ||
| 680 | * The default value is 0 (disabled). | ||
| 681 | * | ||
| 682 | * @IFLA_BR_NF_CALL_ARPTABLES | ||
| 683 | * Enable (*NF_CALL_ARPTABLES* > 0) or disable (*NF_CALL_ARPTABLES* == 0) | ||
| 684 | * arptables hooks on the bridge. | ||
| 685 | * | ||
| 686 | * The default value is 0 (disabled). | ||
| 687 | * | ||
| 688 | * @IFLA_BR_VLAN_DEFAULT_PVID | ||
| 689 | * VLAN ID applied to untagged and priority-tagged incoming packets. | ||
| 690 | * | ||
| 691 | * The default value is 1. Setting to the special value 0 makes all ports of | ||
| 692 | * this bridge not have a PVID by default, which means that they will | ||
| 693 | * not accept VLAN-untagged traffic. | ||
| 694 | * | ||
| 695 | * @IFLA_BR_PAD | ||
| 696 | * Bridge attribute padding type for netlink message. | ||
| 697 | * | ||
| 698 | * @IFLA_BR_VLAN_STATS_ENABLED | ||
| 699 | * Enable (*IFLA_BR_VLAN_STATS_ENABLED* == 1) or disable | ||
| 700 | * (*IFLA_BR_VLAN_STATS_ENABLED* == 0) per-VLAN stats accounting. | ||
| 701 | * | ||
| 702 | * The default value is 0 (disabled). | ||
| 703 | * | ||
| 704 | * @IFLA_BR_MCAST_STATS_ENABLED | ||
| 705 | * Enable (*IFLA_BR_MCAST_STATS_ENABLED* > 0) or disable | ||
| 706 | * (*IFLA_BR_MCAST_STATS_ENABLED* == 0) multicast (IGMP/MLD) stats | ||
| 707 | * accounting. | ||
| 708 | * | ||
| 709 | * The default value is 0 (disabled). | ||
| 710 | * | ||
| 711 | * @IFLA_BR_MCAST_IGMP_VERSION | ||
| 712 | * Set the IGMP version. | ||
| 713 | * | ||
| 714 | * The valid values are 2 and 3. The default value is 2. | ||
| 715 | * | ||
| 716 | * @IFLA_BR_MCAST_MLD_VERSION | ||
| 717 | * Set the MLD version. | ||
| 718 | * | ||
| 719 | * The valid values are 1 and 2. The default value is 1. | ||
| 720 | * | ||
| 721 | * @IFLA_BR_VLAN_STATS_PER_PORT | ||
| 722 | * Enable (*IFLA_BR_VLAN_STATS_PER_PORT* == 1) or disable | ||
| 723 | * (*IFLA_BR_VLAN_STATS_PER_PORT* == 0) per-VLAN per-port stats accounting. | ||
| 724 | * Can be changed only when there are no port VLANs configured. | ||
| 725 | * | ||
| 726 | * The default value is 0 (disabled). | ||
| 727 | * | ||
| 728 | * @IFLA_BR_MULTI_BOOLOPT | ||
| 729 | * The multi_boolopt is used to control new boolean options to avoid adding | ||
| 730 | * new netlink attributes. You can look at ``enum br_boolopt_id`` for those | ||
| 731 | * options. | ||
| 732 | * | ||
| 733 | * @IFLA_BR_MCAST_QUERIER_STATE | ||
| 734 | * Bridge mcast querier states, read only. | ||
| 735 | * | ||
| 736 | * @IFLA_BR_FDB_N_LEARNED | ||
| 737 | * The number of dynamically learned FDB entries for the current bridge, | ||
| 738 | * read only. | ||
| 739 | * | ||
| 740 | * @IFLA_BR_FDB_MAX_LEARNED | ||
| 741 | * Set the number of max dynamically learned FDB entries for the current | ||
| 742 | * bridge. | ||
| 743 | */ | ||
| 464 | enum { | 744 | enum { |
| 465 | IFLA_BR_UNSPEC, | 745 | IFLA_BR_UNSPEC, |
| 466 | IFLA_BR_FORWARD_DELAY, | 746 | IFLA_BR_FORWARD_DELAY, |
| @@ -522,11 +802,252 @@ struct ifla_bridge_id { · 55 unmodified lines | |||
| 522 | __u8 addr[6]; /* ETH_ALEN */ | 802 | __u8 addr[6]; /* ETH_ALEN */ |
| 523 | }; | 803 | }; |
| 524 | 804 | ||
| 805 | /** | ||
| 806 | * DOC: Bridge mode enum definition | ||
| 807 | * | ||
| 808 | * @BRIDGE_MODE_HAIRPIN | ||
| 809 | * Controls whether traffic may be sent back out of the port on which it | ||
| 810 | * was received. This option is also called reflective relay mode, and is | ||
| 811 | * used to support basic VEPA (Virtual Ethernet Port Aggregator) | ||
| 812 | * capabilities. By default, this flag is turned off and the bridge will | ||
| 813 | * not forward traffic back out of the receiving port. | ||
| 814 | */ | ||
| 525 | enum { | 815 | enum { |
| 526 | BRIDGE_MODE_UNSPEC, | 816 | BRIDGE_MODE_UNSPEC, |
| 527 | BRIDGE_MODE_HAIRPIN, | 817 | BRIDGE_MODE_HAIRPIN, |
| 528 | }; | 818 | }; |
| 529 | 819 | ||
| 820 | /** | ||
| 821 | * DOC: Bridge port enum definition | ||
| 822 | * | ||
| 823 | * @IFLA_BRPORT_STATE | ||
| 824 | * The operation state of the port. Here are the valid values. | ||
| 825 | * | ||
| 826 | * * 0 - port is in STP *DISABLED* state. Make this port completely | ||
| 827 | * inactive for STP. This is also called BPDU filter and could be used | ||
| 828 | * to disable STP on an untrusted port, like a leaf virtual device. | ||
| 829 | * The traffic forwarding is also stopped on this port. | ||
| 830 | * * 1 - port is in STP *LISTENING* state. Only valid if STP is enabled | ||
| 831 | * on the bridge. In this state the port listens for STP BPDUs and | ||
| 832 | * drops all other traffic frames. | ||
| 833 | * * 2 - port is in STP *LEARNING* state. Only valid if STP is enabled on | ||
| 834 | * the bridge. In this state the port will accept traffic only for the | ||
| 835 | * purpose of updating MAC address tables. | ||
| 836 | * * 3 - port is in STP *FORWARDING* state. Port is fully active. | ||
| 837 | * * 4 - port is in STP *BLOCKING* state. Only valid if STP is enabled on | ||
| 838 | * the bridge. This state is used during the STP election process. | ||
| 839 | * In this state, port will only process STP BPDUs. | ||
| 840 | * | ||
| 841 | * @IFLA_BRPORT_PRIORITY | ||
| 842 | * The STP port priority. The valid values are between 0 and 255. | ||
| 843 | * | ||
| 844 | * @IFLA_BRPORT_COST | ||
| 845 | * The STP path cost of the port. The valid values are between 1 and 65535. | ||
| 846 | * | ||
| 847 | * @IFLA_BRPORT_MODE | ||
| 848 | * Set the bridge port mode. See *BRIDGE_MODE_HAIRPIN* for more details. | ||
| 849 | * | ||
| 850 | * @IFLA_BRPORT_GUARD | ||
| 851 | * Controls whether STP BPDUs will be processed by the bridge port. By | ||
| 852 | * default, the flag is turned off to allow BPDU processing. Turning this | ||
| 853 | * flag on will disable the bridge port if a STP BPDU packet is received. | ||
| 854 | * | ||
| 855 | * If the bridge has Spanning Tree enabled, hostile devices on the network | ||
| 856 | * may send BPDU on a port and cause network failure. Setting *guard on* | ||
| 857 | * will detect and stop this by disabling the port. The port will be | ||
| 858 | * restarted if the link is brought down, or removed and reattached. | ||
| 859 | * | ||
| 860 | * @IFLA_BRPORT_PROTECT | ||
| 861 | * Controls whether a given port is allowed to become a root port or not. | ||
| 862 | * Only used when STP is enabled on the bridge. By default the flag is off. | ||
| 863 | * | ||
| 864 | * This feature is also called root port guard. If BPDU is received from a | ||
| 865 | * leaf (edge) port, it should not be elected as root port. This could | ||
| 866 | * be used if using STP on a bridge and the downstream bridges are not fully | ||
| 867 | * trusted; this prevents a hostile guest from rerouting traffic. | ||
| 868 | * | ||
| 869 | * @IFLA_BRPORT_FAST_LEAVE | ||
| 870 | * This flag allows the bridge to immediately stop multicast traffic | ||
| 871 | * forwarding on a port that receives an IGMP Leave message. It is only used | ||
| 872 | * when IGMP snooping is enabled on the bridge. By default the flag is off. | ||
| 873 | * | ||
| 874 | * @IFLA_BRPORT_LEARNING | ||
| 875 | * Controls whether a given port will learn *source* MAC addresses from | ||
| 876 | * received traffic or not. Also controls whether dynamic FDB entries | ||
| 877 | * (which can also be added by software) will be refreshed by incoming | ||
| 878 | * traffic. By default this flag is on. | ||
| 879 | * | ||
| 880 | * @IFLA_BRPORT_UNICAST_FLOOD | ||
| 881 | * Controls whether unicast traffic for which there is no FDB entry will | ||
| 882 | * be flooded towards this port. By default this flag is on. | ||
| 883 | * | ||
| 884 | * @IFLA_BRPORT_PROXYARP | ||
| 885 | * Enable proxy ARP on this port. | ||
| 886 | * | ||
| 887 | * @IFLA_BRPORT_LEARNING_SYNC | ||
| 888 | * Controls whether a given port will sync MAC addresses learned on device | ||
| 889 | * port to bridge FDB. | ||
| 890 | * | ||
| 891 | * @IFLA_BRPORT_PROXYARP_WIFI | ||
| 892 | * Enable proxy ARP on this port which meets extended requirements by | ||
| 893 | * IEEE 802.11 and Hotspot 2.0 specifications. | ||
| 894 | * | ||
| 895 | * @IFLA_BRPORT_ROOT_ID | ||
| 896 | * | ||
| 897 | * @IFLA_BRPORT_BRIDGE_ID | ||
| 898 | * | ||
| 899 | * @IFLA_BRPORT_DESIGNATED_PORT | ||
| 900 | * | ||
| 901 | * @IFLA_BRPORT_DESIGNATED_COST | ||
| 902 | * | ||
| 903 | * @IFLA_BRPORT_ID | ||
| 904 | * | ||
| 905 | * @IFLA_BRPORT_NO | ||
| 906 | * | ||
| 907 | * @IFLA_BRPORT_TOPOLOGY_CHANGE_ACK | ||
| 908 | * | ||
| 909 | * @IFLA_BRPORT_CONFIG_PENDING | ||
| 910 | * | ||
| 911 | * @IFLA_BRPORT_MESSAGE_AGE_TIMER | ||
| 912 | * | ||
| 913 | * @IFLA_BRPORT_FORWARD_DELAY_TIMER | ||
| 914 | * | ||
| 915 | * @IFLA_BRPORT_HOLD_TIMER | ||
| 916 | * | ||
| 917 | * @IFLA_BRPORT_FLUSH | ||
| 918 | * Flush bridge ports' fdb dynamic entries. | ||
| 919 | * | ||
| 920 | * @IFLA_BRPORT_MULTICAST_ROUTER | ||
| 921 | * Configure the port's multicast router presence. A port with | ||
| 922 | * a multicast router will receive all multicast traffic. | ||
| 923 | * The valid values are: | ||
| 924 | * | ||
| 925 | * * 0 disable multicast routers on this port | ||
| 926 | * * 1 let the system detect the presence of routers (default) | ||
| 927 | * * 2 permanently enable multicast traffic forwarding on this port | ||
| 928 | * * 3 enable multicast routers temporarily on this port, not depending | ||
| 929 | * on incoming queries. | ||
| 930 | * | ||
| 931 | * @IFLA_BRPORT_PAD | ||
| 932 | * | ||
| 933 | * @IFLA_BRPORT_MCAST_FLOOD | ||
| 934 | * Controls whether a given port will flood multicast traffic for which | ||
| 935 | * there is no MDB entry. By default this flag is on. | ||
| 936 | * | ||
| 937 | * @IFLA_BRPORT_MCAST_TO_UCAST | ||
| 938 | * Controls whether a given port will replicate packets using unicast | ||
| 939 | * instead of multicast. By default this flag is off. | ||
| 940 | * | ||
| 941 | * This is done by copying the packet per host and changing the multicast | ||
| 942 | * destination MAC to a unicast one accordingly. | ||
| 943 | * | ||
| 944 | * *mcast_to_unicast* works on top of the multicast snooping feature of the | ||
| 945 | * bridge. Which means unicast copies are only delivered to hosts which | ||
| 946 | * are interested in unicast and signaled this via IGMP/MLD reports previously. | ||
| 947 | * | ||
| 948 | * This feature is intended for interface types which have a more reliable | ||
| 949 | * and/or efficient way to deliver unicast packets than broadcast ones | ||
| 950 | * (e.g. WiFi). | ||
| 951 | * | ||
| 952 | * However, it should only be enabled on interfaces where no IGMPv2/MLDv1 | ||
| 953 | * report suppression takes place. IGMP/MLD report suppression issue is | ||
| 954 | * usually overcome by the network daemon (supplicant) enabling AP isolation | ||
| 955 | * and by that separating all STAs. | ||
| 956 | * | ||
| 957 | * Delivery of STA-to-STA IP multicast is made possible again by enabling | ||
| 958 | * and utilizing the bridge hairpin mode, which considers the incoming port | ||
| 959 | * as a potential outgoing port, too (see *BRIDGE_MODE_HAIRPIN* option). | ||
| 960 | * Hairpin mode is performed after multicast snooping, therefore leading | ||
| 961 | * to only deliver reports to STAs running a multicast router. | ||
| 962 | * | ||
| 963 | * @IFLA_BRPORT_VLAN_TUNNEL | ||
| 964 | * Controls whether vlan to tunnel mapping is enabled on the port. | ||
| 965 | * By default this flag is off. | ||
| 966 | * | ||
| 967 | * @IFLA_BRPORT_BCAST_FLOOD | ||
| 968 | * Controls flooding of broadcast traffic on the given port. By default | ||
| 969 | * this flag is on. | ||
| 970 | * | ||
| 971 | * @IFLA_BRPORT_GROUP_FWD_MASK | ||
| 972 | * Set the group forward mask. This is a bitmask that is applied to | ||
| 973 | * decide whether to forward incoming frames destined to link-local | ||
| 974 | * addresses. The addresses of the form are 01:80:C2:00:00:0X (defaults | ||
| 975 | * to 0, which means the bridge does not forward any link-local frames | ||
| 976 | * coming on this port). | ||
| 977 | * | ||
| 978 | * @IFLA_BRPORT_NEIGH_SUPPRESS | ||
| 979 | * Controls whether neighbor discovery (arp and nd) proxy and suppression | ||
| 980 | * is enabled on the port. By default this flag is off. | ||
| 981 | * | ||
| 982 | * @IFLA_BRPORT_ISOLATED | ||
| 983 | * Controls whether a given port will be isolated, which means it will be | ||
| 984 | * able to communicate with non-isolated ports only. By default this | ||
| 985 | * flag is off. | ||
| 986 | * | ||
| 987 | * @IFLA_BRPORT_BACKUP_PORT | ||
| 988 | * Set a backup port. If the port loses carrier all traffic will be | ||
| 989 | * redirected to the configured backup port. Set the value to 0 to disable | ||
| 990 | * it. | ||
| 991 | * | ||
| 992 | * @IFLA_BRPORT_MRP_RING_OPEN | ||
| 993 | * | ||
| 994 | * @IFLA_BRPORT_MRP_IN_OPEN | ||
| 995 | * | ||
| 996 | * @IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT | ||
| 997 | * The number of per-port EHT hosts limit. The default value is 512. | ||
| 998 | * Setting to 0 is not allowed. | ||
| 999 | * | ||
| 1000 | * @IFLA_BRPORT_MCAST_EHT_HOSTS_CNT | ||
| 1001 | * The current number of tracked hosts, read only. | ||
| 1002 | * | ||
| 1003 | * @IFLA_BRPORT_LOCKED | ||
| 1004 | * Controls whether a port will be locked, meaning that hosts behind the | ||
| 1005 | * port will not be able to communicate through the port unless an FDB | ||
| 1006 | * entry with the unit's MAC address is in the FDB. The common use case is | ||
| 1007 | * that hosts are allowed access through authentication with the IEEE 802.1X | ||
| 1008 | * protocol or based on whitelists. By default this flag is off. | ||
| 1009 | * | ||
| 1010 | * Please note that secure 802.1X deployments should always use the | ||
| 1011 | * *BR_BOOLOPT_NO_LL_LEARN* flag, to not permit the bridge to populate its | ||
| 1012 | * FDB based on link-local (EAPOL) traffic received on the port. | ||
| 1013 | * | ||
| 1014 | * @IFLA_BRPORT_MAB | ||
| 1015 | * Controls whether a port will use MAC Authentication Bypass (MAB), a | ||
| 1016 | * technique through which select MAC addresses may be allowed on a locked | ||
| 1017 | * port, without using 802.1X authentication. Packets with an unknown source | ||
| 1018 | * MAC address generates a "locked" FDB entry on the incoming bridge port. | ||
| 1019 | * The common use case is for user space to react to these bridge FDB | ||
| 1020 | * notifications and optionally replace the locked FDB entry with a normal | ||
| 1021 | * one, allowing traffic to pass for whitelisted MAC addresses. | ||
| 1022 | * | ||
| 1023 | * Setting this flag also requires *IFLA_BRPORT_LOCKED* and | ||
| 1024 | * *IFLA_BRPORT_LEARNING*. *IFLA_BRPORT_LOCKED* ensures that unauthorized | ||
| 1025 | * data packets are dropped, and *IFLA_BRPORT_LEARNING* allows the dynamic | ||
| 1026 | * FDB entries installed by user space (as replacements for the locked FDB | ||
| 1027 | * entries) to be refreshed and/or aged out. | ||
| 1028 | * | ||
| 1029 | * @IFLA_BRPORT_MCAST_N_GROUPS | ||
| 1030 | * | ||
| 1031 | * @IFLA_BRPORT_MCAST_MAX_GROUPS | ||
| 1032 | * Sets the maximum number of MDB entries that can be registered for a | ||
| 1033 | * given port. Attempts to register more MDB entries at the port than this | ||
| 1034 | * limit allows will be rejected, whether they are done through netlink | ||
| 1035 | * (e.g. the bridge tool), or IGMP or MLD membership reports. Setting a | ||
| 1036 | * limit of 0 disables the limit. The default value is 0. | ||
| 1037 | * | ||
| 1038 | * @IFLA_BRPORT_NEIGH_VLAN_SUPPRESS | ||
| 1039 | * Controls whether neighbor discovery (arp and nd) proxy and suppression is | ||
| 1040 | * enabled for a given port. By default this flag is off. | ||
| 1041 | * | ||
| 1042 | * Note that this option only takes effect when *IFLA_BRPORT_NEIGH_SUPPRESS* | ||
| 1043 | * is enabled for a given port. | ||
| 1044 | * | ||
| 1045 | * @IFLA_BRPORT_BACKUP_NHID | ||
| 1046 | * The FDB nexthop object ID to attach to packets being redirected to a | ||
| 1047 | * backup port that has VLAN tunnel mapping enabled (via the | ||
| 1048 | * *IFLA_BRPORT_VLAN_TUNNEL* option). Setting a value of 0 (default) has | ||
| 1049 | * the effect of not attaching any ID. | ||
| 1050 | */ | ||
| 530 | enum { | 1051 | enum { |
| 531 | IFLA_BRPORT_UNSPEC, | 1052 | IFLA_BRPORT_UNSPEC, |
| 532 | IFLA_BRPORT_STATE, /* Spanning tree state */ | 1053 | IFLA_BRPORT_STATE, /* Spanning tree state */ |
| @@ -856,6 +1377,7 @@ enum { · 323 unmodified lines | |||
| 856 | IFLA_VXLAN_DF, | 1377 | IFLA_VXLAN_DF, |
| 857 | IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ | 1378 | IFLA_VXLAN_VNIFILTER, /* only applicable with COLLECT_METADATA mode */ |
| 858 | IFLA_VXLAN_LOCALBYPASS, | 1379 | IFLA_VXLAN_LOCALBYPASS, |
| 1380 | IFLA_VXLAN_LABEL_POLICY, /* IPv6 flow label policy; ifla_vxlan_label_policy */ | ||
| 859 | __IFLA_VXLAN_MAX | 1381 | __IFLA_VXLAN_MAX |
| 860 | }; | 1382 | }; |
| 861 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) | 1383 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) |
| @@ -873,6 +1395,13 @@ enum ifla_vxlan_df { · 11 unmodified lines | |||
| 873 | VXLAN_DF_MAX = __VXLAN_DF_END - 1, | 1395 | VXLAN_DF_MAX = __VXLAN_DF_END - 1, |
| 874 | }; | 1396 | }; |
| 875 | 1397 | ||
| 1398 | enum ifla_vxlan_label_policy { | ||
| 1399 | VXLAN_LABEL_FIXED = 0, | ||
| 1400 | VXLAN_LABEL_INHERIT = 1, | ||
| 1401 | __VXLAN_LABEL_END, | ||
| 1402 | VXLAN_LABEL_MAX = __VXLAN_LABEL_END - 1, | ||
| 1403 | }; | ||
| 1404 | |||
| 876 | /* GENEVE section */ | 1405 | /* GENEVE section */ |
| 877 | enum { | 1406 | enum { |
| 878 | IFLA_GENEVE_UNSPEC, | 1407 | IFLA_GENEVE_UNSPEC, |
| @@ -33,7 +33,13 @@ · 32 unmodified lines | |||
| 33 | #define XDP_USE_SG (1 << 4) | 33 | #define XDP_USE_SG (1 << 4) |
| 34 | 34 | ||
| 35 | /* Flags for xsk_umem_config flags */ | 35 | /* Flags for xsk_umem_config flags */ |
| 36 | #define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) | 36 | #define XDP_UMEM_UNALIGNED_CHUNK_FLAG (1 << 0) |
| 37 | |||
| 38 | /* Force checksum calculation in software. Can be used for testing or | ||
| 39 | * working around potential HW issues. This option causes performance | ||
| 40 | * degradation and only works in XDP_COPY mode. | ||
| 41 | */ | ||
| 42 | #define XDP_UMEM_TX_SW_CSUM (1 << 1) | ||
| 37 | 43 | ||
| 38 | struct sockaddr_xdp { | 44 | struct sockaddr_xdp { |
| 39 | __u16 sxdp_family; | 45 | __u16 sxdp_family; |
| @@ -76,6 +82,7 @@ struct xdp_umem_reg { · 36 unmodified lines | |||
| 76 | __u32 chunk_size; | 82 | __u32 chunk_size; |
| 77 | __u32 headroom; | 83 | __u32 headroom; |
| 78 | __u32 flags; | 84 | __u32 flags; |
| 85 | __u32 tx_metadata_len; | ||
| 79 | }; | 86 | }; |
| 80 | 87 | ||
| 81 | struct xdp_statistics { | 88 | struct xdp_statistics { |
| @@ -105,6 +112,41 @@ struct xdp_options { · 23 unmodified lines | |||
| 105 | #define XSK_UNALIGNED_BUF_ADDR_MASK \ | 112 | #define XSK_UNALIGNED_BUF_ADDR_MASK \ |
| 106 | ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1) | 113 | ((1ULL << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1) |
| 107 | 114 | ||
| 115 | /* Request transmit timestamp. Upon completion, put it into tx_timestamp | ||
| 116 | * field of struct xsk_tx_metadata. | ||
| 117 | */ | ||
| 118 | #define XDP_TXMD_FLAGS_TIMESTAMP (1 << 0) | ||
| 119 | |||
| 120 | /* Request transmit checksum offload. Checksum start position and offset | ||
| 121 | * are communicated via csum_start and csum_offset fields of struct | ||
| 122 | * xsk_tx_metadata. | ||
| 123 | */ | ||
| 124 | #define XDP_TXMD_FLAGS_CHECKSUM (1 << 1) | ||
| 125 | |||
| 126 | /* AF_XDP offloads request. 'request' union member is consumed by the driver | ||
| 127 | * when the packet is being transmitted. 'completion' union member is | ||
| 128 | * filled by the driver when the transmit completion arrives. | ||
| 129 | */ | ||
| 130 | struct xsk_tx_metadata { | ||
| 131 | __u64 flags; | ||
| 132 | |||
| 133 | union { | ||
| 134 | struct { | ||
| 135 | /* XDP_TXMD_FLAGS_CHECKSUM */ | ||
| 136 | |||
| 137 | /* Offset from desc->addr where checksumming should start. */ | ||
| 138 | __u16 csum_start; | ||
| 139 | /* Offset from csum_start where checksum should be stored. */ | ||
| 140 | __u16 csum_offset; | ||
| 141 | } request; | ||
| 142 | |||
| 143 | struct { | ||
| 144 | /* XDP_TXMD_FLAGS_TIMESTAMP */ | ||
| 145 | __u64 tx_timestamp; | ||
| 146 | } completion; | ||
| 147 | }; | ||
| 148 | }; | ||
| 149 | |||
| 108 | /* Rx/Tx descriptor */ | 150 | /* Rx/Tx descriptor */ |
| 109 | struct xdp_desc { | 151 | struct xdp_desc { |
| 110 | __u64 addr; | 152 | __u64 addr; |
| @@ -121,4 +163,7 @@ struct xdp_desc { · 10 unmodified lines | |||
| 121 | */ | 163 | */ |
| 122 | #define XDP_PKT_CONTD (1 << 0) | 164 | #define XDP_PKT_CONTD (1 << 0) |
| 123 | 165 | ||
| 166 | /* TX packet carries valid metadata. */ | ||
| 167 | #define XDP_TX_METADATA (1 << 1) | ||
| 168 | |||
| 124 | #endif /* _LINUX_IF_XDP_H */ | 169 | #endif /* _LINUX_IF_XDP_H */ |
| @@ -91,6 +91,8 @@ enum iio_modifier { · 90 unmodified lines | |||
| 91 | IIO_MOD_CO2, | 91 | IIO_MOD_CO2, |
| 92 | IIO_MOD_VOC, | 92 | IIO_MOD_VOC, |
| 93 | IIO_MOD_LIGHT_UV, | 93 | IIO_MOD_LIGHT_UV, |
| 94 | IIO_MOD_LIGHT_UVA, | ||
| 95 | IIO_MOD_LIGHT_UVB, | ||
| 94 | IIO_MOD_LIGHT_DUV, | 96 | IIO_MOD_LIGHT_DUV, |
| 95 | IIO_MOD_PM1, | 97 | IIO_MOD_PM1, |
| 96 | IIO_MOD_PM2P5, | 98 | IIO_MOD_PM2P5, |
| @@ -71,6 +71,7 @@ struct io_uring_sqe { · 70 unmodified lines | |||
| 71 | __u32 uring_cmd_flags; | 71 | __u32 uring_cmd_flags; |
| 72 | __u32 waitid_flags; | 72 | __u32 waitid_flags; |
| 73 | __u32 futex_flags; | 73 | __u32 futex_flags; |
| 74 | __u32 install_fd_flags; | ||
| 74 | }; | 75 | }; |
| 75 | __u64 user_data; /* data to be passed back at completion time */ | 76 | __u64 user_data; /* data to be passed back at completion time */ |
| 76 | /* pack this to avoid bogus arm OABI complaints */ | 77 | /* pack this to avoid bogus arm OABI complaints */ |
| @@ -253,6 +254,7 @@ enum io_uring_op { · 176 unmodified lines | |||
| 253 | IORING_OP_FUTEX_WAIT, | 254 | IORING_OP_FUTEX_WAIT, |
| 254 | IORING_OP_FUTEX_WAKE, | 255 | IORING_OP_FUTEX_WAKE, |
| 255 | IORING_OP_FUTEX_WAITV, | 256 | IORING_OP_FUTEX_WAITV, |
| 257 | IORING_OP_FIXED_FD_INSTALL, | ||
| 256 | 258 | ||
| 257 | /* this goes last, obviously */ | 259 | /* this goes last, obviously */ |
| 258 | IORING_OP_LAST, | 260 | IORING_OP_LAST, |
| @@ -386,6 +388,13 @@ enum { · 127 unmodified lines | |||
| 386 | /* Pass through the flags from sqe->file_index to cqe->flags */ | 388 | /* Pass through the flags from sqe->file_index to cqe->flags */ |
| 387 | #define IORING_MSG_RING_FLAGS_PASS (1U << 1) | 389 | #define IORING_MSG_RING_FLAGS_PASS (1U << 1) |
| 388 | 390 | ||
| 391 | /* | ||
| 392 | * IORING_OP_FIXED_FD_INSTALL flags (sqe->install_fd_flags) | ||
| 393 | * | ||
| 394 | * IORING_FIXED_FD_NO_CLOEXEC Don't mark the fd as O_CLOEXEC | ||
| 395 | */ | ||
| 396 | #define IORING_FIXED_FD_NO_CLOEXEC (1U << 0) | ||
| 397 | |||
| 389 | /* | 398 | /* |
| 390 | * IO completion data structure (Completion Queue Entry) | 399 | * IO completion data structure (Completion Queue Entry) |
| 391 | */ | 400 | */ |
| @@ -558,6 +567,9 @@ enum { · 166 unmodified lines | |||
| 558 | /* register a range of fixed file slots for automatic slot allocation */ | 567 | /* register a range of fixed file slots for automatic slot allocation */ |
| 559 | IORING_REGISTER_FILE_ALLOC_RANGE = 25, | 568 | IORING_REGISTER_FILE_ALLOC_RANGE = 25, |
| 560 | 569 | ||
| 570 | /* return status information for a buffer group */ | ||
| 571 | IORING_REGISTER_PBUF_STATUS = 26, | ||
| 572 | |||
| 561 | /* this goes last */ | 573 | /* this goes last */ |
| 562 | IORING_REGISTER_LAST, | 574 | IORING_REGISTER_LAST, |
| 563 | 575 | ||
| @@ -684,6 +696,13 @@ struct io_uring_buf_reg { · 120 unmodified lines | |||
| 684 | __u64 resv[3]; | 696 | __u64 resv[3]; |
| 685 | }; | 697 | }; |
| 686 | 698 | ||
| 699 | /* argument for IORING_REGISTER_PBUF_STATUS */ | ||
| 700 | struct io_uring_buf_status { | ||
| 701 | __u32 buf_group; /* input */ | ||
| 702 | __u32 head; /* output */ | ||
| 703 | __u32 resv[8]; | ||
| 704 | }; | ||
| 705 | |||
| 687 | /* | 706 | /* |
| 688 | * io_uring_restriction->opcode values | 707 | * io_uring_restriction->opcode values |
| 689 | */ | 708 | */ |
| @@ -49,6 +49,7 @@ enum { · 48 unmodified lines | |||
| 49 | IOMMUFD_CMD_GET_HW_INFO, | 49 | IOMMUFD_CMD_GET_HW_INFO, |
| 50 | IOMMUFD_CMD_HWPT_SET_DIRTY_TRACKING, | 50 | IOMMUFD_CMD_HWPT_SET_DIRTY_TRACKING, |
| 51 | IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP, | 51 | IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP, |
| 52 | IOMMUFD_CMD_HWPT_INVALIDATE, | ||
| 52 | }; | 53 | }; |
| 53 | 54 | ||
| 54 | /** | 55 | /** |
| @@ -613,4 +614,82 @@ struct iommu_hwpt_get_dirty_bitmap { · 558 unmodified lines | |||
| 613 | #define IOMMU_HWPT_GET_DIRTY_BITMAP _IO(IOMMUFD_TYPE, \ | 614 | #define IOMMU_HWPT_GET_DIRTY_BITMAP _IO(IOMMUFD_TYPE, \ |
| 614 | IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP) | 615 | IOMMUFD_CMD_HWPT_GET_DIRTY_BITMAP) |
| 615 | 616 | ||
| 617 | /** | ||
| 618 | * enum iommu_hwpt_invalidate_data_type - IOMMU HWPT Cache Invalidation | ||
| 619 | * Data Type | ||
| 620 | * @IOMMU_HWPT_INVALIDATE_DATA_VTD_S1: Invalidation data for VTD_S1 | ||
| 621 | */ | ||
| 622 | enum iommu_hwpt_invalidate_data_type { | ||
| 623 | IOMMU_HWPT_INVALIDATE_DATA_VTD_S1, | ||
| 624 | }; | ||
| 625 | |||
| 626 | /** | ||
| 627 | * enum iommu_hwpt_vtd_s1_invalidate_flags - Flags for Intel VT-d | ||
| 628 | * stage-1 cache invalidation | ||
| 629 | * @IOMMU_VTD_INV_FLAGS_LEAF: Indicates whether the invalidation applies | ||
| 630 | * to all-levels page structure cache or just | ||
| 631 | * the leaf PTE cache. | ||
| 632 | */ | ||
| 633 | enum iommu_hwpt_vtd_s1_invalidate_flags { | ||
| 634 | IOMMU_VTD_INV_FLAGS_LEAF = 1 << 0, | ||
| 635 | }; | ||
| 636 | |||
| 637 | /** | ||
| 638 | * struct iommu_hwpt_vtd_s1_invalidate - Intel VT-d cache invalidation | ||
| 639 | * (IOMMU_HWPT_INVALIDATE_DATA_VTD_S1) | ||
| 640 | * @addr: The start address of the range to be invalidated. It needs to | ||
| 641 | * be 4KB aligned. | ||
| 642 | * @npages: Number of contiguous 4K pages to be invalidated. | ||
| 643 | * @flags: Combination of enum iommu_hwpt_vtd_s1_invalidate_flags | ||
| 644 | * @__reserved: Must be 0 | ||
| 645 | * | ||
| 646 | * The Intel VT-d specific invalidation data for user-managed stage-1 cache | ||
| 647 | * invalidation in nested translation. Userspace uses this structure to | ||
| 648 | * tell the impacted cache scope after modifying the stage-1 page table. | ||
| 649 | * | ||
| 650 | * Invalidating all the caches related to the page table by setting @addr | ||
| 651 | * to be 0 and @npages to be U64_MAX. | ||
| 652 | * | ||
| 653 | * The device TLB will be invalidated automatically if ATS is enabled. | ||
| 654 | */ | ||
| 655 | struct iommu_hwpt_vtd_s1_invalidate { | ||
| 656 | __aligned_u64 addr; | ||
| 657 | __aligned_u64 npages; | ||
| 658 | __u32 flags; | ||
| 659 | __u32 __reserved; | ||
| 660 | }; | ||
| 661 | |||
| 662 | /** | ||
| 663 | * struct iommu_hwpt_invalidate - ioctl(IOMMU_HWPT_INVALIDATE) | ||
| 664 | * @size: sizeof(struct iommu_hwpt_invalidate) | ||
| 665 | * @hwpt_id: ID of a nested HWPT for cache invalidation | ||
| 666 | * @data_uptr: User pointer to an array of driver-specific cache invalidation | ||
| 667 | * data. | ||
| 668 | * @data_type: One of enum iommu_hwpt_invalidate_data_type, defining the data | ||
| 669 | * type of all the entries in the invalidation request array. It | ||
| 670 | * should be a type supported by the hwpt pointed by @hwpt_id. | ||
| 671 | * @entry_len: Length (in bytes) of a request entry in the request array | ||
| 672 | * @entry_num: Input the number of cache invalidation requests in the array. | ||
| 673 | * Output the number of requests successfully handled by kernel. | ||
| 674 | * @__reserved: Must be 0. | ||
| 675 | * | ||
| 676 | * Invalidate the iommu cache for user-managed page table. Modifications on a | ||
| 677 | * user-managed page table should be followed by this operation to sync cache. | ||
| 678 | * Each ioctl can support one or more cache invalidation requests in the array | ||
| 679 | * that has a total size of @entry_len * @entry_num. | ||
| 680 | * | ||
| 681 | * An empty invalidation request array by setting @entry_num==0 is allowed, and | ||
| 682 | * @entry_len and @data_uptr would be ignored in this case. This can be used to | ||
| 683 | * check if the given @data_type is supported or not by kernel. | ||
| 684 | */ | ||
| 685 | struct iommu_hwpt_invalidate { | ||
| 686 | __u32 size; | ||
| 687 | __u32 hwpt_id; | ||
| 688 | __aligned_u64 data_uptr; | ||
| 689 | __u32 data_type; | ||
| 690 | __u32 entry_len; | ||
| 691 | __u32 entry_num; | ||
| 692 | __u32 __reserved; | ||
| 693 | }; | ||
| 694 | #define IOMMU_HWPT_INVALIDATE _IO(IOMMUFD_TYPE, IOMMUFD_CMD_HWPT_INVALIDATE) | ||
| 616 | #endif | 695 | #endif |
| @@ -25,6 +25,7 @@ · 24 unmodified lines | |||
| 25 | #define KEXEC_FILE_UNLOAD 0x00000001 | 25 | #define KEXEC_FILE_UNLOAD 0x00000001 |
| 26 | #define KEXEC_FILE_ON_CRASH 0x00000002 | 26 | #define KEXEC_FILE_ON_CRASH 0x00000002 |
| 27 | #define KEXEC_FILE_NO_INITRAMFS 0x00000004 | 27 | #define KEXEC_FILE_NO_INITRAMFS 0x00000004 |
| 28 | #define KEXEC_FILE_DEBUG 0x00000008 | ||
| 28 | 29 | ||
| 29 | /* These values match the ELF architecture values. | 30 | /* These values match the ELF architecture values. |
| 30 | * Unless there is a good reason that should continue to be the case. | 31 | * Unless there is a good reason that should continue to be the case. |
| @@ -16,76 +16,6 @@ · 15 unmodified lines | |||
| 16 | 16 | ||
| 17 | #define KVM_API_VERSION 12 | 17 | #define KVM_API_VERSION 12 |
| 18 | 18 | ||
| 19 | /* *** Deprecated interfaces *** */ | ||
| 20 | |||
| 21 | #define KVM_TRC_SHIFT 16 | ||
| 22 | |||
| 23 | #define KVM_TRC_ENTRYEXIT (1 << KVM_TRC_SHIFT) | ||
| 24 | #define KVM_TRC_HANDLER (1 << (KVM_TRC_SHIFT + 1)) | ||
| 25 | |||
| 26 | #define KVM_TRC_VMENTRY (KVM_TRC_ENTRYEXIT + 0x01) | ||
| 27 | #define KVM_TRC_VMEXIT (KVM_TRC_ENTRYEXIT + 0x02) | ||
| 28 | #define KVM_TRC_PAGE_FAULT (KVM_TRC_HANDLER + 0x01) | ||
| 29 | |||
| 30 | #define KVM_TRC_HEAD_SIZE 12 | ||
| 31 | #define KVM_TRC_CYCLE_SIZE 8 | ||
| 32 | #define KVM_TRC_EXTRA_MAX 7 | ||
| 33 | |||
| 34 | #define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02) | ||
| 35 | #define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03) | ||
| 36 | #define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04) | ||
| 37 | #define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05) | ||
| 38 | #define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06) | ||
| 39 | #define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07) | ||
| 40 | #define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08) | ||
| 41 | #define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09) | ||
| 42 | #define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A) | ||
| 43 | #define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B) | ||
| 44 | #define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C) | ||
| 45 | #define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D) | ||
| 46 | #define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E) | ||
| 47 | #define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F) | ||
| 48 | #define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10) | ||
| 49 | #define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11) | ||
| 50 | #define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12) | ||
| 51 | #define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13) | ||
| 52 | #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) | ||
| 53 | #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) | ||
| 54 | #define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16) | ||
| 55 | #define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17) | ||
| 56 | #define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18) | ||
| 57 | #define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) | ||
| 58 | |||
| 59 | struct kvm_user_trace_setup { | ||
| 60 | __u32 buf_size; | ||
| 61 | __u32 buf_nr; | ||
| 62 | }; | ||
| 63 | |||
| 64 | #define __KVM_DEPRECATED_MAIN_W_0x06 \ | ||
| 65 | _IOW(KVMIO, 0x06, struct kvm_user_trace_setup) | ||
| 66 | #define __KVM_DEPRECATED_MAIN_0x07 _IO(KVMIO, 0x07) | ||
| 67 | #define __KVM_DEPRECATED_MAIN_0x08 _IO(KVMIO, 0x08) | ||
| 68 | |||
| 69 | #define __KVM_DEPRECATED_VM_R_0x70 _IOR(KVMIO, 0x70, struct kvm_assigned_irq) | ||
| 70 | |||
| 71 | struct kvm_breakpoint { | ||
| 72 | __u32 enabled; | ||
| 73 | __u32 padding; | ||
| 74 | __u64 address; | ||
| 75 | }; | ||
| 76 | |||
| 77 | struct kvm_debug_guest { | ||
| 78 | __u32 enabled; | ||
| 79 | __u32 pad; | ||
| 80 | struct kvm_breakpoint breakpoints[4]; | ||
| 81 | __u32 singlestep; | ||
| 82 | }; | ||
| 83 | |||
| 84 | #define __KVM_DEPRECATED_VCPU_W_0x87 _IOW(KVMIO, 0x87, struct kvm_debug_guest) | ||
| 85 | |||
| 86 | /* *** End of deprecated interfaces *** */ | ||
| 87 | |||
| 88 | |||
| 89 | /* for KVM_SET_USER_MEMORY_REGION */ | 19 | /* for KVM_SET_USER_MEMORY_REGION */ |
| 90 | struct kvm_userspace_memory_region { | 20 | struct kvm_userspace_memory_region { |
| 91 | __u32 slot; | 21 | __u32 slot; |
| @@ -95,6 +25,19 @@ struct kvm_userspace_memory_region { · 3 unmodified lines | |||
| 95 | __u64 userspace_addr; /* start of the userspace allocated memory */ | 25 | __u64 userspace_addr; /* start of the userspace allocated memory */ |
| 96 | }; | 26 | }; |
| 97 | 27 | ||
| 28 | /* for KVM_SET_USER_MEMORY_REGION2 */ | ||
| 29 | struct kvm_userspace_memory_region2 { | ||
| 30 | __u32 slot; | ||
| 31 | __u32 flags; | ||
| 32 | __u64 guest_phys_addr; | ||
| 33 | __u64 memory_size; | ||
| 34 | __u64 userspace_addr; | ||
| 35 | __u64 guest_memfd_offset; | ||
| 36 | __u32 guest_memfd; | ||
| 37 | __u32 pad1; | ||
| 38 | __u64 pad2[14]; | ||
| 39 | }; | ||
| 40 | |||
| 98 | /* | 41 | /* |
| 99 | * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for | 42 | * The bit 0 ~ bit 15 of kvm_userspace_memory_region::flags are visible for |
| 100 | * userspace, other bits are reserved for kvm internal use which are defined | 43 | * userspace, other bits are reserved for kvm internal use which are defined |
| @@ -102,6 +45,7 @@ struct kvm_userspace_memory_region { · 1 unmodified line | |||
| 102 | */ | 45 | */ |
| 103 | #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) | 46 | #define KVM_MEM_LOG_DIRTY_PAGES (1UL << 0) |
| 104 | #define KVM_MEM_READONLY (1UL << 1) | 47 | #define KVM_MEM_READONLY (1UL << 1) |
| 48 | #define KVM_MEM_GUEST_MEMFD (1UL << 2) | ||
| 105 | 49 | ||
| 106 | /* for KVM_IRQ_LINE */ | 50 | /* for KVM_IRQ_LINE */ |
| 107 | struct kvm_irq_level { | 51 | struct kvm_irq_level { |
| @@ -265,6 +209,7 @@ struct kvm_xen_exit { · 157 unmodified lines | |||
| 265 | #define KVM_EXIT_RISCV_CSR 36 | 209 | #define KVM_EXIT_RISCV_CSR 36 |
| 266 | #define KVM_EXIT_NOTIFY 37 | 210 | #define KVM_EXIT_NOTIFY 37 |
| 267 | #define KVM_EXIT_LOONGARCH_IOCSR 38 | 211 | #define KVM_EXIT_LOONGARCH_IOCSR 38 |
| 212 | #define KVM_EXIT_MEMORY_FAULT 39 | ||
| 268 | 213 | ||
| 269 | /* For KVM_EXIT_INTERNAL_ERROR */ | 214 | /* For KVM_EXIT_INTERNAL_ERROR */ |
| 270 | /* Emulate instruction failed. */ | 215 | /* Emulate instruction failed. */ |
| @@ -518,6 +463,13 @@ struct kvm_run { · 247 unmodified lines | |||
| 518 | #define KVM_NOTIFY_CONTEXT_INVALID (1 << 0) | 463 | #define KVM_NOTIFY_CONTEXT_INVALID (1 << 0) |
| 519 | __u32 flags; | 464 | __u32 flags; |
| 520 | } notify; | 465 | } notify; |
| 466 | /* KVM_EXIT_MEMORY_FAULT */ | ||
| 467 | struct { | ||
| 468 | #define KVM_MEMORY_EXIT_FLAG_PRIVATE (1ULL << 3) | ||
| 469 | __u64 flags; | ||
| 470 | __u64 gpa; | ||
| 471 | __u64 size; | ||
| 472 | } memory_fault; | ||
| 521 | /* Fix the size of the union. */ | 473 | /* Fix the size of the union. */ |
| 522 | char padding[256]; | 474 | char padding[256]; |
| 523 | }; | 475 | }; |
| @@ -945,9 +897,6 @@ struct kvm_ppc_resize_hpt { · 421 unmodified lines | |||
| 945 | */ | 897 | */ |
| 946 | #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ | 898 | #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ |
| 947 | #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2) | 899 | #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2) |
| 948 | #define KVM_TRACE_ENABLE __KVM_DEPRECATED_MAIN_W_0x06 | ||
| 949 | #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 | ||
| 950 | #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 | ||
| 951 | #define KVM_GET_EMULATED_CPUID _IOWR(KVMIO, 0x09, struct kvm_cpuid2) | 900 | #define KVM_GET_EMULATED_CPUID _IOWR(KVMIO, 0x09, struct kvm_cpuid2) |
| 952 | #define KVM_GET_MSR_FEATURE_INDEX_LIST _IOWR(KVMIO, 0x0a, struct kvm_msr_list) | 901 | #define KVM_GET_MSR_FEATURE_INDEX_LIST _IOWR(KVMIO, 0x0a, struct kvm_msr_list) |
| 953 | 902 | ||
| @@ -1201,6 +1150,11 @@ struct kvm_ppc_resize_hpt { · 247 unmodified lines | |||
| 1201 | #define KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE 228 | 1150 | #define KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE 228 |
| 1202 | #define KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES 229 | 1151 | #define KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES 229 |
| 1203 | #define KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES 230 | 1152 | #define KVM_CAP_ARM_SUPPORTED_REG_MASK_RANGES 230 |
| 1153 | #define KVM_CAP_USER_MEMORY2 231 | ||
| 1154 | #define KVM_CAP_MEMORY_FAULT_INFO 232 | ||
| 1155 | #define KVM_CAP_MEMORY_ATTRIBUTES 233 | ||
| 1156 | #define KVM_CAP_GUEST_MEMFD 234 | ||
| 1157 | #define KVM_CAP_VM_TYPES 235 | ||
| 1204 | 1158 | ||
| 1205 | #ifdef KVM_CAP_IRQ_ROUTING | 1159 | #ifdef KVM_CAP_IRQ_ROUTING |
| 1206 | 1160 | ||
| @@ -1291,6 +1245,7 @@ struct kvm_x86_mce { · 84 unmodified lines | |||
| 1291 | #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4) | 1245 | #define KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL (1 << 4) |
| 1292 | #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5) | 1246 | #define KVM_XEN_HVM_CONFIG_EVTCHN_SEND (1 << 5) |
| 1293 | #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG (1 << 6) | 1247 | #define KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG (1 << 6) |
| 1248 | #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE (1 << 7) | ||
| 1294 | 1249 | ||
| 1295 | struct kvm_xen_hvm_config { | 1250 | struct kvm_xen_hvm_config { |
| 1296 | __u32 flags; | 1251 | __u32 flags; |
| @@ -1483,6 +1438,8 @@ struct kvm_vfio_spapr_tce { · 186 unmodified lines | |||
| 1483 | struct kvm_userspace_memory_region) | 1438 | struct kvm_userspace_memory_region) |
| 1484 | #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) | 1439 | #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) |
| 1485 | #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) | 1440 | #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) |
| 1441 | #define KVM_SET_USER_MEMORY_REGION2 _IOW(KVMIO, 0x49, \ | ||
| 1442 | struct kvm_userspace_memory_region2) | ||
| 1486 | 1443 | ||
| 1487 | /* enable ucontrol for s390 */ | 1444 | /* enable ucontrol for s390 */ |
| 1488 | struct kvm_s390_ucas_mapping { | 1445 | struct kvm_s390_ucas_mapping { |
| @@ -1507,20 +1464,8 @@ struct kvm_s390_ucas_mapping { · 18 unmodified lines | |||
| 1507 | _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) | 1464 | _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) |
| 1508 | #define KVM_UNREGISTER_COALESCED_MMIO \ | 1465 | #define KVM_UNREGISTER_COALESCED_MMIO \ |
| 1509 | _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) | 1466 | _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) |
| 1510 | #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ | ||
| 1511 | struct kvm_assigned_pci_dev) | ||
| 1512 | #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) | 1467 | #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) |
| 1513 | /* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */ | ||
| 1514 | #define KVM_ASSIGN_IRQ __KVM_DEPRECATED_VM_R_0x70 | ||
| 1515 | #define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq) | ||
| 1516 | #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) | 1468 | #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) |
| 1517 | #define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ | ||
| 1518 | struct kvm_assigned_pci_dev) | ||
| 1519 | #define KVM_ASSIGN_SET_MSIX_NR _IOW(KVMIO, 0x73, \ | ||
| 1520 | struct kvm_assigned_msix_nr) | ||
| 1521 | #define KVM_ASSIGN_SET_MSIX_ENTRY _IOW(KVMIO, 0x74, \ | ||
| 1522 | struct kvm_assigned_msix_entry) | ||
| 1523 | #define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) | ||
| 1524 | #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) | 1469 | #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) |
| 1525 | #define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) | 1470 | #define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) |
| 1526 | #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) | 1471 | #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) |
| @@ -1537,9 +1482,6 @@ struct kvm_s390_ucas_mapping { · 10 unmodified lines | |||
| 1537 | * KVM_CAP_VM_TSC_CONTROL to set defaults for a VM */ | 1482 | * KVM_CAP_VM_TSC_CONTROL to set defaults for a VM */ |
| 1538 | #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) | 1483 | #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2) |
| 1539 | #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) | 1484 | #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3) |
| 1540 | /* Available with KVM_CAP_PCI_2_3 */ | ||
| 1541 | #define KVM_ASSIGN_SET_INTX_MASK _IOW(KVMIO, 0xa4, \ | ||
| 1542 | struct kvm_assigned_pci_dev) | ||
| 1543 | /* Available with KVM_CAP_SIGNAL_MSI */ | 1485 | /* Available with KVM_CAP_SIGNAL_MSI */ |
| 1544 | #define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi) | 1486 | #define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi) |
| 1545 | /* Available with KVM_CAP_PPC_GET_SMMU_INFO */ | 1487 | /* Available with KVM_CAP_PPC_GET_SMMU_INFO */ |
| @@ -1592,8 +1534,6 @@ struct kvm_s390_ucas_mapping { · 46 unmodified lines | |||
| 1592 | #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) | 1534 | #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) |
| 1593 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) | 1535 | #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) |
| 1594 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) | 1536 | #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) |
| 1595 | /* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG instead */ | ||
| 1596 | #define KVM_DEBUG_GUEST __KVM_DEPRECATED_VCPU_W_0x87 | ||
| 1597 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) | 1537 | #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) |
| 1598 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) | 1538 | #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) |
| 1599 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) | 1539 | #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) |
| @@ -2267,4 +2207,24 @@ struct kvm_s390_zpci_op { · 667 unmodified lines | |||
| 2267 | /* flags for kvm_s390_zpci_op->u.reg_aen.flags */ | 2207 | /* flags for kvm_s390_zpci_op->u.reg_aen.flags */ |
| 2268 | #define KVM_S390_ZPCIOP_REGAEN_HOST (1 << 0) | 2208 | #define KVM_S390_ZPCIOP_REGAEN_HOST (1 << 0) |
| 2269 | 2209 | ||
| 2210 | /* Available with KVM_CAP_MEMORY_ATTRIBUTES */ | ||
| 2211 | #define KVM_SET_MEMORY_ATTRIBUTES _IOW(KVMIO, 0xd2, struct kvm_memory_attributes) | ||
| 2212 | |||
| 2213 | struct kvm_memory_attributes { | ||
| 2214 | __u64 address; | ||
| 2215 | __u64 size; | ||
| 2216 | __u64 attributes; | ||
| 2217 | __u64 flags; | ||
| 2218 | }; | ||
| 2219 | |||
| 2220 | #define KVM_MEMORY_ATTRIBUTE_PRIVATE (1ULL << 3) | ||
| 2221 | |||
| 2222 | #define KVM_CREATE_GUEST_MEMFD _IOWR(KVMIO, 0xd4, struct kvm_create_guest_memfd) | ||
| 2223 | |||
| 2224 | struct kvm_create_guest_memfd { | ||
| 2225 | __u64 size; | ||
| 2226 | __u64 flags; | ||
| 2227 | __u64 reserved[6]; | ||
| 2228 | }; | ||
| 2229 | |||
| 2270 | #endif /* __LINUX_KVM_H */ | 2230 | #endif /* __LINUX_KVM_H */ |
| @@ -0,0 +1,90 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Linux Security Modules (LSM) - User space API | ||
| 4 | * | ||
| 5 | * Copyright (C) 2022 Casey Schaufler <casey@schaufler-ca.com> | ||
| 6 | * Copyright (C) 2022 Intel Corporation | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef _UAPI_LINUX_LSM_H | ||
| 10 | #define _UAPI_LINUX_LSM_H | ||
| 11 | |||
| 12 | #include <linux/stddef.h> | ||
| 13 | #include <linux/types.h> | ||
| 14 | #include <linux/unistd.h> | ||
| 15 | |||
| 16 | /** | ||
| 17 | * struct lsm_ctx - LSM context information | ||
| 18 | * @id: the LSM id number, see LSM_ID_XXX | ||
| 19 | * @flags: LSM specific flags | ||
| 20 | * @len: length of the lsm_ctx struct, @ctx and any other data or padding | ||
| 21 | * @ctx_len: the size of @ctx | ||
| 22 | * @ctx: the LSM context value | ||
| 23 | * | ||
| 24 | * The @len field MUST be equal to the size of the lsm_ctx struct | ||
| 25 | * plus any additional padding and/or data placed after @ctx. | ||
| 26 | * | ||
| 27 | * In all cases @ctx_len MUST be equal to the length of @ctx. | ||
| 28 | * If @ctx is a string value it should be nul terminated with | ||
| 29 | * @ctx_len equal to `strlen(@ctx) + 1`. Binary values are | ||
| 30 | * supported. | ||
| 31 | * | ||
| 32 | * The @flags and @ctx fields SHOULD only be interpreted by the | ||
| 33 | * LSM specified by @id; they MUST be set to zero/0 when not used. | ||
| 34 | */ | ||
| 35 | struct lsm_ctx { | ||
| 36 | __u64 id; | ||
| 37 | __u64 flags; | ||
| 38 | __u64 len; | ||
| 39 | __u64 ctx_len; | ||
| 40 | __u8 ctx[] __counted_by(ctx_len); | ||
| 41 | }; | ||
| 42 | |||
| 43 | /* | ||
| 44 | * ID tokens to identify Linux Security Modules (LSMs) | ||
| 45 | * | ||
| 46 | * These token values are used to uniquely identify specific LSMs | ||
| 47 | * in the kernel as well as in the kernel's LSM userspace API. | ||
| 48 | * | ||
| 49 | * A value of zero/0 is considered undefined and should not be used | ||
| 50 | * outside the kernel. Values 1-99 are reserved for potential | ||
| 51 | * future use. | ||
| 52 | */ | ||
| 53 | #define LSM_ID_UNDEF 0 | ||
| 54 | #define LSM_ID_CAPABILITY 100 | ||
| 55 | #define LSM_ID_SELINUX 101 | ||
| 56 | #define LSM_ID_SMACK 102 | ||
| 57 | #define LSM_ID_TOMOYO 103 | ||
| 58 | #define LSM_ID_APPARMOR 104 | ||
| 59 | #define LSM_ID_YAMA 105 | ||
| 60 | #define LSM_ID_LOADPIN 106 | ||
| 61 | #define LSM_ID_SAFESETID 107 | ||
| 62 | #define LSM_ID_LOCKDOWN 108 | ||
| 63 | #define LSM_ID_BPF 109 | ||
| 64 | #define LSM_ID_LANDLOCK 110 | ||
| 65 | |||
| 66 | /* | ||
| 67 | * LSM_ATTR_XXX definitions identify different LSM attributes | ||
| 68 | * which are used in the kernel's LSM userspace API. Support | ||
| 69 | * for these attributes vary across the different LSMs. None | ||
| 70 | * are required. | ||
| 71 | * | ||
| 72 | * A value of zero/0 is considered undefined and should not be used | ||
| 73 | * outside the kernel. Values 1-99 are reserved for potential | ||
| 74 | * future use. | ||
| 75 | */ | ||
| 76 | #define LSM_ATTR_UNDEF 0 | ||
| 77 | #define LSM_ATTR_CURRENT 100 | ||
| 78 | #define LSM_ATTR_EXEC 101 | ||
| 79 | #define LSM_ATTR_FSCREATE 102 | ||
| 80 | #define LSM_ATTR_KEYCREATE 103 | ||
| 81 | #define LSM_ATTR_PREV 104 | ||
| 82 | #define LSM_ATTR_SOCKCREATE 105 | ||
| 83 | |||
| 84 | /* | ||
| 85 | * LSM_FLAG_XXX definitions identify special handling instructions | ||
| 86 | * for the API. | ||
| 87 | */ | ||
| 88 | #define LSM_FLAG_SINGLE 0x0001 | ||
| 89 | |||
| 90 | #endif /* _UAPI_LINUX_LSM_H */ | ||
| @@ -100,14 +100,14 @@ struct mei_connect_client_data_vtag { · 99 unmodified lines | |||
| 100 | * a FW client on a tagged channel. From this point on, every read | 100 | * a FW client on a tagged channel. From this point on, every read |
| 101 | * and write will communicate with the associated FW client | 101 | * and write will communicate with the associated FW client |
| 102 | * on the tagged channel. | 102 | * on the tagged channel. |
| 103 | * Upone close() the communication is terminated. | 103 | * Upon close() the communication is terminated. |
| 104 | * | 104 | * |
| 105 | * The IOCTL argument is a struct with a union that contains | 105 | * The IOCTL argument is a struct with a union that contains |
| 106 | * the input parameter and the output parameter for this IOCTL. | 106 | * the input parameter and the output parameter for this IOCTL. |
| 107 | * | 107 | * |
| 108 | * The input parameter is UUID of the FW Client, a vtag [0,255]. | 108 | * The input parameter is UUID of the FW Client, a vtag [0,255]. |
| 109 | * The output parameter is the properties of the FW client | 109 | * The output parameter is the properties of the FW client |
| 110 | * (FW protocool version and max message size). | 110 | * (FW protocol version and max message size). |
| 111 | * | 111 | * |
| 112 | * Clients that do not support tagged connection | 112 | * Clients that do not support tagged connection |
| 113 | * will respond with -EOPNOTSUPP. | 113 | * will respond with -EOPNOTSUPP. |
| @@ -138,4 +138,74 @@ struct mount_attr { · 137 unmodified lines | |||
| 138 | /* List of all mount_attr versions. */ | 138 | /* List of all mount_attr versions. */ |
| 139 | #define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */ | 139 | #define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */ |
| 140 | 140 | ||
| 141 | |||
| 142 | /* | ||
| 143 | * Structure for getting mount/superblock/filesystem info with statmount(2). | ||
| 144 | * | ||
| 145 | * The interface is similar to statx(2): individual fields or groups can be | ||
| 146 | * selected with the @mask argument of statmount(). Kernel will set the @mask | ||
| 147 | * field according to the supported fields. | ||
| 148 | * | ||
| 149 | * If string fields are selected, then the caller needs to pass a buffer that | ||
| 150 | * has space after the fixed part of the structure. Nul terminated strings are | ||
| 151 | * copied there and offsets relative to @str are stored in the relevant fields. | ||
| 152 | * If the buffer is too small, then EOVERFLOW is returned. The actually used | ||
| 153 | * size is returned in @size. | ||
| 154 | */ | ||
| 155 | struct statmount { | ||
| 156 | __u32 size; /* Total size, including strings */ | ||
| 157 | __u32 __spare1; | ||
| 158 | __u64 mask; /* What results were written */ | ||
| 159 | __u32 sb_dev_major; /* Device ID */ | ||
| 160 | __u32 sb_dev_minor; | ||
| 161 | __u64 sb_magic; /* ..._SUPER_MAGIC */ | ||
| 162 | __u32 sb_flags; /* SB_{RDONLY,SYNCHRONOUS,DIRSYNC,LAZYTIME} */ | ||
| 163 | __u32 fs_type; /* [str] Filesystem type */ | ||
| 164 | __u64 mnt_id; /* Unique ID of mount */ | ||
| 165 | __u64 mnt_parent_id; /* Unique ID of parent (for root == mnt_id) */ | ||
| 166 | __u32 mnt_id_old; /* Reused IDs used in proc/.../mountinfo */ | ||
| 167 | __u32 mnt_parent_id_old; | ||
| 168 | __u64 mnt_attr; /* MOUNT_ATTR_... */ | ||
| 169 | __u64 mnt_propagation; /* MS_{SHARED,SLAVE,PRIVATE,UNBINDABLE} */ | ||
| 170 | __u64 mnt_peer_group; /* ID of shared peer group */ | ||
| 171 | __u64 mnt_master; /* Mount receives propagation from this ID */ | ||
| 172 | __u64 propagate_from; /* Propagation from in current namespace */ | ||
| 173 | __u32 mnt_root; /* [str] Root of mount relative to root of fs */ | ||
| 174 | __u32 mnt_point; /* [str] Mountpoint relative to current root */ | ||
| 175 | __u64 __spare2[50]; | ||
| 176 | char str[]; /* Variable size part containing strings */ | ||
| 177 | }; | ||
| 178 | |||
| 179 | /* | ||
| 180 | * Structure for passing mount ID and miscellaneous parameters to statmount(2) | ||
| 181 | * and listmount(2). | ||
| 182 | * | ||
| 183 | * For statmount(2) @param represents the request mask. | ||
| 184 | * For listmount(2) @param represents the last listed mount id (or zero). | ||
| 185 | */ | ||
| 186 | struct mnt_id_req { | ||
| 187 | __u32 size; | ||
| 188 | __u32 spare; | ||
| 189 | __u64 mnt_id; | ||
| 190 | __u64 param; | ||
| 191 | }; | ||
| 192 | |||
| 193 | /* List of all mnt_id_req versions. */ | ||
| 194 | #define MNT_ID_REQ_SIZE_VER0 24 /* sizeof first published struct */ | ||
| 195 | |||
| 196 | /* | ||
| 197 | * @mask bits for statmount(2) | ||
| 198 | */ | ||
| 199 | #define STATMOUNT_SB_BASIC 0x00000001U /* Want/got sb_... */ | ||
| 200 | #define STATMOUNT_MNT_BASIC 0x00000002U /* Want/got mnt_... */ | ||
| 201 | #define STATMOUNT_PROPAGATE_FROM 0x00000004U /* Want/got propagate_from */ | ||
| 202 | #define STATMOUNT_MNT_ROOT 0x00000008U /* Want/got mnt_root */ | ||
| 203 | #define STATMOUNT_MNT_POINT 0x00000010U /* Want/got mnt_point */ | ||
| 204 | #define STATMOUNT_FS_TYPE 0x00000020U /* Want/got fs_type */ | ||
| 205 | |||
| 206 | /* | ||
| 207 | * Special @mnt_id values that can be passed to listmount | ||
| 208 | */ | ||
| 209 | #define LSMT_ROOT 0xffffffffffffffff /* root mount */ | ||
| 210 | |||
| 141 | #endif /* _UAPI_LINUX_MOUNT_H */ | 211 | #endif /* _UAPI_LINUX_MOUNT_H */ |
| @@ -57,6 +57,7 @@ struct mptcp_info { · 56 unmodified lines | |||
| 57 | __u64 mptcpi_bytes_sent; | 57 | __u64 mptcpi_bytes_sent; |
| 58 | __u64 mptcpi_bytes_received; | 58 | __u64 mptcpi_bytes_received; |
| 59 | __u64 mptcpi_bytes_acked; | 59 | __u64 mptcpi_bytes_acked; |
| 60 | __u8 mptcpi_subflows_total; | ||
| 60 | }; | 61 | }; |
| 61 | 62 | ||
| 62 | /* MPTCP Reset reason codes, rfc8684 */ | 63 | /* MPTCP Reset reason codes, rfc8684 */ |
| @@ -1,6 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */ |
| 2 | /* Do not edit directly, auto-generated from: */ | 2 | /* Do not edit directly, auto-generated from: */ |
| 3 | /* Documentation/netlink/specs/mptcp.yaml */ | 3 | /* Documentation/netlink/specs/mptcp_pm.yaml */ |
| 4 | /* YNL-GEN uapi header */ | 4 | /* YNL-GEN uapi header */ |
| 5 | 5 | ||
| 6 | #ifndef _UAPI_LINUX_MPTCP_PM_H | 6 | #ifndef _UAPI_LINUX_MPTCP_PM_H |
| @@ -44,13 +44,30 @@ enum netdev_xdp_act { · 43 unmodified lines | |||
| 44 | * timestamp via bpf_xdp_metadata_rx_timestamp(). | 44 | * timestamp via bpf_xdp_metadata_rx_timestamp(). |
| 45 | * @NETDEV_XDP_RX_METADATA_HASH: Device is capable of exposing receive packet | 45 | * @NETDEV_XDP_RX_METADATA_HASH: Device is capable of exposing receive packet |
| 46 | * hash via bpf_xdp_metadata_rx_hash(). | 46 | * hash via bpf_xdp_metadata_rx_hash(). |
| 47 | * @NETDEV_XDP_RX_METADATA_VLAN_TAG: Device is capable of exposing receive | ||
| 48 | * packet VLAN tag via bpf_xdp_metadata_rx_vlan_tag(). | ||
| 47 | */ | 49 | */ |
| 48 | enum netdev_xdp_rx_metadata { | 50 | enum netdev_xdp_rx_metadata { |
| 49 | NETDEV_XDP_RX_METADATA_TIMESTAMP = 1, | 51 | NETDEV_XDP_RX_METADATA_TIMESTAMP = 1, |
| 50 | NETDEV_XDP_RX_METADATA_HASH = 2, | 52 | NETDEV_XDP_RX_METADATA_HASH = 2, |
| 53 | NETDEV_XDP_RX_METADATA_VLAN_TAG = 4, | ||
| 54 | }; | ||
| 51 | 55 | ||
| 52 | /* private: */ | 56 | /** |
| 53 | NETDEV_XDP_RX_METADATA_MASK = 3, | 57 | * enum netdev_xsk_flags |
| 58 | * @NETDEV_XSK_FLAGS_TX_TIMESTAMP: HW timestamping egress packets is supported | ||
| 59 | * by the driver. | ||
| 60 | * @NETDEV_XSK_FLAGS_TX_CHECKSUM: L3 checksum HW offload is supported by the | ||
| 61 | * driver. | ||
| 62 | */ | ||
| 63 | enum netdev_xsk_flags { | ||
| 64 | NETDEV_XSK_FLAGS_TX_TIMESTAMP = 1, | ||
| 65 | NETDEV_XSK_FLAGS_TX_CHECKSUM = 2, | ||
| 66 | }; | ||
| 67 | |||
| 68 | enum netdev_queue_type { | ||
| 69 | NETDEV_QUEUE_TYPE_RX, | ||
| 70 | NETDEV_QUEUE_TYPE_TX, | ||
| 54 | }; | 71 | }; |
| 55 | 72 | ||
| 56 | enum { | 73 | enum { |
| @@ -59,21 +76,80 @@ enum { · 2 unmodified lines | |||
| 59 | NETDEV_A_DEV_XDP_FEATURES, | 76 | NETDEV_A_DEV_XDP_FEATURES, |
| 60 | NETDEV_A_DEV_XDP_ZC_MAX_SEGS, | 77 | NETDEV_A_DEV_XDP_ZC_MAX_SEGS, |
| 61 | NETDEV_A_DEV_XDP_RX_METADATA_FEATURES, | 78 | NETDEV_A_DEV_XDP_RX_METADATA_FEATURES, |
| 79 | NETDEV_A_DEV_XSK_FEATURES, | ||
| 62 | 80 | ||
| 63 | __NETDEV_A_DEV_MAX, | 81 | __NETDEV_A_DEV_MAX, |
| 64 | NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) | 82 | NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1) |
| 65 | }; | 83 | }; |
| 66 | 84 | ||
| 85 | enum { | ||
| 86 | NETDEV_A_PAGE_POOL_ID = 1, | ||
| 87 | NETDEV_A_PAGE_POOL_IFINDEX, | ||
| 88 | NETDEV_A_PAGE_POOL_NAPI_ID, | ||
| 89 | NETDEV_A_PAGE_POOL_INFLIGHT, | ||
| 90 | NETDEV_A_PAGE_POOL_INFLIGHT_MEM, | ||
| 91 | NETDEV_A_PAGE_POOL_DETACH_TIME, | ||
| 92 | |||
| 93 | __NETDEV_A_PAGE_POOL_MAX, | ||
| 94 | NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1) | ||
| 95 | }; | ||
| 96 | |||
| 97 | enum { | ||
| 98 | NETDEV_A_PAGE_POOL_STATS_INFO = 1, | ||
| 99 | NETDEV_A_PAGE_POOL_STATS_ALLOC_FAST = 8, | ||
| 100 | NETDEV_A_PAGE_POOL_STATS_ALLOC_SLOW, | ||
| 101 | NETDEV_A_PAGE_POOL_STATS_ALLOC_SLOW_HIGH_ORDER, | ||
| 102 | NETDEV_A_PAGE_POOL_STATS_ALLOC_EMPTY, | ||
| 103 | NETDEV_A_PAGE_POOL_STATS_ALLOC_REFILL, | ||
| 104 | NETDEV_A_PAGE_POOL_STATS_ALLOC_WAIVE, | ||
| 105 | NETDEV_A_PAGE_POOL_STATS_RECYCLE_CACHED, | ||
| 106 | NETDEV_A_PAGE_POOL_STATS_RECYCLE_CACHE_FULL, | ||
| 107 | NETDEV_A_PAGE_POOL_STATS_RECYCLE_RING, | ||
| 108 | NETDEV_A_PAGE_POOL_STATS_RECYCLE_RING_FULL, | ||
| 109 | NETDEV_A_PAGE_POOL_STATS_RECYCLE_RELEASED_REFCNT, | ||
| 110 | |||
| 111 | __NETDEV_A_PAGE_POOL_STATS_MAX, | ||
| 112 | NETDEV_A_PAGE_POOL_STATS_MAX = (__NETDEV_A_PAGE_POOL_STATS_MAX - 1) | ||
| 113 | }; | ||
| 114 | |||
| 115 | enum { | ||
| 116 | NETDEV_A_NAPI_IFINDEX = 1, | ||
| 117 | NETDEV_A_NAPI_ID, | ||
| 118 | NETDEV_A_NAPI_IRQ, | ||
| 119 | NETDEV_A_NAPI_PID, | ||
| 120 | |||
| 121 | __NETDEV_A_NAPI_MAX, | ||
| 122 | NETDEV_A_NAPI_MAX = (__NETDEV_A_NAPI_MAX - 1) | ||
| 123 | }; | ||
| 124 | |||
| 125 | enum { | ||
| 126 | NETDEV_A_QUEUE_ID = 1, | ||
| 127 | NETDEV_A_QUEUE_IFINDEX, | ||
| 128 | NETDEV_A_QUEUE_TYPE, | ||
| 129 | NETDEV_A_QUEUE_NAPI_ID, | ||
| 130 | |||
| 131 | __NETDEV_A_QUEUE_MAX, | ||
| 132 | NETDEV_A_QUEUE_MAX = (__NETDEV_A_QUEUE_MAX - 1) | ||
| 133 | }; | ||
| 134 | |||
| 67 | enum { | 135 | enum { |
| 68 | NETDEV_CMD_DEV_GET = 1, | 136 | NETDEV_CMD_DEV_GET = 1, |
| 69 | NETDEV_CMD_DEV_ADD_NTF, | 137 | NETDEV_CMD_DEV_ADD_NTF, |
| 70 | NETDEV_CMD_DEV_DEL_NTF, | 138 | NETDEV_CMD_DEV_DEL_NTF, |
| 71 | NETDEV_CMD_DEV_CHANGE_NTF, | 139 | NETDEV_CMD_DEV_CHANGE_NTF, |
| 140 | NETDEV_CMD_PAGE_POOL_GET, | ||
| 141 | NETDEV_CMD_PAGE_POOL_ADD_NTF, | ||
| 142 | NETDEV_CMD_PAGE_POOL_DEL_NTF, | ||
| 143 | NETDEV_CMD_PAGE_POOL_CHANGE_NTF, | ||
| 144 | NETDEV_CMD_PAGE_POOL_STATS_GET, | ||
| 145 | NETDEV_CMD_QUEUE_GET, | ||
| 146 | NETDEV_CMD_NAPI_GET, | ||
| 72 | 147 | ||
| 73 | __NETDEV_CMD_MAX, | 148 | __NETDEV_CMD_MAX, |
| 74 | NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) | 149 | NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1) |
| 75 | }; | 150 | }; |
| 76 | 151 | ||
| 77 | #define NETDEV_MCGRP_MGMT "mgmt" | 152 | #define NETDEV_MCGRP_MGMT "mgmt" |
| 153 | #define NETDEV_MCGRP_PAGE_POOL "page-pool" | ||
| 78 | 154 | ||
| 79 | #endif /* _UAPI_LINUX_NETDEV_H */ | 155 | #endif /* _UAPI_LINUX_NETDEV_H */ |
| @@ -72,7 +72,7 @@ · 71 unmodified lines | |||
| 72 | * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS | 72 | * For drivers supporting TDLS with external setup (WIPHY_FLAG_SUPPORTS_TDLS |
| 73 | * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows: | 73 | * and WIPHY_FLAG_TDLS_EXTERNAL_SETUP), the station lifetime is as follows: |
| 74 | * - a setup station entry is added, not yet authorized, without any rate | 74 | * - a setup station entry is added, not yet authorized, without any rate |
| 75 | * or capability information, this just exists to avoid race conditions | 75 | * or capability information; this just exists to avoid race conditions |
| 76 | * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid | 76 | * - when the TDLS setup is done, a single NL80211_CMD_SET_STATION is valid |
| 77 | * to add rate and capability information to the station and at the same | 77 | * to add rate and capability information to the station and at the same |
| 78 | * time mark it authorized. | 78 | * time mark it authorized. |
| @@ -87,7 +87,7 @@ · 8 unmodified lines | |||
| 87 | * DOC: Frame transmission/registration support | 87 | * DOC: Frame transmission/registration support |
| 88 | * | 88 | * |
| 89 | * Frame transmission and registration support exists to allow userspace | 89 | * Frame transmission and registration support exists to allow userspace |
| 90 | * management entities such as wpa_supplicant react to management frames | 90 | * management entities such as wpa_supplicant to react to management frames |
| 91 | * that are not being handled by the kernel. This includes, for example, | 91 | * that are not being handled by the kernel. This includes, for example, |
| 92 | * certain classes of action frames that cannot be handled in the kernel | 92 | * certain classes of action frames that cannot be handled in the kernel |
| 93 | * for various reasons. | 93 | * for various reasons. |
| @@ -113,7 +113,7 @@ · 19 unmodified lines | |||
| 113 | * | 113 | * |
| 114 | * Frame transmission allows userspace to send for example the required | 114 | * Frame transmission allows userspace to send for example the required |
| 115 | * responses to action frames. It is subject to some sanity checking, | 115 | * responses to action frames. It is subject to some sanity checking, |
| 116 | * but many frames can be transmitted. When a frame was transmitted, its | 116 | * but many frames can be transmitted. When a frame is transmitted, its |
| 117 | * status is indicated to the sending socket. | 117 | * status is indicated to the sending socket. |
| 118 | * | 118 | * |
| 119 | * For more technical details, see the corresponding command descriptions | 119 | * For more technical details, see the corresponding command descriptions |
| @@ -123,7 +123,7 @@ · 3 unmodified lines | |||
| 123 | /** | 123 | /** |
| 124 | * DOC: Virtual interface / concurrency capabilities | 124 | * DOC: Virtual interface / concurrency capabilities |
| 125 | * | 125 | * |
| 126 | * Some devices are able to operate with virtual MACs, they can have | 126 | * Some devices are able to operate with virtual MACs; they can have |
| 127 | * more than one virtual interface. The capability handling for this | 127 | * more than one virtual interface. The capability handling for this |
| 128 | * is a bit complex though, as there may be a number of restrictions | 128 | * is a bit complex though, as there may be a number of restrictions |
| 129 | * on the types of concurrency that are supported. | 129 | * on the types of concurrency that are supported. |
| @@ -135,7 +135,7 @@ · 5 unmodified lines | |||
| 135 | * Once concurrency is desired, more attributes must be observed: | 135 | * Once concurrency is desired, more attributes must be observed: |
| 136 | * To start with, since some interface types are purely managed in | 136 | * To start with, since some interface types are purely managed in |
| 137 | * software, like the AP-VLAN type in mac80211 for example, there's | 137 | * software, like the AP-VLAN type in mac80211 for example, there's |
| 138 | * an additional list of these, they can be added at any time and | 138 | * an additional list of these; they can be added at any time and |
| 139 | * are only restricted by some semantic restrictions (e.g. AP-VLAN | 139 | * are only restricted by some semantic restrictions (e.g. AP-VLAN |
| 140 | * cannot be added without a corresponding AP interface). This list | 140 | * cannot be added without a corresponding AP interface). This list |
| 141 | * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute. | 141 | * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute. |
| @@ -164,7 +164,7 @@ · 22 unmodified lines | |||
| 164 | * Packet coalesce feature helps to reduce number of received interrupts | 164 | * Packet coalesce feature helps to reduce number of received interrupts |
| 165 | * to host by buffering these packets in firmware/hardware for some | 165 | * to host by buffering these packets in firmware/hardware for some |
| 166 | * predefined time. Received interrupt will be generated when one of the | 166 | * predefined time. Received interrupt will be generated when one of the |
| 167 | * following events occur. | 167 | * following events occurs. |
| 168 | * a) Expiration of hardware timer whose expiration time is set to maximum | 168 | * a) Expiration of hardware timer whose expiration time is set to maximum |
| 169 | * coalescing delay of matching coalesce rule. | 169 | * coalescing delay of matching coalesce rule. |
| 170 | * b) Coalescing buffer in hardware reaches its limit. | 170 | * b) Coalescing buffer in hardware reaches its limit. |
| @@ -174,7 +174,7 @@ · 3 unmodified lines | |||
| 174 | * rule. | 174 | * rule. |
| 175 | * a) Maximum coalescing delay | 175 | * a) Maximum coalescing delay |
| 176 | * b) List of packet patterns which needs to be matched | 176 | * b) List of packet patterns which needs to be matched |
| 177 | * c) Condition for coalescence. pattern 'match' or 'no match' | 177 | * c) Condition for coalescence: pattern 'match' or 'no match' |
| 178 | * Multiple such rules can be created. | 178 | * Multiple such rules can be created. |
| 179 | */ | 179 | */ |
| 180 | 180 | ||
| @@ -213,7 +213,7 @@ · 32 unmodified lines | |||
| 213 | /** | 213 | /** |
| 214 | * DOC: FILS shared key authentication offload | 214 | * DOC: FILS shared key authentication offload |
| 215 | * | 215 | * |
| 216 | * FILS shared key authentication offload can be advertized by drivers by | 216 | * FILS shared key authentication offload can be advertised by drivers by |
| 217 | * setting @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD flag. The drivers that support | 217 | * setting @NL80211_EXT_FEATURE_FILS_SK_OFFLOAD flag. The drivers that support |
| 218 | * FILS shared key authentication offload should be able to construct the | 218 | * FILS shared key authentication offload should be able to construct the |
| 219 | * authentication and association frames for FILS shared key authentication and | 219 | * authentication and association frames for FILS shared key authentication and |
| @@ -239,7 +239,7 @@ · 19 unmodified lines | |||
| 239 | * The PMKSA can be maintained in userspace persistently so that it can be used | 239 | * The PMKSA can be maintained in userspace persistently so that it can be used |
| 240 | * later after reboots or wifi turn off/on also. | 240 | * later after reboots or wifi turn off/on also. |
| 241 | * | 241 | * |
| 242 | * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertized by a FILS | 242 | * %NL80211_ATTR_FILS_CACHE_ID is the cache identifier advertised by a FILS |
| 243 | * capable AP supporting PMK caching. It specifies the scope within which the | 243 | * capable AP supporting PMK caching. It specifies the scope within which the |
| 244 | * PMKSAs are cached in an ESS. %NL80211_CMD_SET_PMKSA and | 244 | * PMKSAs are cached in an ESS. %NL80211_CMD_SET_PMKSA and |
| 245 | * %NL80211_CMD_DEL_PMKSA are enhanced to allow support for PMKSA caching based | 245 | * %NL80211_CMD_DEL_PMKSA are enhanced to allow support for PMKSA caching based |
| @@ -290,12 +290,12 @@ · 44 unmodified lines | |||
| 290 | * If the configuration needs to be applied for specific peer then the MAC | 290 | * If the configuration needs to be applied for specific peer then the MAC |
| 291 | * address of the peer needs to be passed in %NL80211_ATTR_MAC, otherwise the | 291 | * address of the peer needs to be passed in %NL80211_ATTR_MAC, otherwise the |
| 292 | * configuration will be applied for all the connected peers in the vif except | 292 | * configuration will be applied for all the connected peers in the vif except |
| 293 | * any peers that have peer specific configuration for the TID by default; if | 293 | * any peers that have peer-specific configuration for the TID by default; if |
| 294 | * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer specific values | 294 | * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer-specific values |
| 295 | * will be overwritten. | 295 | * will be overwritten. |
| 296 | * | 296 | * |
| 297 | * All this configuration is valid only for STA's current connection | 297 | * All this configuration is valid only for STA's current connection, |
| 298 | * i.e. the configuration will be reset to default when the STA connects back | 298 | * i.e., the configuration will be reset to default when the STA connects back |
| 299 | * after disconnection/roaming, and this configuration will be cleared when | 299 | * after disconnection/roaming, and this configuration will be cleared when |
| 300 | * the interface goes down. | 300 | * the interface goes down. |
| 301 | */ | 301 | */ |
| @@ -521,7 +521,7 @@ · 219 unmodified lines | |||
| 521 | * %NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is | 521 | * %NL80211_ATTR_SCHED_SCAN_PLANS. If %NL80211_ATTR_SCHED_SCAN_PLANS is |
| 522 | * not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified, | 522 | * not specified and only %NL80211_ATTR_SCHED_SCAN_INTERVAL is specified, |
| 523 | * scheduled scan will run in an infinite loop with the specified interval. | 523 | * scheduled scan will run in an infinite loop with the specified interval. |
| 524 | * These attributes are mutually exculsive, | 524 | * These attributes are mutually exclusive, |
| 525 | * i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if | 525 | * i.e. NL80211_ATTR_SCHED_SCAN_INTERVAL must not be passed if |
| 526 | * NL80211_ATTR_SCHED_SCAN_PLANS is defined. | 526 | * NL80211_ATTR_SCHED_SCAN_PLANS is defined. |
| 527 | * If for some reason scheduled scan is aborted by the driver, all scan | 527 | * If for some reason scheduled scan is aborted by the driver, all scan |
| @@ -552,7 +552,7 @@ · 24 unmodified lines | |||
| 552 | * %NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface | 552 | * %NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface |
| 553 | * is brought down while a scheduled scan was running. | 553 | * is brought down while a scheduled scan was running. |
| 554 | * | 554 | * |
| 555 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation | 555 | * @NL80211_CMD_GET_SURVEY: get survey results, e.g. channel occupation |
| 556 | * or noise level | 556 | * or noise level |
| 557 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to | 557 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to |
| 558 | * NL80211_CMD_GET_SURVEY and on the "scan" multicast group) | 558 | * NL80211_CMD_GET_SURVEY and on the "scan" multicast group) |
| @@ -563,12 +563,13 @@ · 4 unmodified lines | |||
| 563 | * using %NL80211_ATTR_SSID, %NL80211_ATTR_FILS_CACHE_ID, | 563 | * using %NL80211_ATTR_SSID, %NL80211_ATTR_FILS_CACHE_ID, |
| 564 | * %NL80211_ATTR_PMKID, and %NL80211_ATTR_PMK in case of FILS | 564 | * %NL80211_ATTR_PMKID, and %NL80211_ATTR_PMK in case of FILS |
| 565 | * authentication where %NL80211_ATTR_FILS_CACHE_ID is the identifier | 565 | * authentication where %NL80211_ATTR_FILS_CACHE_ID is the identifier |
| 566 | * advertized by a FILS capable AP identifying the scope of PMKSA in an | 566 | * advertised by a FILS capable AP identifying the scope of PMKSA in an |
| 567 | * ESS. | 567 | * ESS. |
| 568 | * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC | 568 | * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC |
| 569 | * (for the BSSID) and %NL80211_ATTR_PMKID or using %NL80211_ATTR_SSID, | 569 | * (for the BSSID) and %NL80211_ATTR_PMKID or using %NL80211_ATTR_SSID, |
| 570 | * %NL80211_ATTR_FILS_CACHE_ID, and %NL80211_ATTR_PMKID in case of FILS | 570 | * %NL80211_ATTR_FILS_CACHE_ID, and %NL80211_ATTR_PMKID in case of FILS |
| 571 | * authentication. | 571 | * authentication. Additionally in case of SAE offload and OWE offloads |
| 572 | * PMKSA entry can be deleted using %NL80211_ATTR_SSID. | ||
| 572 | * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries. | 573 | * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries. |
| 573 | * | 574 | * |
| 574 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain | 575 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain |
| @@ -607,7 +608,7 @@ · 32 unmodified lines | |||
| 607 | * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify | 608 | * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify |
| 608 | * the SSID (mainly for association, but is included in authentication | 609 | * the SSID (mainly for association, but is included in authentication |
| 609 | * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ + | 610 | * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ + |
| 610 | * %NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequence of the | 611 | * %NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequency of the |
| 611 | * channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the | 612 | * channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the |
| 612 | * authentication type. %NL80211_ATTR_IE is used to define IEs | 613 | * authentication type. %NL80211_ATTR_IE is used to define IEs |
| 613 | * (VendorSpecificInfo, but also including RSN IE and FT IEs) to be added | 614 | * (VendorSpecificInfo, but also including RSN IE and FT IEs) to be added |
| @@ -816,7 +817,7 @@ · 202 unmodified lines | |||
| 816 | * reached. | 817 | * reached. |
| 817 | * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ | 818 | * @NL80211_CMD_SET_CHANNEL: Set the channel (using %NL80211_ATTR_WIPHY_FREQ |
| 818 | * and the attributes determining channel width) the given interface | 819 | * and the attributes determining channel width) the given interface |
| 819 | * (identifed by %NL80211_ATTR_IFINDEX) shall operate on. | 820 | * (identified by %NL80211_ATTR_IFINDEX) shall operate on. |
| 820 | * In case multiple channels are supported by the device, the mechanism | 821 | * In case multiple channels are supported by the device, the mechanism |
| 821 | * with which it switches channels is implementation-defined. | 822 | * with which it switches channels is implementation-defined. |
| 822 | * When a monitor interface is given, it can only switch channel while | 823 | * When a monitor interface is given, it can only switch channel while |
| @@ -888,7 +889,7 @@ · 65 unmodified lines | |||
| 888 | * inform userspace of the new replay counter. | 889 | * inform userspace of the new replay counter. |
| 889 | * | 890 | * |
| 890 | * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace | 891 | * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace |
| 891 | * of PMKSA caching dandidates. | 892 | * of PMKSA caching candidates. |
| 892 | * | 893 | * |
| 893 | * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup). | 894 | * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup). |
| 894 | * In addition, this can be used as an event to request userspace to take | 895 | * In addition, this can be used as an event to request userspace to take |
| @@ -924,7 +925,7 @@ · 29 unmodified lines | |||
| 924 | * | 925 | * |
| 925 | * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface | 926 | * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface |
| 926 | * by sending a null data frame to it and reporting when the frame is | 927 | * by sending a null data frame to it and reporting when the frame is |
| 927 | * acknowleged. This is used to allow timing out inactive clients. Uses | 928 | * acknowledged. This is used to allow timing out inactive clients. Uses |
| 928 | * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a | 929 | * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a |
| 929 | * direct reply with an %NL80211_ATTR_COOKIE that is later used to match | 930 | * direct reply with an %NL80211_ATTR_COOKIE that is later used to match |
| 930 | * up the event with the request. The event includes the same data and | 931 | * up the event with the request. The event includes the same data and |
| @@ -1135,11 +1136,15 @@ · 204 unmodified lines | |||
| 1135 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously | 1136 | * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously |
| 1136 | * configured PMK for the authenticator address identified by | 1137 | * configured PMK for the authenticator address identified by |
| 1137 | * %NL80211_ATTR_MAC. | 1138 | * %NL80211_ATTR_MAC. |
| 1138 | * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 802.1X FT roam was | 1139 | * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates port is authorized and |
| 1139 | * completed successfully. Drivers that support 4 way handshake offload | 1140 | * open for regular data traffic. For STA/P2P-client, this event is sent |
| 1140 | * should send this event after indicating 802.1X FT assocation with | 1141 | * with AP MAC address and for AP/P2P-GO, the event carries the STA/P2P- |
| 1141 | * %NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT | 1142 | * client MAC address. |
| 1142 | * should be indicated instead. | 1143 | * Drivers that support 4 way handshake offload should send this event for |
| 1144 | * STA/P2P-client after successful 4-way HS or after 802.1X FT following | ||
| 1145 | * NL80211_CMD_CONNECT or NL80211_CMD_ROAM. Drivers using AP/P2P-GO 4-way | ||
| 1146 | * handshake offload should send this event on successful completion of | ||
| 1147 | * 4-way handshake with the peer (STA/P2P-client). | ||
| 1143 | * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request | 1148 | * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request |
| 1144 | * and RX notification. This command is used both as a request to transmit | 1149 | * and RX notification. This command is used both as a request to transmit |
| 1145 | * a control port frame and as a notification that a control port frame | 1150 | * a control port frame and as a notification that a control port frame |
| @@ -1323,6 +1328,11 @@ · 177 unmodified lines | |||
| 1323 | * Multi-Link reconfiguration. %NL80211_ATTR_MLO_LINKS is used to provide | 1328 | * Multi-Link reconfiguration. %NL80211_ATTR_MLO_LINKS is used to provide |
| 1324 | * information about the removed STA MLD setup links. | 1329 | * information about the removed STA MLD setup links. |
| 1325 | * | 1330 | * |
| 1331 | * @NL80211_CMD_SET_TID_TO_LINK_MAPPING: Set the TID to Link Mapping for a | ||
| 1332 | * non-AP MLD station. The %NL80211_ATTR_MLO_TTLM_DLINK and | ||
| 1333 | * %NL80211_ATTR_MLO_TTLM_ULINK attributes are used to specify the | ||
| 1334 | * TID to Link mapping for downlink/uplink traffic. | ||
| 1335 | * | ||
| 1326 | * @NL80211_CMD_MAX: highest used command number | 1336 | * @NL80211_CMD_MAX: highest used command number |
| 1327 | * @__NL80211_CMD_AFTER_LAST: internal use | 1337 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 1328 | */ | 1338 | */ |
| @@ -1578,6 +1588,8 @@ enum nl80211_commands { · 249 unmodified lines | |||
| 1578 | 1588 | ||
| 1579 | NL80211_CMD_LINKS_REMOVED, | 1589 | NL80211_CMD_LINKS_REMOVED, |
| 1580 | 1590 | ||
| 1591 | NL80211_CMD_SET_TID_TO_LINK_MAPPING, | ||
| 1592 | |||
| 1581 | /* add new commands above here */ | 1593 | /* add new commands above here */ |
| 1582 | 1594 | ||
| 1583 | /* used to define NL80211_CMD_MAX below */ | 1595 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1835,7 +1847,7 @@ enum nl80211_commands { · 251 unmodified lines | |||
| 1835 | * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is | 1847 | * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is |
| 1836 | * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER | 1848 | * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER |
| 1837 | * flag. When used with %NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, pre-auth | 1849 | * flag. When used with %NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, pre-auth |
| 1838 | * frames are not forwared over the control port. | 1850 | * frames are not forwarded over the control port. |
| 1839 | * | 1851 | * |
| 1840 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. | 1852 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. |
| 1841 | * We recommend using nested, driver-specific attributes within this. | 1853 | * We recommend using nested, driver-specific attributes within this. |
| @@ -1972,10 +1984,10 @@ enum nl80211_commands { · 130 unmodified lines | |||
| 1972 | * bit. Depending on which antennas are selected in the bitmap, 802.11n | 1984 | * bit. Depending on which antennas are selected in the bitmap, 802.11n |
| 1973 | * drivers can derive which chainmasks to use (if all antennas belonging to | 1985 | * drivers can derive which chainmasks to use (if all antennas belonging to |
| 1974 | * a particular chain are disabled this chain should be disabled) and if | 1986 | * a particular chain are disabled this chain should be disabled) and if |
| 1975 | * a chain has diversity antennas wether diversity should be used or not. | 1987 | * a chain has diversity antennas whether diversity should be used or not. |
| 1976 | * HT capabilities (STBC, TX Beamforming, Antenna selection) can be | 1988 | * HT capabilities (STBC, TX Beamforming, Antenna selection) can be |
| 1977 | * derived from the available chains after applying the antenna mask. | 1989 | * derived from the available chains after applying the antenna mask. |
| 1978 | * Non-802.11n drivers can derive wether to use diversity or not. | 1990 | * Non-802.11n drivers can derive whether to use diversity or not. |
| 1979 | * Drivers may reject configurations or RX/TX mask combinations they cannot | 1991 | * Drivers may reject configurations or RX/TX mask combinations they cannot |
| 1980 | * support by returning -EINVAL. | 1992 | * support by returning -EINVAL. |
| 1981 | * | 1993 | * |
| @@ -2545,7 +2557,7 @@ enum nl80211_commands { · 563 unmodified lines | |||
| 2545 | * from successful FILS authentication and is used with | 2557 | * from successful FILS authentication and is used with |
| 2546 | * %NL80211_CMD_CONNECT. | 2558 | * %NL80211_CMD_CONNECT. |
| 2547 | * | 2559 | * |
| 2548 | * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertized by a FILS AP | 2560 | * @NL80211_ATTR_FILS_CACHE_ID: A 2-octet identifier advertised by a FILS AP |
| 2549 | * identifying the scope of PMKSAs. This is used with | 2561 | * identifying the scope of PMKSAs. This is used with |
| 2550 | * @NL80211_CMD_SET_PMKSA and @NL80211_CMD_DEL_PMKSA. | 2562 | * @NL80211_CMD_SET_PMKSA and @NL80211_CMD_DEL_PMKSA. |
| 2551 | * | 2563 | * |
| @@ -2826,6 +2838,19 @@ enum nl80211_commands { · 274 unmodified lines | |||
| 2826 | * @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is | 2838 | * @NL80211_ATTR_MLO_LINK_DISABLED: Flag attribute indicating that the link is |
| 2827 | * disabled. | 2839 | * disabled. |
| 2828 | * | 2840 | * |
| 2841 | * @NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA: Include BSS usage data, i.e. | ||
| 2842 | * include BSSes that can only be used in restricted scenarios and/or | ||
| 2843 | * cannot be used at all. | ||
| 2844 | * | ||
| 2845 | * @NL80211_ATTR_MLO_TTLM_DLINK: Binary attribute specifying the downlink TID to | ||
| 2846 | * link mapping. The length is 8 * sizeof(u16). For each TID the link | ||
| 2847 | * mapping is as defined in section 9.4.2.314 (TID-To-Link Mapping element) | ||
| 2848 | * in Draft P802.11be_D4.0. | ||
| 2849 | * @NL80211_ATTR_MLO_TTLM_ULINK: Binary attribute specifying the uplink TID to | ||
| 2850 | * link mapping. The length is 8 * sizeof(u16). For each TID the link | ||
| 2851 | * mapping is as defined in section 9.4.2.314 (TID-To-Link Mapping element) | ||
| 2852 | * in Draft P802.11be_D4.0. | ||
| 2853 | * | ||
| 2829 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2854 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2830 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2855 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2831 | * @__NL80211_ATTR_AFTER_LAST: internal use | 2856 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -3364,6 +3389,11 @@ enum nl80211_attrs { · 532 unmodified lines | |||
| 3364 | 3389 | ||
| 3365 | NL80211_ATTR_MLO_LINK_DISABLED, | 3390 | NL80211_ATTR_MLO_LINK_DISABLED, |
| 3366 | 3391 | ||
| 3392 | NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA, | ||
| 3393 | |||
| 3394 | NL80211_ATTR_MLO_TTLM_DLINK, | ||
| 3395 | NL80211_ATTR_MLO_TTLM_ULINK, | ||
| 3396 | |||
| 3367 | /* add attributes here, update the policy in nl80211.c */ | 3397 | /* add attributes here, update the policy in nl80211.c */ |
| 3368 | 3398 | ||
| 3369 | __NL80211_ATTR_AFTER_LAST, | 3399 | __NL80211_ATTR_AFTER_LAST, |
| @@ -4170,7 +4200,7 @@ enum nl80211_wmm_rule { · 800 unmodified lines | |||
| 4170 | * (100 * dBm). | 4200 | * (100 * dBm). |
| 4171 | * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS | 4201 | * @NL80211_FREQUENCY_ATTR_DFS_STATE: current state for DFS |
| 4172 | * (enum nl80211_dfs_state) | 4202 | * (enum nl80211_dfs_state) |
| 4173 | * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in miliseconds for how long | 4203 | * @NL80211_FREQUENCY_ATTR_DFS_TIME: time in milliseconds for how long |
| 4174 | * this channel is in this DFS state. | 4204 | * this channel is in this DFS state. |
| 4175 | * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this | 4205 | * @NL80211_FREQUENCY_ATTR_NO_HT40_MINUS: HT40- isn't possible with this |
| 4176 | * channel as the control channel | 4206 | * channel as the control channel |
| @@ -4226,6 +4256,14 @@ enum nl80211_wmm_rule { · 49 unmodified lines | |||
| 4226 | * in current regulatory domain. | 4256 | * in current regulatory domain. |
| 4227 | * @NL80211_FREQUENCY_ATTR_PSD: Power spectral density (in dBm) that | 4257 | * @NL80211_FREQUENCY_ATTR_PSD: Power spectral density (in dBm) that |
| 4228 | * is allowed on this channel in current regulatory domain. | 4258 | * is allowed on this channel in current regulatory domain. |
| 4259 | * @NL80211_FREQUENCY_ATTR_DFS_CONCURRENT: Operation on this channel is | ||
| 4260 | * allowed for peer-to-peer or adhoc communication under the control | ||
| 4261 | * of a DFS master which operates on the same channel (FCC-594280 D01 | ||
| 4262 | * Section B.3). Should be used together with %NL80211_RRF_DFS only. | ||
| 4263 | * @NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT: Client connection to VLP AP | ||
| 4264 | * not allowed using this channel | ||
| 4265 | * @NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT: Client connection to AFC AP | ||
| 4266 | * not allowed using this channel | ||
| 4229 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number | 4267 | * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number |
| 4230 | * currently defined | 4268 | * currently defined |
| 4231 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use | 4269 | * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use |
| @@ -4265,6 +4303,9 @@ enum nl80211_frequency_attr { · 33 unmodified lines | |||
| 4265 | NL80211_FREQUENCY_ATTR_NO_320MHZ, | 4303 | NL80211_FREQUENCY_ATTR_NO_320MHZ, |
| 4266 | NL80211_FREQUENCY_ATTR_NO_EHT, | 4304 | NL80211_FREQUENCY_ATTR_NO_EHT, |
| 4267 | NL80211_FREQUENCY_ATTR_PSD, | 4305 | NL80211_FREQUENCY_ATTR_PSD, |
| 4306 | NL80211_FREQUENCY_ATTR_DFS_CONCURRENT, | ||
| 4307 | NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT, | ||
| 4308 | NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT, | ||
| 4268 | 4309 | ||
| 4269 | /* keep last */ | 4310 | /* keep last */ |
| 4270 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, | 4311 | __NL80211_FREQUENCY_ATTR_AFTER_LAST, |
| @@ -4470,6 +4511,12 @@ enum nl80211_sched_scan_match_attr { · 199 unmodified lines | |||
| 4470 | * @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed | 4511 | * @NL80211_RRF_NO_320MHZ: 320MHz operation not allowed |
| 4471 | * @NL80211_RRF_NO_EHT: EHT operation not allowed | 4512 | * @NL80211_RRF_NO_EHT: EHT operation not allowed |
| 4472 | * @NL80211_RRF_PSD: Ruleset has power spectral density value | 4513 | * @NL80211_RRF_PSD: Ruleset has power spectral density value |
| 4514 | * @NL80211_RRF_DFS_CONCURRENT: Operation on this channel is allowed for | ||
| 4515 | peer-to-peer or adhoc communication under the control of a DFS master | ||
| 4516 | which operates on the same channel (FCC-594280 D01 Section B.3). | ||
| 4517 | Should be used together with %NL80211_RRF_DFS only. | ||
| 4518 | * @NL80211_RRF_NO_UHB_VLP_CLIENT: Client connection to VLP AP not allowed | ||
| 4519 | * @NL80211_RRF_NO_UHB_AFC_CLIENT: Client connection to AFC AP not allowed | ||
| 4473 | */ | 4520 | */ |
| 4474 | enum nl80211_reg_rule_flags { | 4521 | enum nl80211_reg_rule_flags { |
| 4475 | NL80211_RRF_NO_OFDM = 1<<0, | 4522 | NL80211_RRF_NO_OFDM = 1<<0, |
| @@ -4491,6 +4538,9 @@ enum nl80211_reg_rule_flags { · 15 unmodified lines | |||
| 4491 | NL80211_RRF_NO_320MHZ = 1<<18, | 4538 | NL80211_RRF_NO_320MHZ = 1<<18, |
| 4492 | NL80211_RRF_NO_EHT = 1<<19, | 4539 | NL80211_RRF_NO_EHT = 1<<19, |
| 4493 | NL80211_RRF_PSD = 1<<20, | 4540 | NL80211_RRF_PSD = 1<<20, |
| 4541 | NL80211_RRF_DFS_CONCURRENT = 1<<21, | ||
| 4542 | NL80211_RRF_NO_UHB_VLP_CLIENT = 1<<22, | ||
| 4543 | NL80211_RRF_NO_UHB_AFC_CLIENT = 1<<23, | ||
| 4494 | }; | 4544 | }; |
| 4495 | 4545 | ||
| 4496 | #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR | 4546 | #define NL80211_RRF_PASSIVE_SCAN NL80211_RRF_NO_IR |
| @@ -5027,6 +5077,33 @@ enum nl80211_bss_scan_width { · 530 unmodified lines | |||
| 5027 | NL80211_BSS_CHAN_WIDTH_2, | 5077 | NL80211_BSS_CHAN_WIDTH_2, |
| 5028 | }; | 5078 | }; |
| 5029 | 5079 | ||
| 5080 | /** | ||
| 5081 | * enum nl80211_bss_use_for - bitmap indicating possible BSS use | ||
| 5082 | * @NL80211_BSS_USE_FOR_NORMAL: Use this BSS for normal "connection", | ||
| 5083 | * including IBSS/MBSS depending on the type. | ||
| 5084 | * @NL80211_BSS_USE_FOR_MLD_LINK: This BSS can be used as a link in an | ||
| 5085 | * MLO connection. Note that for an MLO connection, all links including | ||
| 5086 | * the assoc link must have this flag set, and the assoc link must | ||
| 5087 | * additionally have %NL80211_BSS_USE_FOR_NORMAL set. | ||
| 5088 | */ | ||
| 5089 | enum nl80211_bss_use_for { | ||
| 5090 | NL80211_BSS_USE_FOR_NORMAL = 1 << 0, | ||
| 5091 | NL80211_BSS_USE_FOR_MLD_LINK = 1 << 1, | ||
| 5092 | }; | ||
| 5093 | |||
| 5094 | /** | ||
| 5095 | * enum nl80211_bss_cannot_use_reasons - reason(s) connection to a | ||
| 5096 | * BSS isn't possible | ||
| 5097 | * @NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY: NSTR nonprimary links aren't | ||
| 5098 | * supported by the device, and this BSS entry represents one. | ||
| 5099 | * @NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH: STA is not supporting | ||
| 5100 | * the AP power type (SP, VLP, AP) that the AP uses. | ||
| 5101 | */ | ||
| 5102 | enum nl80211_bss_cannot_use_reasons { | ||
| 5103 | NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY = 1 << 0, | ||
| 5104 | NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH = 1 << 1, | ||
| 5105 | }; | ||
| 5106 | |||
| 5030 | /** | 5107 | /** |
| 5031 | * enum nl80211_bss - netlink attributes for a BSS | 5108 | * enum nl80211_bss - netlink attributes for a BSS |
| 5032 | * | 5109 | * |
| @@ -5079,6 +5156,14 @@ enum nl80211_bss_scan_width { · 46 unmodified lines | |||
| 5079 | * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz | 5156 | * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz |
| 5080 | * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8). | 5157 | * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8). |
| 5081 | * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it. | 5158 | * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it. |
| 5159 | * @NL80211_BSS_USE_FOR: u32 bitmap attribute indicating what the BSS can be | ||
| 5160 | * used for, see &enum nl80211_bss_use_for. | ||
| 5161 | * @NL80211_BSS_CANNOT_USE_REASONS: Indicates the reason that this BSS cannot | ||
| 5162 | * be used for all or some of the possible uses by the device reporting it, | ||
| 5163 | * even though its presence was detected. | ||
| 5164 | * This is a u64 attribute containing a bitmap of values from | ||
| 5165 | * &enum nl80211_cannot_use_reasons, note that the attribute may be missing | ||
| 5166 | * if no reasons are specified. | ||
| 5082 | * @__NL80211_BSS_AFTER_LAST: internal | 5167 | * @__NL80211_BSS_AFTER_LAST: internal |
| 5083 | * @NL80211_BSS_MAX: highest BSS attribute | 5168 | * @NL80211_BSS_MAX: highest BSS attribute |
| 5084 | */ | 5169 | */ |
| @@ -5106,6 +5191,8 @@ enum nl80211_bss { · 21 unmodified lines | |||
| 5106 | NL80211_BSS_FREQUENCY_OFFSET, | 5191 | NL80211_BSS_FREQUENCY_OFFSET, |
| 5107 | NL80211_BSS_MLO_LINK_ID, | 5192 | NL80211_BSS_MLO_LINK_ID, |
| 5108 | NL80211_BSS_MLD_ADDR, | 5193 | NL80211_BSS_MLD_ADDR, |
| 5194 | NL80211_BSS_USE_FOR, | ||
| 5195 | NL80211_BSS_CANNOT_USE_REASONS, | ||
| 5109 | 5196 | ||
| 5110 | /* keep last */ | 5197 | /* keep last */ |
| 5111 | __NL80211_BSS_AFTER_LAST, | 5198 | __NL80211_BSS_AFTER_LAST, |
| @@ -5454,7 +5541,7 @@ enum nl80211_tx_rate_setting { · 342 unmodified lines | |||
| 5454 | * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE). | 5541 | * (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE). |
| 5455 | * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but | 5542 | * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but |
| 5456 | * per peer instead. | 5543 | * per peer instead. |
| 5457 | * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates | 5544 | * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribute, if set indicates |
| 5458 | * that the new configuration overrides all previous peer | 5545 | * that the new configuration overrides all previous peer |
| 5459 | * configurations, otherwise previous peer specific configurations | 5546 | * configurations, otherwise previous peer specific configurations |
| 5460 | * should be left untouched. | 5547 | * should be left untouched. |
| @@ -5837,7 +5924,7 @@ enum nl80211_attr_coalesce_rule { · 376 unmodified lines | |||
| 5837 | 5924 | ||
| 5838 | /** | 5925 | /** |
| 5839 | * enum nl80211_coalesce_condition - coalesce rule conditions | 5926 | * enum nl80211_coalesce_condition - coalesce rule conditions |
| 5840 | * @NL80211_COALESCE_CONDITION_MATCH: coalaesce Rx packets when patterns | 5927 | * @NL80211_COALESCE_CONDITION_MATCH: coalesce Rx packets when patterns |
| 5841 | * in a rule are matched. | 5928 | * in a rule are matched. |
| 5842 | * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns | 5929 | * @NL80211_COALESCE_CONDITION_NO_MATCH: coalesce Rx packets when patterns |
| 5843 | * in a rule are not matched. | 5930 | * in a rule are not matched. |
| @@ -5936,7 +6023,7 @@ enum nl80211_if_combination_attrs { · 92 unmodified lines | |||
| 5936 | * enum nl80211_plink_state - state of a mesh peer link finite state machine | 6023 | * enum nl80211_plink_state - state of a mesh peer link finite state machine |
| 5937 | * | 6024 | * |
| 5938 | * @NL80211_PLINK_LISTEN: initial state, considered the implicit | 6025 | * @NL80211_PLINK_LISTEN: initial state, considered the implicit |
| 5939 | * state of non existent mesh peer links | 6026 | * state of non-existent mesh peer links |
| 5940 | * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to | 6027 | * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to |
| 5941 | * this mesh peer | 6028 | * this mesh peer |
| 5942 | * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received | 6029 | * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received |
| @@ -6229,7 +6316,7 @@ enum nl80211_feature_flags { · 286 unmodified lines | |||
| 6229 | * request to use RRM (see %NL80211_ATTR_USE_RRM) with | 6316 | * request to use RRM (see %NL80211_ATTR_USE_RRM) with |
| 6230 | * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set | 6317 | * %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set |
| 6231 | * the ASSOC_REQ_USE_RRM flag in the association request even if | 6318 | * the ASSOC_REQ_USE_RRM flag in the association request even if |
| 6232 | * NL80211_FEATURE_QUIET is not advertized. | 6319 | * NL80211_FEATURE_QUIET is not advertised. |
| 6233 | * @NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER: This device supports MU-MIMO air | 6320 | * @NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER: This device supports MU-MIMO air |
| 6234 | * sniffer which means that it can be configured to hear packets from | 6321 | * sniffer which means that it can be configured to hear packets from |
| 6235 | * certain groups which can be configured by the | 6322 | * certain groups which can be configured by the |
| @@ -6241,13 +6328,15 @@ enum nl80211_feature_flags { · 5 unmodified lines | |||
| 6241 | * the BSS that the interface that requested the scan is connected to | 6328 | * the BSS that the interface that requested the scan is connected to |
| 6242 | * (if available). | 6329 | * (if available). |
| 6243 | * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the | 6330 | * @NL80211_EXT_FEATURE_BSS_PARENT_TSF: Per BSS, this driver reports the |
| 6244 | * time the last beacon/probe was received. The time is the TSF of the | 6331 | * time the last beacon/probe was received. For a non-MLO connection, the |
| 6245 | * BSS that the interface that requested the scan is connected to | 6332 | * time is the TSF of the BSS that the interface that requested the scan is |
| 6246 | * (if available). | 6333 | * connected to (if available). For an MLO connection, the time is the TSF |
| 6334 | * of the BSS corresponding with link ID specified in the scan request (if | ||
| 6335 | * specified). | ||
| 6247 | * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of | 6336 | * @NL80211_EXT_FEATURE_SET_SCAN_DWELL: This driver supports configuration of |
| 6248 | * channel dwell time. | 6337 | * channel dwell time. |
| 6249 | * @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate | 6338 | * @NL80211_EXT_FEATURE_BEACON_RATE_LEGACY: Driver supports beacon rate |
| 6250 | * configuration (AP/mesh), supporting a legacy (non HT/VHT) rate. | 6339 | * configuration (AP/mesh), supporting a legacy (non-HT/VHT) rate. |
| 6251 | * @NL80211_EXT_FEATURE_BEACON_RATE_HT: Driver supports beacon rate | 6340 | * @NL80211_EXT_FEATURE_BEACON_RATE_HT: Driver supports beacon rate |
| 6252 | * configuration (AP/mesh) with HT rates. | 6341 | * configuration (AP/mesh) with HT rates. |
| 6253 | * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate | 6342 | * @NL80211_EXT_FEATURE_BEACON_RATE_VHT: Driver supports beacon rate |
| @@ -6426,6 +6515,11 @@ enum nl80211_feature_flags { · 172 unmodified lines | |||
| 6426 | * @NL80211_EXT_FEATURE_OWE_OFFLOAD_AP: Driver/Device wants to do OWE DH IE | 6515 | * @NL80211_EXT_FEATURE_OWE_OFFLOAD_AP: Driver/Device wants to do OWE DH IE |
| 6427 | * handling in AP mode. | 6516 | * handling in AP mode. |
| 6428 | * | 6517 | * |
| 6518 | * @NL80211_EXT_FEATURE_DFS_CONCURRENT: The device supports peer-to-peer or | ||
| 6519 | * ad hoc operation on DFS channels under the control of a concurrent | ||
| 6520 | * DFS master on the same channel as described in FCC-594280 D01 | ||
| 6521 | * (Section B.3). This, for example, allows P2P GO and P2P clients to | ||
| 6522 | * operate on DFS channels as long as there's a concurrent BSS connection. | ||
| 6429 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 6523 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 6430 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 6524 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 6431 | */ | 6525 | */ |
| @@ -6499,6 +6593,7 @@ enum nl80211_ext_feature_index { · 67 unmodified lines | |||
| 6499 | NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA, | 6593 | NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA, |
| 6500 | NL80211_EXT_FEATURE_OWE_OFFLOAD, | 6594 | NL80211_EXT_FEATURE_OWE_OFFLOAD, |
| 6501 | NL80211_EXT_FEATURE_OWE_OFFLOAD_AP, | 6595 | NL80211_EXT_FEATURE_OWE_OFFLOAD_AP, |
| 6596 | NL80211_EXT_FEATURE_DFS_CONCURRENT, | ||
| 6502 | 6597 | ||
| 6503 | /* add new features before the definition below */ | 6598 | /* add new features before the definition below */ |
| 6504 | NUM_NL80211_EXT_FEATURES, | 6599 | NUM_NL80211_EXT_FEATURES, |
| @@ -6583,7 +6678,7 @@ enum nl80211_timeout_reason { · 78 unmodified lines | |||
| 6583 | * request parameters IE in the probe request | 6678 | * request parameters IE in the probe request |
| 6584 | * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses | 6679 | * @NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP: accept broadcast probe responses |
| 6585 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at | 6680 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE: send probe request frames at |
| 6586 | * rate of at least 5.5M. In case non OCE AP is discovered in the channel, | 6681 | * rate of at least 5.5M. In case non-OCE AP is discovered in the channel, |
| 6587 | * only the first probe req in the channel will be sent in high rate. | 6682 | * only the first probe req in the channel will be sent in high rate. |
| 6588 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request | 6683 | * @NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION: allow probe request |
| 6589 | * tx deferral (dot11FILSProbeDelay shall be set to 15ms) | 6684 | * tx deferral (dot11FILSProbeDelay shall be set to 15ms) |
| @@ -6619,7 +6714,7 @@ enum nl80211_timeout_reason { · 29 unmodified lines | |||
| 6619 | * received on the 2.4/5 GHz channels to actively scan only the 6GHz | 6714 | * received on the 2.4/5 GHz channels to actively scan only the 6GHz |
| 6620 | * channels on which APs are expected to be found. Note that when not set, | 6715 | * channels on which APs are expected to be found. Note that when not set, |
| 6621 | * the scan logic would scan all 6GHz channels, but since transmission of | 6716 | * the scan logic would scan all 6GHz channels, but since transmission of |
| 6622 | * probe requests on non PSC channels is limited, it is highly likely that | 6717 | * probe requests on non-PSC channels is limited, it is highly likely that |
| 6623 | * these channels would passively be scanned. Also note that when the flag | 6718 | * these channels would passively be scanned. Also note that when the flag |
| 6624 | * is set, in addition to the colocated APs, PSC channels would also be | 6719 | * is set, in addition to the colocated APs, PSC channels would also be |
| 6625 | * scanned if the user space has asked for it. | 6720 | * scanned if the user space has asked for it. |
| @@ -6951,7 +7046,7 @@ enum nl80211_nan_func_term_reason { · 325 unmodified lines | |||
| 6951 | * The instance ID for the follow up Service Discovery Frame. This is u8. | 7046 | * The instance ID for the follow up Service Discovery Frame. This is u8. |
| 6952 | * @NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID: relevant if the function's type | 7047 | * @NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID: relevant if the function's type |
| 6953 | * is follow up. This is a u8. | 7048 | * is follow up. This is a u8. |
| 6954 | * The requestor instance ID for the follow up Service Discovery Frame. | 7049 | * The requester instance ID for the follow up Service Discovery Frame. |
| 6955 | * @NL80211_NAN_FUNC_FOLLOW_UP_DEST: the MAC address of the recipient of the | 7050 | * @NL80211_NAN_FUNC_FOLLOW_UP_DEST: the MAC address of the recipient of the |
| 6956 | * follow up Service Discovery Frame. This is a binary attribute. | 7051 | * follow up Service Discovery Frame. This is a binary attribute. |
| 6957 | * @NL80211_NAN_FUNC_CLOSE_RANGE: is this function limited for devices in a | 7052 | * @NL80211_NAN_FUNC_CLOSE_RANGE: is this function limited for devices in a |
| @@ -7341,7 +7436,7 @@ enum nl80211_peer_measurement_attrs { · 383 unmodified lines | |||
| 7341 | * @NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED: flag attribute indicating if | 7436 | * @NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED: flag attribute indicating if |
| 7342 | * trigger based ranging measurement is supported | 7437 | * trigger based ranging measurement is supported |
| 7343 | * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating | 7438 | * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating |
| 7344 | * if non trigger based ranging measurement is supported | 7439 | * if non-trigger-based ranging measurement is supported |
| 7345 | * | 7440 | * |
| 7346 | * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal | 7441 | * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal |
| 7347 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number | 7442 | * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number |
| @@ -7395,7 +7490,7 @@ enum nl80211_peer_measurement_ftm_capa { · 47 unmodified lines | |||
| 7395 | * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor | 7490 | * if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor |
| 7396 | * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based | 7491 | * %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based |
| 7397 | * ranging will be used. | 7492 | * ranging will be used. |
| 7398 | * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non trigger based | 7493 | * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non-trigger-based |
| 7399 | * ranging measurement (flag) | 7494 | * ranging measurement (flag) |
| 7400 | * This attribute and %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED are | 7495 | * This attribute and %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED are |
| 7401 | * mutually exclusive. | 7496 | * mutually exclusive. |
| @@ -7473,7 +7568,7 @@ enum nl80211_peer_measurement_ftm_failure_reasons { · 71 unmodified lines | |||
| 7473 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS: number of FTM Request frames | 7568 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS: number of FTM Request frames |
| 7474 | * transmitted (u32, optional) | 7569 | * transmitted (u32, optional) |
| 7475 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES: number of FTM Request frames | 7570 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES: number of FTM Request frames |
| 7476 | * that were acknowleged (u32, optional) | 7571 | * that were acknowledged (u32, optional) |
| 7477 | * @NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME: retry time received from the | 7572 | * @NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME: retry time received from the |
| 7478 | * busy peer (u32, seconds) | 7573 | * busy peer (u32, seconds) |
| 7479 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP: actual number of bursts exponent | 7574 | * @NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP: actual number of bursts exponent |
| @@ -0,0 +1,31 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef __UAPI_LINUX_NSM_H | ||
| 7 | #define __UAPI_LINUX_NSM_H | ||
| 8 | |||
| 9 | #include <linux/ioctl.h> | ||
| 10 | #include <linux/types.h> | ||
| 11 | |||
| 12 | #define NSM_MAGIC 0x0A | ||
| 13 | |||
| 14 | #define NSM_REQUEST_MAX_SIZE 0x1000 | ||
| 15 | #define NSM_RESPONSE_MAX_SIZE 0x3000 | ||
| 16 | |||
| 17 | struct nsm_iovec { | ||
| 18 | __u64 addr; /* Virtual address of target buffer */ | ||
| 19 | __u64 len; /* Length of target buffer */ | ||
| 20 | }; | ||
| 21 | |||
| 22 | /* Raw NSM message. Only available with CAP_SYS_ADMIN. */ | ||
| 23 | struct nsm_raw { | ||
| 24 | /* Request from user */ | ||
| 25 | struct nsm_iovec request; | ||
| 26 | /* Response to user */ | ||
| 27 | struct nsm_iovec response; | ||
| 28 | }; | ||
| 29 | #define NSM_IOCTL_RAW _IOWR(NSM_MAGIC, 0x0, struct nsm_raw) | ||
| 30 | |||
| 31 | #endif /* __UAPI_LINUX_NSM_H */ | ||
| @@ -11,7 +11,8 @@ · 10 unmodified lines | |||
| 11 | #define __UAPI_LINUX_PCITEST_H | 11 | #define __UAPI_LINUX_PCITEST_H |
| 12 | 12 | ||
| 13 | #define PCITEST_BAR _IO('P', 0x1) | 13 | #define PCITEST_BAR _IO('P', 0x1) |
| 14 | #define PCITEST_LEGACY_IRQ _IO('P', 0x2) | 14 | #define PCITEST_INTX_IRQ _IO('P', 0x2) |
| 15 | #define PCITEST_LEGACY_IRQ PCITEST_INTX_IRQ | ||
| 15 | #define PCITEST_MSI _IOW('P', 0x3, int) | 16 | #define PCITEST_MSI _IOW('P', 0x3, int) |
| 16 | #define PCITEST_WRITE _IOW('P', 0x4, unsigned long) | 17 | #define PCITEST_WRITE _IOW('P', 0x4, unsigned long) |
| 17 | #define PCITEST_READ _IOW('P', 0x5, unsigned long) | 18 | #define PCITEST_READ _IOW('P', 0x5, unsigned long) |
| @@ -204,6 +204,8 @@ enum perf_branch_sample_type_shift { · 203 unmodified lines | |||
| 204 | 204 | ||
| 205 | PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT = 18, /* save privilege mode */ | 205 | PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT = 18, /* save privilege mode */ |
| 206 | 206 | ||
| 207 | PERF_SAMPLE_BRANCH_COUNTERS_SHIFT = 19, /* save occurrences of events on a branch */ | ||
| 208 | |||
| 207 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ | 209 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ |
| 208 | }; | 210 | }; |
| 209 | 211 | ||
| @@ -235,6 +237,8 @@ enum perf_branch_sample_type { · 25 unmodified lines | |||
| 235 | 237 | ||
| 236 | PERF_SAMPLE_BRANCH_PRIV_SAVE = 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, | 238 | PERF_SAMPLE_BRANCH_PRIV_SAVE = 1U << PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT, |
| 237 | 239 | ||
| 240 | PERF_SAMPLE_BRANCH_COUNTERS = 1U << PERF_SAMPLE_BRANCH_COUNTERS_SHIFT, | ||
| 241 | |||
| 238 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | 242 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, |
| 239 | }; | 243 | }; |
| 240 | 244 | ||
| @@ -982,6 +986,12 @@ enum perf_event_type { · 741 unmodified lines | |||
| 982 | * { u64 nr; | 986 | * { u64 nr; |
| 983 | * { u64 hw_idx; } && PERF_SAMPLE_BRANCH_HW_INDEX | 987 | * { u64 hw_idx; } && PERF_SAMPLE_BRANCH_HW_INDEX |
| 984 | * { u64 from, to, flags } lbr[nr]; | 988 | * { u64 from, to, flags } lbr[nr]; |
| 989 | * # | ||
| 990 | * # The format of the counters is decided by the | ||
| 991 | * # "branch_counter_nr" and "branch_counter_width", | ||
| 992 | * # which are defined in the ABI. | ||
| 993 | * # | ||
| 994 | * { u64 counters; } cntr[nr] && PERF_SAMPLE_BRANCH_COUNTERS | ||
| 985 | * } && PERF_SAMPLE_BRANCH_STACK | 995 | * } && PERF_SAMPLE_BRANCH_STACK |
| 986 | * | 996 | * |
| 987 | * { u64 abi; # enum perf_sample_regs_abi | 997 | * { u64 abi; # enum perf_sample_regs_abi |
| @@ -1427,6 +1437,9 @@ struct perf_branch_entry { · 439 unmodified lines | |||
| 1427 | reserved:31; | 1437 | reserved:31; |
| 1428 | }; | 1438 | }; |
| 1429 | 1439 | ||
| 1440 | /* Size of used info bits in struct perf_branch_entry */ | ||
| 1441 | #define PERF_BRANCH_ENTRY_INFO_BITS_MAX 33 | ||
| 1442 | |||
| 1430 | union perf_sample_weight { | 1443 | union perf_sample_weight { |
| 1431 | __u64 full; | 1444 | __u64 full; |
| 1432 | #if defined(__LITTLE_ENDIAN_BITFIELD) | 1445 | #if defined(__LITTLE_ENDIAN_BITFIELD) |
| @@ -99,7 +99,7 @@ enum { · 98 unmodified lines | |||
| 99 | * versions. | 99 | * versions. |
| 100 | */ | 100 | */ |
| 101 | #define TCA_ACT_GACT 5 | 101 | #define TCA_ACT_GACT 5 |
| 102 | #define TCA_ACT_IPT 6 | 102 | #define TCA_ACT_IPT 6 /* obsoleted, can be reused */ |
| 103 | #define TCA_ACT_PEDIT 7 | 103 | #define TCA_ACT_PEDIT 7 |
| 104 | #define TCA_ACT_MIRRED 8 | 104 | #define TCA_ACT_MIRRED 8 |
| 105 | #define TCA_ACT_NAT 9 | 105 | #define TCA_ACT_NAT 9 |
| @@ -120,7 +120,7 @@ enum tca_id { · 14 unmodified lines | |||
| 120 | TCA_ID_UNSPEC = 0, | 120 | TCA_ID_UNSPEC = 0, |
| 121 | TCA_ID_POLICE = 1, | 121 | TCA_ID_POLICE = 1, |
| 122 | TCA_ID_GACT = TCA_ACT_GACT, | 122 | TCA_ID_GACT = TCA_ACT_GACT, |
| 123 | TCA_ID_IPT = TCA_ACT_IPT, | 123 | TCA_ID_IPT = TCA_ACT_IPT, /* Obsoleted, can be reused */ |
| 124 | TCA_ID_PEDIT = TCA_ACT_PEDIT, | 124 | TCA_ID_PEDIT = TCA_ACT_PEDIT, |
| 125 | TCA_ID_MIRRED = TCA_ACT_MIRRED, | 125 | TCA_ID_MIRRED = TCA_ACT_MIRRED, |
| 126 | TCA_ID_NAT = TCA_ACT_NAT, | 126 | TCA_ID_NAT = TCA_ACT_NAT, |
| @@ -280,37 +280,6 @@ struct tc_u32_pcnt { · 153 unmodified lines | |||
| 280 | 280 | ||
| 281 | #define TC_U32_MAXDEPTH 8 | 281 | #define TC_U32_MAXDEPTH 8 |
| 282 | 282 | ||
| 283 | |||
| 284 | /* RSVP filter */ | ||
| 285 | |||
| 286 | enum { | ||
| 287 | TCA_RSVP_UNSPEC, | ||
| 288 | TCA_RSVP_CLASSID, | ||
| 289 | TCA_RSVP_DST, | ||
| 290 | TCA_RSVP_SRC, | ||
| 291 | TCA_RSVP_PINFO, | ||
| 292 | TCA_RSVP_POLICE, | ||
| 293 | TCA_RSVP_ACT, | ||
| 294 | __TCA_RSVP_MAX | ||
| 295 | }; | ||
| 296 | |||
| 297 | #define TCA_RSVP_MAX (__TCA_RSVP_MAX - 1 ) | ||
| 298 | |||
| 299 | struct tc_rsvp_gpi { | ||
| 300 | __u32 key; | ||
| 301 | __u32 mask; | ||
| 302 | int offset; | ||
| 303 | }; | ||
| 304 | |||
| 305 | struct tc_rsvp_pinfo { | ||
| 306 | struct tc_rsvp_gpi dpi; | ||
| 307 | struct tc_rsvp_gpi spi; | ||
| 308 | __u8 protocol; | ||
| 309 | __u8 tunnelid; | ||
| 310 | __u8 tunnelhdr; | ||
| 311 | __u8 pad; | ||
| 312 | }; | ||
| 313 | |||
| 314 | /* ROUTE filter */ | 283 | /* ROUTE filter */ |
| 315 | 284 | ||
| 316 | enum { | 285 | enum { |
| @@ -341,22 +310,6 @@ enum { · 24 unmodified lines | |||
| 341 | 310 | ||
| 342 | #define TCA_FW_MAX (__TCA_FW_MAX - 1) | 311 | #define TCA_FW_MAX (__TCA_FW_MAX - 1) |
| 343 | 312 | ||
| 344 | /* TC index filter */ | ||
| 345 | |||
| 346 | enum { | ||
| 347 | TCA_TCINDEX_UNSPEC, | ||
| 348 | TCA_TCINDEX_HASH, | ||
| 349 | TCA_TCINDEX_MASK, | ||
| 350 | TCA_TCINDEX_SHIFT, | ||
| 351 | TCA_TCINDEX_FALL_THROUGH, | ||
| 352 | TCA_TCINDEX_CLASSID, | ||
| 353 | TCA_TCINDEX_POLICE, | ||
| 354 | TCA_TCINDEX_ACT, | ||
| 355 | __TCA_TCINDEX_MAX | ||
| 356 | }; | ||
| 357 | |||
| 358 | #define TCA_TCINDEX_MAX (__TCA_TCINDEX_MAX - 1) | ||
| 359 | |||
| 360 | /* Flow filter */ | 313 | /* Flow filter */ |
| 361 | 314 | ||
| 362 | enum { | 315 | enum { |
| @@ -477,115 +477,6 @@ enum { · 476 unmodified lines | |||
| 477 | 477 | ||
| 478 | #define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) | 478 | #define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) |
| 479 | 479 | ||
| 480 | |||
| 481 | /* CBQ section */ | ||
| 482 | |||
| 483 | #define TC_CBQ_MAXPRIO 8 | ||
| 484 | #define TC_CBQ_MAXLEVEL 8 | ||
| 485 | #define TC_CBQ_DEF_EWMA 5 | ||
| 486 | |||
| 487 | struct tc_cbq_lssopt { | ||
| 488 | unsigned char change; | ||
| 489 | unsigned char flags; | ||
| 490 | #define TCF_CBQ_LSS_BOUNDED 1 | ||
| 491 | #define TCF_CBQ_LSS_ISOLATED 2 | ||
| 492 | unsigned char ewma_log; | ||
| 493 | unsigned char level; | ||
| 494 | #define TCF_CBQ_LSS_FLAGS 1 | ||
| 495 | #define TCF_CBQ_LSS_EWMA 2 | ||
| 496 | #define TCF_CBQ_LSS_MAXIDLE 4 | ||
| 497 | #define TCF_CBQ_LSS_MINIDLE 8 | ||
| 498 | #define TCF_CBQ_LSS_OFFTIME 0x10 | ||
| 499 | #define TCF_CBQ_LSS_AVPKT 0x20 | ||
| 500 | __u32 maxidle; | ||
| 501 | __u32 minidle; | ||
| 502 | __u32 offtime; | ||
| 503 | __u32 avpkt; | ||
| 504 | }; | ||
| 505 | |||
| 506 | struct tc_cbq_wrropt { | ||
| 507 | unsigned char flags; | ||
| 508 | unsigned char priority; | ||
| 509 | unsigned char cpriority; | ||
| 510 | unsigned char __reserved; | ||
| 511 | __u32 allot; | ||
| 512 | __u32 weight; | ||
| 513 | }; | ||
| 514 | |||
| 515 | struct tc_cbq_ovl { | ||
| 516 | unsigned char strategy; | ||
| 517 | #define TC_CBQ_OVL_CLASSIC 0 | ||
| 518 | #define TC_CBQ_OVL_DELAY 1 | ||
| 519 | #define TC_CBQ_OVL_LOWPRIO 2 | ||
| 520 | #define TC_CBQ_OVL_DROP 3 | ||
| 521 | #define TC_CBQ_OVL_RCLASSIC 4 | ||
| 522 | unsigned char priority2; | ||
| 523 | __u16 pad; | ||
| 524 | __u32 penalty; | ||
| 525 | }; | ||
| 526 | |||
| 527 | struct tc_cbq_police { | ||
| 528 | unsigned char police; | ||
| 529 | unsigned char __res1; | ||
| 530 | unsigned short __res2; | ||
| 531 | }; | ||
| 532 | |||
| 533 | struct tc_cbq_fopt { | ||
| 534 | __u32 split; | ||
| 535 | __u32 defmap; | ||
| 536 | __u32 defchange; | ||
| 537 | }; | ||
| 538 | |||
| 539 | struct tc_cbq_xstats { | ||
| 540 | __u32 borrows; | ||
| 541 | __u32 overactions; | ||
| 542 | __s32 avgidle; | ||
| 543 | __s32 undertime; | ||
| 544 | }; | ||
| 545 | |||
| 546 | enum { | ||
| 547 | TCA_CBQ_UNSPEC, | ||
| 548 | TCA_CBQ_LSSOPT, | ||
| 549 | TCA_CBQ_WRROPT, | ||
| 550 | TCA_CBQ_FOPT, | ||
| 551 | TCA_CBQ_OVL_STRATEGY, | ||
| 552 | TCA_CBQ_RATE, | ||
| 553 | TCA_CBQ_RTAB, | ||
| 554 | TCA_CBQ_POLICE, | ||
| 555 | __TCA_CBQ_MAX, | ||
| 556 | }; | ||
| 557 | |||
| 558 | #define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1) | ||
| 559 | |||
| 560 | /* dsmark section */ | ||
| 561 | |||
| 562 | enum { | ||
| 563 | TCA_DSMARK_UNSPEC, | ||
| 564 | TCA_DSMARK_INDICES, | ||
| 565 | TCA_DSMARK_DEFAULT_INDEX, | ||
| 566 | TCA_DSMARK_SET_TC_INDEX, | ||
| 567 | TCA_DSMARK_MASK, | ||
| 568 | TCA_DSMARK_VALUE, | ||
| 569 | __TCA_DSMARK_MAX, | ||
| 570 | }; | ||
| 571 | |||
| 572 | #define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1) | ||
| 573 | |||
| 574 | /* ATM section */ | ||
| 575 | |||
| 576 | enum { | ||
| 577 | TCA_ATM_UNSPEC, | ||
| 578 | TCA_ATM_FD, /* file/socket descriptor */ | ||
| 579 | TCA_ATM_PTR, /* pointer to descriptor - later */ | ||
| 580 | TCA_ATM_HDR, /* LL header */ | ||
| 581 | TCA_ATM_EXCESS, /* excess traffic class (0 for CLP) */ | ||
| 582 | TCA_ATM_ADDR, /* PVC address (for output only) */ | ||
| 583 | TCA_ATM_STATE, /* VC state (ATM_VS_*; for output only) */ | ||
| 584 | __TCA_ATM_MAX, | ||
| 585 | }; | ||
| 586 | |||
| 587 | #define TCA_ATM_MAX (__TCA_ATM_MAX - 1) | ||
| 588 | |||
| 589 | /* Network emulator */ | 480 | /* Network emulator */ |
| 590 | 481 | ||
| 591 | enum { | 482 | enum { |
| @@ -2,15 +2,11 @@ · 1 unmodified line | |||
| 2 | /* | 2 | /* |
| 3 | md_p.h : physical layout of Linux RAID devices | 3 | md_p.h : physical layout of Linux RAID devices |
| 4 | Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman | 4 | Copyright (C) 1996-98 Ingo Molnar, Gadi Oxman |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | |||
| 11 | You should have received a copy of the GNU General Public License | ||
| 12 | (for example /usr/src/linux/COPYING); if not, write to the Free | ||
| 13 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 14 | */ | 10 | */ |
| 15 | 11 | ||
| 16 | #ifndef _MD_P_H | 12 | #ifndef _MD_P_H |
| @@ -237,7 +233,7 @@ struct mdp_superblock_1 { · 220 unmodified lines | |||
| 237 | char set_name[32]; /* set and interpreted by user-space */ | 233 | char set_name[32]; /* set and interpreted by user-space */ |
| 238 | 234 | ||
| 239 | __le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/ | 235 | __le64 ctime; /* lo 40 bits are seconds, top 24 are microseconds or 0*/ |
| 240 | __le32 level; /* -4 (multipath), -1 (linear), 0,1,4,5 */ | 236 | __le32 level; /* 0,1,4,5 */ |
| 241 | __le32 layout; /* only for raid5 and raid10 currently */ | 237 | __le32 layout; /* only for raid5 and raid10 currently */ |
| 242 | __le64 size; /* used size of component devices, in 512byte sectors */ | 238 | __le64 size; /* used size of component devices, in 512byte sectors */ |
| 243 | 239 | ||
| @@ -2,15 +2,11 @@ · 1 unmodified line | |||
| 2 | /* | 2 | /* |
| 3 | md_u.h : user <=> kernel API between Linux raidtools and RAID drivers | 3 | md_u.h : user <=> kernel API between Linux raidtools and RAID drivers |
| 4 | Copyright (C) 1998 Ingo Molnar | 4 | Copyright (C) 1998 Ingo Molnar |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| 8 | the Free Software Foundation; either version 2, or (at your option) | 8 | the Free Software Foundation; either version 2, or (at your option) |
| 9 | any later version. | 9 | any later version. |
| 10 | |||
| 11 | You should have received a copy of the GNU General Public License | ||
| 12 | (for example /usr/src/linux/COPYING); if not, write to the Free | ||
| 13 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 14 | */ | 10 | */ |
| 15 | 11 | ||
| 16 | #ifndef _UAPI_MD_U_H | 12 | #ifndef _UAPI_MD_U_H |
| @@ -107,11 +103,6 @@ typedef struct mdu_array_info_s { · 90 unmodified lines | |||
| 107 | 103 | ||
| 108 | } mdu_array_info_t; | 104 | } mdu_array_info_t; |
| 109 | 105 | ||
| 110 | /* non-obvious values for 'level' */ | ||
| 111 | #define LEVEL_MULTIPATH (-4) | ||
| 112 | #define LEVEL_LINEAR (-1) | ||
| 113 | #define LEVEL_FAULTY (-5) | ||
| 114 | |||
| 115 | /* we need a value for 'no level specified' and 0 | 106 | /* we need a value for 'no level specified' and 0 |
| 116 | * means 'raid0', so we need something else. This is | 107 | * means 'raid0', so we need something else. This is |
| 117 | * for internal use only | 108 | * for internal use only |
| @@ -2,7 +2,7 @@ · 1 unmodified line | |||
| 2 | #ifndef _UAPI_LINUX_RESOURCE_H | 2 | #ifndef _UAPI_LINUX_RESOURCE_H |
| 3 | #define _UAPI_LINUX_RESOURCE_H | 3 | #define _UAPI_LINUX_RESOURCE_H |
| 4 | 4 | ||
| 5 | #include <linux/time.h> | 5 | #include <linux/time_types.h> |
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | 7 | ||
| 8 | /* | 8 | /* |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | |||
| 11 | #ifndef _UAPI_LINUX_SERIAL_H | 11 | #ifndef _UAPI_LINUX_SERIAL_H |
| 12 | #define _UAPI_LINUX_SERIAL_H | 12 | #define _UAPI_LINUX_SERIAL_H |
| 13 | 13 | ||
| 14 | #include <linux/const.h> | ||
| 14 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 15 | 16 | ||
| 16 | #include <linux/tty_flags.h> | 17 | #include <linux/tty_flags.h> |
| @@ -137,17 +138,19 @@ struct serial_icounter_struct { · 120 unmodified lines | |||
| 137 | * * %SER_RS485_ADDRB - Enable RS485 addressing mode. | 138 | * * %SER_RS485_ADDRB - Enable RS485 addressing mode. |
| 138 | * * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB. | 139 | * * %SER_RS485_ADDR_RECV - Receive address filter (enables @addr_recv). Requires %SER_RS485_ADDRB. |
| 139 | * * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB. | 140 | * * %SER_RS485_ADDR_DEST - Destination address (enables @addr_dest). Requires %SER_RS485_ADDRB. |
| 141 | * * %SER_RS485_MODE_RS422 - Enable RS422. Requires %SER_RS485_ENABLED. | ||
| 140 | */ | 142 | */ |
| 141 | struct serial_rs485 { | 143 | struct serial_rs485 { |
| 142 | __u32 flags; | 144 | __u32 flags; |
| 143 | #define SER_RS485_ENABLED (1 << 0) | 145 | #define SER_RS485_ENABLED _BITUL(0) |
| 144 | #define SER_RS485_RTS_ON_SEND (1 << 1) | 146 | #define SER_RS485_RTS_ON_SEND _BITUL(1) |
| 145 | #define SER_RS485_RTS_AFTER_SEND (1 << 2) | 147 | #define SER_RS485_RTS_AFTER_SEND _BITUL(2) |
| 146 | #define SER_RS485_RX_DURING_TX (1 << 4) | 148 | #define SER_RS485_RX_DURING_TX _BITUL(3) |
| 147 | #define SER_RS485_TERMINATE_BUS (1 << 5) | 149 | #define SER_RS485_TERMINATE_BUS _BITUL(4) |
| 148 | #define SER_RS485_ADDRB (1 << 6) | 150 | #define SER_RS485_ADDRB _BITUL(5) |
| 149 | #define SER_RS485_ADDR_RECV (1 << 7) | 151 | #define SER_RS485_ADDR_RECV _BITUL(6) |
| 150 | #define SER_RS485_ADDR_DEST (1 << 8) | 152 | #define SER_RS485_ADDR_DEST _BITUL(7) |
| 153 | #define SER_RS485_MODE_RS422 _BITUL(8) | ||
| 151 | 154 | ||
| 152 | __u32 delay_rts_before_send; | 155 | __u32 delay_rts_before_send; |
| 153 | __u32 delay_rts_after_send; | 156 | __u32 delay_rts_after_send; |
| @@ -160,6 +160,8 @@ enum { · 159 unmodified lines | |||
| 160 | SMC_NLA_LGR_D_CHID, /* u16 */ | 160 | SMC_NLA_LGR_D_CHID, /* u16 */ |
| 161 | SMC_NLA_LGR_D_PAD, /* flag */ | 161 | SMC_NLA_LGR_D_PAD, /* flag */ |
| 162 | SMC_NLA_LGR_D_V2_COMMON, /* nest */ | 162 | SMC_NLA_LGR_D_V2_COMMON, /* nest */ |
| 163 | SMC_NLA_LGR_D_EXT_GID, /* u64 */ | ||
| 164 | SMC_NLA_LGR_D_PEER_EXT_GID, /* u64 */ | ||
| 163 | __SMC_NLA_LGR_D_MAX, | 165 | __SMC_NLA_LGR_D_MAX, |
| 164 | SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1 | 166 | SMC_NLA_LGR_D_MAX = __SMC_NLA_LGR_D_MAX - 1 |
| 165 | }; | 167 | }; |
| @@ -107,6 +107,8 @@ struct smcd_diag_dmbinfo { /* SMC-D Socket internals */ · 106 unmodified lines | |||
| 107 | __aligned_u64 my_gid; /* My GID */ | 107 | __aligned_u64 my_gid; /* My GID */ |
| 108 | __aligned_u64 token; /* Token of DMB */ | 108 | __aligned_u64 token; /* Token of DMB */ |
| 109 | __aligned_u64 peer_token; /* Token of remote DMBE */ | 109 | __aligned_u64 peer_token; /* Token of remote DMBE */ |
| 110 | __aligned_u64 peer_gid_ext; /* Peer GID (extended part) */ | ||
| 111 | __aligned_u64 my_gid_ext; /* My GID (extended part) */ | ||
| 110 | }; | 112 | }; |
| 111 | 113 | ||
| 112 | #endif /* _UAPI_SMC_DIAG_H_ */ | 114 | #endif /* _UAPI_SMC_DIAG_H_ */ |
| @@ -154,6 +154,7 @@ struct statx { · 153 unmodified lines | |||
| 154 | #define STATX_BTIME 0x00000800U /* Want/got stx_btime */ | 154 | #define STATX_BTIME 0x00000800U /* Want/got stx_btime */ |
| 155 | #define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */ | 155 | #define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */ |
| 156 | #define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */ | 156 | #define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */ |
| 157 | #define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */ | ||
| 157 | 158 | ||
| 158 | #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */ | 159 | #define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */ |
| 159 | 160 | ||
| @@ -27,7 +27,7 @@ · 26 unmodified lines | |||
| 27 | union { \ | 27 | union { \ |
| 28 | struct { MEMBERS } ATTRS; \ | 28 | struct { MEMBERS } ATTRS; \ |
| 29 | struct TAG { MEMBERS } ATTRS NAME; \ | 29 | struct TAG { MEMBERS } ATTRS NAME; \ |
| 30 | } | 30 | } ATTRS |
| 31 | 31 | ||
| 32 | #ifdef __cplusplus | 32 | #ifdef __cplusplus |
| 33 | /* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */ | 33 | /* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */ |
| @@ -1,20 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef __LINUX_TC_IPT_H | ||
| 3 | #define __LINUX_TC_IPT_H | ||
| 4 | |||
| 5 | #include <linux/pkt_cls.h> | ||
| 6 | |||
| 7 | enum { | ||
| 8 | TCA_IPT_UNSPEC, | ||
| 9 | TCA_IPT_TABLE, | ||
| 10 | TCA_IPT_HOOK, | ||
| 11 | TCA_IPT_INDEX, | ||
| 12 | TCA_IPT_CNT, | ||
| 13 | TCA_IPT_TM, | ||
| 14 | TCA_IPT_TARG, | ||
| 15 | TCA_IPT_PAD, | ||
| 16 | __TCA_IPT_MAX | ||
| 17 | }; | ||
| 18 | #define TCA_IPT_MAX (__TCA_IPT_MAX - 1) | ||
| 19 | |||
| 20 | #endif | ||
| @@ -21,6 +21,7 @@ enum { · 20 unmodified lines | |||
| 21 | TCA_MIRRED_TM, | 21 | TCA_MIRRED_TM, |
| 22 | TCA_MIRRED_PARMS, | 22 | TCA_MIRRED_PARMS, |
| 23 | TCA_MIRRED_PAD, | 23 | TCA_MIRRED_PAD, |
| 24 | TCA_MIRRED_BLOCKID, | ||
| 24 | __TCA_MIRRED_MAX | 25 | __TCA_MIRRED_MAX |
| 25 | }; | 26 | }; |
| 26 | #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) | 27 | #define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) |
| @@ -0,0 +1,19 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * THine THP7312 user space header file. | ||
| 4 | * | ||
| 5 | * Copyright (C) 2021 THine Electronics, Inc. | ||
| 6 | * Copyright (C) 2023 Ideas on Board Oy | ||
| 7 | */ | ||
| 8 | |||
| 9 | #ifndef __UAPI_THP7312_H_ | ||
| 10 | #define __UAPI_THP7312_H_ | ||
| 11 | |||
| 12 | #include <linux/v4l2-controls.h> | ||
| 13 | |||
| 14 | #define V4L2_CID_THP7312_LOW_LIGHT_COMPENSATION (V4L2_CID_USER_THP7312_BASE + 0x01) | ||
| 15 | #define V4L2_CID_THP7312_AUTO_FOCUS_METHOD (V4L2_CID_USER_THP7312_BASE + 0x02) | ||
| 16 | #define V4L2_CID_THP7312_NOISE_REDUCTION_AUTO (V4L2_CID_USER_THP7312_BASE + 0x03) | ||
| 17 | #define V4L2_CID_THP7312_NOISE_REDUCTION_ABSOLUTE (V4L2_CID_USER_THP7312_BASE + 0x04) | ||
| 18 | |||
| 19 | #endif /* __UAPI_THP7312_H_ */ | ||
| @@ -73,8 +73,10 @@ struct usb_os_desc_header { · 72 unmodified lines | |||
| 73 | struct usb_ext_compat_desc { | 73 | struct usb_ext_compat_desc { |
| 74 | __u8 bFirstInterfaceNumber; | 74 | __u8 bFirstInterfaceNumber; |
| 75 | __u8 Reserved1; | 75 | __u8 Reserved1; |
| 76 | __u8 CompatibleID[8]; | 76 | __struct_group(/* no tag */, IDs, /* no attrs */, |
| 77 | __u8 SubCompatibleID[8]; | 77 | __u8 CompatibleID[8]; |
| 78 | __u8 SubCompatibleID[8]; | ||
| 79 | ); | ||
| 78 | __u8 Reserved2[6]; | 80 | __u8 Reserved2[6]; |
| 79 | }; | 81 | }; |
| 80 | 82 | ||
| @@ -41,7 +41,8 @@ · 40 unmodified lines | |||
| 41 | UFFD_FEATURE_WP_HUGETLBFS_SHMEM | \ | 41 | UFFD_FEATURE_WP_HUGETLBFS_SHMEM | \ |
| 42 | UFFD_FEATURE_WP_UNPOPULATED | \ | 42 | UFFD_FEATURE_WP_UNPOPULATED | \ |
| 43 | UFFD_FEATURE_POISON | \ | 43 | UFFD_FEATURE_POISON | \ |
| 44 | UFFD_FEATURE_WP_ASYNC) | 44 | UFFD_FEATURE_WP_ASYNC | \ |
| 45 | UFFD_FEATURE_MOVE) | ||
| 45 | #define UFFD_API_IOCTLS \ | 46 | #define UFFD_API_IOCTLS \ |
| 46 | ((__u64)1 << _UFFDIO_REGISTER | \ | 47 | ((__u64)1 << _UFFDIO_REGISTER | \ |
| 47 | (__u64)1 << _UFFDIO_UNREGISTER | \ | 48 | (__u64)1 << _UFFDIO_UNREGISTER | \ |
| @@ -50,6 +51,7 @@ · 2 unmodified lines | |||
| 50 | ((__u64)1 << _UFFDIO_WAKE | \ | 51 | ((__u64)1 << _UFFDIO_WAKE | \ |
| 51 | (__u64)1 << _UFFDIO_COPY | \ | 52 | (__u64)1 << _UFFDIO_COPY | \ |
| 52 | (__u64)1 << _UFFDIO_ZEROPAGE | \ | 53 | (__u64)1 << _UFFDIO_ZEROPAGE | \ |
| 54 | (__u64)1 << _UFFDIO_MOVE | \ | ||
| 53 | (__u64)1 << _UFFDIO_WRITEPROTECT | \ | 55 | (__u64)1 << _UFFDIO_WRITEPROTECT | \ |
| 54 | (__u64)1 << _UFFDIO_CONTINUE | \ | 56 | (__u64)1 << _UFFDIO_CONTINUE | \ |
| 55 | (__u64)1 << _UFFDIO_POISON) | 57 | (__u64)1 << _UFFDIO_POISON) |
| @@ -73,6 +75,7 @@ · 17 unmodified lines | |||
| 73 | #define _UFFDIO_WAKE (0x02) | 75 | #define _UFFDIO_WAKE (0x02) |
| 74 | #define _UFFDIO_COPY (0x03) | 76 | #define _UFFDIO_COPY (0x03) |
| 75 | #define _UFFDIO_ZEROPAGE (0x04) | 77 | #define _UFFDIO_ZEROPAGE (0x04) |
| 78 | #define _UFFDIO_MOVE (0x05) | ||
| 76 | #define _UFFDIO_WRITEPROTECT (0x06) | 79 | #define _UFFDIO_WRITEPROTECT (0x06) |
| 77 | #define _UFFDIO_CONTINUE (0x07) | 80 | #define _UFFDIO_CONTINUE (0x07) |
| 78 | #define _UFFDIO_POISON (0x08) | 81 | #define _UFFDIO_POISON (0x08) |
| @@ -92,6 +95,8 @@ · 13 unmodified lines | |||
| 92 | struct uffdio_copy) | 95 | struct uffdio_copy) |
| 93 | #define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, \ | 96 | #define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, \ |
| 94 | struct uffdio_zeropage) | 97 | struct uffdio_zeropage) |
| 98 | #define UFFDIO_MOVE _IOWR(UFFDIO, _UFFDIO_MOVE, \ | ||
| 99 | struct uffdio_move) | ||
| 95 | #define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \ | 100 | #define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \ |
| 96 | struct uffdio_writeprotect) | 101 | struct uffdio_writeprotect) |
| 97 | #define UFFDIO_CONTINUE _IOWR(UFFDIO, _UFFDIO_CONTINUE, \ | 102 | #define UFFDIO_CONTINUE _IOWR(UFFDIO, _UFFDIO_CONTINUE, \ |
| @@ -222,6 +227,9 @@ struct uffdio_api { · 124 unmodified lines | |||
| 222 | * asynchronous mode is supported in which the write fault is | 227 | * asynchronous mode is supported in which the write fault is |
| 223 | * automatically resolved and write-protection is un-set. | 228 | * automatically resolved and write-protection is un-set. |
| 224 | * It implies UFFD_FEATURE_WP_UNPOPULATED. | 229 | * It implies UFFD_FEATURE_WP_UNPOPULATED. |
| 230 | * | ||
| 231 | * UFFD_FEATURE_MOVE indicates that the kernel supports moving an | ||
| 232 | * existing page contents from userspace. | ||
| 225 | */ | 233 | */ |
| 226 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) | 234 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) |
| 227 | #define UFFD_FEATURE_EVENT_FORK (1<<1) | 235 | #define UFFD_FEATURE_EVENT_FORK (1<<1) |
| @@ -239,6 +247,7 @@ struct uffdio_api { · 11 unmodified lines | |||
| 239 | #define UFFD_FEATURE_WP_UNPOPULATED (1<<13) | 247 | #define UFFD_FEATURE_WP_UNPOPULATED (1<<13) |
| 240 | #define UFFD_FEATURE_POISON (1<<14) | 248 | #define UFFD_FEATURE_POISON (1<<14) |
| 241 | #define UFFD_FEATURE_WP_ASYNC (1<<15) | 249 | #define UFFD_FEATURE_WP_ASYNC (1<<15) |
| 250 | #define UFFD_FEATURE_MOVE (1<<16) | ||
| 242 | __u64 features; | 251 | __u64 features; |
| 243 | 252 | ||
| 244 | __u64 ioctls; | 253 | __u64 ioctls; |
| @@ -347,6 +356,24 @@ struct uffdio_poison { · 102 unmodified lines | |||
| 347 | __s64 updated; | 356 | __s64 updated; |
| 348 | }; | 357 | }; |
| 349 | 358 | ||
| 359 | struct uffdio_move { | ||
| 360 | __u64 dst; | ||
| 361 | __u64 src; | ||
| 362 | __u64 len; | ||
| 363 | /* | ||
| 364 | * Especially if used to atomically remove memory from the | ||
| 365 | * address space the wake on the dst range is not needed. | ||
| 366 | */ | ||
| 367 | #define UFFDIO_MOVE_MODE_DONTWAKE ((__u64)1<<0) | ||
| 368 | #define UFFDIO_MOVE_MODE_ALLOW_SRC_HOLES ((__u64)1<<1) | ||
| 369 | __u64 mode; | ||
| 370 | /* | ||
| 371 | * "move" is written by the ioctl and must be at the end: the | ||
| 372 | * copy_from_user will not read the last 8 bytes. | ||
| 373 | */ | ||
| 374 | __s64 move; | ||
| 375 | }; | ||
| 376 | |||
| 350 | /* | 377 | /* |
| 351 | * Flags for the userfaultfd(2) system call itself. | 378 | * Flags for the userfaultfd(2) system call itself. |
| 352 | */ | 379 | */ |
| @@ -209,6 +209,12 @@ enum v4l2_colorfx { · 208 unmodified lines | |||
| 209 | */ | 209 | */ |
| 210 | #define V4L2_CID_USER_NPCM_BASE (V4L2_CID_USER_BASE + 0x11b0) | 210 | #define V4L2_CID_USER_NPCM_BASE (V4L2_CID_USER_BASE + 0x11b0) |
| 211 | 211 | ||
| 212 | /* | ||
| 213 | * The base for THine THP7312 driver controls. | ||
| 214 | * We reserve 32 controls for this driver. | ||
| 215 | */ | ||
| 216 | #define V4L2_CID_USER_THP7312_BASE (V4L2_CID_USER_BASE + 0x11c0) | ||
| 217 | |||
| 212 | /* MPEG-class control IDs */ | 218 | /* MPEG-class control IDs */ |
| 213 | /* The MPEG controls are applicable to all codec controls | 219 | /* The MPEG controls are applicable to all codec controls |
| 214 | * and the 'MPEG' part of the define is historical */ | 220 | * and the 'MPEG' part of the define is historical */ |
| @@ -116,13 +116,15 @@ struct v4l2_subdev_frame_size_enum { · 115 unmodified lines | |||
| 116 | * @pad: pad number, as reported by the media API | 116 | * @pad: pad number, as reported by the media API |
| 117 | * @interval: frame interval in seconds | 117 | * @interval: frame interval in seconds |
| 118 | * @stream: stream number, defined in subdev routing | 118 | * @stream: stream number, defined in subdev routing |
| 119 | * @which: interval type (from enum v4l2_subdev_format_whence) | ||
| 119 | * @reserved: drivers and applications must zero this array | 120 | * @reserved: drivers and applications must zero this array |
| 120 | */ | 121 | */ |
| 121 | struct v4l2_subdev_frame_interval { | 122 | struct v4l2_subdev_frame_interval { |
| 122 | __u32 pad; | 123 | __u32 pad; |
| 123 | struct v4l2_fract interval; | 124 | struct v4l2_fract interval; |
| 124 | __u32 stream; | 125 | __u32 stream; |
| 125 | __u32 reserved[8]; | 126 | __u32 which; |
| 127 | __u32 reserved[7]; | ||
| 126 | }; | 128 | }; |
| 127 | 129 | ||
| 128 | /** | 130 | /** |
| @@ -133,7 +135,7 @@ struct v4l2_subdev_frame_interval { · 4 unmodified lines | |||
| 133 | * @width: frame width in pixels | 135 | * @width: frame width in pixels |
| 134 | * @height: frame height in pixels | 136 | * @height: frame height in pixels |
| 135 | * @interval: frame interval in seconds | 137 | * @interval: frame interval in seconds |
| 136 | * @which: format type (from enum v4l2_subdev_format_whence) | 138 | * @which: interval type (from enum v4l2_subdev_format_whence) |
| 137 | * @stream: stream number, defined in subdev routing | 139 | * @stream: stream number, defined in subdev routing |
| 138 | * @reserved: drivers and applications must zero this array | 140 | * @reserved: drivers and applications must zero this array |
| 139 | */ | 141 | */ |
| @@ -239,7 +241,14 @@ struct v4l2_subdev_routing { · 99 unmodified lines | |||
| 239 | * set (which is the default), the 'stream' fields will be forced to 0 by the | 241 | * set (which is the default), the 'stream' fields will be forced to 0 by the |
| 240 | * kernel. | 242 | * kernel. |
| 241 | */ | 243 | */ |
| 242 | #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1U << 0) | 244 | #define V4L2_SUBDEV_CLIENT_CAP_STREAMS (1ULL << 0) |
| 245 | |||
| 246 | /* | ||
| 247 | * The client is aware of the struct v4l2_subdev_frame_interval which field. If | ||
| 248 | * this is not set (which is the default), the which field is forced to | ||
| 249 | * V4L2_SUBDEV_FORMAT_ACTIVE by the kernel. | ||
| 250 | */ | ||
| 251 | #define V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH (1ULL << 1) | ||
| 243 | 252 | ||
| 244 | /** | 253 | /** |
| 245 | * struct v4l2_subdev_client_capability - Capabilities of the client accessing | 254 | * struct v4l2_subdev_client_capability - Capabilities of the client accessing |
| @@ -1219,6 +1219,7 @@ enum vfio_device_mig_state { · 1218 unmodified lines | |||
| 1219 | VFIO_DEVICE_STATE_RUNNING_P2P = 5, | 1219 | VFIO_DEVICE_STATE_RUNNING_P2P = 5, |
| 1220 | VFIO_DEVICE_STATE_PRE_COPY = 6, | 1220 | VFIO_DEVICE_STATE_PRE_COPY = 6, |
| 1221 | VFIO_DEVICE_STATE_PRE_COPY_P2P = 7, | 1221 | VFIO_DEVICE_STATE_PRE_COPY_P2P = 7, |
| 1222 | VFIO_DEVICE_STATE_NR, | ||
| 1222 | }; | 1223 | }; |
| 1223 | 1224 | ||
| 1224 | /** | 1225 | /** |
| @@ -1035,6 +1035,7 @@ struct v4l2_requestbuffers { · 1034 unmodified lines | |||
| 1035 | #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4) | 1035 | #define V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS (1 << 4) |
| 1036 | #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5) | 1036 | #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5) |
| 1037 | #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6) | 1037 | #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6) |
| 1038 | #define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS (1 << 7) | ||
| 1038 | 1039 | ||
| 1039 | /** | 1040 | /** |
| 1040 | * struct v4l2_plane - plane info for multi-planar buffers | 1041 | * struct v4l2_plane - plane info for multi-planar buffers |
| @@ -1816,7 +1817,7 @@ struct v4l2_ext_control { · 775 unmodified lines | |||
| 1816 | __s64 __user *p_s64; | 1817 | __s64 __user *p_s64; |
| 1817 | struct v4l2_area __user *p_area; | 1818 | struct v4l2_area __user *p_area; |
| 1818 | struct v4l2_ctrl_h264_sps __user *p_h264_sps; | 1819 | struct v4l2_ctrl_h264_sps __user *p_h264_sps; |
| 1819 | struct v4l2_ctrl_h264_pps *p_h264_pps; | 1820 | struct v4l2_ctrl_h264_pps __user *p_h264_pps; |
| 1820 | struct v4l2_ctrl_h264_scaling_matrix __user *p_h264_scaling_matrix; | 1821 | struct v4l2_ctrl_h264_scaling_matrix __user *p_h264_scaling_matrix; |
| 1821 | struct v4l2_ctrl_h264_pred_weights __user *p_h264_pred_weights; | 1822 | struct v4l2_ctrl_h264_pred_weights __user *p_h264_pred_weights; |
| 1822 | struct v4l2_ctrl_h264_slice_params __user *p_h264_slice_params; | 1823 | struct v4l2_ctrl_h264_slice_params __user *p_h264_slice_params; |
| @@ -1837,6 +1838,8 @@ struct v4l2_ext_control { · 14 unmodified lines | |||
| 1837 | struct v4l2_ctrl_av1_tile_group_entry __user *p_av1_tile_group_entry; | 1838 | struct v4l2_ctrl_av1_tile_group_entry __user *p_av1_tile_group_entry; |
| 1838 | struct v4l2_ctrl_av1_frame __user *p_av1_frame; | 1839 | struct v4l2_ctrl_av1_frame __user *p_av1_frame; |
| 1839 | struct v4l2_ctrl_av1_film_grain __user *p_av1_film_grain; | 1840 | struct v4l2_ctrl_av1_film_grain __user *p_av1_film_grain; |
| 1841 | struct v4l2_ctrl_hdr10_cll_info __user *p_hdr10_cll_info; | ||
| 1842 | struct v4l2_ctrl_hdr10_mastering_display __user *p_hdr10_mastering_display; | ||
| 1840 | void __user *ptr; | 1843 | void __user *ptr; |
| 1841 | }; | 1844 | }; |
| 1842 | } __attribute__ ((packed)); | 1845 | } __attribute__ ((packed)); |
| @@ -2605,6 +2608,9 @@ struct v4l2_dbg_chip_info { · 762 unmodified lines | |||
| 2605 | * @flags: additional buffer management attributes (ignored unless the | 2608 | * @flags: additional buffer management attributes (ignored unless the |
| 2606 | * queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability | 2609 | * queue has V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS capability |
| 2607 | * and configured for MMAP streaming I/O). | 2610 | * and configured for MMAP streaming I/O). |
| 2611 | * @max_num_buffers: if V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS capability flag is set | ||
| 2612 | * this field indicate the maximum possible number of buffers | ||
| 2613 | * for this queue. | ||
| 2608 | * @reserved: future extensions | 2614 | * @reserved: future extensions |
| 2609 | */ | 2615 | */ |
| 2610 | struct v4l2_create_buffers { | 2616 | struct v4l2_create_buffers { |
| @@ -2614,7 +2620,8 @@ struct v4l2_create_buffers { · 3 unmodified lines | |||
| 2614 | struct v4l2_format format; | 2620 | struct v4l2_format format; |
| 2615 | __u32 capabilities; | 2621 | __u32 capabilities; |
| 2616 | __u32 flags; | 2622 | __u32 flags; |
| 2617 | __u32 reserved[6]; | 2623 | __u32 max_num_buffers; |
| 2624 | __u32 reserved[5]; | ||
| 2618 | }; | 2625 | }; |
| 2619 | 2626 | ||
| 2620 | /* | 2627 | /* |
| @@ -52,7 +52,7 @@ · 51 unmodified lines | |||
| 52 | * rest are per-device feature bits. | 52 | * rest are per-device feature bits. |
| 53 | */ | 53 | */ |
| 54 | #define VIRTIO_TRANSPORT_F_START 28 | 54 | #define VIRTIO_TRANSPORT_F_START 28 |
| 55 | #define VIRTIO_TRANSPORT_F_END 41 | 55 | #define VIRTIO_TRANSPORT_F_END 42 |
| 56 | 56 | ||
| 57 | #ifndef VIRTIO_CONFIG_NO_LEGACY | 57 | #ifndef VIRTIO_CONFIG_NO_LEGACY |
| 58 | /* Do we get callbacks when the ring is completely used, even if we've | 58 | /* Do we get callbacks when the ring is completely used, even if we've |
| @@ -114,4 +114,10 @@ · 55 unmodified lines | |||
| 114 | * This feature indicates that the driver can reset a queue individually. | 114 | * This feature indicates that the driver can reset a queue individually. |
| 115 | */ | 115 | */ |
| 116 | #define VIRTIO_F_RING_RESET 40 | 116 | #define VIRTIO_F_RING_RESET 40 |
| 117 | |||
| 118 | /* | ||
| 119 | * This feature indicates that the device support administration virtqueues. | ||
| 120 | */ | ||
| 121 | #define VIRTIO_F_ADMIN_VQ 41 | ||
| 122 | |||
| 117 | #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ | 123 | #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */ |
| @@ -175,6 +175,9 @@ struct virtio_pci_modern_common_cfg { · 174 unmodified lines | |||
| 175 | 175 | ||
| 176 | __le16 queue_notify_data; /* read-write */ | 176 | __le16 queue_notify_data; /* read-write */ |
| 177 | __le16 queue_reset; /* read-write */ | 177 | __le16 queue_reset; /* read-write */ |
| 178 | |||
| 179 | __le16 admin_queue_index; /* read-only */ | ||
| 180 | __le16 admin_queue_num; /* read-only */ | ||
| 178 | }; | 181 | }; |
| 179 | 182 | ||
| 180 | /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ | 183 | /* Fields in VIRTIO_PCI_CAP_PCI_CFG: */ |
| @@ -215,7 +218,72 @@ struct virtio_pci_cfg_cap { · 34 unmodified lines | |||
| 215 | #define VIRTIO_PCI_COMMON_Q_USEDHI 52 | 218 | #define VIRTIO_PCI_COMMON_Q_USEDHI 52 |
| 216 | #define VIRTIO_PCI_COMMON_Q_NDATA 56 | 219 | #define VIRTIO_PCI_COMMON_Q_NDATA 56 |
| 217 | #define VIRTIO_PCI_COMMON_Q_RESET 58 | 220 | #define VIRTIO_PCI_COMMON_Q_RESET 58 |
| 221 | #define VIRTIO_PCI_COMMON_ADM_Q_IDX 60 | ||
| 222 | #define VIRTIO_PCI_COMMON_ADM_Q_NUM 62 | ||
| 218 | 223 | ||
| 219 | #endif /* VIRTIO_PCI_NO_MODERN */ | 224 | #endif /* VIRTIO_PCI_NO_MODERN */ |
| 220 | 225 | ||
| 226 | /* Admin command status. */ | ||
| 227 | #define VIRTIO_ADMIN_STATUS_OK 0 | ||
| 228 | |||
| 229 | /* Admin command opcode. */ | ||
| 230 | #define VIRTIO_ADMIN_CMD_LIST_QUERY 0x0 | ||
| 231 | #define VIRTIO_ADMIN_CMD_LIST_USE 0x1 | ||
| 232 | |||
| 233 | /* Admin command group type. */ | ||
| 234 | #define VIRTIO_ADMIN_GROUP_TYPE_SRIOV 0x1 | ||
| 235 | |||
| 236 | /* Transitional device admin command. */ | ||
| 237 | #define VIRTIO_ADMIN_CMD_LEGACY_COMMON_CFG_WRITE 0x2 | ||
| 238 | #define VIRTIO_ADMIN_CMD_LEGACY_COMMON_CFG_READ 0x3 | ||
| 239 | #define VIRTIO_ADMIN_CMD_LEGACY_DEV_CFG_WRITE 0x4 | ||
| 240 | #define VIRTIO_ADMIN_CMD_LEGACY_DEV_CFG_READ 0x5 | ||
| 241 | #define VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO 0x6 | ||
| 242 | |||
| 243 | struct __packed virtio_admin_cmd_hdr { | ||
| 244 | __le16 opcode; | ||
| 245 | /* | ||
| 246 | * 1 - SR-IOV | ||
| 247 | * 2-65535 - reserved | ||
| 248 | */ | ||
| 249 | __le16 group_type; | ||
| 250 | /* Unused, reserved for future extensions. */ | ||
| 251 | __u8 reserved1[12]; | ||
| 252 | __le64 group_member_id; | ||
| 253 | }; | ||
| 254 | |||
| 255 | struct __packed virtio_admin_cmd_status { | ||
| 256 | __le16 status; | ||
| 257 | __le16 status_qualifier; | ||
| 258 | /* Unused, reserved for future extensions. */ | ||
| 259 | __u8 reserved2[4]; | ||
| 260 | }; | ||
| 261 | |||
| 262 | struct __packed virtio_admin_cmd_legacy_wr_data { | ||
| 263 | __u8 offset; /* Starting offset of the register(s) to write. */ | ||
| 264 | __u8 reserved[7]; | ||
| 265 | __u8 registers[]; | ||
| 266 | }; | ||
| 267 | |||
| 268 | struct __packed virtio_admin_cmd_legacy_rd_data { | ||
| 269 | __u8 offset; /* Starting offset of the register(s) to read. */ | ||
| 270 | }; | ||
| 271 | |||
| 272 | #define VIRTIO_ADMIN_CMD_NOTIFY_INFO_FLAGS_END 0 | ||
| 273 | #define VIRTIO_ADMIN_CMD_NOTIFY_INFO_FLAGS_OWNER_DEV 0x1 | ||
| 274 | #define VIRTIO_ADMIN_CMD_NOTIFY_INFO_FLAGS_OWNER_MEM 0x2 | ||
| 275 | |||
| 276 | #define VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO 4 | ||
| 277 | |||
| 278 | struct __packed virtio_admin_cmd_notify_info_data { | ||
| 279 | __u8 flags; /* 0 = end of list, 1 = owner device, 2 = member device */ | ||
| 280 | __u8 bar; /* BAR of the member or the owner device */ | ||
| 281 | __u8 padding[6]; | ||
| 282 | __le64 offset; /* Offset within bar. */ | ||
| 283 | }; | ||
| 284 | |||
| 285 | struct virtio_admin_cmd_notify_info_result { | ||
| 286 | struct virtio_admin_cmd_notify_info_data entries[VIRTIO_ADMIN_CMD_MAX_NOTIFY_INFO]; | ||
| 287 | }; | ||
| 288 | |||
| 221 | #endif | 289 | #endif |
| @@ -14,6 +14,13 @@ · 13 unmodified lines | |||
| 14 | #include <linux/virtio_ids.h> | 14 | #include <linux/virtio_ids.h> |
| 15 | #include <linux/virtio_config.h> | 15 | #include <linux/virtio_config.h> |
| 16 | 16 | ||
| 17 | /* Feature bits */ | ||
| 18 | /* guest physical address range will be indicated as shared memory region 0 */ | ||
| 19 | #define VIRTIO_PMEM_F_SHMEM_REGION 0 | ||
| 20 | |||
| 21 | /* shmid of the shared memory region corresponding to the pmem */ | ||
| 22 | #define VIRTIO_PMEM_SHMEM_REGION_ID 0 | ||
| 23 | |||
| 17 | struct virtio_pmem_config { | 24 | struct virtio_pmem_config { |
| 18 | __le64 start; | 25 | __le64 start; |
| 19 | __le64 size; | 26 | __le64 size; |
| @@ -54,6 +54,8 @@ enum { · 53 unmodified lines | |||
| 54 | BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, | 54 | BNXT_RE_UCNTX_CMASK_HAVE_MODE = 0x02ULL, |
| 55 | BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL, | 55 | BNXT_RE_UCNTX_CMASK_WC_DPI_ENABLED = 0x04ULL, |
| 56 | BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL, | 56 | BNXT_RE_UCNTX_CMASK_DBR_PACING_ENABLED = 0x08ULL, |
| 57 | BNXT_RE_UCNTX_CMASK_POW2_DISABLED = 0x10ULL, | ||
| 58 | BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40, | ||
| 57 | }; | 59 | }; |
| 58 | 60 | ||
| 59 | enum bnxt_re_wqe_mode { | 61 | enum bnxt_re_wqe_mode { |
| @@ -62,6 +64,14 @@ enum bnxt_re_wqe_mode { · 2 unmodified lines | |||
| 62 | BNXT_QPLIB_WQE_MODE_INVALID = 0x02, | 64 | BNXT_QPLIB_WQE_MODE_INVALID = 0x02, |
| 63 | }; | 65 | }; |
| 64 | 66 | ||
| 67 | enum { | ||
| 68 | BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT = 0x01, | ||
| 69 | }; | ||
| 70 | |||
| 71 | struct bnxt_re_uctx_req { | ||
| 72 | __aligned_u64 comp_mask; | ||
| 73 | }; | ||
| 74 | |||
| 65 | struct bnxt_re_uctx_resp { | 75 | struct bnxt_re_uctx_resp { |
| 66 | __u32 dev_id; | 76 | __u32 dev_id; |
| 67 | __u32 max_qp; | 77 | __u32 max_qp; |
| @@ -92,11 +102,16 @@ struct bnxt_re_cq_req { · 24 unmodified lines | |||
| 92 | __aligned_u64 cq_handle; | 102 | __aligned_u64 cq_handle; |
| 93 | }; | 103 | }; |
| 94 | 104 | ||
| 105 | enum bnxt_re_cq_mask { | ||
| 106 | BNXT_RE_CQ_TOGGLE_PAGE_SUPPORT = 0x1, | ||
| 107 | }; | ||
| 108 | |||
| 95 | struct bnxt_re_cq_resp { | 109 | struct bnxt_re_cq_resp { |
| 96 | __u32 cqid; | 110 | __u32 cqid; |
| 97 | __u32 tail; | 111 | __u32 tail; |
| 98 | __u32 phase; | 112 | __u32 phase; |
| 99 | __u32 rsvd; | 113 | __u32 rsvd; |
| 114 | __aligned_u64 comp_mask; | ||
| 100 | }; | 115 | }; |
| 101 | 116 | ||
| 102 | struct bnxt_re_resize_cq_req { | 117 | struct bnxt_re_resize_cq_req { |
| @@ -133,6 +148,7 @@ enum bnxt_re_shpg_offt { · 30 unmodified lines | |||
| 133 | enum bnxt_re_objects { | 148 | enum bnxt_re_objects { |
| 134 | BNXT_RE_OBJECT_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), | 149 | BNXT_RE_OBJECT_ALLOC_PAGE = (1U << UVERBS_ID_NS_SHIFT), |
| 135 | BNXT_RE_OBJECT_NOTIFY_DRV, | 150 | BNXT_RE_OBJECT_NOTIFY_DRV, |
| 151 | BNXT_RE_OBJECT_GET_TOGGLE_MEM, | ||
| 136 | }; | 152 | }; |
| 137 | 153 | ||
| 138 | enum bnxt_re_alloc_page_type { | 154 | enum bnxt_re_alloc_page_type { |
| @@ -161,4 +177,29 @@ enum bnxt_re_alloc_page_methods { · 22 unmodified lines | |||
| 161 | enum bnxt_re_notify_drv_methods { | 177 | enum bnxt_re_notify_drv_methods { |
| 162 | BNXT_RE_METHOD_NOTIFY_DRV = (1U << UVERBS_ID_NS_SHIFT), | 178 | BNXT_RE_METHOD_NOTIFY_DRV = (1U << UVERBS_ID_NS_SHIFT), |
| 163 | }; | 179 | }; |
| 180 | |||
| 181 | /* Toggle mem */ | ||
| 182 | |||
| 183 | enum bnxt_re_get_toggle_mem_type { | ||
| 184 | BNXT_RE_CQ_TOGGLE_MEM = 0, | ||
| 185 | BNXT_RE_SRQ_TOGGLE_MEM, | ||
| 186 | }; | ||
| 187 | |||
| 188 | enum bnxt_re_var_toggle_mem_attrs { | ||
| 189 | BNXT_RE_TOGGLE_MEM_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 190 | BNXT_RE_TOGGLE_MEM_TYPE, | ||
| 191 | BNXT_RE_TOGGLE_MEM_RES_ID, | ||
| 192 | BNXT_RE_TOGGLE_MEM_MMAP_PAGE, | ||
| 193 | BNXT_RE_TOGGLE_MEM_MMAP_OFFSET, | ||
| 194 | BNXT_RE_TOGGLE_MEM_MMAP_LENGTH, | ||
| 195 | }; | ||
| 196 | |||
| 197 | enum bnxt_re_toggle_mem_attrs { | ||
| 198 | BNXT_RE_RELEASE_TOGGLE_MEM_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 199 | }; | ||
| 200 | |||
| 201 | enum bnxt_re_toggle_mem_methods { | ||
| 202 | BNXT_RE_METHOD_GET_TOGGLE_MEM = (1U << UVERBS_ID_NS_SHIFT), | ||
| 203 | BNXT_RE_METHOD_RELEASE_TOGGLE_MEM, | ||
| 204 | }; | ||
| 164 | #endif /* __BNXT_RE_UVERBS_ABI_H__*/ | 205 | #endif /* __BNXT_RE_UVERBS_ABI_H__*/ |
| @@ -1,12 +1,13 @@ | |||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ | 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All rights reserved. | 3 | * Copyright 2018-2024 Amazon.com, Inc. or its affiliates. All rights reserved. |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef EFA_ABI_USER_H | 6 | #ifndef EFA_ABI_USER_H |
| 7 | #define EFA_ABI_USER_H | 7 | #define EFA_ABI_USER_H |
| 8 | 8 | ||
| 9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
| 10 | #include <rdma/ib_user_ioctl_cmds.h> | ||
| 10 | 11 | ||
| 11 | /* | 12 | /* |
| 12 | * Increment this value if any changes that break userspace ABI | 13 | * Increment this value if any changes that break userspace ABI |
| @@ -134,4 +135,22 @@ struct efa_ibv_ex_query_device_resp { · 121 unmodified lines | |||
| 134 | __u32 device_caps; | 135 | __u32 device_caps; |
| 135 | }; | 136 | }; |
| 136 | 137 | ||
| 138 | enum { | ||
| 139 | EFA_QUERY_MR_VALIDITY_RECV_IC_ID = 1 << 0, | ||
| 140 | EFA_QUERY_MR_VALIDITY_RDMA_READ_IC_ID = 1 << 1, | ||
| 141 | EFA_QUERY_MR_VALIDITY_RDMA_RECV_IC_ID = 1 << 2, | ||
| 142 | }; | ||
| 143 | |||
| 144 | enum efa_query_mr_attrs { | ||
| 145 | EFA_IB_ATTR_QUERY_MR_HANDLE = (1U << UVERBS_ID_NS_SHIFT), | ||
| 146 | EFA_IB_ATTR_QUERY_MR_RESP_IC_ID_VALIDITY, | ||
| 147 | EFA_IB_ATTR_QUERY_MR_RESP_RECV_IC_ID, | ||
| 148 | EFA_IB_ATTR_QUERY_MR_RESP_RDMA_READ_IC_ID, | ||
| 149 | EFA_IB_ATTR_QUERY_MR_RESP_RDMA_RECV_IC_ID, | ||
| 150 | }; | ||
| 151 | |||
| 152 | enum efa_mr_methods { | ||
| 153 | EFA_IB_METHOD_MR_QUERY = (1U << UVERBS_ID_NS_SHIFT), | ||
| 154 | }; | ||
| 155 | |||
| 137 | #endif /* EFA_ABI_USER_H */ | 156 | #endif /* EFA_ABI_USER_H */ |
| @@ -125,4 +125,9 @@ struct hns_roce_ib_alloc_pd_resp { · 124 unmodified lines | |||
| 125 | __u32 pdn; | 125 | __u32 pdn; |
| 126 | }; | 126 | }; |
| 127 | 127 | ||
| 128 | struct hns_roce_ib_create_ah_resp { | ||
| 129 | __u8 dmac[6]; | ||
| 130 | __u8 reserved[2]; | ||
| 131 | }; | ||
| 132 | |||
| 128 | #endif /* HNS_ABI_USER_H */ | 133 | #endif /* HNS_ABI_USER_H */ |
| @@ -37,6 +37,7 @@ · 36 unmodified lines | |||
| 37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
| 38 | #include <linux/if_ether.h> /* For ETH_ALEN. */ | 38 | #include <linux/if_ether.h> /* For ETH_ALEN. */ |
| 39 | #include <rdma/ib_user_ioctl_verbs.h> | 39 | #include <rdma/ib_user_ioctl_verbs.h> |
| 40 | #include <rdma/mlx5_user_ioctl_verbs.h> | ||
| 40 | 41 | ||
| 41 | enum { | 42 | enum { |
| 42 | MLX5_QP_FLAG_SIGNATURE = 1 << 0, | 43 | MLX5_QP_FLAG_SIGNATURE = 1 << 0, |
| @@ -275,6 +276,7 @@ struct mlx5_ib_query_device_resp { · 232 unmodified lines | |||
| 275 | __u32 tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */ | 276 | __u32 tunnel_offloads_caps; /* enum mlx5_ib_tunnel_offloads */ |
| 276 | struct mlx5_ib_dci_streams_caps dci_streams_caps; | 277 | struct mlx5_ib_dci_streams_caps dci_streams_caps; |
| 277 | __u16 reserved; | 278 | __u16 reserved; |
| 279 | struct mlx5_ib_uapi_reg reg_c0; | ||
| 278 | }; | 280 | }; |
| 279 | 281 | ||
| 280 | enum mlx5_ib_create_cq_flags { | 282 | enum mlx5_ib_create_cq_flags { |
| @@ -64,6 +64,7 @@ enum mlx5_ib_uapi_dm_type { · 63 unmodified lines | |||
| 64 | MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM, | 64 | MLX5_IB_UAPI_DM_TYPE_STEERING_SW_ICM, |
| 65 | MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM, | 65 | MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_SW_ICM, |
| 66 | MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_PATTERN_SW_ICM, | 66 | MLX5_IB_UAPI_DM_TYPE_HEADER_MODIFY_PATTERN_SW_ICM, |
| 67 | MLX5_IB_UAPI_DM_TYPE_ENCAP_SW_ICM, | ||
| 67 | }; | 68 | }; |
| 68 | 69 | ||
| 69 | enum mlx5_ib_uapi_devx_create_event_channel_flags { | 70 | enum mlx5_ib_uapi_devx_create_event_channel_flags { |
| @@ -0,0 +1,90 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Regulator uapi header | ||
| 4 | * | ||
| 5 | * Author: Naresh Solanki <Naresh.Solanki@9elements.com> | ||
| 6 | */ | ||
| 7 | |||
| 8 | #ifndef _UAPI_REGULATOR_H | ||
| 9 | #define _UAPI_REGULATOR_H | ||
| 10 | |||
| 11 | #ifdef __KERNEL__ | ||
| 12 | #include <linux/types.h> | ||
| 13 | #else | ||
| 14 | #include <stdint.h> | ||
| 15 | #endif | ||
| 16 | |||
| 17 | /* | ||
| 18 | * Regulator notifier events. | ||
| 19 | * | ||
| 20 | * UNDER_VOLTAGE Regulator output is under voltage. | ||
| 21 | * OVER_CURRENT Regulator output current is too high. | ||
| 22 | * REGULATION_OUT Regulator output is out of regulation. | ||
| 23 | * FAIL Regulator output has failed. | ||
| 24 | * OVER_TEMP Regulator over temp. | ||
| 25 | * FORCE_DISABLE Regulator forcibly shut down by software. | ||
| 26 | * VOLTAGE_CHANGE Regulator voltage changed. | ||
| 27 | * Data passed is old voltage cast to (void *). | ||
| 28 | * DISABLE Regulator was disabled. | ||
| 29 | * PRE_VOLTAGE_CHANGE Regulator is about to have voltage changed. | ||
| 30 | * Data passed is "struct pre_voltage_change_data" | ||
| 31 | * ABORT_VOLTAGE_CHANGE Regulator voltage change failed for some reason. | ||
| 32 | * Data passed is old voltage cast to (void *). | ||
| 33 | * PRE_DISABLE Regulator is about to be disabled | ||
| 34 | * ABORT_DISABLE Regulator disable failed for some reason | ||
| 35 | * | ||
| 36 | * NOTE: These events can be OR'ed together when passed into handler. | ||
| 37 | */ | ||
| 38 | |||
| 39 | #define REGULATOR_EVENT_UNDER_VOLTAGE 0x01 | ||
| 40 | #define REGULATOR_EVENT_OVER_CURRENT 0x02 | ||
| 41 | #define REGULATOR_EVENT_REGULATION_OUT 0x04 | ||
| 42 | #define REGULATOR_EVENT_FAIL 0x08 | ||
| 43 | #define REGULATOR_EVENT_OVER_TEMP 0x10 | ||
| 44 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 | ||
| 45 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 | ||
| 46 | #define REGULATOR_EVENT_DISABLE 0x80 | ||
| 47 | #define REGULATOR_EVENT_PRE_VOLTAGE_CHANGE 0x100 | ||
| 48 | #define REGULATOR_EVENT_ABORT_VOLTAGE_CHANGE 0x200 | ||
| 49 | #define REGULATOR_EVENT_PRE_DISABLE 0x400 | ||
| 50 | #define REGULATOR_EVENT_ABORT_DISABLE 0x800 | ||
| 51 | #define REGULATOR_EVENT_ENABLE 0x1000 | ||
| 52 | /* | ||
| 53 | * Following notifications should be emitted only if detected condition | ||
| 54 | * is such that the HW is likely to still be working but consumers should | ||
| 55 | * take a recovery action to prevent problems escalating into errors. | ||
| 56 | */ | ||
| 57 | #define REGULATOR_EVENT_UNDER_VOLTAGE_WARN 0x2000 | ||
| 58 | #define REGULATOR_EVENT_OVER_CURRENT_WARN 0x4000 | ||
| 59 | #define REGULATOR_EVENT_OVER_VOLTAGE_WARN 0x8000 | ||
| 60 | #define REGULATOR_EVENT_OVER_TEMP_WARN 0x10000 | ||
| 61 | #define REGULATOR_EVENT_WARN_MASK 0x1E000 | ||
| 62 | |||
| 63 | struct reg_genl_event { | ||
| 64 | char reg_name[32]; | ||
| 65 | uint64_t event; | ||
| 66 | }; | ||
| 67 | |||
| 68 | /* attributes of reg_genl_family */ | ||
| 69 | enum { | ||
| 70 | REG_GENL_ATTR_UNSPEC, | ||
| 71 | REG_GENL_ATTR_EVENT, /* reg event info needed by user space */ | ||
| 72 | __REG_GENL_ATTR_MAX, | ||
| 73 | }; | ||
| 74 | |||
| 75 | #define REG_GENL_ATTR_MAX (__REG_GENL_ATTR_MAX - 1) | ||
| 76 | |||
| 77 | /* commands supported by the reg_genl_family */ | ||
| 78 | enum { | ||
| 79 | REG_GENL_CMD_UNSPEC, | ||
| 80 | REG_GENL_CMD_EVENT, /* kernel->user notifications for reg events */ | ||
| 81 | __REG_GENL_CMD_MAX, | ||
| 82 | }; | ||
| 83 | |||
| 84 | #define REG_GENL_CMD_MAX (__REG_GENL_CMD_MAX - 1) | ||
| 85 | |||
| 86 | #define REG_GENL_FAMILY_NAME "reg_event" | ||
| 87 | #define REG_GENL_VERSION 0x01 | ||
| 88 | #define REG_GENL_MCAST_GROUP_NAME "reg_mc_group" | ||
| 89 | |||
| 90 | #endif /* _UAPI_REGULATOR_H */ | ||
| @@ -491,6 +491,8 @@ struct mpi3_nvme_encapsulated_error_reply { · 490 unmodified lines | |||
| 491 | #define MPI3MR_NVME_DATA_FORMAT_PRP 0 | 491 | #define MPI3MR_NVME_DATA_FORMAT_PRP 0 |
| 492 | #define MPI3MR_NVME_DATA_FORMAT_SGL1 1 | 492 | #define MPI3MR_NVME_DATA_FORMAT_SGL1 1 |
| 493 | #define MPI3MR_NVME_DATA_FORMAT_SGL2 2 | 493 | #define MPI3MR_NVME_DATA_FORMAT_SGL2 2 |
| 494 | #define MPI3MR_NVMESGL_DATA_SEGMENT 0x00 | ||
| 495 | #define MPI3MR_NVMESGL_LAST_SEGMENT 0x03 | ||
| 494 | 496 | ||
| 495 | /* MPI3: task management related definitions */ | 497 | /* MPI3: task management related definitions */ |
| 496 | struct mpi3_scsi_task_mgmt_request { | 498 | struct mpi3_scsi_task_mgmt_request { |
| @@ -142,7 +142,7 @@ struct snd_hwdep_dsp_image { · 141 unmodified lines | |||
| 142 | * * | 142 | * * |
| 143 | *****************************************************************************/ | 143 | *****************************************************************************/ |
| 144 | 144 | ||
| 145 | #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 15) | 145 | #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 16) |
| 146 | 146 | ||
| 147 | typedef unsigned long snd_pcm_uframes_t; | 147 | typedef unsigned long snd_pcm_uframes_t; |
| 148 | typedef signed long snd_pcm_sframes_t; | 148 | typedef signed long snd_pcm_sframes_t; |
| @@ -267,7 +267,10 @@ typedef int __bitwise snd_pcm_format_t; · 118 unmodified lines | |||
| 267 | 267 | ||
| 268 | typedef int __bitwise snd_pcm_subformat_t; | 268 | typedef int __bitwise snd_pcm_subformat_t; |
| 269 | #define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0) | 269 | #define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0) |
| 270 | #define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD | 270 | #define SNDRV_PCM_SUBFORMAT_MSBITS_MAX ((__force snd_pcm_subformat_t) 1) |
| 271 | #define SNDRV_PCM_SUBFORMAT_MSBITS_20 ((__force snd_pcm_subformat_t) 2) | ||
| 272 | #define SNDRV_PCM_SUBFORMAT_MSBITS_24 ((__force snd_pcm_subformat_t) 3) | ||
| 273 | #define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_MSBITS_24 | ||
| 271 | 274 | ||
| 272 | #define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ | 275 | #define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ |
| 273 | #define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */ | 276 | #define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */ |
| @@ -0,0 +1,54 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Focusrite Scarlett 2 Protocol Driver for ALSA | ||
| 4 | * (including Scarlett 2nd Gen, 3rd Gen, 4th Gen, Clarett USB, and | ||
| 5 | * Clarett+ series products) | ||
| 6 | * | ||
| 7 | * Copyright (c) 2023 by Geoffrey D. Bennett <g at b4.vu> | ||
| 8 | */ | ||
| 9 | #ifndef __UAPI_SOUND_SCARLETT2_H | ||
| 10 | #define __UAPI_SOUND_SCARLETT2_H | ||
| 11 | |||
| 12 | #include <linux/types.h> | ||
| 13 | #include <linux/ioctl.h> | ||
| 14 | |||
| 15 | #define SCARLETT2_HWDEP_MAJOR 1 | ||
| 16 | #define SCARLETT2_HWDEP_MINOR 0 | ||
| 17 | #define SCARLETT2_HWDEP_SUBMINOR 0 | ||
| 18 | |||
| 19 | #define SCARLETT2_HWDEP_VERSION \ | ||
| 20 | ((SCARLETT2_HWDEP_MAJOR << 16) | \ | ||
| 21 | (SCARLETT2_HWDEP_MINOR << 8) | \ | ||
| 22 | SCARLETT2_HWDEP_SUBMINOR) | ||
| 23 | |||
| 24 | #define SCARLETT2_HWDEP_VERSION_MAJOR(v) (((v) >> 16) & 0xFF) | ||
| 25 | #define SCARLETT2_HWDEP_VERSION_MINOR(v) (((v) >> 8) & 0xFF) | ||
| 26 | #define SCARLETT2_HWDEP_VERSION_SUBMINOR(v) ((v) & 0xFF) | ||
| 27 | |||
| 28 | /* Get protocol version */ | ||
| 29 | #define SCARLETT2_IOCTL_PVERSION _IOR('S', 0x60, int) | ||
| 30 | |||
| 31 | /* Reboot */ | ||
| 32 | #define SCARLETT2_IOCTL_REBOOT _IO('S', 0x61) | ||
| 33 | |||
| 34 | /* Select flash segment */ | ||
| 35 | #define SCARLETT2_SEGMENT_ID_SETTINGS 0 | ||
| 36 | #define SCARLETT2_SEGMENT_ID_FIRMWARE 1 | ||
| 37 | #define SCARLETT2_SEGMENT_ID_COUNT 2 | ||
| 38 | |||
| 39 | #define SCARLETT2_IOCTL_SELECT_FLASH_SEGMENT _IOW('S', 0x62, int) | ||
| 40 | |||
| 41 | /* Erase selected flash segment */ | ||
| 42 | #define SCARLETT2_IOCTL_ERASE_FLASH_SEGMENT _IO('S', 0x63) | ||
| 43 | |||
| 44 | /* Get selected flash segment erase progress | ||
| 45 | * 1 through to num_blocks, or 255 for complete | ||
| 46 | */ | ||
| 47 | struct scarlett2_flash_segment_erase_progress { | ||
| 48 | unsigned char progress; | ||
| 49 | unsigned char num_blocks; | ||
| 50 | }; | ||
| 51 | #define SCARLETT2_IOCTL_GET_ERASE_PROGRESS \ | ||
| 52 | _IOR('S', 0x64, struct scarlett2_flash_segment_erase_progress) | ||
| 53 | |||
| 54 | #endif /* __UAPI_SOUND_SCARLETT2_H */ | ||
| @@ -35,6 +35,7 @@ · 34 unmodified lines | |||
| 35 | /* buffers */ | 35 | /* buffers */ |
| 36 | #define SOF_TKN_BUF_SIZE 100 | 36 | #define SOF_TKN_BUF_SIZE 100 |
| 37 | #define SOF_TKN_BUF_CAPS 101 | 37 | #define SOF_TKN_BUF_CAPS 101 |
| 38 | #define SOF_TKN_BUF_FLAGS 102 | ||
| 38 | 39 | ||
| 39 | /* DAI */ | 40 | /* DAI */ |
| 40 | /* Token retired with ABI 3.2, do not use for new capabilities | 41 | /* Token retired with ABI 3.2, do not use for new capabilities |
| @@ -213,4 +214,8 @@ · 172 unmodified lines | |||
| 213 | #define SOF_TKN_AMD_ACPI2S_CH 1701 | 214 | #define SOF_TKN_AMD_ACPI2S_CH 1701 |
| 214 | #define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702 | 215 | #define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702 |
| 215 | 216 | ||
| 217 | /* MICFIL PDM */ | ||
| 218 | #define SOF_TKN_IMX_MICFIL_RATE 2000 | ||
| 219 | #define SOF_TKN_IMX_MICFIL_CH 2001 | ||
| 220 | |||
| 216 | #endif | 221 | #endif |