Need MST sideband message transaction to power up/down nodes.
Showing the changes to include/uapi (71 of 11337 files). Show all
Unified · Split
| @@ -0,0 +1,34 @@ | |||
| 1 | #ifndef _ASM_GENERIC_HUGETLB_ENCODE_H_ | ||
| 2 | #define _ASM_GENERIC_HUGETLB_ENCODE_H_ | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Several system calls take a flag to request "hugetlb" huge pages. | ||
| 6 | * Without further specification, these system calls will use the | ||
| 7 | * system's default huge page size. If a system supports multiple | ||
| 8 | * huge page sizes, the desired huge page size can be specified in | ||
| 9 | * bits [26:31] of the flag arguments. The value in these 6 bits | ||
| 10 | * will encode the log2 of the huge page size. | ||
| 11 | * | ||
| 12 | * The following definitions are associated with this huge page size | ||
| 13 | * encoding in flag arguments. System call specific header files | ||
| 14 | * that use this encoding should include this file. They can then | ||
| 15 | * provide definitions based on these with their own specific prefix. | ||
| 16 | * for example: | ||
| 17 | * #define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT | ||
| 18 | */ | ||
| 19 | |||
| 20 | #define HUGETLB_FLAG_ENCODE_SHIFT 26 | ||
| 21 | #define HUGETLB_FLAG_ENCODE_MASK 0x3f | ||
| 22 | |||
| 23 | #define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 24 | #define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 25 | #define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 26 | #define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 27 | #define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 28 | #define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 29 | #define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 30 | #define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 31 | #define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 32 | #define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) | ||
| 33 | |||
| 34 | #endif /* _ASM_GENERIC_HUGETLB_ENCODE_H_ */ | ||
| @@ -58,20 +58,12 @@ · 57 unmodified lines | |||
| 58 | overrides the coredump filter bits */ | 58 | overrides the coredump filter bits */ |
| 59 | #define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag */ | 59 | #define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag */ |
| 60 | 60 | ||
| 61 | #define MADV_WIPEONFORK 18 /* Zero memory on fork, child only */ | ||
| 62 | #define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK */ | ||
| 63 | |||
| 61 | /* compatibility flags */ | 64 | /* compatibility flags */ |
| 62 | #define MAP_FILE 0 | 65 | #define MAP_FILE 0 |
| 63 | 66 | ||
| 64 | /* | ||
| 65 | * When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. | ||
| 66 | * This gives us 6 bits, which is enough until someone invents 128 bit address | ||
| 67 | * spaces. | ||
| 68 | * | ||
| 69 | * Assume these are all power of twos. | ||
| 70 | * When 0 use the default page size. | ||
| 71 | */ | ||
| 72 | #define MAP_HUGE_SHIFT 26 | ||
| 73 | #define MAP_HUGE_MASK 0x3f | ||
| 74 | |||
| 75 | #define PKEY_DISABLE_ACCESS 0x1 | 67 | #define PKEY_DISABLE_ACCESS 0x1 |
| 76 | #define PKEY_DISABLE_WRITE 0x2 | 68 | #define PKEY_DISABLE_WRITE 0x2 |
| 77 | #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ | 69 | #define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS |\ |
| @@ -151,29 +151,6 @@ typedef struct siginfo { · 150 unmodified lines | |||
| 151 | #define si_arch _sifields._sigsys._arch | 151 | #define si_arch _sifields._sigsys._arch |
| 152 | #endif | 152 | #endif |
| 153 | 153 | ||
| 154 | #ifdef __KERNEL__ | ||
| 155 | #define __SI_MASK 0xffff0000u | ||
| 156 | #define __SI_KILL (0 << 16) | ||
| 157 | #define __SI_TIMER (1 << 16) | ||
| 158 | #define __SI_POLL (2 << 16) | ||
| 159 | #define __SI_FAULT (3 << 16) | ||
| 160 | #define __SI_CHLD (4 << 16) | ||
| 161 | #define __SI_RT (5 << 16) | ||
| 162 | #define __SI_MESGQ (6 << 16) | ||
| 163 | #define __SI_SYS (7 << 16) | ||
| 164 | #define __SI_CODE(T,N) ((T) | ((N) & 0xffff)) | ||
| 165 | #else /* __KERNEL__ */ | ||
| 166 | #define __SI_KILL 0 | ||
| 167 | #define __SI_TIMER 0 | ||
| 168 | #define __SI_POLL 0 | ||
| 169 | #define __SI_FAULT 0 | ||
| 170 | #define __SI_CHLD 0 | ||
| 171 | #define __SI_RT 0 | ||
| 172 | #define __SI_MESGQ 0 | ||
| 173 | #define __SI_SYS 0 | ||
| 174 | #define __SI_CODE(T,N) (N) | ||
| 175 | #endif /* __KERNEL__ */ | ||
| 176 | |||
| 177 | /* | 154 | /* |
| 178 | * si_code values | 155 | * si_code values |
| 179 | * Digital reserves positive values for kernel-generated signals. | 156 | * Digital reserves positive values for kernel-generated signals. |
| @@ -181,8 +158,8 @@ typedef struct siginfo { · 1 unmodified line | |||
| 181 | #define SI_USER 0 /* sent by kill, sigsend, raise */ | 158 | #define SI_USER 0 /* sent by kill, sigsend, raise */ |
| 182 | #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ | 159 | #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ |
| 183 | #define SI_QUEUE -1 /* sent by sigqueue */ | 160 | #define SI_QUEUE -1 /* sent by sigqueue */ |
| 184 | #define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */ | 161 | #define SI_TIMER -2 /* sent by timer expiration */ |
| 185 | #define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) /* sent by real time mesq state change */ | 162 | #define SI_MESGQ -3 /* sent by real time mesq state change */ |
| 186 | #define SI_ASYNCIO -4 /* sent by AIO completion */ | 163 | #define SI_ASYNCIO -4 /* sent by AIO completion */ |
| 187 | #define SI_SIGIO -5 /* sent by queued SIGIO */ | 164 | #define SI_SIGIO -5 /* sent by queued SIGIO */ |
| 188 | #define SI_TKILL -6 /* sent by tkill system call */ | 165 | #define SI_TKILL -6 /* sent by tkill system call */ |
| @@ -194,86 +171,86 @@ typedef struct siginfo { · 5 unmodified lines | |||
| 194 | /* | 171 | /* |
| 195 | * SIGILL si_codes | 172 | * SIGILL si_codes |
| 196 | */ | 173 | */ |
| 197 | #define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */ | 174 | #define ILL_ILLOPC 1 /* illegal opcode */ |
| 198 | #define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */ | 175 | #define ILL_ILLOPN 2 /* illegal operand */ |
| 199 | #define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */ | 176 | #define ILL_ILLADR 3 /* illegal addressing mode */ |
| 200 | #define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */ | 177 | #define ILL_ILLTRP 4 /* illegal trap */ |
| 201 | #define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */ | 178 | #define ILL_PRVOPC 5 /* privileged opcode */ |
| 202 | #define ILL_PRVREG (__SI_FAULT|6) /* privileged register */ | 179 | #define ILL_PRVREG 6 /* privileged register */ |
| 203 | #define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */ | 180 | #define ILL_COPROC 7 /* coprocessor error */ |
| 204 | #define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */ | 181 | #define ILL_BADSTK 8 /* internal stack error */ |
| 205 | #define NSIGILL 8 | 182 | #define NSIGILL 8 |
| 206 | 183 | ||
| 207 | /* | 184 | /* |
| 208 | * SIGFPE si_codes | 185 | * SIGFPE si_codes |
| 209 | */ | 186 | */ |
| 210 | #define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */ | 187 | #define FPE_INTDIV 1 /* integer divide by zero */ |
| 211 | #define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */ | 188 | #define FPE_INTOVF 2 /* integer overflow */ |
| 212 | #define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */ | 189 | #define FPE_FLTDIV 3 /* floating point divide by zero */ |
| 213 | #define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */ | 190 | #define FPE_FLTOVF 4 /* floating point overflow */ |
| 214 | #define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */ | 191 | #define FPE_FLTUND 5 /* floating point underflow */ |
| 215 | #define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */ | 192 | #define FPE_FLTRES 6 /* floating point inexact result */ |
| 216 | #define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */ | 193 | #define FPE_FLTINV 7 /* floating point invalid operation */ |
| 217 | #define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */ | 194 | #define FPE_FLTSUB 8 /* subscript out of range */ |
| 218 | #define NSIGFPE 8 | 195 | #define NSIGFPE 8 |
| 219 | 196 | ||
| 220 | /* | 197 | /* |
| 221 | * SIGSEGV si_codes | 198 | * SIGSEGV si_codes |
| 222 | */ | 199 | */ |
| 223 | #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ | 200 | #define SEGV_MAPERR 1 /* address not mapped to object */ |
| 224 | #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ | 201 | #define SEGV_ACCERR 2 /* invalid permissions for mapped object */ |
| 225 | #define SEGV_BNDERR (__SI_FAULT|3) /* failed address bound checks */ | 202 | #define SEGV_BNDERR 3 /* failed address bound checks */ |
| 226 | #define SEGV_PKUERR (__SI_FAULT|4) /* failed protection key checks */ | 203 | #define SEGV_PKUERR 4 /* failed protection key checks */ |
| 227 | #define NSIGSEGV 4 | 204 | #define NSIGSEGV 4 |
| 228 | 205 | ||
| 229 | /* | 206 | /* |
| 230 | * SIGBUS si_codes | 207 | * SIGBUS si_codes |
| 231 | */ | 208 | */ |
| 232 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | 209 | #define BUS_ADRALN 1 /* invalid address alignment */ |
| 233 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */ | 210 | #define BUS_ADRERR 2 /* non-existent physical address */ |
| 234 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | 211 | #define BUS_OBJERR 3 /* object specific hardware error */ |
| 235 | /* hardware memory error consumed on a machine check: action required */ | 212 | /* hardware memory error consumed on a machine check: action required */ |
| 236 | #define BUS_MCEERR_AR (__SI_FAULT|4) | 213 | #define BUS_MCEERR_AR 4 |
| 237 | /* hardware memory error detected in process but not consumed: action optional*/ | 214 | /* hardware memory error detected in process but not consumed: action optional*/ |
| 238 | #define BUS_MCEERR_AO (__SI_FAULT|5) | 215 | #define BUS_MCEERR_AO 5 |
| 239 | #define NSIGBUS 5 | 216 | #define NSIGBUS 5 |
| 240 | 217 | ||
| 241 | /* | 218 | /* |
| 242 | * SIGTRAP si_codes | 219 | * SIGTRAP si_codes |
| 243 | */ | 220 | */ |
| 244 | #define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */ | 221 | #define TRAP_BRKPT 1 /* process breakpoint */ |
| 245 | #define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */ | 222 | #define TRAP_TRACE 2 /* process trace trap */ |
| 246 | #define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */ | 223 | #define TRAP_BRANCH 3 /* process taken branch trap */ |
| 247 | #define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint/watchpoint */ | 224 | #define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */ |
| 248 | #define NSIGTRAP 4 | 225 | #define NSIGTRAP 4 |
| 249 | 226 | ||
| 250 | /* | 227 | /* |
| 251 | * SIGCHLD si_codes | 228 | * SIGCHLD si_codes |
| 252 | */ | 229 | */ |
| 253 | #define CLD_EXITED (__SI_CHLD|1) /* child has exited */ | 230 | #define CLD_EXITED 1 /* child has exited */ |
| 254 | #define CLD_KILLED (__SI_CHLD|2) /* child was killed */ | 231 | #define CLD_KILLED 2 /* child was killed */ |
| 255 | #define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */ | 232 | #define CLD_DUMPED 3 /* child terminated abnormally */ |
| 256 | #define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */ | 233 | #define CLD_TRAPPED 4 /* traced child has trapped */ |
| 257 | #define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */ | 234 | #define CLD_STOPPED 5 /* child has stopped */ |
| 258 | #define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */ | 235 | #define CLD_CONTINUED 6 /* stopped child has continued */ |
| 259 | #define NSIGCHLD 6 | 236 | #define NSIGCHLD 6 |
| 260 | 237 | ||
| 261 | /* | 238 | /* |
| 262 | * SIGPOLL si_codes | 239 | * SIGPOLL (or any other signal without signal specific si_codes) si_codes |
| 263 | */ | 240 | */ |
| 264 | #define POLL_IN (__SI_POLL|1) /* data input available */ | 241 | #define POLL_IN 1 /* data input available */ |
| 265 | #define POLL_OUT (__SI_POLL|2) /* output buffers available */ | 242 | #define POLL_OUT 2 /* output buffers available */ |
| 266 | #define POLL_MSG (__SI_POLL|3) /* input message available */ | 243 | #define POLL_MSG 3 /* input message available */ |
| 267 | #define POLL_ERR (__SI_POLL|4) /* i/o error */ | 244 | #define POLL_ERR 4 /* i/o error */ |
| 268 | #define POLL_PRI (__SI_POLL|5) /* high priority input available */ | 245 | #define POLL_PRI 5 /* high priority input available */ |
| 269 | #define POLL_HUP (__SI_POLL|6) /* device disconnected */ | 246 | #define POLL_HUP 6 /* device disconnected */ |
| 270 | #define NSIGPOLL 6 | 247 | #define NSIGPOLL 6 |
| 271 | 248 | ||
| 272 | /* | 249 | /* |
| 273 | * SIGSYS si_codes | 250 | * SIGSYS si_codes |
| 274 | */ | 251 | */ |
| 275 | #define SYS_SECCOMP (__SI_SYS|1) /* seccomp triggered */ | 252 | #define SYS_SECCOMP 1 /* seccomp triggered */ |
| 276 | #define NSIGSYS 1 | 253 | #define NSIGSYS 1 |
| 277 | 254 | ||
| 278 | /* | 255 | /* |
| 279 | * sigevent definitions | 256 | * sigevent definitions |
| @@ -104,4 +104,6 @@ · 103 unmodified lines | |||
| 104 | 104 | ||
| 105 | #define SO_PEERGROUPS 59 | 105 | #define SO_PEERGROUPS 59 |
| 106 | 106 | ||
| 107 | #define SO_ZEROCOPY 60 | ||
| 108 | |||
| 107 | #endif /* __ASM_GENERIC_SOCKET_H */ | 109 | #endif /* __ASM_GENERIC_SOCKET_H */ |
| @@ -87,6 +87,8 @@ extern "C" { · 86 unmodified lines | |||
| 87 | #define AMDGPU_GEM_CREATE_SHADOW (1 << 4) | 87 | #define AMDGPU_GEM_CREATE_SHADOW (1 << 4) |
| 88 | /* Flag that allocating the BO should use linear VRAM */ | 88 | /* Flag that allocating the BO should use linear VRAM */ |
| 89 | #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) | 89 | #define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) |
| 90 | /* Flag that BO is always valid in this VM */ | ||
| 91 | #define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6) | ||
| 90 | 92 | ||
| 91 | struct drm_amdgpu_gem_create_in { | 93 | struct drm_amdgpu_gem_create_in { |
| 92 | /** the requested memory size */ | 94 | /** the requested memory size */ |
| @@ -749,9 +749,9 @@ struct drm_format_modifier { · 748 unmodified lines | |||
| 749 | * If the number formats grew to 128, and formats 98-102 are | 749 | * If the number formats grew to 128, and formats 98-102 are |
| 750 | * supported with the modifier: | 750 | * supported with the modifier: |
| 751 | * | 751 | * |
| 752 | * 0x0000003c00000000 0000000000000000 | 752 | * 0x0000007c00000000 0000000000000000 |
| 753 | * ^ | 753 | * ^ |
| 754 | * |__offset = 64, formats = 0x3c00000000 | 754 | * |__offset = 64, formats = 0x7c00000000 |
| 755 | * | 755 | * |
| 756 | */ | 756 | */ |
| 757 | __u64 formats; | 757 | __u64 formats; |
| @@ -28,6 +28,7 @@ · 27 unmodified lines | |||
| 28 | #define __LINUX__AIO_ABI_H | 28 | #define __LINUX__AIO_ABI_H |
| 29 | 29 | ||
| 30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
| 31 | #include <linux/fs.h> | ||
| 31 | #include <asm/byteorder.h> | 32 | #include <asm/byteorder.h> |
| 32 | 33 | ||
| 33 | typedef __kernel_ulong_t aio_context_t; | 34 | typedef __kernel_ulong_t aio_context_t; |
| @@ -62,14 +63,6 @@ struct io_event { · 28 unmodified lines | |||
| 62 | __s64 res2; /* secondary result */ | 63 | __s64 res2; /* secondary result */ |
| 63 | }; | 64 | }; |
| 64 | 65 | ||
| 65 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) | ||
| 66 | #define PADDED(x,y) x, y | ||
| 67 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) | ||
| 68 | #define PADDED(x,y) y, x | ||
| 69 | #else | ||
| 70 | #error edit for your odd byteorder. | ||
| 71 | #endif | ||
| 72 | |||
| 73 | /* | 66 | /* |
| 74 | * we always use a 64bit off_t when communicating | 67 | * we always use a 64bit off_t when communicating |
| 75 | * with userland. its up to libraries to do the | 68 | * with userland. its up to libraries to do the |
| @@ -79,8 +72,16 @@ struct io_event { · 3 unmodified lines | |||
| 79 | struct iocb { | 72 | struct iocb { |
| 80 | /* these are internal to the kernel/libc. */ | 73 | /* these are internal to the kernel/libc. */ |
| 81 | __u64 aio_data; /* data to be returned in event's data */ | 74 | __u64 aio_data; /* data to be returned in event's data */ |
| 82 | __u32 PADDED(aio_key, aio_rw_flags); | 75 | |
| 83 | /* the kernel sets aio_key to the req # */ | 76 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
| 77 | __u32 aio_key; /* the kernel sets aio_key to the req # */ | ||
| 78 | __kernel_rwf_t aio_rw_flags; /* RWF_* flags */ | ||
| 79 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) | ||
| 80 | __kernel_rwf_t aio_rw_flags; /* RWF_* flags */ | ||
| 81 | __u32 aio_key; /* the kernel sets aio_key to the req # */ | ||
| 82 | #else | ||
| 83 | #error edit for your odd byteorder. | ||
| 84 | #endif | ||
| 84 | 85 | ||
| 85 | /* common fields */ | 86 | /* common fields */ |
| 86 | __u16 aio_lio_opcode; /* see IOCB_CMD_ above */ | 87 | __u16 aio_lio_opcode; /* see IOCB_CMD_ above */ |
| @@ -132,6 +132,7 @@ enum { · 131 unmodified lines | |||
| 132 | 132 | ||
| 133 | /* struct binder_fd_array_object - object describing an array of fds in a buffer | 133 | /* struct binder_fd_array_object - object describing an array of fds in a buffer |
| 134 | * @hdr: common header structure | 134 | * @hdr: common header structure |
| 135 | * @pad: padding to ensure correct alignment | ||
| 135 | * @num_fds: number of file descriptors in the buffer | 136 | * @num_fds: number of file descriptors in the buffer |
| 136 | * @parent: index in offset array to buffer holding the fd array | 137 | * @parent: index in offset array to buffer holding the fd array |
| 137 | * @parent_offset: start offset of fd array in the buffer | 138 | * @parent_offset: start offset of fd array in the buffer |
| @@ -152,6 +153,7 @@ enum { · 14 unmodified lines | |||
| 152 | */ | 153 | */ |
| 153 | struct binder_fd_array_object { | 154 | struct binder_fd_array_object { |
| 154 | struct binder_object_header hdr; | 155 | struct binder_object_header hdr; |
| 156 | __u32 pad; | ||
| 155 | binder_size_t num_fds; | 157 | binder_size_t num_fds; |
| 156 | binder_size_t parent; | 158 | binder_size_t parent; |
| 157 | binder_size_t parent_offset; | 159 | binder_size_t parent_offset; |
| @@ -184,6 +186,19 @@ struct binder_version { · 26 unmodified lines | |||
| 184 | #define BINDER_CURRENT_PROTOCOL_VERSION 8 | 186 | #define BINDER_CURRENT_PROTOCOL_VERSION 8 |
| 185 | #endif | 187 | #endif |
| 186 | 188 | ||
| 189 | /* | ||
| 190 | * Use with BINDER_GET_NODE_DEBUG_INFO, driver reads ptr, writes to all fields. | ||
| 191 | * Set ptr to NULL for the first call to get the info for the first node, and | ||
| 192 | * then repeat the call passing the previously returned value to get the next | ||
| 193 | * nodes. ptr will be 0 when there are no more nodes. | ||
| 194 | */ | ||
| 195 | struct binder_node_debug_info { | ||
| 196 | binder_uintptr_t ptr; | ||
| 197 | binder_uintptr_t cookie; | ||
| 198 | __u32 has_strong_ref; | ||
| 199 | __u32 has_weak_ref; | ||
| 200 | }; | ||
| 201 | |||
| 187 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) | 202 | #define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) |
| 188 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) | 203 | #define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) |
| 189 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) | 204 | #define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) |
| @@ -191,6 +206,7 @@ struct binder_version { · 1 unmodified line | |||
| 191 | #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) | 206 | #define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) |
| 192 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) | 207 | #define BINDER_THREAD_EXIT _IOW('b', 8, __s32) |
| 193 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) | 208 | #define BINDER_VERSION _IOWR('b', 9, struct binder_version) |
| 209 | #define BINDER_GET_NODE_DEBUG_INFO _IOWR('b', 11, struct binder_node_debug_info) | ||
| 194 | 210 | ||
| 195 | /* | 211 | /* |
| 196 | * NOTE: Two special error codes you should check for when calling | 212 | * NOTE: Two special error codes you should check for when calling |
| @@ -16,7 +16,7 @@ · 15 unmodified lines | |||
| 16 | #define AUTOFS_DEVICE_NAME "autofs" | 16 | #define AUTOFS_DEVICE_NAME "autofs" |
| 17 | 17 | ||
| 18 | #define AUTOFS_DEV_IOCTL_VERSION_MAJOR 1 | 18 | #define AUTOFS_DEV_IOCTL_VERSION_MAJOR 1 |
| 19 | #define AUTOFS_DEV_IOCTL_VERSION_MINOR 0 | 19 | #define AUTOFS_DEV_IOCTL_VERSION_MINOR 1 |
| 20 | 20 | ||
| 21 | #define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl) | 21 | #define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl) |
| 22 | 22 | ||
| @@ -155,8 +155,6 @@ enum { · 154 unmodified lines | |||
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int) | 157 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int) |
| 158 | #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI | ||
| 159 | #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI | ||
| 160 | #define AUTOFS_IOC_PROTOSUBVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int) | 158 | #define AUTOFS_IOC_PROTOSUBVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int) |
| 161 | #define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int) | 159 | #define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int) |
| 162 | 160 | ||
| @@ -52,6 +52,7 @@ enum blktrace_act { · 51 unmodified lines | |||
| 52 | __BLK_TA_REMAP, /* bio was remapped */ | 52 | __BLK_TA_REMAP, /* bio was remapped */ |
| 53 | __BLK_TA_ABORT, /* request aborted */ | 53 | __BLK_TA_ABORT, /* request aborted */ |
| 54 | __BLK_TA_DRV_DATA, /* driver-specific binary data */ | 54 | __BLK_TA_DRV_DATA, /* driver-specific binary data */ |
| 55 | __BLK_TA_CGROUP = 1 << 8, /* from a cgroup*/ | ||
| 55 | }; | 56 | }; |
| 56 | 57 | ||
| 57 | /* | 58 | /* |
| @@ -61,6 +62,7 @@ enum blktrace_notify { · 3 unmodified lines | |||
| 61 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ | 62 | __BLK_TN_PROCESS = 0, /* establish pid/name mapping */ |
| 62 | __BLK_TN_TIMESTAMP, /* include system clock */ | 63 | __BLK_TN_TIMESTAMP, /* include system clock */ |
| 63 | __BLK_TN_MESSAGE, /* Character string message */ | 64 | __BLK_TN_MESSAGE, /* Character string message */ |
| 65 | __BLK_TN_CGROUP = __BLK_TA_CGROUP, /* from a cgroup */ | ||
| 64 | }; | 66 | }; |
| 65 | 67 | ||
| 66 | 68 | ||
| @@ -107,6 +109,7 @@ struct blk_io_trace { · 40 unmodified lines | |||
| 107 | __u32 cpu; /* on what cpu did it happen */ | 109 | __u32 cpu; /* on what cpu did it happen */ |
| 108 | __u16 error; /* completion error */ | 110 | __u16 error; /* completion error */ |
| 109 | __u16 pdu_len; /* length of data after this trace */ | 111 | __u16 pdu_len; /* length of data after this trace */ |
| 112 | /* cgroup id will be stored here if exists */ | ||
| 110 | }; | 113 | }; |
| 111 | 114 | ||
| 112 | /* | 115 | /* |
| @@ -30,9 +30,14 @@ · 29 unmodified lines | |||
| 30 | #define BPF_FROM_LE BPF_TO_LE | 30 | #define BPF_FROM_LE BPF_TO_LE |
| 31 | #define BPF_FROM_BE BPF_TO_BE | 31 | #define BPF_FROM_BE BPF_TO_BE |
| 32 | 32 | ||
| 33 | /* jmp encodings */ | ||
| 33 | #define BPF_JNE 0x50 /* jump != */ | 34 | #define BPF_JNE 0x50 /* jump != */ |
| 35 | #define BPF_JLT 0xa0 /* LT is unsigned, '<' */ | ||
| 36 | #define BPF_JLE 0xb0 /* LE is unsigned, '<=' */ | ||
| 34 | #define BPF_JSGT 0x60 /* SGT is signed '>', GT in x86 */ | 37 | #define BPF_JSGT 0x60 /* SGT is signed '>', GT in x86 */ |
| 35 | #define BPF_JSGE 0x70 /* SGE is signed '>=', GE in x86 */ | 38 | #define BPF_JSGE 0x70 /* SGE is signed '>=', GE in x86 */ |
| 39 | #define BPF_JSLT 0xc0 /* SLT is signed, '<' */ | ||
| 40 | #define BPF_JSLE 0xd0 /* SLE is signed, '<=' */ | ||
| 36 | #define BPF_CALL 0x80 /* function call */ | 41 | #define BPF_CALL 0x80 /* function call */ |
| 37 | #define BPF_EXIT 0x90 /* function return */ | 42 | #define BPF_EXIT 0x90 /* function return */ |
| 38 | 43 | ||
| @@ -104,6 +109,8 @@ enum bpf_map_type { · 65 unmodified lines | |||
| 104 | BPF_MAP_TYPE_LPM_TRIE, | 109 | BPF_MAP_TYPE_LPM_TRIE, |
| 105 | BPF_MAP_TYPE_ARRAY_OF_MAPS, | 110 | BPF_MAP_TYPE_ARRAY_OF_MAPS, |
| 106 | BPF_MAP_TYPE_HASH_OF_MAPS, | 111 | BPF_MAP_TYPE_HASH_OF_MAPS, |
| 112 | BPF_MAP_TYPE_DEVMAP, | ||
| 113 | BPF_MAP_TYPE_SOCKMAP, | ||
| 107 | }; | 114 | }; |
| 108 | 115 | ||
| 109 | enum bpf_prog_type { | 116 | enum bpf_prog_type { |
| @@ -121,6 +128,7 @@ enum bpf_prog_type { · 11 unmodified lines | |||
| 121 | BPF_PROG_TYPE_LWT_OUT, | 128 | BPF_PROG_TYPE_LWT_OUT, |
| 122 | BPF_PROG_TYPE_LWT_XMIT, | 129 | BPF_PROG_TYPE_LWT_XMIT, |
| 123 | BPF_PROG_TYPE_SOCK_OPS, | 130 | BPF_PROG_TYPE_SOCK_OPS, |
| 131 | BPF_PROG_TYPE_SK_SKB, | ||
| 124 | }; | 132 | }; |
| 125 | 133 | ||
| 126 | enum bpf_attach_type { | 134 | enum bpf_attach_type { |
| @@ -128,6 +136,8 @@ enum bpf_attach_type { · 1 unmodified line | |||
| 128 | BPF_CGROUP_INET_EGRESS, | 136 | BPF_CGROUP_INET_EGRESS, |
| 129 | BPF_CGROUP_INET_SOCK_CREATE, | 137 | BPF_CGROUP_INET_SOCK_CREATE, |
| 130 | BPF_CGROUP_SOCK_OPS, | 138 | BPF_CGROUP_SOCK_OPS, |
| 139 | BPF_SK_SKB_STREAM_PARSER, | ||
| 140 | BPF_SK_SKB_STREAM_VERDICT, | ||
| 131 | __MAX_BPF_ATTACH_TYPE | 141 | __MAX_BPF_ATTACH_TYPE |
| 132 | }; | 142 | }; |
| 133 | 143 | ||
| @@ -153,6 +163,7 @@ enum bpf_attach_type { · 19 unmodified lines | |||
| 153 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ | 163 | #define BPF_NOEXIST 1 /* create new element if it didn't exist */ |
| 154 | #define BPF_EXIST 2 /* update existing element */ | 164 | #define BPF_EXIST 2 /* update existing element */ |
| 155 | 165 | ||
| 166 | /* flags for BPF_MAP_CREATE command */ | ||
| 156 | #define BPF_F_NO_PREALLOC (1U << 0) | 167 | #define BPF_F_NO_PREALLOC (1U << 0) |
| 157 | /* Instead of having one common LRU list in the | 168 | /* Instead of having one common LRU list in the |
| 158 | * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list | 169 | * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list |
| @@ -161,6 +172,8 @@ enum bpf_attach_type { · 2 unmodified lines | |||
| 161 | * across different LRU lists. | 172 | * across different LRU lists. |
| 162 | */ | 173 | */ |
| 163 | #define BPF_F_NO_COMMON_LRU (1U << 1) | 174 | #define BPF_F_NO_COMMON_LRU (1U << 1) |
| 175 | /* Specify numa node during map creation */ | ||
| 176 | #define BPF_F_NUMA_NODE (1U << 2) | ||
| 164 | 177 | ||
| 165 | union bpf_attr { | 178 | union bpf_attr { |
| 166 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 179 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
| @@ -168,8 +181,13 @@ union bpf_attr { · 1 unmodified line | |||
| 168 | __u32 key_size; /* size of key in bytes */ | 181 | __u32 key_size; /* size of key in bytes */ |
| 169 | __u32 value_size; /* size of value in bytes */ | 182 | __u32 value_size; /* size of value in bytes */ |
| 170 | __u32 max_entries; /* max number of entries in a map */ | 183 | __u32 max_entries; /* max number of entries in a map */ |
| 171 | __u32 map_flags; /* prealloc or not */ | 184 | __u32 map_flags; /* BPF_MAP_CREATE related |
| 185 | * flags defined above. | ||
| 186 | */ | ||
| 172 | __u32 inner_map_fd; /* fd pointing to the inner map */ | 187 | __u32 inner_map_fd; /* fd pointing to the inner map */ |
| 188 | __u32 numa_node; /* numa node (effective only if | ||
| 189 | * BPF_F_NUMA_NODE is set). | ||
| 190 | */ | ||
| 173 | }; | 191 | }; |
| 174 | 192 | ||
| 175 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ | 193 | struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ |
| @@ -344,9 +362,20 @@ union bpf_attr { · 168 unmodified lines | |||
| 344 | * int bpf_redirect(ifindex, flags) | 362 | * int bpf_redirect(ifindex, flags) |
| 345 | * redirect to another netdev | 363 | * redirect to another netdev |
| 346 | * @ifindex: ifindex of the net device | 364 | * @ifindex: ifindex of the net device |
| 347 | * @flags: bit 0 - if set, redirect to ingress instead of egress | 365 | * @flags: |
| 348 | * other bits - reserved | 366 | * cls_bpf: |
| 349 | * Return: TC_ACT_REDIRECT | 367 | * bit 0 - if set, redirect to ingress instead of egress |
| 368 | * other bits - reserved | ||
| 369 | * xdp_bpf: | ||
| 370 | * all bits - reserved | ||
| 371 | * Return: cls_bpf: TC_ACT_REDIRECT on success or TC_ACT_SHOT on error | ||
| 372 | * xdp_bfp: XDP_REDIRECT on success or XDP_ABORT on error | ||
| 373 | * int bpf_redirect_map(map, key, flags) | ||
| 374 | * redirect to endpoint in map | ||
| 375 | * @map: pointer to dev map | ||
| 376 | * @key: index in map to lookup | ||
| 377 | * @flags: -- | ||
| 378 | * Return: XDP_REDIRECT on success or XDP_ABORT on error | ||
| 350 | * | 379 | * |
| 351 | * u32 bpf_get_route_realm(skb) | 380 | * u32 bpf_get_route_realm(skb) |
| 352 | * retrieve a dst's tclassid | 381 | * retrieve a dst's tclassid |
| @@ -539,6 +568,20 @@ union bpf_attr { · 186 unmodified lines | |||
| 539 | * @mode: operation mode (enum bpf_adj_room_mode) | 568 | * @mode: operation mode (enum bpf_adj_room_mode) |
| 540 | * @flags: reserved for future use | 569 | * @flags: reserved for future use |
| 541 | * Return: 0 on success or negative error code | 570 | * Return: 0 on success or negative error code |
| 571 | * | ||
| 572 | * int bpf_sk_redirect_map(map, key, flags) | ||
| 573 | * Redirect skb to a sock in map using key as a lookup key for the | ||
| 574 | * sock in map. | ||
| 575 | * @map: pointer to sockmap | ||
| 576 | * @key: key to lookup sock in map | ||
| 577 | * @flags: reserved for future use | ||
| 578 | * Return: SK_REDIRECT | ||
| 579 | * | ||
| 580 | * int bpf_sock_map_update(skops, map, key, flags) | ||
| 581 | * @skops: pointer to bpf_sock_ops | ||
| 582 | * @map: pointer to sockmap to update | ||
| 583 | * @key: key to insert/update sock in map | ||
| 584 | * @flags: same flags as map update elem | ||
| 542 | */ | 585 | */ |
| 543 | #define __BPF_FUNC_MAPPER(FN) \ | 586 | #define __BPF_FUNC_MAPPER(FN) \ |
| 544 | FN(unspec), \ | 587 | FN(unspec), \ |
| @@ -591,7 +634,10 @@ union bpf_attr { · 46 unmodified lines | |||
| 591 | FN(get_socket_uid), \ | 634 | FN(get_socket_uid), \ |
| 592 | FN(set_hash), \ | 635 | FN(set_hash), \ |
| 593 | FN(setsockopt), \ | 636 | FN(setsockopt), \ |
| 594 | FN(skb_adjust_room), | 637 | FN(skb_adjust_room), \ |
| 638 | FN(redirect_map), \ | ||
| 639 | FN(sk_redirect_map), \ | ||
| 640 | FN(sock_map_update), \ | ||
| 595 | 641 | ||
| 596 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 642 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 597 | * function eBPF program intends to call | 643 | * function eBPF program intends to call |
| @@ -668,6 +714,15 @@ struct __sk_buff { · 70 unmodified lines | |||
| 668 | __u32 data; | 714 | __u32 data; |
| 669 | __u32 data_end; | 715 | __u32 data_end; |
| 670 | __u32 napi_id; | 716 | __u32 napi_id; |
| 717 | |||
| 718 | /* accessed by BPF_PROG_TYPE_sk_skb types */ | ||
| 719 | __u32 family; | ||
| 720 | __u32 remote_ip4; /* Stored in network byte order */ | ||
| 721 | __u32 local_ip4; /* Stored in network byte order */ | ||
| 722 | __u32 remote_ip6[4]; /* Stored in network byte order */ | ||
| 723 | __u32 local_ip6[4]; /* Stored in network byte order */ | ||
| 724 | __u32 remote_port; /* Stored in network byte order */ | ||
| 725 | __u32 local_port; /* stored in host byte order */ | ||
| 671 | }; | 726 | }; |
| 672 | 727 | ||
| 673 | struct bpf_tunnel_key { | 728 | struct bpf_tunnel_key { |
| @@ -703,20 +758,23 @@ struct bpf_sock { · 29 unmodified lines | |||
| 703 | __u32 family; | 758 | __u32 family; |
| 704 | __u32 type; | 759 | __u32 type; |
| 705 | __u32 protocol; | 760 | __u32 protocol; |
| 761 | __u32 mark; | ||
| 762 | __u32 priority; | ||
| 706 | }; | 763 | }; |
| 707 | 764 | ||
| 708 | #define XDP_PACKET_HEADROOM 256 | 765 | #define XDP_PACKET_HEADROOM 256 |
| 709 | 766 | ||
| 710 | /* User return codes for XDP prog type. | 767 | /* User return codes for XDP prog type. |
| 711 | * A valid XDP program must return one of these defined values. All other | 768 | * A valid XDP program must return one of these defined values. All other |
| 712 | * return codes are reserved for future use. Unknown return codes will result | 769 | * return codes are reserved for future use. Unknown return codes will |
| 713 | * in packet drop. | 770 | * result in packet drops and a warning via bpf_warn_invalid_xdp_action(). |
| 714 | */ | 771 | */ |
| 715 | enum xdp_action { | 772 | enum xdp_action { |
| 716 | XDP_ABORTED = 0, | 773 | XDP_ABORTED = 0, |
| 717 | XDP_DROP, | 774 | XDP_DROP, |
| 718 | XDP_PASS, | 775 | XDP_PASS, |
| 719 | XDP_TX, | 776 | XDP_TX, |
| 777 | XDP_REDIRECT, | ||
| 720 | }; | 778 | }; |
| 721 | 779 | ||
| 722 | /* user accessible metadata for XDP packet hook | 780 | /* user accessible metadata for XDP packet hook |
| @@ -727,6 +785,12 @@ struct xdp_md { · 4 unmodified lines | |||
| 727 | __u32 data_end; | 785 | __u32 data_end; |
| 728 | }; | 786 | }; |
| 729 | 787 | ||
| 788 | enum sk_action { | ||
| 789 | SK_ABORTED = 0, | ||
| 790 | SK_DROP, | ||
| 791 | SK_REDIRECT, | ||
| 792 | }; | ||
| 793 | |||
| 730 | #define BPF_TAG_SIZE 8 | 794 | #define BPF_TAG_SIZE 8 |
| 731 | 795 | ||
| 732 | struct bpf_prog_info { | 796 | struct bpf_prog_info { |
| @@ -255,13 +255,7 @@ struct btrfs_ioctl_fs_info_args { · 254 unmodified lines | |||
| 255 | #define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1) | 255 | #define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL (1ULL << 1) |
| 256 | #define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2) | 256 | #define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS (1ULL << 2) |
| 257 | #define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO (1ULL << 3) | 257 | #define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO (1ULL << 3) |
| 258 | /* | 258 | #define BTRFS_FEATURE_INCOMPAT_COMPRESS_ZSTD (1ULL << 4) |
| 259 | * some patches floated around with a second compression method | ||
| 260 | * lets save that incompat here for when they do get in | ||
| 261 | * Note we don't actually support it, we're just reserving the | ||
| 262 | * number | ||
| 263 | */ | ||
| 264 | #define BTRFS_FEATURE_INCOMPAT_COMPRESS_LZOv2 (1ULL << 4) | ||
| 265 | 259 | ||
| 266 | /* | 260 | /* |
| 267 | * older kernels tried to do bigger metadata blocks, but the | 261 | * older kernels tried to do bigger metadata blocks, but the |
| @@ -60,9 +60,13 @@ typedef struct __user_cap_data_struct { · 59 unmodified lines | |||
| 60 | #define VFS_CAP_U32_2 2 | 60 | #define VFS_CAP_U32_2 2 |
| 61 | #define XATTR_CAPS_SZ_2 (sizeof(__le32)*(1 + 2*VFS_CAP_U32_2)) | 61 | #define XATTR_CAPS_SZ_2 (sizeof(__le32)*(1 + 2*VFS_CAP_U32_2)) |
| 62 | 62 | ||
| 63 | #define XATTR_CAPS_SZ XATTR_CAPS_SZ_2 | 63 | #define VFS_CAP_REVISION_3 0x03000000 |
| 64 | #define VFS_CAP_U32 VFS_CAP_U32_2 | 64 | #define VFS_CAP_U32_3 2 |
| 65 | #define VFS_CAP_REVISION VFS_CAP_REVISION_2 | 65 | #define XATTR_CAPS_SZ_3 (sizeof(__le32)*(2 + 2*VFS_CAP_U32_3)) |
| 66 | |||
| 67 | #define XATTR_CAPS_SZ XATTR_CAPS_SZ_3 | ||
| 68 | #define VFS_CAP_U32 VFS_CAP_U32_3 | ||
| 69 | #define VFS_CAP_REVISION VFS_CAP_REVISION_3 | ||
| 66 | 70 | ||
| 67 | struct vfs_cap_data { | 71 | struct vfs_cap_data { |
| 68 | __le32 magic_etc; /* Little endian */ | 72 | __le32 magic_etc; /* Little endian */ |
| @@ -72,6 +76,18 @@ struct vfs_cap_data { · 3 unmodified lines | |||
| 72 | } data[VFS_CAP_U32]; | 76 | } data[VFS_CAP_U32]; |
| 73 | }; | 77 | }; |
| 74 | 78 | ||
| 79 | /* | ||
| 80 | * same as vfs_cap_data but with a rootid at the end | ||
| 81 | */ | ||
| 82 | struct vfs_ns_cap_data { | ||
| 83 | __le32 magic_etc; | ||
| 84 | struct { | ||
| 85 | __le32 permitted; /* Little endian */ | ||
| 86 | __le32 inheritable; /* Little endian */ | ||
| 87 | } data[VFS_CAP_U32]; | ||
| 88 | __le32 rootid; | ||
| 89 | }; | ||
| 90 | |||
| 75 | #ifndef __KERNEL__ | 91 | #ifndef __KERNEL__ |
| 76 | 92 | ||
| 77 | /* | 93 | /* |
| @@ -895,6 +895,7 @@ static inline void cec_ops_report_features(const struct cec_msg *msg, · 894 unmodified lines | |||
| 895 | *cec_version = msg->msg[2]; | 895 | *cec_version = msg->msg[2]; |
| 896 | *all_device_types = msg->msg[3]; | 896 | *all_device_types = msg->msg[3]; |
| 897 | *rc_profile = p; | 897 | *rc_profile = p; |
| 898 | *dev_features = NULL; | ||
| 898 | while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT)) | 899 | while (p < &msg->msg[14] && (*p & CEC_OP_FEAT_EXT)) |
| 899 | p++; | 900 | p++; |
| 900 | if (!(*p & CEC_OP_FEAT_EXT)) { | 901 | if (!(*p & CEC_OP_FEAT_EXT)) { |
| @@ -318,6 +318,7 @@ static inline int cec_is_unconfigured(__u16 log_addr_mask) · 317 unmodified lines | |||
| 318 | #define CEC_MODE_FOLLOWER (0x1 << 4) | 318 | #define CEC_MODE_FOLLOWER (0x1 << 4) |
| 319 | #define CEC_MODE_EXCL_FOLLOWER (0x2 << 4) | 319 | #define CEC_MODE_EXCL_FOLLOWER (0x2 << 4) |
| 320 | #define CEC_MODE_EXCL_FOLLOWER_PASSTHRU (0x3 << 4) | 320 | #define CEC_MODE_EXCL_FOLLOWER_PASSTHRU (0x3 << 4) |
| 321 | #define CEC_MODE_MONITOR_PIN (0xd << 4) | ||
| 321 | #define CEC_MODE_MONITOR (0xe << 4) | 322 | #define CEC_MODE_MONITOR (0xe << 4) |
| 322 | #define CEC_MODE_MONITOR_ALL (0xf << 4) | 323 | #define CEC_MODE_MONITOR_ALL (0xf << 4) |
| 323 | #define CEC_MODE_FOLLOWER_MSK 0xf0 | 324 | #define CEC_MODE_FOLLOWER_MSK 0xf0 |
| @@ -338,6 +339,8 @@ static inline int cec_is_unconfigured(__u16 log_addr_mask) · 14 unmodified lines | |||
| 338 | #define CEC_CAP_MONITOR_ALL (1 << 5) | 339 | #define CEC_CAP_MONITOR_ALL (1 << 5) |
| 339 | /* Hardware can use CEC only if the HDMI HPD pin is high. */ | 340 | /* Hardware can use CEC only if the HDMI HPD pin is high. */ |
| 340 | #define CEC_CAP_NEEDS_HPD (1 << 6) | 341 | #define CEC_CAP_NEEDS_HPD (1 << 6) |
| 342 | /* Hardware can monitor CEC pin transitions */ | ||
| 343 | #define CEC_CAP_MONITOR_PIN (1 << 7) | ||
| 341 | 344 | ||
| 342 | /** | 345 | /** |
| 343 | * struct cec_caps - CEC capabilities structure. | 346 | * struct cec_caps - CEC capabilities structure. |
| @@ -405,8 +408,11 @@ struct cec_log_addrs { · 61 unmodified lines | |||
| 405 | * didn't empty the message queue in time | 408 | * didn't empty the message queue in time |
| 406 | */ | 409 | */ |
| 407 | #define CEC_EVENT_LOST_MSGS 2 | 410 | #define CEC_EVENT_LOST_MSGS 2 |
| 411 | #define CEC_EVENT_PIN_CEC_LOW 3 | ||
| 412 | #define CEC_EVENT_PIN_CEC_HIGH 4 | ||
| 408 | 413 | ||
| 409 | #define CEC_EVENT_FL_INITIAL_STATE (1 << 0) | 414 | #define CEC_EVENT_FL_INITIAL_STATE (1 << 0) |
| 415 | #define CEC_EVENT_FL_DROPPED_EVENTS (1 << 1) | ||
| 410 | 416 | ||
| 411 | /** | 417 | /** |
| 412 | * struct cec_event_state_change - used when the CEC adapter changes state. | 418 | * struct cec_event_state_change - used when the CEC adapter changes state. |
| @@ -419,7 +425,7 @@ struct cec_event_state_change { · 6 unmodified lines | |||
| 419 | }; | 425 | }; |
| 420 | 426 | ||
| 421 | /** | 427 | /** |
| 422 | * struct cec_event_lost_msgs - tells you how many messages were lost due. | 428 | * struct cec_event_lost_msgs - tells you how many messages were lost. |
| 423 | * @lost_msgs: how many messages were lost. | 429 | * @lost_msgs: how many messages were lost. |
| 424 | */ | 430 | */ |
| 425 | struct cec_event_lost_msgs { | 431 | struct cec_event_lost_msgs { |
| @@ -226,4 +226,22 @@ enum devlink_dpipe_action_type { · 225 unmodified lines | |||
| 226 | DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY, | 226 | DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY, |
| 227 | }; | 227 | }; |
| 228 | 228 | ||
| 229 | enum devlink_dpipe_field_ethernet_id { | ||
| 230 | DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC, | ||
| 231 | }; | ||
| 232 | |||
| 233 | enum devlink_dpipe_field_ipv4_id { | ||
| 234 | DEVLINK_DPIPE_FIELD_IPV4_DST_IP, | ||
| 235 | }; | ||
| 236 | |||
| 237 | enum devlink_dpipe_field_ipv6_id { | ||
| 238 | DEVLINK_DPIPE_FIELD_IPV6_DST_IP, | ||
| 239 | }; | ||
| 240 | |||
| 241 | enum devlink_dpipe_header_id { | ||
| 242 | DEVLINK_DPIPE_HEADER_ETHERNET, | ||
| 243 | DEVLINK_DPIPE_HEADER_IPV4, | ||
| 244 | DEVLINK_DPIPE_HEADER_IPV6, | ||
| 245 | }; | ||
| 246 | |||
| 229 | #endif /* _UAPI_LINUX_DEVLINK_H_ */ | 247 | #endif /* _UAPI_LINUX_DEVLINK_H_ */ |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | |||
| 10 | #define _DLM_NETLINK_H | 10 | #define _DLM_NETLINK_H |
| 11 | 11 | ||
| 12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
| 13 | #include <linux/dlmconstants.h> | ||
| 13 | 14 | ||
| 14 | enum { | 15 | enum { |
| 15 | DLM_STATUS_WAITING = 1, | 16 | DLM_STATUS_WAITING = 1, |
| @@ -24,67 +24,131 @@ · 23 unmodified lines | |||
| 24 | #ifndef _DVBCA_H_ | 24 | #ifndef _DVBCA_H_ |
| 25 | #define _DVBCA_H_ | 25 | #define _DVBCA_H_ |
| 26 | 26 | ||
| 27 | /* slot interface types and info */ | 27 | /** |
| 28 | 28 | * struct ca_slot_info - CA slot interface types and info. | |
| 29 | typedef struct ca_slot_info { | 29 | * |
| 30 | int num; /* slot number */ | 30 | * @num: slot number. |
| 31 | * @type: slot type. | ||
| 32 | * @flags: flags applicable to the slot. | ||
| 33 | * | ||
| 34 | * This struct stores the CA slot information. | ||
| 35 | * | ||
| 36 | * @type can be: | ||
| 37 | * | ||
| 38 | * - %CA_CI - CI high level interface; | ||
| 39 | * - %CA_CI_LINK - CI link layer level interface; | ||
| 40 | * - %CA_CI_PHYS - CI physical layer level interface; | ||
| 41 | * - %CA_DESCR - built-in descrambler; | ||
| 42 | * - %CA_SC -simple smart card interface. | ||
| 43 | * | ||
| 44 | * @flags can be: | ||
| 45 | * | ||
| 46 | * - %CA_CI_MODULE_PRESENT - module (or card) inserted; | ||
| 47 | * - %CA_CI_MODULE_READY - module is ready for usage. | ||
| 48 | */ | ||
| 31 | 49 | ||
| 32 | int type; /* CA interface this slot supports */ | 50 | struct ca_slot_info { |
| 33 | #define CA_CI 1 /* CI high level interface */ | 51 | int num; |
| 34 | #define CA_CI_LINK 2 /* CI link layer level interface */ | 52 | int type; |
| 35 | #define CA_CI_PHYS 4 /* CI physical layer level interface */ | 53 | #define CA_CI 1 |
| 36 | #define CA_DESCR 8 /* built-in descrambler */ | 54 | #define CA_CI_LINK 2 |
| 37 | #define CA_SC 128 /* simple smart card interface */ | 55 | #define CA_CI_PHYS 4 |
| 56 | #define CA_DESCR 8 | ||
| 57 | #define CA_SC 128 | ||
| 38 | 58 | ||
| 39 | unsigned int flags; | 59 | unsigned int flags; |
| 40 | #define CA_CI_MODULE_PRESENT 1 /* module (or card) inserted */ | 60 | #define CA_CI_MODULE_PRESENT 1 |
| 41 | #define CA_CI_MODULE_READY 2 | 61 | #define CA_CI_MODULE_READY 2 |
| 42 | } ca_slot_info_t; | 62 | }; |
| 43 | |||
| 44 | 63 | ||
| 45 | /* descrambler types and info */ | ||
| 46 | 64 | ||
| 47 | typedef struct ca_descr_info { | 65 | /** |
| 48 | unsigned int num; /* number of available descramblers (keys) */ | 66 | * struct ca_descr_info - descrambler types and info. |
| 49 | unsigned int type; /* type of supported scrambling system */ | 67 | * |
| 68 | * @num: number of available descramblers (keys). | ||
| 69 | * @type: type of supported scrambling system. | ||
| 70 | * | ||
| 71 | * Identifies the number of descramblers and their type. | ||
| 72 | * | ||
| 73 | * @type can be: | ||
| 74 | * | ||
| 75 | * - %CA_ECD - European Common Descrambler (ECD) hardware; | ||
| 76 | * - %CA_NDS - Videoguard (NDS) hardware; | ||
| 77 | * - %CA_DSS - Distributed Sample Scrambling (DSS) hardware. | ||
| 78 | */ | ||
| 79 | struct ca_descr_info { | ||
| 80 | unsigned int num; | ||
| 81 | unsigned int type; | ||
| 50 | #define CA_ECD 1 | 82 | #define CA_ECD 1 |
| 51 | #define CA_NDS 2 | 83 | #define CA_NDS 2 |
| 52 | #define CA_DSS 4 | 84 | #define CA_DSS 4 |
| 53 | } ca_descr_info_t; | 85 | }; |
| 54 | 86 | ||
| 55 | typedef struct ca_caps { | 87 | /** |
| 56 | unsigned int slot_num; /* total number of CA card and module slots */ | 88 | * struct ca_caps - CA slot interface capabilities. |
| 57 | unsigned int slot_type; /* OR of all supported types */ | 89 | * |
| 58 | unsigned int descr_num; /* total number of descrambler slots (keys) */ | 90 | * @slot_num: total number of CA card and module slots. |
| 59 | unsigned int descr_type; /* OR of all supported types */ | 91 | * @slot_type: bitmap with all supported types as defined at |
| 60 | } ca_caps_t; | 92 | * &struct ca_slot_info (e. g. %CA_CI, %CA_CI_LINK, etc). |
| 93 | * @descr_num: total number of descrambler slots (keys) | ||
| 94 | * @descr_type: bitmap with all supported types as defined at | ||
| 95 | * &struct ca_descr_info (e. g. %CA_ECD, %CA_NDS, etc). | ||
| 96 | */ | ||
| 97 | struct ca_caps { | ||
| 98 | unsigned int slot_num; | ||
| 99 | unsigned int slot_type; | ||
| 100 | unsigned int descr_num; | ||
| 101 | unsigned int descr_type; | ||
| 102 | }; | ||
| 61 | 103 | ||
| 62 | /* a message to/from a CI-CAM */ | 104 | /** |
| 63 | typedef struct ca_msg { | 105 | * struct ca_msg - a message to/from a CI-CAM |
| 106 | * | ||
| 107 | * @index: unused | ||
| 108 | * @type: unused | ||
| 109 | * @length: length of the message | ||
| 110 | * @msg: message | ||
| 111 | * | ||
| 112 | * This struct carries a message to be send/received from a CI CA module. | ||
| 113 | */ | ||
| 114 | struct ca_msg { | ||
| 64 | unsigned int index; | 115 | unsigned int index; |
| 65 | unsigned int type; | 116 | unsigned int type; |
| 66 | unsigned int length; | 117 | unsigned int length; |
| 67 | unsigned char msg[256]; | 118 | unsigned char msg[256]; |
| 68 | } ca_msg_t; | 119 | }; |
| 69 | 120 | ||
| 70 | typedef struct ca_descr { | 121 | /** |
| 122 | * struct ca_descr - CA descrambler control words info | ||
| 123 | * | ||
| 124 | * @index: CA Descrambler slot | ||
| 125 | * @parity: control words parity, where 0 means even and 1 means odd | ||
| 126 | * @cw: CA Descrambler control words | ||
| 127 | */ | ||
| 128 | struct ca_descr { | ||
| 71 | unsigned int index; | 129 | unsigned int index; |
| 72 | unsigned int parity; /* 0 == even, 1 == odd */ | 130 | unsigned int parity; |
| 73 | unsigned char cw[8]; | 131 | unsigned char cw[8]; |
| 74 | } ca_descr_t; | 132 | }; |
| 75 | |||
| 76 | typedef struct ca_pid { | ||
| 77 | unsigned int pid; | ||
| 78 | int index; /* -1 == disable*/ | ||
| 79 | } ca_pid_t; | ||
| 80 | 133 | ||
| 81 | #define CA_RESET _IO('o', 128) | 134 | #define CA_RESET _IO('o', 128) |
| 82 | #define CA_GET_CAP _IOR('o', 129, ca_caps_t) | 135 | #define CA_GET_CAP _IOR('o', 129, struct ca_caps) |
| 83 | #define CA_GET_SLOT_INFO _IOR('o', 130, ca_slot_info_t) | 136 | #define CA_GET_SLOT_INFO _IOR('o', 130, struct ca_slot_info) |
| 84 | #define CA_GET_DESCR_INFO _IOR('o', 131, ca_descr_info_t) | 137 | #define CA_GET_DESCR_INFO _IOR('o', 131, struct ca_descr_info) |
| 85 | #define CA_GET_MSG _IOR('o', 132, ca_msg_t) | 138 | #define CA_GET_MSG _IOR('o', 132, struct ca_msg) |
| 86 | #define CA_SEND_MSG _IOW('o', 133, ca_msg_t) | 139 | #define CA_SEND_MSG _IOW('o', 133, struct ca_msg) |
| 87 | #define CA_SET_DESCR _IOW('o', 134, ca_descr_t) | 140 | #define CA_SET_DESCR _IOW('o', 134, struct ca_descr) |
| 88 | #define CA_SET_PID _IOW('o', 135, ca_pid_t) | 141 | |
| 142 | #if !defined(__KERNEL__) | ||
| 143 | |||
| 144 | /* This is needed for legacy userspace support */ | ||
| 145 | typedef struct ca_slot_info ca_slot_info_t; | ||
| 146 | typedef struct ca_descr_info ca_descr_info_t; | ||
| 147 | typedef struct ca_caps ca_caps_t; | ||
| 148 | typedef struct ca_msg ca_msg_t; | ||
| 149 | typedef struct ca_descr ca_descr_t; | ||
| 150 | |||
| 151 | #endif | ||
| 152 | |||
| 89 | 153 | ||
| 90 | #endif | 154 | #endif |
| @@ -32,28 +32,74 @@ · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | #define DMX_FILTER_SIZE 16 | 33 | #define DMX_FILTER_SIZE 16 |
| 34 | 34 | ||
| 35 | enum dmx_output | 35 | /** |
| 36 | { | 36 | * enum dmx_output - Output for the demux. |
| 37 | DMX_OUT_DECODER, /* Streaming directly to decoder. */ | 37 | * |
| 38 | DMX_OUT_TAP, /* Output going to a memory buffer */ | 38 | * @DMX_OUT_DECODER: |
| 39 | /* (to be retrieved via the read command).*/ | 39 | * Streaming directly to decoder. |
| 40 | DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */ | 40 | * @DMX_OUT_TAP: |
| 41 | /* (to be retrieved by reading from the */ | 41 | * Output going to a memory buffer (to be retrieved via the read command). |
| 42 | /* logical DVR device). */ | 42 | * Delivers the stream output to the demux device on which the ioctl |
| 43 | DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */ | 43 | * is called. |
| 44 | * @DMX_OUT_TS_TAP: | ||
| 45 | * Output multiplexed into a new TS (to be retrieved by reading from the | ||
| 46 | * logical DVR device). Routes output to the logical DVR device | ||
| 47 | * ``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from all | ||
| 48 | * filters for which @DMX_OUT_TS_TAP was specified. | ||
| 49 | * @DMX_OUT_TSDEMUX_TAP: | ||
| 50 | * Like @DMX_OUT_TS_TAP but retrieved from the DMX device. | ||
| 51 | */ | ||
| 52 | enum dmx_output { | ||
| 53 | DMX_OUT_DECODER, | ||
| 54 | DMX_OUT_TAP, | ||
| 55 | DMX_OUT_TS_TAP, | ||
| 56 | DMX_OUT_TSDEMUX_TAP | ||
| 44 | }; | 57 | }; |
| 45 | 58 | ||
| 46 | typedef enum dmx_output dmx_output_t; | ||
| 47 | 59 | ||
| 48 | typedef enum dmx_input | 60 | /** |
| 49 | { | 61 | * enum dmx_input - Input from the demux. |
| 50 | DMX_IN_FRONTEND, /* Input from a front-end device. */ | 62 | * |
| 51 | DMX_IN_DVR /* Input from the logical DVR device. */ | 63 | * @DMX_IN_FRONTEND: Input from a front-end device. |
| 52 | } dmx_input_t; | 64 | * @DMX_IN_DVR: Input from the logical DVR device. |
| 65 | */ | ||
| 66 | enum dmx_input { | ||
| 67 | DMX_IN_FRONTEND, | ||
| 68 | DMX_IN_DVR | ||
| 69 | }; | ||
| 53 | 70 | ||
| 71 | /** | ||
| 72 | * enum dmx_ts_pes - type of the PES filter. | ||
| 73 | * | ||
| 74 | * @DMX_PES_AUDIO0: first audio PID. Also referred as @DMX_PES_AUDIO. | ||
| 75 | * @DMX_PES_VIDEO0: first video PID. Also referred as @DMX_PES_VIDEO. | ||
| 76 | * @DMX_PES_TELETEXT0: first teletext PID. Also referred as @DMX_PES_TELETEXT. | ||
| 77 | * @DMX_PES_SUBTITLE0: first subtitle PID. Also referred as @DMX_PES_SUBTITLE. | ||
| 78 | * @DMX_PES_PCR0: first Program Clock Reference PID. | ||
| 79 | * Also referred as @DMX_PES_PCR. | ||
| 80 | * | ||
| 81 | * @DMX_PES_AUDIO1: second audio PID. | ||
| 82 | * @DMX_PES_VIDEO1: second video PID. | ||
| 83 | * @DMX_PES_TELETEXT1: second teletext PID. | ||
| 84 | * @DMX_PES_SUBTITLE1: second subtitle PID. | ||
| 85 | * @DMX_PES_PCR1: second Program Clock Reference PID. | ||
| 86 | * | ||
| 87 | * @DMX_PES_AUDIO2: third audio PID. | ||
| 88 | * @DMX_PES_VIDEO2: third video PID. | ||
| 89 | * @DMX_PES_TELETEXT2: third teletext PID. | ||
| 90 | * @DMX_PES_SUBTITLE2: third subtitle PID. | ||
| 91 | * @DMX_PES_PCR2: third Program Clock Reference PID. | ||
| 92 | * | ||
| 93 | * @DMX_PES_AUDIO3: fourth audio PID. | ||
| 94 | * @DMX_PES_VIDEO3: fourth video PID. | ||
| 95 | * @DMX_PES_TELETEXT3: fourth teletext PID. | ||
| 96 | * @DMX_PES_SUBTITLE3: fourth subtitle PID. | ||
| 97 | * @DMX_PES_PCR3: fourth Program Clock Reference PID. | ||
| 98 | * | ||
| 99 | * @DMX_PES_OTHER: any other PID. | ||
| 100 | */ | ||
| 54 | 101 | ||
| 55 | typedef enum dmx_ts_pes | 102 | enum dmx_ts_pes { |
| 56 | { | ||
| 57 | DMX_PES_AUDIO0, | 103 | DMX_PES_AUDIO0, |
| 58 | DMX_PES_VIDEO0, | 104 | DMX_PES_VIDEO0, |
| 59 | DMX_PES_TELETEXT0, | 105 | DMX_PES_TELETEXT0, |
| @@ -79,7 +125,7 @@ typedef enum dmx_ts_pes · 19 unmodified lines | |||
| 79 | DMX_PES_PCR3, | 125 | DMX_PES_PCR3, |
| 80 | 126 | ||
| 81 | DMX_PES_OTHER | 127 | DMX_PES_OTHER |
| 82 | } dmx_pes_type_t; | 128 | }; |
| 83 | 129 | ||
| 84 | #define DMX_PES_AUDIO DMX_PES_AUDIO0 | 130 | #define DMX_PES_AUDIO DMX_PES_AUDIO0 |
| 85 | #define DMX_PES_VIDEO DMX_PES_VIDEO0 | 131 | #define DMX_PES_VIDEO DMX_PES_VIDEO0 |
| @@ -88,56 +134,80 @@ typedef enum dmx_ts_pes · 2 unmodified lines | |||
| 88 | #define DMX_PES_PCR DMX_PES_PCR0 | 134 | #define DMX_PES_PCR DMX_PES_PCR0 |
| 89 | 135 | ||
| 90 | 136 | ||
| 91 | typedef struct dmx_filter | 137 | |
| 92 | { | 138 | /** |
| 139 | * struct dmx_filter - Specifies a section header filter. | ||
| 140 | * | ||
| 141 | * @filter: bit array with bits to be matched at the section header. | ||
| 142 | * @mask: bits that are valid at the filter bit array. | ||
| 143 | * @mode: mode of match: if bit is zero, it will match if equal (positive | ||
| 144 | * match); if bit is one, it will match if the bit is negated. | ||
| 145 | * | ||
| 146 | * Note: All arrays in this struct have a size of DMX_FILTER_SIZE (16 bytes). | ||
| 147 | */ | ||
| 148 | struct dmx_filter { | ||
| 93 | __u8 filter[DMX_FILTER_SIZE]; | 149 | __u8 filter[DMX_FILTER_SIZE]; |
| 94 | __u8 mask[DMX_FILTER_SIZE]; | 150 | __u8 mask[DMX_FILTER_SIZE]; |
| 95 | __u8 mode[DMX_FILTER_SIZE]; | 151 | __u8 mode[DMX_FILTER_SIZE]; |
| 96 | } dmx_filter_t; | 152 | }; |
| 97 | |||
| 98 | 153 | ||
| 99 | struct dmx_sct_filter_params | 154 | /** |
| 100 | { | 155 | * struct dmx_sct_filter_params - Specifies a section filter. |
| 101 | __u16 pid; | 156 | * |
| 102 | dmx_filter_t filter; | 157 | * @pid: PID to be filtered. |
| 103 | __u32 timeout; | 158 | * @filter: section header filter, as defined by &struct dmx_filter. |
| 104 | __u32 flags; | 159 | * @timeout: maximum time to filter, in milliseconds. |
| 160 | * @flags: extra flags for the section filter. | ||
| 161 | * | ||
| 162 | * Carries the configuration for a MPEG-TS section filter. | ||
| 163 | * | ||
| 164 | * The @flags can be: | ||
| 165 | * | ||
| 166 | * - %DMX_CHECK_CRC - only deliver sections where the CRC check succeeded; | ||
| 167 | * - %DMX_ONESHOT - disable the section filter after one section | ||
| 168 | * has been delivered; | ||
| 169 | * - %DMX_IMMEDIATE_START - Start filter immediately without requiring a | ||
| 170 | * :ref:`DMX_START`. | ||
| 171 | */ | ||
| 172 | struct dmx_sct_filter_params { | ||
| 173 | __u16 pid; | ||
| 174 | struct dmx_filter filter; | ||
| 175 | __u32 timeout; | ||
| 176 | __u32 flags; | ||
| 105 | #define DMX_CHECK_CRC 1 | 177 | #define DMX_CHECK_CRC 1 |
| 106 | #define DMX_ONESHOT 2 | 178 | #define DMX_ONESHOT 2 |
| 107 | #define DMX_IMMEDIATE_START 4 | 179 | #define DMX_IMMEDIATE_START 4 |
| 108 | #define DMX_KERNEL_CLIENT 0x8000 | ||
| 109 | }; | 180 | }; |
| 110 | 181 | ||
| 111 | 182 | /** | |
| 112 | struct dmx_pes_filter_params | 183 | * struct dmx_pes_filter_params - Specifies Packetized Elementary Stream (PES) |
| 113 | { | 184 | * filter parameters. |
| 114 | __u16 pid; | 185 | * |
| 115 | dmx_input_t input; | 186 | * @pid: PID to be filtered. |
| 116 | dmx_output_t output; | 187 | * @input: Demux input, as specified by &enum dmx_input. |
| 117 | dmx_pes_type_t pes_type; | 188 | * @output: Demux output, as specified by &enum dmx_output. |
| 118 | __u32 flags; | 189 | * @pes_type: Type of the pes filter, as specified by &enum dmx_pes_type. |
| 190 | * @flags: Demux PES flags. | ||
| 191 | */ | ||
| 192 | struct dmx_pes_filter_params { | ||
| 193 | __u16 pid; | ||
| 194 | enum dmx_input input; | ||
| 195 | enum dmx_output output; | ||
| 196 | enum dmx_ts_pes pes_type; | ||
| 197 | __u32 flags; | ||
| 119 | }; | 198 | }; |
| 120 | 199 | ||
| 121 | typedef struct dmx_caps { | 200 | /** |
| 122 | __u32 caps; | 201 | * struct dmx_stc - Stores System Time Counter (STC) information. |
| 123 | int num_decoders; | 202 | * |
| 124 | } dmx_caps_t; | 203 | * @num: input data: number of the STC, from 0 to N. |
| 125 | 204 | * @base: output: divisor for STC to get 90 kHz clock. | |
| 126 | typedef enum dmx_source { | 205 | * @stc: output: stc in @base * 90 kHz units. |
| 127 | DMX_SOURCE_FRONT0 = 0, | 206 | */ |
| 128 | DMX_SOURCE_FRONT1, | ||
| 129 | DMX_SOURCE_FRONT2, | ||
| 130 | DMX_SOURCE_FRONT3, | ||
| 131 | DMX_SOURCE_DVR0 = 16, | ||
| 132 | DMX_SOURCE_DVR1, | ||
| 133 | DMX_SOURCE_DVR2, | ||
| 134 | DMX_SOURCE_DVR3 | ||
| 135 | } dmx_source_t; | ||
| 136 | |||
| 137 | struct dmx_stc { | 207 | struct dmx_stc { |
| 138 | unsigned int num; /* input : which STC? 0..N */ | 208 | unsigned int num; |
| 139 | unsigned int base; /* output: divisor for stc to get 90 kHz clock */ | 209 | unsigned int base; |
| 140 | __u64 stc; /* output: stc in 'base'*90 kHz units */ | 210 | __u64 stc; |
| 141 | }; | 211 | }; |
| 142 | 212 | ||
| 143 | #define DMX_START _IO('o', 41) | 213 | #define DMX_START _IO('o', 41) |
| @@ -146,10 +216,18 @@ struct dmx_stc { · 2 unmodified lines | |||
| 146 | #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params) | 216 | #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params) |
| 147 | #define DMX_SET_BUFFER_SIZE _IO('o', 45) | 217 | #define DMX_SET_BUFFER_SIZE _IO('o', 45) |
| 148 | #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5]) | 218 | #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5]) |
| 149 | #define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t) | ||
| 150 | #define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t) | ||
| 151 | #define DMX_GET_STC _IOWR('o', 50, struct dmx_stc) | 219 | #define DMX_GET_STC _IOWR('o', 50, struct dmx_stc) |
| 152 | #define DMX_ADD_PID _IOW('o', 51, __u16) | 220 | #define DMX_ADD_PID _IOW('o', 51, __u16) |
| 153 | #define DMX_REMOVE_PID _IOW('o', 52, __u16) | 221 | #define DMX_REMOVE_PID _IOW('o', 52, __u16) |
| 154 | 222 | ||
| 223 | #if !defined(__KERNEL__) | ||
| 224 | |||
| 225 | /* This is needed for legacy userspace support */ | ||
| 226 | typedef enum dmx_output dmx_output_t; | ||
| 227 | typedef enum dmx_input dmx_input_t; | ||
| 228 | typedef enum dmx_ts_pes dmx_pes_type_t; | ||
| 229 | typedef struct dmx_filter dmx_filter_t; | ||
| 230 | |||
| 231 | #endif | ||
| 232 | |||
| 155 | #endif /* _UAPI_DVBDMX_H_ */ | 233 | #endif /* _UAPI_DVBDMX_H_ */ |
| @@ -28,13 +28,46 @@ · 27 unmodified lines | |||
| 28 | 28 | ||
| 29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
| 30 | 30 | ||
| 31 | enum fe_type { | 31 | /** |
| 32 | FE_QPSK, | 32 | * enum fe_caps - Frontend capabilities |
| 33 | FE_QAM, | 33 | * |
| 34 | FE_OFDM, | 34 | * @FE_IS_STUPID: There's something wrong at the |
| 35 | FE_ATSC | 35 | * frontend, and it can't report its |
| 36 | }; | 36 | * capabilities. |
| 37 | 37 | * @FE_CAN_INVERSION_AUTO: Can auto-detect frequency spectral | |
| 38 | * band inversion | ||
| 39 | * @FE_CAN_FEC_1_2: Supports FEC 1/2 | ||
| 40 | * @FE_CAN_FEC_2_3: Supports FEC 2/3 | ||
| 41 | * @FE_CAN_FEC_3_4: Supports FEC 3/4 | ||
| 42 | * @FE_CAN_FEC_4_5: Supports FEC 4/5 | ||
| 43 | * @FE_CAN_FEC_5_6: Supports FEC 5/6 | ||
| 44 | * @FE_CAN_FEC_6_7: Supports FEC 6/7 | ||
| 45 | * @FE_CAN_FEC_7_8: Supports FEC 7/8 | ||
| 46 | * @FE_CAN_FEC_8_9: Supports FEC 8/9 | ||
| 47 | * @FE_CAN_FEC_AUTO: Can auto-detect FEC | ||
| 48 | * @FE_CAN_QPSK: Supports QPSK modulation | ||
| 49 | * @FE_CAN_QAM_16: Supports 16-QAM modulation | ||
| 50 | * @FE_CAN_QAM_32: Supports 32-QAM modulation | ||
| 51 | * @FE_CAN_QAM_64: Supports 64-QAM modulation | ||
| 52 | * @FE_CAN_QAM_128: Supports 128-QAM modulation | ||
| 53 | * @FE_CAN_QAM_256: Supports 256-QAM modulation | ||
| 54 | * @FE_CAN_QAM_AUTO: Can auto-detect QAM modulation | ||
| 55 | * @FE_CAN_TRANSMISSION_MODE_AUTO: Can auto-detect transmission mode | ||
| 56 | * @FE_CAN_BANDWIDTH_AUTO: Can auto-detect bandwidth | ||
| 57 | * @FE_CAN_GUARD_INTERVAL_AUTO: Can auto-detect guard interval | ||
| 58 | * @FE_CAN_HIERARCHY_AUTO: Can auto-detect hierarchy | ||
| 59 | * @FE_CAN_8VSB: Supports 8-VSB modulation | ||
| 60 | * @FE_CAN_16VSB: Supporta 16-VSB modulation | ||
| 61 | * @FE_HAS_EXTENDED_CAPS: Unused | ||
| 62 | * @FE_CAN_MULTISTREAM: Supports multistream filtering | ||
| 63 | * @FE_CAN_TURBO_FEC: Supports "turbo FEC" modulation | ||
| 64 | * @FE_CAN_2G_MODULATION: Supports "2nd generation" modulation, | ||
| 65 | * e. g. DVB-S2, DVB-T2, DVB-C2 | ||
| 66 | * @FE_NEEDS_BENDING: Unused | ||
| 67 | * @FE_CAN_RECOVER: Can recover from a cable unplug | ||
| 68 | * automatically | ||
| 69 | * @FE_CAN_MUTE_TS: Can stop spurious TS data output | ||
| 70 | */ | ||
| 38 | enum fe_caps { | 71 | enum fe_caps { |
| 39 | FE_IS_STUPID = 0, | 72 | FE_IS_STUPID = 0, |
| 40 | FE_CAN_INVERSION_AUTO = 0x1, | 73 | FE_CAN_INVERSION_AUTO = 0x1, |
| @@ -60,15 +93,55 @@ enum fe_caps { · 19 unmodified lines | |||
| 60 | FE_CAN_HIERARCHY_AUTO = 0x100000, | 93 | FE_CAN_HIERARCHY_AUTO = 0x100000, |
| 61 | FE_CAN_8VSB = 0x200000, | 94 | FE_CAN_8VSB = 0x200000, |
| 62 | FE_CAN_16VSB = 0x400000, | 95 | FE_CAN_16VSB = 0x400000, |
| 63 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ | 96 | FE_HAS_EXTENDED_CAPS = 0x800000, |
| 64 | FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */ | 97 | FE_CAN_MULTISTREAM = 0x4000000, |
| 65 | FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ | 98 | FE_CAN_TURBO_FEC = 0x8000000, |
| 66 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ | 99 | FE_CAN_2G_MODULATION = 0x10000000, |
| 67 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ | 100 | FE_NEEDS_BENDING = 0x20000000, |
| 68 | FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */ | 101 | FE_CAN_RECOVER = 0x40000000, |
| 69 | FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */ | 102 | FE_CAN_MUTE_TS = 0x80000000 |
| 103 | }; | ||
| 104 | |||
| 105 | /* | ||
| 106 | * DEPRECATED: Should be kept just due to backward compatibility. | ||
| 107 | */ | ||
| 108 | enum fe_type { | ||
| 109 | FE_QPSK, | ||
| 110 | FE_QAM, | ||
| 111 | FE_OFDM, | ||
| 112 | FE_ATSC | ||
| 70 | }; | 113 | }; |
| 71 | 114 | ||
| 115 | /** | ||
| 116 | * struct dvb_frontend_info - Frontend properties and capabilities | ||
| 117 | * | ||
| 118 | * @name: Name of the frontend | ||
| 119 | * @type: **DEPRECATED**. | ||
| 120 | * Should not be used on modern programs, | ||
| 121 | * as a frontend may have more than one type. | ||
| 122 | * In order to get the support types of a given | ||
| 123 | * frontend, use :c:type:`DTV_ENUM_DELSYS` | ||
| 124 | * instead. | ||
| 125 | * @frequency_min: Minimal frequency supported by the frontend. | ||
| 126 | * @frequency_max: Minimal frequency supported by the frontend. | ||
| 127 | * @frequency_stepsize: All frequencies are multiple of this value. | ||
| 128 | * @frequency_tolerance: Frequency tolerance. | ||
| 129 | * @symbol_rate_min: Minimal symbol rate, in bauds | ||
| 130 | * (for Cable/Satellite systems). | ||
| 131 | * @symbol_rate_max: Maximal symbol rate, in bauds | ||
| 132 | * (for Cable/Satellite systems). | ||
| 133 | * @symbol_rate_tolerance: Maximal symbol rate tolerance, in ppm | ||
| 134 | * (for Cable/Satellite systems). | ||
| 135 | * @notifier_delay: **DEPRECATED**. Not used by any driver. | ||
| 136 | * @caps: Capabilities supported by the frontend, | ||
| 137 | * as specified in &enum fe_caps. | ||
| 138 | * | ||
| 139 | * .. note: | ||
| 140 | * | ||
| 141 | * #. The frequencies are specified in Hz for Terrestrial and Cable | ||
| 142 | * systems. | ||
| 143 | * #. The frequencies are specified in kHz for Satellite systems. | ||
| 144 | */ | ||
| 72 | struct dvb_frontend_info { | 145 | struct dvb_frontend_info { |
| 73 | char name[128]; | 146 | char name[128]; |
| 74 | enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */ | 147 | enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */ |
| @@ -78,55 +151,105 @@ struct dvb_frontend_info { · 3 unmodified lines | |||
| 78 | __u32 frequency_tolerance; | 151 | __u32 frequency_tolerance; |
| 79 | __u32 symbol_rate_min; | 152 | __u32 symbol_rate_min; |
| 80 | __u32 symbol_rate_max; | 153 | __u32 symbol_rate_max; |
| 81 | __u32 symbol_rate_tolerance; /* ppm */ | 154 | __u32 symbol_rate_tolerance; |
| 82 | __u32 notifier_delay; /* DEPRECATED */ | 155 | __u32 notifier_delay; /* DEPRECATED */ |
| 83 | enum fe_caps caps; | 156 | enum fe_caps caps; |
| 84 | }; | 157 | }; |
| 85 | 158 | ||
| 86 | |||
| 87 | /** | 159 | /** |
| 88 | * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for | 160 | * struct dvb_diseqc_master_cmd - DiSEqC master command |
| 89 | * the meaning of this struct... | 161 | * |
| 162 | * @msg: | ||
| 163 | * DiSEqC message to be sent. It contains a 3 bytes header with: | ||
| 164 | * framing + address + command, and an optional argument | ||
| 165 | * of up to 3 bytes of data. | ||
| 166 | * @msg_len: | ||
| 167 | * Length of the DiSEqC message. Valid values are 3 to 6. | ||
| 168 | * | ||
| 169 | * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for | ||
| 170 | * the possible messages that can be used. | ||
| 90 | */ | 171 | */ |
| 91 | struct dvb_diseqc_master_cmd { | 172 | struct dvb_diseqc_master_cmd { |
| 92 | __u8 msg [6]; /* { framing, address, command, data [3] } */ | 173 | __u8 msg[6]; |
| 93 | __u8 msg_len; /* valid values are 3...6 */ | 174 | __u8 msg_len; |
| 94 | }; | 175 | }; |
| 95 | 176 | ||
| 177 | /** | ||
| 178 | * struct dvb_diseqc_slave_reply - DiSEqC received data | ||
| 179 | * | ||
| 180 | * @msg: | ||
| 181 | * DiSEqC message buffer to store a message received via DiSEqC. | ||
| 182 | * It contains one byte header with: framing and | ||
| 183 | * an optional argument of up to 3 bytes of data. | ||
| 184 | * @msg_len: | ||
| 185 | * Length of the DiSEqC message. Valid values are 0 to 4, | ||
| 186 | * where 0 means no message. | ||
| 187 | * @timeout: | ||
| 188 | * Return from ioctl after timeout ms with errorcode when | ||
| 189 | * no message was received. | ||
| 190 | * | ||
| 191 | * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for | ||
| 192 | * the possible messages that can be used. | ||
| 193 | */ | ||
| 96 | struct dvb_diseqc_slave_reply { | 194 | struct dvb_diseqc_slave_reply { |
| 97 | __u8 msg [4]; /* { framing, data [3] } */ | 195 | __u8 msg[4]; |
| 98 | __u8 msg_len; /* valid values are 0...4, 0 means no msg */ | 196 | __u8 msg_len; |
| 99 | int timeout; /* return from ioctl after timeout ms with */ | 197 | int timeout; |
| 100 | }; /* errorcode when no message was received */ | 198 | }; |
| 101 | 199 | ||
| 200 | /** | ||
| 201 | * enum fe_sec_voltage - DC Voltage used to feed the LNBf | ||
| 202 | * | ||
| 203 | * @SEC_VOLTAGE_13: Output 13V to the LNBf | ||
| 204 | * @SEC_VOLTAGE_18: Output 18V to the LNBf | ||
| 205 | * @SEC_VOLTAGE_OFF: Don't feed the LNBf with a DC voltage | ||
| 206 | */ | ||
| 102 | enum fe_sec_voltage { | 207 | enum fe_sec_voltage { |
| 103 | SEC_VOLTAGE_13, | 208 | SEC_VOLTAGE_13, |
| 104 | SEC_VOLTAGE_18, | 209 | SEC_VOLTAGE_18, |
| 105 | SEC_VOLTAGE_OFF | 210 | SEC_VOLTAGE_OFF |
| 106 | }; | 211 | }; |
| 107 | 212 | ||
| 213 | /** | ||
| 214 | * enum fe_sec_tone_mode - Type of tone to be send to the LNBf. | ||
| 215 | * @SEC_TONE_ON: Sends a 22kHz tone burst to the antenna. | ||
| 216 | * @SEC_TONE_OFF: Don't send a 22kHz tone to the antenna (except | ||
| 217 | * if the ``FE_DISEQC_*`` ioctls are called). | ||
| 218 | */ | ||
| 108 | enum fe_sec_tone_mode { | 219 | enum fe_sec_tone_mode { |
| 109 | SEC_TONE_ON, | 220 | SEC_TONE_ON, |
| 110 | SEC_TONE_OFF | 221 | SEC_TONE_OFF |
| 111 | }; | 222 | }; |
| 112 | 223 | ||
| 224 | /** | ||
| 225 | * enum fe_sec_mini_cmd - Type of mini burst to be sent | ||
| 226 | * | ||
| 227 | * @SEC_MINI_A: Sends a mini-DiSEqC 22kHz '0' Tone Burst to select | ||
| 228 | * satellite-A | ||
| 229 | * @SEC_MINI_B: Sends a mini-DiSEqC 22kHz '1' Data Burst to select | ||
| 230 | * satellite-B | ||
| 231 | */ | ||
| 113 | enum fe_sec_mini_cmd { | 232 | enum fe_sec_mini_cmd { |
| 114 | SEC_MINI_A, | 233 | SEC_MINI_A, |
| 115 | SEC_MINI_B | 234 | SEC_MINI_B |
| 116 | }; | 235 | }; |
| 117 | 236 | ||
| 118 | /** | 237 | /** |
| 119 | * enum fe_status - enumerates the possible frontend status | 238 | * enum fe_status - Enumerates the possible frontend status. |
| 120 | * @FE_HAS_SIGNAL: found something above the noise level | 239 | * @FE_NONE: The frontend doesn't have any kind of lock. |
| 121 | * @FE_HAS_CARRIER: found a DVB signal | 240 | * That's the initial frontend status |
| 122 | * @FE_HAS_VITERBI: FEC is stable | 241 | * @FE_HAS_SIGNAL: Has found something above the noise level. |
| 123 | * @FE_HAS_SYNC: found sync bytes | 242 | * @FE_HAS_CARRIER: Has found a signal. |
| 124 | * @FE_HAS_LOCK: everything's working | 243 | * @FE_HAS_VITERBI: FEC inner coding (Viterbi, LDPC or other inner code). |
| 125 | * @FE_TIMEDOUT: no lock within the last ~2 seconds | 244 | * is stable. |
| 126 | * @FE_REINIT: frontend was reinitialized, application is recommended | 245 | * @FE_HAS_SYNC: Synchronization bytes was found. |
| 127 | * to reset DiSEqC, tone and parameters | 246 | * @FE_HAS_LOCK: Digital TV were locked and everything is working. |
| 247 | * @FE_TIMEDOUT: Fo lock within the last about 2 seconds. | ||
| 248 | * @FE_REINIT: Frontend was reinitialized, application is recommended | ||
| 249 | * to reset DiSEqC, tone and parameters. | ||
| 128 | */ | 250 | */ |
| 129 | enum fe_status { | 251 | enum fe_status { |
| 252 | FE_NONE = 0x00, | ||
| 130 | FE_HAS_SIGNAL = 0x01, | 253 | FE_HAS_SIGNAL = 0x01, |
| 131 | FE_HAS_CARRIER = 0x02, | 254 | FE_HAS_CARRIER = 0x02, |
| 132 | FE_HAS_VITERBI = 0x04, | 255 | FE_HAS_VITERBI = 0x04, |
| @@ -136,12 +259,45 @@ enum fe_status { · 3 unmodified lines | |||
| 136 | FE_REINIT = 0x40, | 259 | FE_REINIT = 0x40, |
| 137 | }; | 260 | }; |
| 138 | 261 | ||
| 262 | /** | ||
| 263 | * enum fe_spectral_inversion - Type of inversion band | ||
| 264 | * | ||
| 265 | * @INVERSION_OFF: Don't do spectral band inversion. | ||
| 266 | * @INVERSION_ON: Do spectral band inversion. | ||
| 267 | * @INVERSION_AUTO: Autodetect spectral band inversion. | ||
| 268 | * | ||
| 269 | * This parameter indicates if spectral inversion should be presumed or | ||
| 270 | * not. In the automatic setting (``INVERSION_AUTO``) the hardware will try | ||
| 271 | * to figure out the correct setting by itself. If the hardware doesn't | ||
| 272 | * support, the %dvb_frontend will try to lock at the carrier first with | ||
| 273 | * inversion off. If it fails, it will try to enable inversion. | ||
| 274 | */ | ||
| 139 | enum fe_spectral_inversion { | 275 | enum fe_spectral_inversion { |
| 140 | INVERSION_OFF, | 276 | INVERSION_OFF, |
| 141 | INVERSION_ON, | 277 | INVERSION_ON, |
| 142 | INVERSION_AUTO | 278 | INVERSION_AUTO |
| 143 | }; | 279 | }; |
| 144 | 280 | ||
| 281 | /** | ||
| 282 | * enum fe_code_rate - Type of Forward Error Correction (FEC) | ||
| 283 | * | ||
| 284 | * | ||
| 285 | * @FEC_NONE: No Forward Error Correction Code | ||
| 286 | * @FEC_1_2: Forward Error Correction Code 1/2 | ||
| 287 | * @FEC_2_3: Forward Error Correction Code 2/3 | ||
| 288 | * @FEC_3_4: Forward Error Correction Code 3/4 | ||
| 289 | * @FEC_4_5: Forward Error Correction Code 4/5 | ||
| 290 | * @FEC_5_6: Forward Error Correction Code 5/6 | ||
| 291 | * @FEC_6_7: Forward Error Correction Code 6/7 | ||
| 292 | * @FEC_7_8: Forward Error Correction Code 7/8 | ||
| 293 | * @FEC_8_9: Forward Error Correction Code 8/9 | ||
| 294 | * @FEC_AUTO: Autodetect Error Correction Code | ||
| 295 | * @FEC_3_5: Forward Error Correction Code 3/5 | ||
| 296 | * @FEC_9_10: Forward Error Correction Code 9/10 | ||
| 297 | * @FEC_2_5: Forward Error Correction Code 2/5 | ||
| 298 | * | ||
| 299 | * Please note that not all FEC types are supported by a given standard. | ||
| 300 | */ | ||
| 145 | enum fe_code_rate { | 301 | enum fe_code_rate { |
| 146 | FEC_NONE = 0, | 302 | FEC_NONE = 0, |
| 147 | FEC_1_2, | 303 | FEC_1_2, |
| @@ -158,6 +314,26 @@ enum fe_code_rate { · 10 unmodified lines | |||
| 158 | FEC_2_5, | 314 | FEC_2_5, |
| 159 | }; | 315 | }; |
| 160 | 316 | ||
| 317 | /** | ||
| 318 | * enum fe_modulation - Type of modulation/constellation | ||
| 319 | * @QPSK: QPSK modulation | ||
| 320 | * @QAM_16: 16-QAM modulation | ||
| 321 | * @QAM_32: 32-QAM modulation | ||
| 322 | * @QAM_64: 64-QAM modulation | ||
| 323 | * @QAM_128: 128-QAM modulation | ||
| 324 | * @QAM_256: 256-QAM modulation | ||
| 325 | * @QAM_AUTO: Autodetect QAM modulation | ||
| 326 | * @VSB_8: 8-VSB modulation | ||
| 327 | * @VSB_16: 16-VSB modulation | ||
| 328 | * @PSK_8: 8-PSK modulation | ||
| 329 | * @APSK_16: 16-APSK modulation | ||
| 330 | * @APSK_32: 32-APSK modulation | ||
| 331 | * @DQPSK: DQPSK modulation | ||
| 332 | * @QAM_4_NR: 4-QAM-NR modulation | ||
| 333 | * | ||
| 334 | * Please note that not all modulations are supported by a given standard. | ||
| 335 | * | ||
| 336 | */ | ||
| 161 | enum fe_modulation { | 337 | enum fe_modulation { |
| 162 | QPSK, | 338 | QPSK, |
| 163 | QAM_16, | 339 | QAM_16, |
| @@ -175,6 +351,32 @@ enum fe_modulation { · 11 unmodified lines | |||
| 175 | QAM_4_NR, | 351 | QAM_4_NR, |
| 176 | }; | 352 | }; |
| 177 | 353 | ||
| 354 | /** | ||
| 355 | * enum fe_transmit_mode - Transmission mode | ||
| 356 | * | ||
| 357 | * @TRANSMISSION_MODE_AUTO: | ||
| 358 | * Autodetect transmission mode. The hardware will try to find the | ||
| 359 | * correct FFT-size (if capable) to fill in the missing parameters. | ||
| 360 | * @TRANSMISSION_MODE_1K: | ||
| 361 | * Transmission mode 1K | ||
| 362 | * @TRANSMISSION_MODE_2K: | ||
| 363 | * Transmission mode 2K | ||
| 364 | * @TRANSMISSION_MODE_8K: | ||
| 365 | * Transmission mode 8K | ||
| 366 | * @TRANSMISSION_MODE_4K: | ||
| 367 | * Transmission mode 4K | ||
| 368 | * @TRANSMISSION_MODE_16K: | ||
| 369 | * Transmission mode 16K | ||
| 370 | * @TRANSMISSION_MODE_32K: | ||
| 371 | * Transmission mode 32K | ||
| 372 | * @TRANSMISSION_MODE_C1: | ||
| 373 | * Single Carrier (C=1) transmission mode (DTMB only) | ||
| 374 | * @TRANSMISSION_MODE_C3780: | ||
| 375 | * Multi Carrier (C=3780) transmission mode (DTMB only) | ||
| 376 | * | ||
| 377 | * Please note that not all transmission modes are supported by a given | ||
| 378 | * standard. | ||
| 379 | */ | ||
| 178 | enum fe_transmit_mode { | 380 | enum fe_transmit_mode { |
| 179 | TRANSMISSION_MODE_2K, | 381 | TRANSMISSION_MODE_2K, |
| 180 | TRANSMISSION_MODE_8K, | 382 | TRANSMISSION_MODE_8K, |
| @@ -187,6 +389,23 @@ enum fe_transmit_mode { · 6 unmodified lines | |||
| 187 | TRANSMISSION_MODE_C3780, | 389 | TRANSMISSION_MODE_C3780, |
| 188 | }; | 390 | }; |
| 189 | 391 | ||
| 392 | /** | ||
| 393 | * enum fe_guard_interval - Guard interval | ||
| 394 | * | ||
| 395 | * @GUARD_INTERVAL_AUTO: Autodetect the guard interval | ||
| 396 | * @GUARD_INTERVAL_1_128: Guard interval 1/128 | ||
| 397 | * @GUARD_INTERVAL_1_32: Guard interval 1/32 | ||
| 398 | * @GUARD_INTERVAL_1_16: Guard interval 1/16 | ||
| 399 | * @GUARD_INTERVAL_1_8: Guard interval 1/8 | ||
| 400 | * @GUARD_INTERVAL_1_4: Guard interval 1/4 | ||
| 401 | * @GUARD_INTERVAL_19_128: Guard interval 19/128 | ||
| 402 | * @GUARD_INTERVAL_19_256: Guard interval 19/256 | ||
| 403 | * @GUARD_INTERVAL_PN420: PN length 420 (1/4) | ||
| 404 | * @GUARD_INTERVAL_PN595: PN length 595 (1/6) | ||
| 405 | * @GUARD_INTERVAL_PN945: PN length 945 (1/9) | ||
| 406 | * | ||
| 407 | * Please note that not all guard intervals are supported by a given standard. | ||
| 408 | */ | ||
| 190 | enum fe_guard_interval { | 409 | enum fe_guard_interval { |
| 191 | GUARD_INTERVAL_1_32, | 410 | GUARD_INTERVAL_1_32, |
| 192 | GUARD_INTERVAL_1_16, | 411 | GUARD_INTERVAL_1_16, |
| @@ -201,6 +420,16 @@ enum fe_guard_interval { · 8 unmodified lines | |||
| 201 | GUARD_INTERVAL_PN945, | 420 | GUARD_INTERVAL_PN945, |
| 202 | }; | 421 | }; |
| 203 | 422 | ||
| 423 | /** | ||
| 424 | * enum fe_hierarchy - Hierarchy | ||
| 425 | * @HIERARCHY_NONE: No hierarchy | ||
| 426 | * @HIERARCHY_AUTO: Autodetect hierarchy (if supported) | ||
| 427 | * @HIERARCHY_1: Hierarchy 1 | ||
| 428 | * @HIERARCHY_2: Hierarchy 2 | ||
| 429 | * @HIERARCHY_4: Hierarchy 4 | ||
| 430 | * | ||
| 431 | * Please note that not all hierarchy types are supported by a given standard. | ||
| 432 | */ | ||
| 204 | enum fe_hierarchy { | 433 | enum fe_hierarchy { |
| 205 | HIERARCHY_NONE, | 434 | HIERARCHY_NONE, |
| 206 | HIERARCHY_1, | 435 | HIERARCHY_1, |
| @@ -209,6 +438,15 @@ enum fe_hierarchy { · 2 unmodified lines | |||
| 209 | HIERARCHY_AUTO | 438 | HIERARCHY_AUTO |
| 210 | }; | 439 | }; |
| 211 | 440 | ||
| 441 | /** | ||
| 442 | * enum fe_interleaving - Interleaving | ||
| 443 | * @INTERLEAVING_NONE: No interleaving. | ||
| 444 | * @INTERLEAVING_AUTO: Auto-detect interleaving. | ||
| 445 | * @INTERLEAVING_240: Interleaving of 240 symbols. | ||
| 446 | * @INTERLEAVING_720: Interleaving of 720 symbols. | ||
| 447 | * | ||
| 448 | * Please note that, currently, only DTMB uses it. | ||
| 449 | */ | ||
| 212 | enum fe_interleaving { | 450 | enum fe_interleaving { |
| 213 | INTERLEAVING_NONE, | 451 | INTERLEAVING_NONE, |
| 214 | INTERLEAVING_AUTO, | 452 | INTERLEAVING_AUTO, |
| @@ -216,7 +454,8 @@ enum fe_interleaving { · 1 unmodified line | |||
| 216 | INTERLEAVING_720, | 454 | INTERLEAVING_720, |
| 217 | }; | 455 | }; |
| 218 | 456 | ||
| 219 | /* S2API Commands */ | 457 | /* DVBv5 property Commands */ |
| 458 | |||
| 220 | #define DTV_UNDEFINED 0 | 459 | #define DTV_UNDEFINED 0 |
| 221 | #define DTV_TUNE 1 | 460 | #define DTV_TUNE 1 |
| 222 | #define DTV_CLEAR 2 | 461 | #define DTV_CLEAR 2 |
| @@ -309,19 +548,79 @@ enum fe_interleaving { · 86 unmodified lines | |||
| 309 | 548 | ||
| 310 | #define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT | 549 | #define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT |
| 311 | 550 | ||
| 551 | /** | ||
| 552 | * enum fe_pilot - Type of pilot tone | ||
| 553 | * | ||
| 554 | * @PILOT_ON: Pilot tones enabled | ||
| 555 | * @PILOT_OFF: Pilot tones disabled | ||
| 556 | * @PILOT_AUTO: Autodetect pilot tones | ||
| 557 | */ | ||
| 312 | enum fe_pilot { | 558 | enum fe_pilot { |
| 313 | PILOT_ON, | 559 | PILOT_ON, |
| 314 | PILOT_OFF, | 560 | PILOT_OFF, |
| 315 | PILOT_AUTO, | 561 | PILOT_AUTO, |
| 316 | }; | 562 | }; |
| 317 | 563 | ||
| 564 | /** | ||
| 565 | * enum fe_rolloff - Rolloff factor | ||
| 566 | * @ROLLOFF_35: Roloff factor: α=35% | ||
| 567 | * @ROLLOFF_20: Roloff factor: α=20% | ||
| 568 | * @ROLLOFF_25: Roloff factor: α=25% | ||
| 569 | * @ROLLOFF_AUTO: Auto-detect the roloff factor. | ||
| 570 | * | ||
| 571 | * .. note: | ||
| 572 | * | ||
| 573 | * Roloff factor of 35% is implied on DVB-S. On DVB-S2, it is default. | ||
| 574 | */ | ||
| 318 | enum fe_rolloff { | 575 | enum fe_rolloff { |
| 319 | ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */ | 576 | ROLLOFF_35, |
| 320 | ROLLOFF_20, | 577 | ROLLOFF_20, |
| 321 | ROLLOFF_25, | 578 | ROLLOFF_25, |
| 322 | ROLLOFF_AUTO, | 579 | ROLLOFF_AUTO, |
| 323 | }; | 580 | }; |
| 324 | 581 | ||
| 582 | /** | ||
| 583 | * enum fe_delivery_system - Type of the delivery system | ||
| 584 | * | ||
| 585 | * @SYS_UNDEFINED: | ||
| 586 | * Undefined standard. Generally, indicates an error | ||
| 587 | * @SYS_DVBC_ANNEX_A: | ||
| 588 | * Cable TV: DVB-C following ITU-T J.83 Annex A spec | ||
| 589 | * @SYS_DVBC_ANNEX_B: | ||
| 590 | * Cable TV: DVB-C following ITU-T J.83 Annex B spec (ClearQAM) | ||
| 591 | * @SYS_DVBC_ANNEX_C: | ||
| 592 | * Cable TV: DVB-C following ITU-T J.83 Annex C spec | ||
| 593 | * @SYS_ISDBC: | ||
| 594 | * Cable TV: ISDB-C (no drivers yet) | ||
| 595 | * @SYS_DVBT: | ||
| 596 | * Terrestrial TV: DVB-T | ||
| 597 | * @SYS_DVBT2: | ||
| 598 | * Terrestrial TV: DVB-T2 | ||
| 599 | * @SYS_ISDBT: | ||
| 600 | * Terrestrial TV: ISDB-T | ||
| 601 | * @SYS_ATSC: | ||
| 602 | * Terrestrial TV: ATSC | ||
| 603 | * @SYS_ATSCMH: | ||
| 604 | * Terrestrial TV (mobile): ATSC-M/H | ||
| 605 | * @SYS_DTMB: | ||
| 606 | * Terrestrial TV: DTMB | ||
| 607 | * @SYS_DVBS: | ||
| 608 | * Satellite TV: DVB-S | ||
| 609 | * @SYS_DVBS2: | ||
| 610 | * Satellite TV: DVB-S2 | ||
| 611 | * @SYS_TURBO: | ||
| 612 | * Satellite TV: DVB-S Turbo | ||
| 613 | * @SYS_ISDBS: | ||
| 614 | * Satellite TV: ISDB-S | ||
| 615 | * @SYS_DAB: | ||
| 616 | * Digital audio: DAB (not fully supported) | ||
| 617 | * @SYS_DSS: | ||
| 618 | * Satellite TV: DSS (not fully supported) | ||
| 619 | * @SYS_CMMB: | ||
| 620 | * Terrestrial TV (mobile): CMMB (not fully supported) | ||
| 621 | * @SYS_DVBH: | ||
| 622 | * Terrestrial TV (mobile): DVB-H (standard deprecated) | ||
| 623 | */ | ||
| 325 | enum fe_delivery_system { | 624 | enum fe_delivery_system { |
| 326 | SYS_UNDEFINED, | 625 | SYS_UNDEFINED, |
| 327 | SYS_DVBC_ANNEX_A, | 626 | SYS_DVBC_ANNEX_A, |
| @@ -344,35 +643,85 @@ enum fe_delivery_system { · 16 unmodified lines | |||
| 344 | SYS_DVBC_ANNEX_C, | 643 | SYS_DVBC_ANNEX_C, |
| 345 | }; | 644 | }; |
| 346 | 645 | ||
| 347 | /* backward compatibility */ | 646 | /* backward compatibility definitions for delivery systems */ |
| 348 | #define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A | 647 | #define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A |
| 349 | #define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */ | 648 | #define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB */ |
| 350 | 649 | ||
| 351 | /* ATSC-MH */ | 650 | /* ATSC-MH specific parameters */ |
| 352 | 651 | ||
| 652 | /** | ||
| 653 | * enum atscmh_sccc_block_mode - Type of Series Concatenated Convolutional | ||
| 654 | * Code Block Mode. | ||
| 655 | * | ||
| 656 | * @ATSCMH_SCCC_BLK_SEP: | ||
| 657 | * Separate SCCC: the SCCC outer code mode shall be set independently | ||
| 658 | * for each Group Region (A, B, C, D) | ||
| 659 | * @ATSCMH_SCCC_BLK_COMB: | ||
| 660 | * Combined SCCC: all four Regions shall have the same SCCC outer | ||
| 661 | * code mode. | ||
| 662 | * @ATSCMH_SCCC_BLK_RES: | ||
| 663 | * Reserved. Shouldn't be used. | ||
| 664 | */ | ||
| 353 | enum atscmh_sccc_block_mode { | 665 | enum atscmh_sccc_block_mode { |
| 354 | ATSCMH_SCCC_BLK_SEP = 0, | 666 | ATSCMH_SCCC_BLK_SEP = 0, |
| 355 | ATSCMH_SCCC_BLK_COMB = 1, | 667 | ATSCMH_SCCC_BLK_COMB = 1, |
| 356 | ATSCMH_SCCC_BLK_RES = 2, | 668 | ATSCMH_SCCC_BLK_RES = 2, |
| 357 | }; | 669 | }; |
| 358 | 670 | ||
| 671 | /** | ||
| 672 | * enum atscmh_sccc_code_mode - Type of Series Concatenated Convolutional | ||
| 673 | * Code Rate. | ||
| 674 | * | ||
| 675 | * @ATSCMH_SCCC_CODE_HLF: | ||
| 676 | * The outer code rate of a SCCC Block is 1/2 rate. | ||
| 677 | * @ATSCMH_SCCC_CODE_QTR: | ||
| 678 | * The outer code rate of a SCCC Block is 1/4 rate. | ||
| 679 | * @ATSCMH_SCCC_CODE_RES: | ||
| 680 | * Reserved. Should not be used. | ||
| 681 | */ | ||
| 359 | enum atscmh_sccc_code_mode { | 682 | enum atscmh_sccc_code_mode { |
| 360 | ATSCMH_SCCC_CODE_HLF = 0, | 683 | ATSCMH_SCCC_CODE_HLF = 0, |
| 361 | ATSCMH_SCCC_CODE_QTR = 1, | 684 | ATSCMH_SCCC_CODE_QTR = 1, |
| 362 | ATSCMH_SCCC_CODE_RES = 2, | 685 | ATSCMH_SCCC_CODE_RES = 2, |
| 363 | }; | 686 | }; |
| 364 | 687 | ||
| 688 | /** | ||
| 689 | * enum atscmh_rs_frame_ensemble - Reed Solomon(RS) frame ensemble. | ||
| 690 | * | ||
| 691 | * @ATSCMH_RSFRAME_ENS_PRI: Primary Ensemble. | ||
| 692 | * @ATSCMH_RSFRAME_ENS_SEC: Secondary Ensemble. | ||
| 693 | */ | ||
| 365 | enum atscmh_rs_frame_ensemble { | 694 | enum atscmh_rs_frame_ensemble { |
| 366 | ATSCMH_RSFRAME_ENS_PRI = 0, | 695 | ATSCMH_RSFRAME_ENS_PRI = 0, |
| 367 | ATSCMH_RSFRAME_ENS_SEC = 1, | 696 | ATSCMH_RSFRAME_ENS_SEC = 1, |
| 368 | }; | 697 | }; |
| 369 | 698 | ||
| 699 | /** | ||
| 700 | * enum atscmh_rs_frame_mode - Reed Solomon (RS) frame mode. | ||
| 701 | * | ||
| 702 | * @ATSCMH_RSFRAME_PRI_ONLY: | ||
| 703 | * Single Frame: There is only a primary RS Frame for all Group | ||
| 704 | * Regions. | ||
| 705 | * @ATSCMH_RSFRAME_PRI_SEC: | ||
| 706 | * Dual Frame: There are two separate RS Frames: Primary RS Frame for | ||
| 707 | * Group Region A and B and Secondary RS Frame for Group Region C and | ||
| 708 | * D. | ||
| 709 | * @ATSCMH_RSFRAME_RES: | ||
| 710 | * Reserved. Shouldn't be used. | ||
| 711 | */ | ||
| 370 | enum atscmh_rs_frame_mode { | 712 | enum atscmh_rs_frame_mode { |
| 371 | ATSCMH_RSFRAME_PRI_ONLY = 0, | 713 | ATSCMH_RSFRAME_PRI_ONLY = 0, |
| 372 | ATSCMH_RSFRAME_PRI_SEC = 1, | 714 | ATSCMH_RSFRAME_PRI_SEC = 1, |
| 373 | ATSCMH_RSFRAME_RES = 2, | 715 | ATSCMH_RSFRAME_RES = 2, |
| 374 | }; | 716 | }; |
| 375 | 717 | ||
| 718 | /** | ||
| 719 | * enum atscmh_rs_code_mode | ||
| 720 | * @ATSCMH_RSCODE_211_187: Reed Solomon code (211,187). | ||
| 721 | * @ATSCMH_RSCODE_223_187: Reed Solomon code (223,187). | ||
| 722 | * @ATSCMH_RSCODE_235_187: Reed Solomon code (235,187). | ||
| 723 | * @ATSCMH_RSCODE_RES: Reserved. Shouldn't be used. | ||
| 724 | */ | ||
| 376 | enum atscmh_rs_code_mode { | 725 | enum atscmh_rs_code_mode { |
| 377 | ATSCMH_RSCODE_211_187 = 0, | 726 | ATSCMH_RSCODE_211_187 = 0, |
| 378 | ATSCMH_RSCODE_223_187 = 1, | 727 | ATSCMH_RSCODE_223_187 = 1, |
| @@ -383,28 +732,18 @@ enum atscmh_rs_code_mode { · 4 unmodified lines | |||
| 383 | #define NO_STREAM_ID_FILTER (~0U) | 732 | #define NO_STREAM_ID_FILTER (~0U) |
| 384 | #define LNA_AUTO (~0U) | 733 | #define LNA_AUTO (~0U) |
| 385 | 734 | ||
| 386 | struct dtv_cmds_h { | ||
| 387 | char *name; /* A display name for debugging purposes */ | ||
| 388 | |||
| 389 | __u32 cmd; /* A unique ID */ | ||
| 390 | |||
| 391 | /* Flags */ | ||
| 392 | __u32 set:1; /* Either a set or get property */ | ||
| 393 | __u32 buffer:1; /* Does this property use the buffer? */ | ||
| 394 | __u32 reserved:30; /* Align */ | ||
| 395 | }; | ||
| 396 | |||
| 397 | /** | 735 | /** |
| 398 | * Scale types for the quality parameters. | 736 | * enum fecap_scale_params - scale types for the quality parameters. |
| 737 | * | ||
| 399 | * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That | 738 | * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That |
| 400 | * could indicate a temporary or a permanent | 739 | * could indicate a temporary or a permanent |
| 401 | * condition. | 740 | * condition. |
| 402 | * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically | 741 | * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically |
| 403 | * used on signal measures. | 742 | * used on signal measures. |
| 404 | * @FE_SCALE_RELATIVE: The scale is a relative percentual measure, | 743 | * @FE_SCALE_RELATIVE: The scale is a relative percentual measure, |
| 405 | * ranging from 0 (0%) to 0xffff (100%). | 744 | * ranging from 0 (0%) to 0xffff (100%). |
| 406 | * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like | 745 | * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like |
| 407 | * bit error, block error, lapsed time. | 746 | * bit error, block error, lapsed time. |
| 408 | */ | 747 | */ |
| 409 | enum fecap_scale_params { | 748 | enum fecap_scale_params { |
| 410 | FE_SCALE_NOT_AVAILABLE = 0, | 749 | FE_SCALE_NOT_AVAILABLE = 0, |
| @@ -416,24 +755,38 @@ enum fecap_scale_params { · 5 unmodified lines | |||
| 416 | /** | 755 | /** |
| 417 | * struct dtv_stats - Used for reading a DTV status property | 756 | * struct dtv_stats - Used for reading a DTV status property |
| 418 | * | 757 | * |
| 419 | * @value: value of the measure. Should range from 0 to 0xffff; | ||
| 420 | * @scale: Filled with enum fecap_scale_params - the scale | 758 | * @scale: Filled with enum fecap_scale_params - the scale |
| 421 | * in usage for that parameter | 759 | * in usage for that parameter |
| 422 | * | 760 | * |
| 761 | * The ``{unnamed_union}`` may have either one of the values below: | ||
| 762 | * | ||
| 763 | * %svalue | ||
| 764 | * integer value of the measure, for %FE_SCALE_DECIBEL, | ||
| 765 | * used for dB measures. The unit is 0.001 dB. | ||
| 766 | * | ||
| 767 | * %uvalue | ||
| 768 | * unsigned integer value of the measure, used when @scale is | ||
| 769 | * either %FE_SCALE_RELATIVE or %FE_SCALE_COUNTER. | ||
| 770 | * | ||
| 423 | * For most delivery systems, this will return a single value for each | 771 | * For most delivery systems, this will return a single value for each |
| 424 | * parameter. | 772 | * parameter. |
| 773 | * | ||
| 425 | * It should be noticed, however, that new OFDM delivery systems like | 774 | * It should be noticed, however, that new OFDM delivery systems like |
| 426 | * ISDB can use different modulation types for each group of carriers. | 775 | * ISDB can use different modulation types for each group of carriers. |
| 427 | * On such standards, up to 8 groups of statistics can be provided, one | 776 | * On such standards, up to 8 groups of statistics can be provided, one |
| 428 | * for each carrier group (called "layer" on ISDB). | 777 | * for each carrier group (called "layer" on ISDB). |
| 778 | * | ||
| 429 | * In order to be consistent with other delivery systems, the first | 779 | * In order to be consistent with other delivery systems, the first |
| 430 | * value refers to the entire set of carriers ("global"). | 780 | * value refers to the entire set of carriers ("global"). |
| 431 | * dtv_status:scale should use the value FE_SCALE_NOT_AVAILABLE when | 781 | * |
| 782 | * @scale should use the value %FE_SCALE_NOT_AVAILABLE when | ||
| 432 | * the value for the entire group of carriers or from one specific layer | 783 | * the value for the entire group of carriers or from one specific layer |
| 433 | * is not provided by the hardware. | 784 | * is not provided by the hardware. |
| 434 | * st.len should be filled with the latest filled status + 1. | ||
| 435 | * | 785 | * |
| 436 | * In other words, for ISDB, those values should be filled like: | 786 | * @len should be filled with the latest filled status + 1. |
| 787 | * | ||
| 788 | * In other words, for ISDB, those values should be filled like:: | ||
| 789 | * | ||
| 437 | * u.st.stat.svalue[0] = global statistics; | 790 | * u.st.stat.svalue[0] = global statistics; |
| 438 | * u.st.stat.scale[0] = FE_SCALE_DECIBEL; | 791 | * u.st.stat.scale[0] = FE_SCALE_DECIBEL; |
| 439 | * u.st.stat.value[1] = layer A statistics; | 792 | * u.st.stat.value[1] = layer A statistics; |
| @@ -455,11 +808,39 @@ struct dtv_stats { · 15 unmodified lines | |||
| 455 | 808 | ||
| 456 | #define MAX_DTV_STATS 4 | 809 | #define MAX_DTV_STATS 4 |
| 457 | 810 | ||
| 811 | /** | ||
| 812 | * struct dtv_fe_stats - store Digital TV frontend statistics | ||
| 813 | * | ||
| 814 | * @len: length of the statistics - if zero, stats is disabled. | ||
| 815 | * @stat: array with digital TV statistics. | ||
| 816 | * | ||
| 817 | * On most standards, @len can either be 0 or 1. However, for ISDB, each | ||
| 818 | * layer is modulated in separate. So, each layer may have its own set | ||
| 819 | * of statistics. If so, stat[0] carries on a global value for the property. | ||
| 820 | * Indexes 1 to 3 means layer A to B. | ||
| 821 | */ | ||
| 458 | struct dtv_fe_stats { | 822 | struct dtv_fe_stats { |
| 459 | __u8 len; | 823 | __u8 len; |
| 460 | struct dtv_stats stat[MAX_DTV_STATS]; | 824 | struct dtv_stats stat[MAX_DTV_STATS]; |
| 461 | } __attribute__ ((packed)); | 825 | } __attribute__ ((packed)); |
| 462 | 826 | ||
| 827 | /** | ||
| 828 | * struct dtv_property - store one of frontend command and its value | ||
| 829 | * | ||
| 830 | * @cmd: Digital TV command. | ||
| 831 | * @reserved: Not used. | ||
| 832 | * @u: Union with the values for the command. | ||
| 833 | * @result: Result of the command set (currently unused). | ||
| 834 | * | ||
| 835 | * The @u union may have either one of the values below: | ||
| 836 | * | ||
| 837 | * %data | ||
| 838 | * an unsigned 32-bits number. | ||
| 839 | * %st | ||
| 840 | * a &struct dtv_fe_stats array of statistics. | ||
| 841 | * %buffer | ||
| 842 | * a buffer of up to 32 characters (currently unused). | ||
| 843 | */ | ||
| 463 | struct dtv_property { | 844 | struct dtv_property { |
| 464 | __u32 cmd; | 845 | __u32 cmd; |
| 465 | __u32 reserved[3]; | 846 | __u32 reserved[3]; |
| @@ -479,17 +860,70 @@ struct dtv_property { · 13 unmodified lines | |||
| 479 | /* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */ | 860 | /* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */ |
| 480 | #define DTV_IOCTL_MAX_MSGS 64 | 861 | #define DTV_IOCTL_MAX_MSGS 64 |
| 481 | 862 | ||
| 863 | /** | ||
| 864 | * struct dtv_properties - a set of command/value pairs. | ||
| 865 | * | ||
| 866 | * @num: amount of commands stored at the struct. | ||
| 867 | * @props: a pointer to &struct dtv_property. | ||
| 868 | */ | ||
| 482 | struct dtv_properties { | 869 | struct dtv_properties { |
| 483 | __u32 num; | 870 | __u32 num; |
| 484 | struct dtv_property *props; | 871 | struct dtv_property *props; |
| 485 | }; | 872 | }; |
| 486 | 873 | ||
| 487 | #if defined(__DVB_CORE__) || !defined (__KERNEL__) | 874 | /* |
| 875 | * When set, this flag will disable any zigzagging or other "normal" tuning | ||
| 876 | * behavior. Additionally, there will be no automatic monitoring of the lock | ||
| 877 | * status, and hence no frontend events will be generated. If a frontend device | ||
| 878 | * is closed, this flag will be automatically turned off when the device is | ||
| 879 | * reopened read-write. | ||
| 880 | */ | ||
| 881 | #define FE_TUNE_MODE_ONESHOT 0x01 | ||
| 882 | |||
| 883 | /* Digital TV Frontend API calls */ | ||
| 884 | |||
| 885 | #define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info) | ||
| 886 | |||
| 887 | #define FE_DISEQC_RESET_OVERLOAD _IO('o', 62) | ||
| 888 | #define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd) | ||
| 889 | #define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply) | ||
| 890 | #define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */ | ||
| 891 | |||
| 892 | #define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */ | ||
| 893 | #define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */ | ||
| 894 | #define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */ | ||
| 895 | |||
| 896 | #define FE_READ_STATUS _IOR('o', 69, fe_status_t) | ||
| 897 | #define FE_READ_BER _IOR('o', 70, __u32) | ||
| 898 | #define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16) | ||
| 899 | #define FE_READ_SNR _IOR('o', 72, __u16) | ||
| 900 | #define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32) | ||
| 901 | |||
| 902 | #define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */ | ||
| 903 | #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event) | ||
| 904 | |||
| 905 | #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */ | ||
| 906 | |||
| 907 | #define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties) | ||
| 908 | #define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties) | ||
| 909 | |||
| 910 | #if defined(__DVB_CORE__) || !defined(__KERNEL__) | ||
| 911 | |||
| 912 | /* | ||
| 913 | * DEPRECATED: Everything below is deprecated in favor of DVBv5 API | ||
| 914 | * | ||
| 915 | * The DVBv3 only ioctls, structs and enums should not be used on | ||
| 916 | * newer programs, as it doesn't support the second generation of | ||
| 917 | * digital TV standards, nor supports newer delivery systems. | ||
| 918 | * They also don't support modern frontends with usually support multiple | ||
| 919 | * delivery systems. | ||
| 920 | * | ||
| 921 | * Drivers shouldn't use them. | ||
| 922 | * | ||
| 923 | * New applications should use DVBv5 delivery system instead | ||
| 924 | */ | ||
| 488 | 925 | ||
| 489 | /* | 926 | /* |
| 490 | * DEPRECATED: The DVBv3 ioctls, structs and enums should not be used on | ||
| 491 | * newer programs, as it doesn't support the second generation of digital | ||
| 492 | * TV standards, nor supports newer delivery systems. | ||
| 493 | */ | 927 | */ |
| 494 | 928 | ||
| 495 | enum fe_bandwidth { | 929 | enum fe_bandwidth { |
| @@ -502,7 +936,7 @@ enum fe_bandwidth { · 6 unmodified lines | |||
| 502 | BANDWIDTH_1_712_MHZ, | 936 | BANDWIDTH_1_712_MHZ, |
| 503 | }; | 937 | }; |
| 504 | 938 | ||
| 505 | /* This is needed for legacy userspace support */ | 939 | /* This is kept for legacy userspace support */ |
| 506 | typedef enum fe_sec_voltage fe_sec_voltage_t; | 940 | typedef enum fe_sec_voltage fe_sec_voltage_t; |
| 507 | typedef enum fe_caps fe_caps_t; | 941 | typedef enum fe_caps fe_caps_t; |
| 508 | typedef enum fe_type fe_type_t; | 942 | typedef enum fe_type fe_type_t; |
| @@ -520,6 +954,8 @@ typedef enum fe_pilot fe_pilot_t; · 11 unmodified lines | |||
| 520 | typedef enum fe_rolloff fe_rolloff_t; | 954 | typedef enum fe_rolloff fe_rolloff_t; |
| 521 | typedef enum fe_delivery_system fe_delivery_system_t; | 955 | typedef enum fe_delivery_system fe_delivery_system_t; |
| 522 | 956 | ||
| 957 | /* DVBv3 structs */ | ||
| 958 | |||
| 523 | struct dvb_qpsk_parameters { | 959 | struct dvb_qpsk_parameters { |
| 524 | __u32 symbol_rate; /* symbol rate in Symbols per second */ | 960 | __u32 symbol_rate; /* symbol rate in Symbols per second */ |
| 525 | fe_code_rate_t fec_inner; /* forward error correction (see above) */ | 961 | fe_code_rate_t fec_inner; /* forward error correction (see above) */ |
| @@ -546,8 +982,8 @@ struct dvb_ofdm_parameters { · 20 unmodified lines | |||
| 546 | }; | 982 | }; |
| 547 | 983 | ||
| 548 | struct dvb_frontend_parameters { | 984 | struct dvb_frontend_parameters { |
| 549 | __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */ | 985 | __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */ |
| 550 | /* intermediate frequency in kHz for DVB-S */ | 986 | /* intermediate frequency in kHz for DVB-S */ |
| 551 | fe_spectral_inversion_t inversion; | 987 | fe_spectral_inversion_t inversion; |
| 552 | union { | 988 | union { |
| 553 | struct dvb_qpsk_parameters qpsk; /* DVB-S */ | 989 | struct dvb_qpsk_parameters qpsk; /* DVB-S */ |
| @@ -561,42 +997,12 @@ struct dvb_frontend_event { · 7 unmodified lines | |||
| 561 | fe_status_t status; | 997 | fe_status_t status; |
| 562 | struct dvb_frontend_parameters parameters; | 998 | struct dvb_frontend_parameters parameters; |
| 563 | }; | 999 | }; |
| 564 | #endif | ||
| 565 | 1000 | ||
| 566 | #define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties) | 1001 | /* DVBv3 API calls */ |
| 567 | #define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties) | ||
| 568 | |||
| 569 | /** | ||
| 570 | * When set, this flag will disable any zigzagging or other "normal" tuning | ||
| 571 | * behaviour. Additionally, there will be no automatic monitoring of the lock | ||
| 572 | * status, and hence no frontend events will be generated. If a frontend device | ||
| 573 | * is closed, this flag will be automatically turned off when the device is | ||
| 574 | * reopened read-write. | ||
| 575 | */ | ||
| 576 | #define FE_TUNE_MODE_ONESHOT 0x01 | ||
| 577 | |||
| 578 | #define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info) | ||
| 579 | |||
| 580 | #define FE_DISEQC_RESET_OVERLOAD _IO('o', 62) | ||
| 581 | #define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd) | ||
| 582 | #define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply) | ||
| 583 | #define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */ | ||
| 584 | |||
| 585 | #define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */ | ||
| 586 | #define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */ | ||
| 587 | #define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */ | ||
| 588 | |||
| 589 | #define FE_READ_STATUS _IOR('o', 69, fe_status_t) | ||
| 590 | #define FE_READ_BER _IOR('o', 70, __u32) | ||
| 591 | #define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16) | ||
| 592 | #define FE_READ_SNR _IOR('o', 72, __u16) | ||
| 593 | #define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32) | ||
| 594 | 1002 | ||
| 595 | #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters) | 1003 | #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters) |
| 596 | #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters) | 1004 | #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters) |
| 597 | #define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */ | ||
| 598 | #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event) | ||
| 599 | 1005 | ||
| 600 | #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */ | 1006 | #endif |
| 601 | 1007 | ||
| 602 | #endif /*_DVBFRONTEND_H_*/ | 1008 | #endif /*_DVBFRONTEND_H_*/ |
| @@ -26,6 +26,21 @@ · 25 unmodified lines | |||
| 26 | 26 | ||
| 27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
| 28 | 28 | ||
| 29 | /** | ||
| 30 | * struct dvb_net_if - describes a DVB network interface | ||
| 31 | * | ||
| 32 | * @pid: Packet ID (PID) of the MPEG-TS that contains data | ||
| 33 | * @if_num: number of the Digital TV interface. | ||
| 34 | * @feedtype: Encapsulation type of the feed. | ||
| 35 | * | ||
| 36 | * A MPEG-TS stream may contain packet IDs with IP packages on it. | ||
| 37 | * This struct describes it, and the type of encoding. | ||
| 38 | * | ||
| 39 | * @feedtype can be: | ||
| 40 | * | ||
| 41 | * - %DVB_NET_FEEDTYPE_MPE for MPE encoding | ||
| 42 | * - %DVB_NET_FEEDTYPE_ULE for ULE encoding. | ||
| 43 | */ | ||
| 29 | struct dvb_net_if { | 44 | struct dvb_net_if { |
| 30 | __u16 pid; | 45 | __u16 pid; |
| 31 | __u16 if_num; | 46 | __u16 if_num; |
| @@ -18,10 +18,13 @@ struct sock_extended_err { · 17 unmodified lines | |||
| 18 | #define SO_EE_ORIGIN_ICMP 2 | 18 | #define SO_EE_ORIGIN_ICMP 2 |
| 19 | #define SO_EE_ORIGIN_ICMP6 3 | 19 | #define SO_EE_ORIGIN_ICMP6 3 |
| 20 | #define SO_EE_ORIGIN_TXSTATUS 4 | 20 | #define SO_EE_ORIGIN_TXSTATUS 4 |
| 21 | #define SO_EE_ORIGIN_ZEROCOPY 5 | ||
| 21 | #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS | 22 | #define SO_EE_ORIGIN_TIMESTAMPING SO_EE_ORIGIN_TXSTATUS |
| 22 | 23 | ||
| 23 | #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) | 24 | #define SO_EE_OFFENDER(ee) ((struct sockaddr*)((ee)+1)) |
| 24 | 25 | ||
| 26 | #define SO_EE_CODE_ZEROCOPY_COPIED 1 | ||
| 27 | |||
| 25 | /** | 28 | /** |
| 26 | * struct scm_timestamping - timestamps exposed through cmsg | 29 | * struct scm_timestamping - timestamps exposed through cmsg |
| 27 | * | 30 | * |
| @@ -1238,6 +1238,47 @@ struct ethtool_per_queue_op { · 1237 unmodified lines | |||
| 1238 | char data[]; | 1238 | char data[]; |
| 1239 | }; | 1239 | }; |
| 1240 | 1240 | ||
| 1241 | /** | ||
| 1242 | * struct ethtool_fecparam - Ethernet forward error correction(fec) parameters | ||
| 1243 | * @cmd: Command number = %ETHTOOL_GFECPARAM or %ETHTOOL_SFECPARAM | ||
| 1244 | * @active_fec: FEC mode which is active on porte | ||
| 1245 | * @fec: Bitmask of supported/configured FEC modes | ||
| 1246 | * @rsvd: Reserved for future extensions. i.e FEC bypass feature. | ||
| 1247 | * | ||
| 1248 | * Drivers should reject a non-zero setting of @autoneg when | ||
| 1249 | * autoneogotiation is disabled (or not supported) for the link. | ||
| 1250 | * | ||
| 1251 | */ | ||
| 1252 | struct ethtool_fecparam { | ||
| 1253 | __u32 cmd; | ||
| 1254 | /* bitmask of FEC modes */ | ||
| 1255 | __u32 active_fec; | ||
| 1256 | __u32 fec; | ||
| 1257 | __u32 reserved; | ||
| 1258 | }; | ||
| 1259 | |||
| 1260 | /** | ||
| 1261 | * enum ethtool_fec_config_bits - flags definition of ethtool_fec_configuration | ||
| 1262 | * @ETHTOOL_FEC_NONE: FEC mode configuration is not supported | ||
| 1263 | * @ETHTOOL_FEC_AUTO: Default/Best FEC mode provided by driver | ||
| 1264 | * @ETHTOOL_FEC_OFF: No FEC Mode | ||
| 1265 | * @ETHTOOL_FEC_RS: Reed-Solomon Forward Error Detection mode | ||
| 1266 | * @ETHTOOL_FEC_BASER: Base-R/Reed-Solomon Forward Error Detection mode | ||
| 1267 | */ | ||
| 1268 | enum ethtool_fec_config_bits { | ||
| 1269 | ETHTOOL_FEC_NONE_BIT, | ||
| 1270 | ETHTOOL_FEC_AUTO_BIT, | ||
| 1271 | ETHTOOL_FEC_OFF_BIT, | ||
| 1272 | ETHTOOL_FEC_RS_BIT, | ||
| 1273 | ETHTOOL_FEC_BASER_BIT, | ||
| 1274 | }; | ||
| 1275 | |||
| 1276 | #define ETHTOOL_FEC_NONE (1 << ETHTOOL_FEC_NONE_BIT) | ||
| 1277 | #define ETHTOOL_FEC_AUTO (1 << ETHTOOL_FEC_AUTO_BIT) | ||
| 1278 | #define ETHTOOL_FEC_OFF (1 << ETHTOOL_FEC_OFF_BIT) | ||
| 1279 | #define ETHTOOL_FEC_RS (1 << ETHTOOL_FEC_RS_BIT) | ||
| 1280 | #define ETHTOOL_FEC_BASER (1 << ETHTOOL_FEC_BASER_BIT) | ||
| 1281 | |||
| 1241 | /* CMDs currently supported */ | 1282 | /* CMDs currently supported */ |
| 1242 | #define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings. | 1283 | #define ETHTOOL_GSET 0x00000001 /* DEPRECATED, Get settings. |
| 1243 | * Please use ETHTOOL_GLINKSETTINGS | 1284 | * Please use ETHTOOL_GLINKSETTINGS |
| @@ -1330,6 +1371,8 @@ struct ethtool_per_queue_op { · 86 unmodified lines | |||
| 1330 | #define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */ | 1371 | #define ETHTOOL_SLINKSETTINGS 0x0000004d /* Set ethtool_link_settings */ |
| 1331 | #define ETHTOOL_PHY_GTUNABLE 0x0000004e /* Get PHY tunable configuration */ | 1372 | #define ETHTOOL_PHY_GTUNABLE 0x0000004e /* Get PHY tunable configuration */ |
| 1332 | #define ETHTOOL_PHY_STUNABLE 0x0000004f /* Set PHY tunable configuration */ | 1373 | #define ETHTOOL_PHY_STUNABLE 0x0000004f /* Set PHY tunable configuration */ |
| 1374 | #define ETHTOOL_GFECPARAM 0x00000050 /* Get FEC settings */ | ||
| 1375 | #define ETHTOOL_SFECPARAM 0x00000051 /* Set FEC settings */ | ||
| 1333 | 1376 | ||
| 1334 | /* compatibility with older code */ | 1377 | /* compatibility with older code */ |
| 1335 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1378 | #define SPARC_ETH_GSET ETHTOOL_GSET |
| @@ -1387,6 +1430,9 @@ enum ethtool_link_mode_bit_indices { · 51 unmodified lines | |||
| 1387 | ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47, | 1430 | ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47, |
| 1388 | ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48, | 1431 | ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48, |
| 1389 | 1432 | ||
| 1433 | ETHTOOL_LINK_MODE_FEC_NONE_BIT = 49, | ||
| 1434 | ETHTOOL_LINK_MODE_FEC_RS_BIT = 50, | ||
| 1435 | ETHTOOL_LINK_MODE_FEC_BASER_BIT = 51, | ||
| 1390 | 1436 | ||
| 1391 | /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit | 1437 | /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit |
| 1392 | * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_* | 1438 | * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_* |
| @@ -1395,7 +1441,7 @@ enum ethtool_link_mode_bit_indices { · 2 unmodified lines | |||
| 1395 | */ | 1441 | */ |
| 1396 | 1442 | ||
| 1397 | __ETHTOOL_LINK_MODE_LAST | 1443 | __ETHTOOL_LINK_MODE_LAST |
| 1398 | = ETHTOOL_LINK_MODE_5000baseT_Full_BIT, | 1444 | = ETHTOOL_LINK_MODE_FEC_BASER_BIT, |
| 1399 | }; | 1445 | }; |
| 1400 | 1446 | ||
| 1401 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ | 1447 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ |
| @@ -1707,6 +1753,8 @@ enum ethtool_reset_flags { · 305 unmodified lines | |||
| 1707 | * %ethtool_link_mode_bit_indices for the link modes, and other | 1753 | * %ethtool_link_mode_bit_indices for the link modes, and other |
| 1708 | * link features that the link partner advertised through | 1754 | * link features that the link partner advertised through |
| 1709 | * autonegotiation; 0 if unknown or not applicable. Read-only. | 1755 | * autonegotiation; 0 if unknown or not applicable. Read-only. |
| 1756 | * @transceiver: Used to distinguish different possible PHY types, | ||
| 1757 | * reported consistently by PHYLIB. Read-only. | ||
| 1710 | * | 1758 | * |
| 1711 | * If autonegotiation is disabled, the speed and @duplex represent the | 1759 | * If autonegotiation is disabled, the speed and @duplex represent the |
| 1712 | * fixed link mode and are writable if the driver supports multiple | 1760 | * fixed link mode and are writable if the driver supports multiple |
| @@ -1758,7 +1806,9 @@ struct ethtool_link_settings { · 45 unmodified lines | |||
| 1758 | __u8 eth_tp_mdix; | 1806 | __u8 eth_tp_mdix; |
| 1759 | __u8 eth_tp_mdix_ctrl; | 1807 | __u8 eth_tp_mdix_ctrl; |
| 1760 | __s8 link_mode_masks_nwords; | 1808 | __s8 link_mode_masks_nwords; |
| 1761 | __u32 reserved[8]; | 1809 | __u8 transceiver; |
| 1810 | __u8 reserved1[3]; | ||
| 1811 | __u32 reserved[7]; | ||
| 1762 | __u32 link_mode_masks[0]; | 1812 | __u32 link_mode_masks[0]; |
| 1763 | /* layout of link_mode_masks fields: | 1813 | /* layout of link_mode_masks fields: |
| 1764 | * __u32 map_supported[link_mode_masks_nwords]; | 1814 | * __u32 map_supported[link_mode_masks_nwords]; |
| @@ -358,13 +358,25 @@ struct fscrypt_key { · 357 unmodified lines | |||
| 358 | #define SYNC_FILE_RANGE_WRITE 2 | 358 | #define SYNC_FILE_RANGE_WRITE 2 |
| 359 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | 359 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 |
| 360 | 360 | ||
| 361 | /* flags for preadv2/pwritev2: */ | 361 | /* |
| 362 | #define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */ | 362 | * Flags for preadv2/pwritev2: |
| 363 | #define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC */ | 363 | */ |
| 364 | #define RWF_SYNC 0x00000004 /* per-IO O_SYNC */ | 364 | |
| 365 | #define RWF_NOWAIT 0x00000008 /* per-IO, return -EAGAIN if operation would block */ | 365 | typedef int __bitwise __kernel_rwf_t; |
| 366 | 366 | ||
| 367 | #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC |\ | 367 | /* high priority request, poll if possible */ |
| 368 | RWF_NOWAIT) | 368 | #define RWF_HIPRI ((__force __kernel_rwf_t)0x00000001) |
| 369 | |||
| 370 | /* per-IO O_DSYNC */ | ||
| 371 | #define RWF_DSYNC ((__force __kernel_rwf_t)0x00000002) | ||
| 372 | |||
| 373 | /* per-IO O_SYNC */ | ||
| 374 | #define RWF_SYNC ((__force __kernel_rwf_t)0x00000004) | ||
| 375 | |||
| 376 | /* per-IO, return -EAGAIN if operation would block */ | ||
| 377 | #define RWF_NOWAIT ((__force __kernel_rwf_t)0x00000008) | ||
| 378 | |||
| 379 | /* mask of flags supported by the kernel */ | ||
| 380 | #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT) | ||
| 369 | 381 | ||
| 370 | #endif /* _UAPI_LINUX_FS_H */ | 382 | #endif /* _UAPI_LINUX_FS_H */ |
| @@ -96,7 +96,7 @@ fsmap_advance( · 95 unmodified lines | |||
| 96 | #define FMR_OF_EXTENT_MAP 0x4 /* segment = extent map */ | 96 | #define FMR_OF_EXTENT_MAP 0x4 /* segment = extent map */ |
| 97 | #define FMR_OF_SHARED 0x8 /* segment = shared with another file */ | 97 | #define FMR_OF_SHARED 0x8 /* segment = shared with another file */ |
| 98 | #define FMR_OF_SPECIAL_OWNER 0x10 /* owner is a special value */ | 98 | #define FMR_OF_SPECIAL_OWNER 0x10 /* owner is a special value */ |
| 99 | #define FMR_OF_LAST 0x20 /* segment is the last in the FS */ | 99 | #define FMR_OF_LAST 0x20 /* segment is the last in the dataset */ |
| 100 | 100 | ||
| 101 | /* Each FS gets to define its own special owner codes. */ | 101 | /* Each FS gets to define its own special owner codes. */ |
| 102 | #define FMR_OWNER(type, code) (((__u64)type << 32) | \ | 102 | #define FMR_OWNER(type, code) (((__u64)type << 32) | \ |
| @@ -59,6 +59,7 @@ · 58 unmodified lines | |||
| 59 | #define ARPHRD_LAPB 516 /* LAPB */ | 59 | #define ARPHRD_LAPB 516 /* LAPB */ |
| 60 | #define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */ | 60 | #define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */ |
| 61 | #define ARPHRD_RAWHDLC 518 /* Raw HDLC */ | 61 | #define ARPHRD_RAWHDLC 518 /* Raw HDLC */ |
| 62 | #define ARPHRD_RAWIP 519 /* Raw IP */ | ||
| 62 | 63 | ||
| 63 | #define ARPHRD_TUNNEL 768 /* IPIP tunnel */ | 64 | #define ARPHRD_TUNNEL 768 /* IPIP tunnel */ |
| 64 | #define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */ | 65 | #define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */ |
| @@ -66,6 +66,7 @@ · 65 unmodified lines | |||
| 66 | #define ETH_P_ATALK 0x809B /* Appletalk DDP */ | 66 | #define ETH_P_ATALK 0x809B /* Appletalk DDP */ |
| 67 | #define ETH_P_AARP 0x80F3 /* Appletalk AARP */ | 67 | #define ETH_P_AARP 0x80F3 /* Appletalk AARP */ |
| 68 | #define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ | 68 | #define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ |
| 69 | #define ETH_P_ERSPAN 0x88BE /* ERSPAN type II */ | ||
| 69 | #define ETH_P_IPX 0x8137 /* IPX over DIX */ | 70 | #define ETH_P_IPX 0x8137 /* IPX over DIX */ |
| 70 | #define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ | 71 | #define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ |
| 71 | #define ETH_P_PAUSE 0x8808 /* IEEE Pause frames. See 802.3 31B */ | 72 | #define ETH_P_PAUSE 0x8808 /* IEEE Pause frames. See 802.3 31B */ |
| @@ -98,11 +99,13 @@ · 26 unmodified lines | |||
| 98 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ | 99 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ |
| 99 | #define ETH_P_80221 0x8917 /* IEEE 802.21 Media Independent Handover Protocol */ | 100 | #define ETH_P_80221 0x8917 /* IEEE 802.21 Media Independent Handover Protocol */ |
| 100 | #define ETH_P_HSR 0x892F /* IEC 62439-3 HSRv1 */ | 101 | #define ETH_P_HSR 0x892F /* IEC 62439-3 HSRv1 */ |
| 102 | #define ETH_P_NSH 0x894F /* Network Service Header */ | ||
| 101 | #define ETH_P_LOOPBACK 0x9000 /* Ethernet loopback packet, per IEEE 802.3 */ | 103 | #define ETH_P_LOOPBACK 0x9000 /* Ethernet loopback packet, per IEEE 802.3 */ |
| 102 | #define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 104 | #define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 103 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 105 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 104 | #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 106 | #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 105 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | 107 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 108 | #define ETH_P_IFE 0xED3E /* ForCES inter-FE LFB type */ | ||
| 106 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ | 109 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 107 | 110 | ||
| 108 | #define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value | 111 | #define ETH_P_802_3_MIN 0x0600 /* If the value in the ethernet type is less than this value |
| @@ -137,6 +140,9 @@ · 28 unmodified lines | |||
| 137 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ | 140 | #define ETH_P_IEEE802154 0x00F6 /* IEEE802.15.4 frame */ |
| 138 | #define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */ | 141 | #define ETH_P_CAIF 0x00F7 /* ST-Ericsson CAIF protocol */ |
| 139 | #define ETH_P_XDSA 0x00F8 /* Multiplexed DSA protocol */ | 142 | #define ETH_P_XDSA 0x00F8 /* Multiplexed DSA protocol */ |
| 143 | #define ETH_P_MAP 0x00F9 /* Qualcomm multiplexing and | ||
| 144 | * aggregation protocol | ||
| 145 | */ | ||
| 140 | 146 | ||
| 141 | /* | 147 | /* |
| 142 | * This is an Ethernet frame header. | 148 | * This is an Ethernet frame header. |
| @@ -134,6 +134,7 @@ enum { · 133 unmodified lines | |||
| 134 | IFLA_GRE_COLLECT_METADATA, | 134 | IFLA_GRE_COLLECT_METADATA, |
| 135 | IFLA_GRE_IGNORE_DF, | 135 | IFLA_GRE_IGNORE_DF, |
| 136 | IFLA_GRE_FWMARK, | 136 | IFLA_GRE_FWMARK, |
| 137 | IFLA_GRE_ERSPAN_INDEX, | ||
| 137 | __IFLA_GRE_MAX, | 138 | __IFLA_GRE_MAX, |
| 138 | }; | 139 | }; |
| 139 | 140 | ||
| @@ -142,6 +142,8 @@ enum { · 141 unmodified lines | |||
| 142 | INET_DIAG_PAD, | 142 | INET_DIAG_PAD, |
| 143 | INET_DIAG_MARK, | 143 | INET_DIAG_MARK, |
| 144 | INET_DIAG_BBRINFO, | 144 | INET_DIAG_BBRINFO, |
| 145 | INET_DIAG_CLASS_ID, | ||
| 146 | INET_DIAG_MD5SIG, | ||
| 145 | __INET_DIAG_MAX, | 147 | __INET_DIAG_MAX, |
| 146 | }; | 148 | }; |
| 147 | 149 | ||
| @@ -23,15 +23,15 @@ · 22 unmodified lines | |||
| 23 | #ifndef KFD_IOCTL_H_INCLUDED | 23 | #ifndef KFD_IOCTL_H_INCLUDED |
| 24 | #define KFD_IOCTL_H_INCLUDED | 24 | #define KFD_IOCTL_H_INCLUDED |
| 25 | 25 | ||
| 26 | #include <linux/types.h> | 26 | #include <drm/drm.h> |
| 27 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
| 28 | 28 | ||
| 29 | #define KFD_IOCTL_MAJOR_VERSION 1 | 29 | #define KFD_IOCTL_MAJOR_VERSION 1 |
| 30 | #define KFD_IOCTL_MINOR_VERSION 1 | 30 | #define KFD_IOCTL_MINOR_VERSION 1 |
| 31 | 31 | ||
| 32 | struct kfd_ioctl_get_version_args { | 32 | struct kfd_ioctl_get_version_args { |
| 33 | uint32_t major_version; /* from KFD */ | 33 | __u32 major_version; /* from KFD */ |
| 34 | uint32_t minor_version; /* from KFD */ | 34 | __u32 minor_version; /* from KFD */ |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | /* For kfd_ioctl_create_queue_args.queue_type. */ | 37 | /* For kfd_ioctl_create_queue_args.queue_type. */ |
| @@ -43,36 +43,36 @@ struct kfd_ioctl_get_version_args { · 5 unmodified lines | |||
| 43 | #define KFD_MAX_QUEUE_PRIORITY 15 | 43 | #define KFD_MAX_QUEUE_PRIORITY 15 |
| 44 | 44 | ||
| 45 | struct kfd_ioctl_create_queue_args { | 45 | struct kfd_ioctl_create_queue_args { |
| 46 | uint64_t ring_base_address; /* to KFD */ | 46 | __u64 ring_base_address; /* to KFD */ |
| 47 | uint64_t write_pointer_address; /* from KFD */ | 47 | __u64 write_pointer_address; /* from KFD */ |
| 48 | uint64_t read_pointer_address; /* from KFD */ | 48 | __u64 read_pointer_address; /* from KFD */ |
| 49 | uint64_t doorbell_offset; /* from KFD */ | 49 | __u64 doorbell_offset; /* from KFD */ |
| 50 | 50 | ||
| 51 | uint32_t ring_size; /* to KFD */ | 51 | __u32 ring_size; /* to KFD */ |
| 52 | uint32_t gpu_id; /* to KFD */ | 52 | __u32 gpu_id; /* to KFD */ |
| 53 | uint32_t queue_type; /* to KFD */ | 53 | __u32 queue_type; /* to KFD */ |
| 54 | uint32_t queue_percentage; /* to KFD */ | 54 | __u32 queue_percentage; /* to KFD */ |
| 55 | uint32_t queue_priority; /* to KFD */ | 55 | __u32 queue_priority; /* to KFD */ |
| 56 | uint32_t queue_id; /* from KFD */ | 56 | __u32 queue_id; /* from KFD */ |
| 57 | 57 | ||
| 58 | uint64_t eop_buffer_address; /* to KFD */ | 58 | __u64 eop_buffer_address; /* to KFD */ |
| 59 | uint64_t eop_buffer_size; /* to KFD */ | 59 | __u64 eop_buffer_size; /* to KFD */ |
| 60 | uint64_t ctx_save_restore_address; /* to KFD */ | 60 | __u64 ctx_save_restore_address; /* to KFD */ |
| 61 | uint64_t ctx_save_restore_size; /* to KFD */ | 61 | __u64 ctx_save_restore_size; /* to KFD */ |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | struct kfd_ioctl_destroy_queue_args { | 64 | struct kfd_ioctl_destroy_queue_args { |
| 65 | uint32_t queue_id; /* to KFD */ | 65 | __u32 queue_id; /* to KFD */ |
| 66 | uint32_t pad; | 66 | __u32 pad; |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | struct kfd_ioctl_update_queue_args { | 69 | struct kfd_ioctl_update_queue_args { |
| 70 | uint64_t ring_base_address; /* to KFD */ | 70 | __u64 ring_base_address; /* to KFD */ |
| 71 | 71 | ||
| 72 | uint32_t queue_id; /* to KFD */ | 72 | __u32 queue_id; /* to KFD */ |
| 73 | uint32_t ring_size; /* to KFD */ | 73 | __u32 ring_size; /* to KFD */ |
| 74 | uint32_t queue_percentage; /* to KFD */ | 74 | __u32 queue_percentage; /* to KFD */ |
| 75 | uint32_t queue_priority; /* to KFD */ | 75 | __u32 queue_priority; /* to KFD */ |
| 76 | }; | 76 | }; |
| 77 | 77 | ||
| 78 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ | 78 | /* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ |
| @@ -80,13 +80,13 @@ struct kfd_ioctl_update_queue_args { · 1 unmodified line | |||
| 80 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 | 80 | #define KFD_IOC_CACHE_POLICY_NONCOHERENT 1 |
| 81 | 81 | ||
| 82 | struct kfd_ioctl_set_memory_policy_args { | 82 | struct kfd_ioctl_set_memory_policy_args { |
| 83 | uint64_t alternate_aperture_base; /* to KFD */ | 83 | __u64 alternate_aperture_base; /* to KFD */ |
| 84 | uint64_t alternate_aperture_size; /* to KFD */ | 84 | __u64 alternate_aperture_size; /* to KFD */ |
| 85 | 85 | ||
| 86 | uint32_t gpu_id; /* to KFD */ | 86 | __u32 gpu_id; /* to KFD */ |
| 87 | uint32_t default_policy; /* to KFD */ | 87 | __u32 default_policy; /* to KFD */ |
| 88 | uint32_t alternate_policy; /* to KFD */ | 88 | __u32 alternate_policy; /* to KFD */ |
| 89 | uint32_t pad; | 89 | __u32 pad; |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | /* | 92 | /* |
| @@ -97,26 +97,26 @@ struct kfd_ioctl_set_memory_policy_args { · 4 unmodified lines | |||
| 97 | */ | 97 | */ |
| 98 | 98 | ||
| 99 | struct kfd_ioctl_get_clock_counters_args { | 99 | struct kfd_ioctl_get_clock_counters_args { |
| 100 | uint64_t gpu_clock_counter; /* from KFD */ | 100 | __u64 gpu_clock_counter; /* from KFD */ |
| 101 | uint64_t cpu_clock_counter; /* from KFD */ | 101 | __u64 cpu_clock_counter; /* from KFD */ |
| 102 | uint64_t system_clock_counter; /* from KFD */ | 102 | __u64 system_clock_counter; /* from KFD */ |
| 103 | uint64_t system_clock_freq; /* from KFD */ | 103 | __u64 system_clock_freq; /* from KFD */ |
| 104 | 104 | ||
| 105 | uint32_t gpu_id; /* to KFD */ | 105 | __u32 gpu_id; /* to KFD */ |
| 106 | uint32_t pad; | 106 | __u32 pad; |
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | #define NUM_OF_SUPPORTED_GPUS 7 | 109 | #define NUM_OF_SUPPORTED_GPUS 7 |
| 110 | 110 | ||
| 111 | struct kfd_process_device_apertures { | 111 | struct kfd_process_device_apertures { |
| 112 | uint64_t lds_base; /* from KFD */ | 112 | __u64 lds_base; /* from KFD */ |
| 113 | uint64_t lds_limit; /* from KFD */ | 113 | __u64 lds_limit; /* from KFD */ |
| 114 | uint64_t scratch_base; /* from KFD */ | 114 | __u64 scratch_base; /* from KFD */ |
| 115 | uint64_t scratch_limit; /* from KFD */ | 115 | __u64 scratch_limit; /* from KFD */ |
| 116 | uint64_t gpuvm_base; /* from KFD */ | 116 | __u64 gpuvm_base; /* from KFD */ |
| 117 | uint64_t gpuvm_limit; /* from KFD */ | 117 | __u64 gpuvm_limit; /* from KFD */ |
| 118 | uint32_t gpu_id; /* from KFD */ | 118 | __u32 gpu_id; /* from KFD */ |
| 119 | uint32_t pad; | 119 | __u32 pad; |
| 120 | }; | 120 | }; |
| 121 | 121 | ||
| 122 | struct kfd_ioctl_get_process_apertures_args { | 122 | struct kfd_ioctl_get_process_apertures_args { |
| @@ -124,8 +124,8 @@ struct kfd_ioctl_get_process_apertures_args { · 1 unmodified line | |||
| 124 | process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */ | 124 | process_apertures[NUM_OF_SUPPORTED_GPUS];/* from KFD */ |
| 125 | 125 | ||
| 126 | /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */ | 126 | /* from KFD, should be in the range [1 - NUM_OF_SUPPORTED_GPUS] */ |
| 127 | uint32_t num_of_nodes; | 127 | __u32 num_of_nodes; |
| 128 | uint32_t pad; | 128 | __u32 pad; |
| 129 | }; | 129 | }; |
| 130 | 130 | ||
| 131 | #define MAX_ALLOWED_NUM_POINTS 100 | 131 | #define MAX_ALLOWED_NUM_POINTS 100 |
| @@ -133,25 +133,25 @@ struct kfd_ioctl_get_process_apertures_args { · 1 unmodified line | |||
| 133 | #define MAX_ALLOWED_WAC_BUFF_SIZE 128 | 133 | #define MAX_ALLOWED_WAC_BUFF_SIZE 128 |
| 134 | 134 | ||
| 135 | struct kfd_ioctl_dbg_register_args { | 135 | struct kfd_ioctl_dbg_register_args { |
| 136 | uint32_t gpu_id; /* to KFD */ | 136 | __u32 gpu_id; /* to KFD */ |
| 137 | uint32_t pad; | 137 | __u32 pad; |
| 138 | }; | 138 | }; |
| 139 | 139 | ||
| 140 | struct kfd_ioctl_dbg_unregister_args { | 140 | struct kfd_ioctl_dbg_unregister_args { |
| 141 | uint32_t gpu_id; /* to KFD */ | 141 | __u32 gpu_id; /* to KFD */ |
| 142 | uint32_t pad; | 142 | __u32 pad; |
| 143 | }; | 143 | }; |
| 144 | 144 | ||
| 145 | struct kfd_ioctl_dbg_address_watch_args { | 145 | struct kfd_ioctl_dbg_address_watch_args { |
| 146 | uint64_t content_ptr; /* a pointer to the actual content */ | 146 | __u64 content_ptr; /* a pointer to the actual content */ |
| 147 | uint32_t gpu_id; /* to KFD */ | 147 | __u32 gpu_id; /* to KFD */ |
| 148 | uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */ | 148 | __u32 buf_size_in_bytes; /*including gpu_id and buf_size */ |
| 149 | }; | 149 | }; |
| 150 | 150 | ||
| 151 | struct kfd_ioctl_dbg_wave_control_args { | 151 | struct kfd_ioctl_dbg_wave_control_args { |
| 152 | uint64_t content_ptr; /* a pointer to the actual content */ | 152 | __u64 content_ptr; /* a pointer to the actual content */ |
| 153 | uint32_t gpu_id; /* to KFD */ | 153 | __u32 gpu_id; /* to KFD */ |
| 154 | uint32_t buf_size_in_bytes; /*including gpu_id and buf_size */ | 154 | __u32 buf_size_in_bytes; /*including gpu_id and buf_size */ |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | /* Matching HSA_EVENTTYPE */ | 157 | /* Matching HSA_EVENTTYPE */ |
| @@ -172,44 +172,44 @@ struct kfd_ioctl_dbg_wave_control_args { · 14 unmodified lines | |||
| 172 | #define KFD_SIGNAL_EVENT_LIMIT 256 | 172 | #define KFD_SIGNAL_EVENT_LIMIT 256 |
| 173 | 173 | ||
| 174 | struct kfd_ioctl_create_event_args { | 174 | struct kfd_ioctl_create_event_args { |
| 175 | uint64_t event_page_offset; /* from KFD */ | 175 | __u64 event_page_offset; /* from KFD */ |
| 176 | uint32_t event_trigger_data; /* from KFD - signal events only */ | 176 | __u32 event_trigger_data; /* from KFD - signal events only */ |
| 177 | uint32_t event_type; /* to KFD */ | 177 | __u32 event_type; /* to KFD */ |
| 178 | uint32_t auto_reset; /* to KFD */ | 178 | __u32 auto_reset; /* to KFD */ |
| 179 | uint32_t node_id; /* to KFD - only valid for certain | 179 | __u32 node_id; /* to KFD - only valid for certain |
| 180 | event types */ | 180 | event types */ |
| 181 | uint32_t event_id; /* from KFD */ | 181 | __u32 event_id; /* from KFD */ |
| 182 | uint32_t event_slot_index; /* from KFD */ | 182 | __u32 event_slot_index; /* from KFD */ |
| 183 | }; | 183 | }; |
| 184 | 184 | ||
| 185 | struct kfd_ioctl_destroy_event_args { | 185 | struct kfd_ioctl_destroy_event_args { |
| 186 | uint32_t event_id; /* to KFD */ | 186 | __u32 event_id; /* to KFD */ |
| 187 | uint32_t pad; | 187 | __u32 pad; |
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| 190 | struct kfd_ioctl_set_event_args { | 190 | struct kfd_ioctl_set_event_args { |
| 191 | uint32_t event_id; /* to KFD */ | 191 | __u32 event_id; /* to KFD */ |
| 192 | uint32_t pad; | 192 | __u32 pad; |
| 193 | }; | 193 | }; |
| 194 | 194 | ||
| 195 | struct kfd_ioctl_reset_event_args { | 195 | struct kfd_ioctl_reset_event_args { |
| 196 | uint32_t event_id; /* to KFD */ | 196 | __u32 event_id; /* to KFD */ |
| 197 | uint32_t pad; | 197 | __u32 pad; |
| 198 | }; | 198 | }; |
| 199 | 199 | ||
| 200 | struct kfd_memory_exception_failure { | 200 | struct kfd_memory_exception_failure { |
| 201 | uint32_t NotPresent; /* Page not present or supervisor privilege */ | 201 | __u32 NotPresent; /* Page not present or supervisor privilege */ |
| 202 | uint32_t ReadOnly; /* Write access to a read-only page */ | 202 | __u32 ReadOnly; /* Write access to a read-only page */ |
| 203 | uint32_t NoExecute; /* Execute access to a page marked NX */ | 203 | __u32 NoExecute; /* Execute access to a page marked NX */ |
| 204 | uint32_t pad; | 204 | __u32 pad; |
| 205 | }; | 205 | }; |
| 206 | 206 | ||
| 207 | /* memory exception data*/ | 207 | /* memory exception data*/ |
| 208 | struct kfd_hsa_memory_exception_data { | 208 | struct kfd_hsa_memory_exception_data { |
| 209 | struct kfd_memory_exception_failure failure; | 209 | struct kfd_memory_exception_failure failure; |
| 210 | uint64_t va; | 210 | __u64 va; |
| 211 | uint32_t gpu_id; | 211 | __u32 gpu_id; |
| 212 | uint32_t pad; | 212 | __u32 pad; |
| 213 | }; | 213 | }; |
| 214 | 214 | ||
| 215 | /* Event data*/ | 215 | /* Event data*/ |
| @@ -217,19 +217,19 @@ struct kfd_event_data { · 1 unmodified line | |||
| 217 | union { | 217 | union { |
| 218 | struct kfd_hsa_memory_exception_data memory_exception_data; | 218 | struct kfd_hsa_memory_exception_data memory_exception_data; |
| 219 | }; /* From KFD */ | 219 | }; /* From KFD */ |
| 220 | uint64_t kfd_event_data_ext; /* pointer to an extension structure | 220 | __u64 kfd_event_data_ext; /* pointer to an extension structure |
| 221 | for future exception types */ | 221 | for future exception types */ |
| 222 | uint32_t event_id; /* to KFD */ | 222 | __u32 event_id; /* to KFD */ |
| 223 | uint32_t pad; | 223 | __u32 pad; |
| 224 | }; | 224 | }; |
| 225 | 225 | ||
| 226 | struct kfd_ioctl_wait_events_args { | 226 | struct kfd_ioctl_wait_events_args { |
| 227 | uint64_t events_ptr; /* pointed to struct | 227 | __u64 events_ptr; /* pointed to struct |
| 228 | kfd_event_data array, to KFD */ | 228 | kfd_event_data array, to KFD */ |
| 229 | uint32_t num_events; /* to KFD */ | 229 | __u32 num_events; /* to KFD */ |
| 230 | uint32_t wait_for_all; /* to KFD */ | 230 | __u32 wait_for_all; /* to KFD */ |
| 231 | uint32_t timeout; /* to KFD */ | 231 | __u32 timeout; /* to KFD */ |
| 232 | uint32_t wait_result; /* from KFD */ | 232 | __u32 wait_result; /* from KFD */ |
| 233 | }; | 233 | }; |
| 234 | 234 | ||
| 235 | struct kfd_ioctl_set_scratch_backing_va_args { | 235 | struct kfd_ioctl_set_scratch_backing_va_args { |
| @@ -711,7 +711,8 @@ struct kvm_ppc_one_seg_page_size { · 710 unmodified lines | |||
| 711 | struct kvm_ppc_smmu_info { | 711 | struct kvm_ppc_smmu_info { |
| 712 | __u64 flags; | 712 | __u64 flags; |
| 713 | __u32 slb_size; | 713 | __u32 slb_size; |
| 714 | __u32 pad; | 714 | __u16 data_keys; /* # storage keys supported for data */ |
| 715 | __u16 instr_keys; /* # storage keys supported for instructions */ | ||
| 715 | struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ]; | 716 | struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ]; |
| 716 | }; | 717 | }; |
| 717 | 718 | ||
| @@ -22,7 +22,6 @@ enum { · 21 unmodified lines | |||
| 22 | LO_FLAGS_AUTOCLEAR = 4, | 22 | LO_FLAGS_AUTOCLEAR = 4, |
| 23 | LO_FLAGS_PARTSCAN = 8, | 23 | LO_FLAGS_PARTSCAN = 8, |
| 24 | LO_FLAGS_DIRECT_IO = 16, | 24 | LO_FLAGS_DIRECT_IO = 16, |
| 25 | LO_FLAGS_BLOCKSIZE = 32, | ||
| 26 | }; | 25 | }; |
| 27 | 26 | ||
| 28 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | 27 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ |
| @@ -60,8 +59,6 @@ struct loop_info64 { · 31 unmodified lines | |||
| 60 | __u64 lo_init[2]; | 59 | __u64 lo_init[2]; |
| 61 | }; | 60 | }; |
| 62 | 61 | ||
| 63 | #define LO_INFO_BLOCKSIZE(l) (l)->lo_init[0] | ||
| 64 | |||
| 65 | /* | 62 | /* |
| 66 | * Loop filter types | 63 | * Loop filter types |
| 67 | */ | 64 | */ |
| @@ -91,6 +88,7 @@ struct loop_info64 { · 23 unmodified lines | |||
| 91 | #define LOOP_CHANGE_FD 0x4C06 | 88 | #define LOOP_CHANGE_FD 0x4C06 |
| 92 | #define LOOP_SET_CAPACITY 0x4C07 | 89 | #define LOOP_SET_CAPACITY 0x4C07 |
| 93 | #define LOOP_SET_DIRECT_IO 0x4C08 | 90 | #define LOOP_SET_DIRECT_IO 0x4C08 |
| 91 | #define LOOP_SET_BLOCK_SIZE 0x4C09 | ||
| 94 | 92 | ||
| 95 | /* /dev/loop-control interface */ | 93 | /* /dev/loop-control interface */ |
| 96 | #define LOOP_CTL_ADD 0x4C80 | 94 | #define LOOP_CTL_ADD 0x4C80 |
| @@ -11,6 +11,7 @@ enum lwtunnel_encap_types { · 10 unmodified lines | |||
| 11 | LWTUNNEL_ENCAP_IP6, | 11 | LWTUNNEL_ENCAP_IP6, |
| 12 | LWTUNNEL_ENCAP_SEG6, | 12 | LWTUNNEL_ENCAP_SEG6, |
| 13 | LWTUNNEL_ENCAP_BPF, | 13 | LWTUNNEL_ENCAP_BPF, |
| 14 | LWTUNNEL_ENCAP_SEG6_LOCAL, | ||
| 14 | __LWTUNNEL_ENCAP_MAX, | 15 | __LWTUNNEL_ENCAP_MAX, |
| 15 | }; | 16 | }; |
| 16 | 17 | ||
| @@ -30,8 +30,6 @@ · 29 unmodified lines | |||
| 30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
| 31 | #include <linux/version.h> | 31 | #include <linux/version.h> |
| 32 | 32 | ||
| 33 | #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) | ||
| 34 | |||
| 35 | struct media_device_info { | 33 | struct media_device_info { |
| 36 | char driver[16]; | 34 | char driver[16]; |
| 37 | char model[32]; | 35 | char model[32]; |
| @@ -187,6 +185,9 @@ struct media_device_info { · 149 unmodified lines | |||
| 187 | #define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS | 185 | #define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS |
| 188 | #define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER | 186 | #define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER |
| 189 | #define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER | 187 | #define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER |
| 188 | |||
| 189 | /* Obsolete symbol for media_version, no longer used in the kernel */ | ||
| 190 | #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) | ||
| 190 | #endif | 191 | #endif |
| 191 | 192 | ||
| 192 | /* Entity flags */ | 193 | /* Entity flags */ |
| @@ -40,14 +40,33 @@ · 39 unmodified lines | |||
| 40 | * (non-running threads are de facto in such a | 40 | * (non-running threads are de facto in such a |
| 41 | * state). This covers threads from all processes | 41 | * state). This covers threads from all processes |
| 42 | * running on the system. This command returns 0. | 42 | * running on the system. This command returns 0. |
| 43 | * @MEMBARRIER_CMD_PRIVATE_EXPEDITED: | ||
| 44 | * Execute a memory barrier on each running | ||
| 45 | * thread belonging to the same process as the current | ||
| 46 | * thread. Upon return from system call, the | ||
| 47 | * caller thread is ensured that all its running | ||
| 48 | * threads siblings have passed through a state | ||
| 49 | * where all memory accesses to user-space | ||
| 50 | * addresses match program order between entry | ||
| 51 | * to and return from the system call | ||
| 52 | * (non-running threads are de facto in such a | ||
| 53 | * state). This only covers threads from the | ||
| 54 | * same processes as the caller thread. This | ||
| 55 | * command returns 0. The "expedited" commands | ||
| 56 | * complete faster than the non-expedited ones, | ||
| 57 | * they never block, but have the downside of | ||
| 58 | * causing extra overhead. | ||
| 43 | * | 59 | * |
| 44 | * Command to be passed to the membarrier system call. The commands need to | 60 | * Command to be passed to the membarrier system call. The commands need to |
| 45 | * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to | 61 | * be a single bit each, except for MEMBARRIER_CMD_QUERY which is assigned to |
| 46 | * the value 0. | 62 | * the value 0. |
| 47 | */ | 63 | */ |
| 48 | enum membarrier_cmd { | 64 | enum membarrier_cmd { |
| 49 | MEMBARRIER_CMD_QUERY = 0, | 65 | MEMBARRIER_CMD_QUERY = 0, |
| 50 | MEMBARRIER_CMD_SHARED = (1 << 0), | 66 | MEMBARRIER_CMD_SHARED = (1 << 0), |
| 67 | /* reserved for MEMBARRIER_CMD_SHARED_EXPEDITED (1 << 1) */ | ||
| 68 | /* reserved for MEMBARRIER_CMD_PRIVATE (1 << 2) */ | ||
| 69 | MEMBARRIER_CMD_PRIVATE_EXPEDITED = (1 << 3), | ||
| 51 | }; | 70 | }; |
| 52 | 71 | ||
| 53 | #endif /* _UAPI_LINUX_MEMBARRIER_H */ | 72 | #endif /* _UAPI_LINUX_MEMBARRIER_H */ |
| @@ -1,8 +1,32 @@ | |||
| 1 | #ifndef _UAPI_LINUX_MEMFD_H | 1 | #ifndef _UAPI_LINUX_MEMFD_H |
| 2 | #define _UAPI_LINUX_MEMFD_H | 2 | #define _UAPI_LINUX_MEMFD_H |
| 3 | 3 | ||
| 4 | #include <asm-generic/hugetlb_encode.h> | ||
| 5 | |||
| 4 | /* flags for memfd_create(2) (unsigned int) */ | 6 | /* flags for memfd_create(2) (unsigned int) */ |
| 5 | #define MFD_CLOEXEC 0x0001U | 7 | #define MFD_CLOEXEC 0x0001U |
| 6 | #define MFD_ALLOW_SEALING 0x0002U | 8 | #define MFD_ALLOW_SEALING 0x0002U |
| 9 | #define MFD_HUGETLB 0x0004U | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Huge page size encoding when MFD_HUGETLB is specified, and a huge page | ||
| 13 | * size other than the default is desired. See hugetlb_encode.h. | ||
| 14 | * All known huge page size encodings are provided here. It is the | ||
| 15 | * responsibility of the application to know which sizes are supported on | ||
| 16 | * the running system. See mmap(2) man page for details. | ||
| 17 | */ | ||
| 18 | #define MFD_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT | ||
| 19 | #define MFD_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK | ||
| 20 | |||
| 21 | #define MFD_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB | ||
| 22 | #define MFD_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB | ||
| 23 | #define MFD_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB | ||
| 24 | #define MFD_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB | ||
| 25 | #define MFD_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB | ||
| 26 | #define MFD_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB | ||
| 27 | #define MFD_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB | ||
| 28 | #define MFD_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB | ||
| 29 | #define MFD_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB | ||
| 30 | #define MFD_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB | ||
| 7 | 31 | ||
| 8 | #endif /* _UAPI_LINUX_MEMFD_H */ | 32 | #endif /* _UAPI_LINUX_MEMFD_H */ |
| @@ -2,6 +2,7 @@ · 1 unmodified line | |||
| 2 | #define _UAPI_LINUX_MMAN_H | 2 | #define _UAPI_LINUX_MMAN_H |
| 3 | 3 | ||
| 4 | #include <asm/mman.h> | 4 | #include <asm/mman.h> |
| 5 | #include <asm-generic/hugetlb_encode.h> | ||
| 5 | 6 | ||
| 6 | #define MREMAP_MAYMOVE 1 | 7 | #define MREMAP_MAYMOVE 1 |
| 7 | #define MREMAP_FIXED 2 | 8 | #define MREMAP_FIXED 2 |
| @@ -10,4 +11,25 @@ · 2 unmodified lines | |||
| 10 | #define OVERCOMMIT_ALWAYS 1 | 11 | #define OVERCOMMIT_ALWAYS 1 |
| 11 | #define OVERCOMMIT_NEVER 2 | 12 | #define OVERCOMMIT_NEVER 2 |
| 12 | 13 | ||
| 14 | /* | ||
| 15 | * Huge page size encoding when MAP_HUGETLB is specified, and a huge page | ||
| 16 | * size other than the default is desired. See hugetlb_encode.h. | ||
| 17 | * All known huge page size encodings are provided here. It is the | ||
| 18 | * responsibility of the application to know which sizes are supported on | ||
| 19 | * the running system. See mmap(2) man page for details. | ||
| 20 | */ | ||
| 21 | #define MAP_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT | ||
| 22 | #define MAP_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK | ||
| 23 | |||
| 24 | #define MAP_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB | ||
| 25 | #define MAP_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB | ||
| 26 | #define MAP_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB | ||
| 27 | #define MAP_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB | ||
| 28 | #define MAP_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB | ||
| 29 | #define MAP_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB | ||
| 30 | #define MAP_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB | ||
| 31 | #define MAP_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB | ||
| 32 | #define MAP_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB | ||
| 33 | #define MAP_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB | ||
| 34 | |||
| 13 | #endif /* _UAPI_LINUX_MMAN_H */ | 35 | #endif /* _UAPI_LINUX_MMAN_H */ |
| @@ -145,43 +145,6 @@ struct nd_cmd_clear_error { · 144 unmodified lines | |||
| 145 | __u64 cleared; | 145 | __u64 cleared; |
| 146 | } __packed; | 146 | } __packed; |
| 147 | 147 | ||
| 148 | struct nd_cmd_trans_spa { | ||
| 149 | __u64 spa; | ||
| 150 | __u32 status; | ||
| 151 | __u8 flags; | ||
| 152 | __u8 _reserved[3]; | ||
| 153 | __u64 trans_length; | ||
| 154 | __u32 num_nvdimms; | ||
| 155 | struct nd_nvdimm_device { | ||
| 156 | __u32 nfit_device_handle; | ||
| 157 | __u32 _reserved; | ||
| 158 | __u64 dpa; | ||
| 159 | } __packed devices[0]; | ||
| 160 | |||
| 161 | } __packed; | ||
| 162 | |||
| 163 | struct nd_cmd_ars_err_inj { | ||
| 164 | __u64 err_inj_spa_range_base; | ||
| 165 | __u64 err_inj_spa_range_length; | ||
| 166 | __u8 err_inj_options; | ||
| 167 | __u32 status; | ||
| 168 | } __packed; | ||
| 169 | |||
| 170 | struct nd_cmd_ars_err_inj_clr { | ||
| 171 | __u64 err_inj_clr_spa_range_base; | ||
| 172 | __u64 err_inj_clr_spa_range_length; | ||
| 173 | __u32 status; | ||
| 174 | } __packed; | ||
| 175 | |||
| 176 | struct nd_cmd_ars_err_inj_stat { | ||
| 177 | __u32 status; | ||
| 178 | __u32 inj_err_rec_count; | ||
| 179 | struct nd_error_stat_query_record { | ||
| 180 | __u64 err_inj_stat_spa_range_base; | ||
| 181 | __u64 err_inj_stat_spa_range_length; | ||
| 182 | } __packed record[0]; | ||
| 183 | } __packed; | ||
| 184 | |||
| 185 | enum { | 148 | enum { |
| 186 | ND_CMD_IMPLEMENTED = 0, | 149 | ND_CMD_IMPLEMENTED = 0, |
| 187 | 150 | ||
| @@ -1,10 +1,11 @@ | |||
| 1 | #ifndef _LINUX_NF_TABLES_H | 1 | #ifndef _LINUX_NF_TABLES_H |
| 2 | #define _LINUX_NF_TABLES_H | 2 | #define _LINUX_NF_TABLES_H |
| 3 | 3 | ||
| 4 | #define NFT_TABLE_MAXNAMELEN 32 | 4 | #define NFT_NAME_MAXLEN 256 |
| 5 | #define NFT_CHAIN_MAXNAMELEN 32 | 5 | #define NFT_TABLE_MAXNAMELEN NFT_NAME_MAXLEN |
| 6 | #define NFT_SET_MAXNAMELEN 32 | 6 | #define NFT_CHAIN_MAXNAMELEN NFT_NAME_MAXLEN |
| 7 | #define NFT_OBJ_MAXNAMELEN 32 | 7 | #define NFT_SET_MAXNAMELEN NFT_NAME_MAXLEN |
| 8 | #define NFT_OBJ_MAXNAMELEN NFT_NAME_MAXLEN | ||
| 8 | #define NFT_USERDATA_MAXLEN 256 | 9 | #define NFT_USERDATA_MAXLEN 256 |
| 9 | 10 | ||
| 10 | /** | 11 | /** |
| @@ -731,7 +732,8 @@ enum nft_exthdr_op { · 720 unmodified lines | |||
| 731 | * @NFTA_EXTHDR_OFFSET: extension header offset (NLA_U32) | 732 | * @NFTA_EXTHDR_OFFSET: extension header offset (NLA_U32) |
| 732 | * @NFTA_EXTHDR_LEN: extension header length (NLA_U32) | 733 | * @NFTA_EXTHDR_LEN: extension header length (NLA_U32) |
| 733 | * @NFTA_EXTHDR_FLAGS: extension header flags (NLA_U32) | 734 | * @NFTA_EXTHDR_FLAGS: extension header flags (NLA_U32) |
| 734 | * @NFTA_EXTHDR_OP: option match type (NLA_U8) | 735 | * @NFTA_EXTHDR_OP: option match type (NLA_U32) |
| 736 | * @NFTA_EXTHDR_SREG: option match type (NLA_U32) | ||
| 735 | */ | 737 | */ |
| 736 | enum nft_exthdr_attributes { | 738 | enum nft_exthdr_attributes { |
| 737 | NFTA_EXTHDR_UNSPEC, | 739 | NFTA_EXTHDR_UNSPEC, |
| @@ -741,6 +743,7 @@ enum nft_exthdr_attributes { · 3 unmodified lines | |||
| 741 | NFTA_EXTHDR_LEN, | 743 | NFTA_EXTHDR_LEN, |
| 742 | NFTA_EXTHDR_FLAGS, | 744 | NFTA_EXTHDR_FLAGS, |
| 743 | NFTA_EXTHDR_OP, | 745 | NFTA_EXTHDR_OP, |
| 746 | NFTA_EXTHDR_SREG, | ||
| 744 | __NFTA_EXTHDR_MAX | 747 | __NFTA_EXTHDR_MAX |
| 745 | }; | 748 | }; |
| 746 | #define NFTA_EXTHDR_MAX (__NFTA_EXTHDR_MAX - 1) | 749 | #define NFTA_EXTHDR_MAX (__NFTA_EXTHDR_MAX - 1) |
| @@ -808,11 +811,13 @@ enum nft_meta_keys { · 61 unmodified lines | |||
| 808 | * @NFT_RT_CLASSID: realm value of packet's route (skb->dst->tclassid) | 811 | * @NFT_RT_CLASSID: realm value of packet's route (skb->dst->tclassid) |
| 809 | * @NFT_RT_NEXTHOP4: routing nexthop for IPv4 | 812 | * @NFT_RT_NEXTHOP4: routing nexthop for IPv4 |
| 810 | * @NFT_RT_NEXTHOP6: routing nexthop for IPv6 | 813 | * @NFT_RT_NEXTHOP6: routing nexthop for IPv6 |
| 814 | * @NFT_RT_TCPMSS: fetch current path tcp mss | ||
| 811 | */ | 815 | */ |
| 812 | enum nft_rt_keys { | 816 | enum nft_rt_keys { |
| 813 | NFT_RT_CLASSID, | 817 | NFT_RT_CLASSID, |
| 814 | NFT_RT_NEXTHOP4, | 818 | NFT_RT_NEXTHOP4, |
| 815 | NFT_RT_NEXTHOP6, | 819 | NFT_RT_NEXTHOP6, |
| 820 | NFT_RT_TCPMSS, | ||
| 816 | }; | 821 | }; |
| 817 | 822 | ||
| 818 | /** | 823 | /** |
| @@ -1221,6 +1226,8 @@ enum nft_objref_attributes { · 402 unmodified lines | |||
| 1221 | enum nft_gen_attributes { | 1226 | enum nft_gen_attributes { |
| 1222 | NFTA_GEN_UNSPEC, | 1227 | NFTA_GEN_UNSPEC, |
| 1223 | NFTA_GEN_ID, | 1228 | NFTA_GEN_ID, |
| 1229 | NFTA_GEN_PROC_PID, | ||
| 1230 | NFTA_GEN_PROC_NAME, | ||
| 1224 | __NFTA_GEN_MAX | 1231 | __NFTA_GEN_MAX |
| 1225 | }; | 1232 | }; |
| 1226 | #define NFTA_GEN_MAX (__NFTA_GEN_MAX - 1) | 1233 | #define NFTA_GEN_MAX (__NFTA_GEN_MAX - 1) |
| @@ -1275,7 +1282,8 @@ enum nft_ct_helper_attributes { · 48 unmodified lines | |||
| 1275 | #define NFT_OBJECT_COUNTER 1 | 1282 | #define NFT_OBJECT_COUNTER 1 |
| 1276 | #define NFT_OBJECT_QUOTA 2 | 1283 | #define NFT_OBJECT_QUOTA 2 |
| 1277 | #define NFT_OBJECT_CT_HELPER 3 | 1284 | #define NFT_OBJECT_CT_HELPER 3 |
| 1278 | #define __NFT_OBJECT_MAX 4 | 1285 | #define NFT_OBJECT_LIMIT 4 |
| 1286 | #define __NFT_OBJECT_MAX 5 | ||
| 1279 | #define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1) | 1287 | #define NFT_OBJECT_MAX (__NFT_OBJECT_MAX - 1) |
| 1280 | 1288 | ||
| 1281 | /** | 1289 | /** |
| @@ -19,12 +19,13 @@ · 18 unmodified lines | |||
| 19 | struct xt_hashlimit_htable; | 19 | struct xt_hashlimit_htable; |
| 20 | 20 | ||
| 21 | enum { | 21 | enum { |
| 22 | XT_HASHLIMIT_HASH_DIP = 1 << 0, | 22 | XT_HASHLIMIT_HASH_DIP = 1 << 0, |
| 23 | XT_HASHLIMIT_HASH_DPT = 1 << 1, | 23 | XT_HASHLIMIT_HASH_DPT = 1 << 1, |
| 24 | XT_HASHLIMIT_HASH_SIP = 1 << 2, | 24 | XT_HASHLIMIT_HASH_SIP = 1 << 2, |
| 25 | XT_HASHLIMIT_HASH_SPT = 1 << 3, | 25 | XT_HASHLIMIT_HASH_SPT = 1 << 3, |
| 26 | XT_HASHLIMIT_INVERT = 1 << 4, | 26 | XT_HASHLIMIT_INVERT = 1 << 4, |
| 27 | XT_HASHLIMIT_BYTES = 1 << 5, | 27 | XT_HASHLIMIT_BYTES = 1 << 5, |
| 28 | XT_HASHLIMIT_RATE_MATCH = 1 << 6, | ||
| 28 | }; | 29 | }; |
| 29 | 30 | ||
| 30 | struct hashlimit_cfg { | 31 | struct hashlimit_cfg { |
| @@ -79,6 +80,21 @@ struct hashlimit_cfg2 { · 48 unmodified lines | |||
| 79 | __u8 srcmask, dstmask; | 80 | __u8 srcmask, dstmask; |
| 80 | }; | 81 | }; |
| 81 | 82 | ||
| 83 | struct hashlimit_cfg3 { | ||
| 84 | __u64 avg; /* Average secs between packets * scale */ | ||
| 85 | __u64 burst; /* Period multiplier for upper limit. */ | ||
| 86 | __u32 mode; /* bitmask of XT_HASHLIMIT_HASH_* */ | ||
| 87 | |||
| 88 | /* user specified */ | ||
| 89 | __u32 size; /* how many buckets */ | ||
| 90 | __u32 max; /* max number of entries */ | ||
| 91 | __u32 gc_interval; /* gc interval */ | ||
| 92 | __u32 expire; /* when do entries expire? */ | ||
| 93 | |||
| 94 | __u32 interval; | ||
| 95 | __u8 srcmask, dstmask; | ||
| 96 | }; | ||
| 97 | |||
| 82 | struct xt_hashlimit_mtinfo1 { | 98 | struct xt_hashlimit_mtinfo1 { |
| 83 | char name[IFNAMSIZ]; | 99 | char name[IFNAMSIZ]; |
| 84 | struct hashlimit_cfg1 cfg; | 100 | struct hashlimit_cfg1 cfg; |
| @@ -95,4 +111,12 @@ struct xt_hashlimit_mtinfo2 { · 10 unmodified lines | |||
| 95 | struct xt_hashlimit_htable *hinfo __attribute__((aligned(8))); | 111 | struct xt_hashlimit_htable *hinfo __attribute__((aligned(8))); |
| 96 | }; | 112 | }; |
| 97 | 113 | ||
| 114 | struct xt_hashlimit_mtinfo3 { | ||
| 115 | char name[NAME_MAX]; | ||
| 116 | struct hashlimit_cfg3 cfg; | ||
| 117 | |||
| 118 | /* Used internally by the kernel */ | ||
| 119 | struct xt_hashlimit_htable *hinfo __attribute__((aligned(8))); | ||
| 120 | }; | ||
| 121 | |||
| 98 | #endif /* _UAPI_XT_HASHLIMIT_H */ | 122 | #endif /* _UAPI_XT_HASHLIMIT_H */ |
| @@ -69,6 +69,9 @@ struct nlmsghdr { · 68 unmodified lines | |||
| 69 | #define NLM_F_CREATE 0x400 /* Create, if it does not exist */ | 69 | #define NLM_F_CREATE 0x400 /* Create, if it does not exist */ |
| 70 | #define NLM_F_APPEND 0x800 /* Add to end of list */ | 70 | #define NLM_F_APPEND 0x800 /* Add to end of list */ |
| 71 | 71 | ||
| 72 | /* Modifiers to DELETE request */ | ||
| 73 | #define NLM_F_NONREC 0x100 /* Do not delete recursively */ | ||
| 74 | |||
| 72 | /* Flags for ACK message */ | 75 | /* Flags for ACK message */ |
| 73 | #define NLM_F_CAPPED 0x100 /* request was capped */ | 76 | #define NLM_F_CAPPED 0x100 /* request was capped */ |
| 74 | #define NLM_F_ACK_TLVS 0x200 /* extended ACK TVLs were included */ | 77 | #define NLM_F_ACK_TLVS 0x200 /* extended ACK TVLs were included */ |
| @@ -226,5 +229,22 @@ struct nlattr { · 151 unmodified lines | |||
| 226 | #define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) | 229 | #define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) |
| 227 | #define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) | 230 | #define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr))) |
| 228 | 231 | ||
| 232 | /* Generic 32 bitflags attribute content sent to the kernel. | ||
| 233 | * | ||
| 234 | * The value is a bitmap that defines the values being set | ||
| 235 | * The selector is a bitmask that defines which value is legit | ||
| 236 | * | ||
| 237 | * Examples: | ||
| 238 | * value = 0x0, and selector = 0x1 | ||
| 239 | * implies we are selecting bit 1 and we want to set its value to 0. | ||
| 240 | * | ||
| 241 | * value = 0x2, and selector = 0x2 | ||
| 242 | * implies we are selecting bit 2 and we want to set its value to 1. | ||
| 243 | * | ||
| 244 | */ | ||
| 245 | struct nla_bitfield32 { | ||
| 246 | __u32 value; | ||
| 247 | __u32 selector; | ||
| 248 | }; | ||
| 229 | 249 | ||
| 230 | #endif /* _UAPI__LINUX_NETLINK_H */ | 250 | #endif /* _UAPI__LINUX_NETLINK_H */ |
| @@ -513,6 +513,7 @@ · 512 unmodified lines | |||
| 513 | #define PCI_EXP_DEVSTA_URD 0x0008 /* Unsupported Request Detected */ | 513 | #define PCI_EXP_DEVSTA_URD 0x0008 /* Unsupported Request Detected */ |
| 514 | #define PCI_EXP_DEVSTA_AUXPD 0x0010 /* AUX Power Detected */ | 514 | #define PCI_EXP_DEVSTA_AUXPD 0x0010 /* AUX Power Detected */ |
| 515 | #define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */ | 515 | #define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */ |
| 516 | #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1 12 /* v1 endpoints without link end here */ | ||
| 516 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ | 517 | #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ |
| 517 | #define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */ | 518 | #define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */ |
| 518 | #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ | 519 | #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ |
| @@ -556,7 +557,7 @@ · 37 unmodified lines | |||
| 556 | #define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ | 557 | #define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */ |
| 557 | #define PCI_EXP_LNKSTA_LBMS 0x4000 /* Link Bandwidth Management Status */ | 558 | #define PCI_EXP_LNKSTA_LBMS 0x4000 /* Link Bandwidth Management Status */ |
| 558 | #define PCI_EXP_LNKSTA_LABS 0x8000 /* Link Autonomous Bandwidth Status */ | 559 | #define PCI_EXP_LNKSTA_LABS 0x8000 /* Link Autonomous Bandwidth Status */ |
| 559 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 20 /* v1 endpoints end here */ | 560 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 20 /* v1 endpoints with link end here */ |
| 560 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ | 561 | #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ |
| 561 | #define PCI_EXP_SLTCAP_ABP 0x00000001 /* Attention Button Present */ | 562 | #define PCI_EXP_SLTCAP_ABP 0x00000001 /* Attention Button Present */ |
| 562 | #define PCI_EXP_SLTCAP_PCP 0x00000002 /* Power Controller Present */ | 563 | #define PCI_EXP_SLTCAP_PCP 0x00000002 /* Power Controller Present */ |
| @@ -639,7 +640,7 @@ · 76 unmodified lines | |||
| 639 | #define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000 /* Enable OBFF Message type B */ | 640 | #define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000 /* Enable OBFF Message type B */ |
| 640 | #define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ | 641 | #define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ |
| 641 | #define PCI_EXP_DEVSTA2 42 /* Device Status 2 */ | 642 | #define PCI_EXP_DEVSTA2 42 /* Device Status 2 */ |
| 642 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints end here */ | 643 | #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints without link end here */ |
| 643 | #define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */ | 644 | #define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */ |
| 644 | #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ | 645 | #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ |
| 645 | #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5.0GT/s */ | 646 | #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5.0GT/s */ |
| @@ -647,6 +648,7 @@ · 1 unmodified line | |||
| 647 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ | 648 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ |
| 648 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | 649 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ |
| 649 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ | 650 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ |
| 651 | #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */ | ||
| 650 | #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ | 652 | #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ |
| 651 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ | 653 | #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ |
| 652 | #define PCI_EXP_SLTSTA2 58 /* Slot Status 2 */ | 654 | #define PCI_EXP_SLTSTA2 58 /* Slot Status 2 */ |
| @@ -733,23 +735,17 @@ · 80 unmodified lines | |||
| 733 | #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ | 735 | #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ |
| 734 | #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ | 736 | #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ |
| 735 | #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ | 737 | #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ |
| 736 | /* Correctable Err Reporting Enable */ | 738 | #define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */ |
| 737 | #define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 | 739 | #define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */ |
| 738 | /* Non-fatal Err Reporting Enable */ | 740 | #define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */ |
| 739 | #define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 | ||
| 740 | /* Fatal Err Reporting Enable */ | ||
| 741 | #define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 | ||
| 742 | #define PCI_ERR_ROOT_STATUS 48 | 741 | #define PCI_ERR_ROOT_STATUS 48 |
| 743 | #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ | 742 | #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ |
| 744 | /* Multi ERR_COR Received */ | 743 | #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */ |
| 745 | #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 | 744 | #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */ |
| 746 | /* ERR_FATAL/NONFATAL Received */ | 745 | #define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 /* Multiple FATAL/NONFATAL */ |
| 747 | #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 | 746 | #define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First UNC is Fatal */ |
| 748 | /* Multi ERR_FATAL/NONFATAL Received */ | 747 | #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ |
| 749 | #define PCI_ERR_ROOT_MULTI_UNCOR_RCV 0x00000008 | 748 | #define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ |
| 750 | #define PCI_ERR_ROOT_FIRST_FATAL 0x00000010 /* First Fatal */ | ||
| 751 | #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ | ||
| 752 | #define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ | ||
| 753 | #define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */ | 749 | #define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */ |
| 754 | 750 | ||
| 755 | /* Virtual Channel */ | 751 | /* Virtual Channel */ |
| @@ -967,6 +963,7 @@ · 211 unmodified lines | |||
| 967 | #define PCI_EXP_DPC_CAP_RP_EXT 0x20 /* Root Port Extensions for DPC */ | 963 | #define PCI_EXP_DPC_CAP_RP_EXT 0x20 /* Root Port Extensions for DPC */ |
| 968 | #define PCI_EXP_DPC_CAP_POISONED_TLP 0x40 /* Poisoned TLP Egress Blocking Supported */ | 964 | #define PCI_EXP_DPC_CAP_POISONED_TLP 0x40 /* Poisoned TLP Egress Blocking Supported */ |
| 969 | #define PCI_EXP_DPC_CAP_SW_TRIGGER 0x80 /* Software Triggering Supported */ | 965 | #define PCI_EXP_DPC_CAP_SW_TRIGGER 0x80 /* Software Triggering Supported */ |
| 966 | #define PCI_EXP_DPC_RP_PIO_LOG_SIZE 0xF00 /* RP PIO log size */ | ||
| 970 | #define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */ | 967 | #define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */ |
| 971 | 968 | ||
| 972 | #define PCI_EXP_DPC_CTL 6 /* DPC control */ | 969 | #define PCI_EXP_DPC_CTL 6 /* DPC control */ |
| @@ -980,6 +977,15 @@ · 7 unmodified lines | |||
| 980 | 977 | ||
| 981 | #define PCI_EXP_DPC_SOURCE_ID 10 /* DPC Source Identifier */ | 978 | #define PCI_EXP_DPC_SOURCE_ID 10 /* DPC Source Identifier */ |
| 982 | 979 | ||
| 980 | #define PCI_EXP_DPC_RP_PIO_STATUS 0x0C /* RP PIO Status */ | ||
| 981 | #define PCI_EXP_DPC_RP_PIO_MASK 0x10 /* RP PIO MASK */ | ||
| 982 | #define PCI_EXP_DPC_RP_PIO_SEVERITY 0x14 /* RP PIO Severity */ | ||
| 983 | #define PCI_EXP_DPC_RP_PIO_SYSERROR 0x18 /* RP PIO SysError */ | ||
| 984 | #define PCI_EXP_DPC_RP_PIO_EXCEPTION 0x1C /* RP PIO Exception */ | ||
| 985 | #define PCI_EXP_DPC_RP_PIO_HEADER_LOG 0x20 /* RP PIO Header Log */ | ||
| 986 | #define PCI_EXP_DPC_RP_PIO_IMPSPEC_LOG 0x30 /* RP PIO ImpSpec Log */ | ||
| 987 | #define PCI_EXP_DPC_RP_PIO_TLPPREFIX_LOG 0x34 /* RP PIO TLP Prefix Log */ | ||
| 988 | |||
| 983 | /* Precision Time Measurement */ | 989 | /* Precision Time Measurement */ |
| 984 | #define PCI_PTM_CAP 0x04 /* PTM Capability */ | 990 | #define PCI_PTM_CAP 0x04 /* PTM Capability */ |
| 985 | #define PCI_PTM_CAP_REQ 0x00000001 /* Requester capable */ | 991 | #define PCI_PTM_CAP_REQ 0x00000001 /* Requester capable */ |
| @@ -139,8 +139,9 @@ enum perf_event_sample_format { · 138 unmodified lines | |||
| 139 | PERF_SAMPLE_IDENTIFIER = 1U << 16, | 139 | PERF_SAMPLE_IDENTIFIER = 1U << 16, |
| 140 | PERF_SAMPLE_TRANSACTION = 1U << 17, | 140 | PERF_SAMPLE_TRANSACTION = 1U << 17, |
| 141 | PERF_SAMPLE_REGS_INTR = 1U << 18, | 141 | PERF_SAMPLE_REGS_INTR = 1U << 18, |
| 142 | PERF_SAMPLE_PHYS_ADDR = 1U << 19, | ||
| 142 | 143 | ||
| 143 | PERF_SAMPLE_MAX = 1U << 19, /* non-ABI */ | 144 | PERF_SAMPLE_MAX = 1U << 20, /* non-ABI */ |
| 144 | }; | 145 | }; |
| 145 | 146 | ||
| 146 | /* | 147 | /* |
| @@ -174,6 +175,8 @@ enum perf_branch_sample_type_shift { · 27 unmodified lines | |||
| 174 | PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 14, /* no flags */ | 175 | PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 14, /* no flags */ |
| 175 | PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 15, /* no cycles */ | 176 | PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 15, /* no cycles */ |
| 176 | 177 | ||
| 178 | PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, /* save branch type */ | ||
| 179 | |||
| 177 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ | 180 | PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */ |
| 178 | }; | 181 | }; |
| 179 | 182 | ||
| @@ -198,9 +201,30 @@ enum perf_branch_sample_type { · 18 unmodified lines | |||
| 198 | PERF_SAMPLE_BRANCH_NO_FLAGS = 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT, | 201 | PERF_SAMPLE_BRANCH_NO_FLAGS = 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT, |
| 199 | PERF_SAMPLE_BRANCH_NO_CYCLES = 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT, | 202 | PERF_SAMPLE_BRANCH_NO_CYCLES = 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT, |
| 200 | 203 | ||
| 204 | PERF_SAMPLE_BRANCH_TYPE_SAVE = | ||
| 205 | 1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT, | ||
| 206 | |||
| 201 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, | 207 | PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT, |
| 202 | }; | 208 | }; |
| 203 | 209 | ||
| 210 | /* | ||
| 211 | * Common flow change classification | ||
| 212 | */ | ||
| 213 | enum { | ||
| 214 | PERF_BR_UNKNOWN = 0, /* unknown */ | ||
| 215 | PERF_BR_COND = 1, /* conditional */ | ||
| 216 | PERF_BR_UNCOND = 2, /* unconditional */ | ||
| 217 | PERF_BR_IND = 3, /* indirect */ | ||
| 218 | PERF_BR_CALL = 4, /* function call */ | ||
| 219 | PERF_BR_IND_CALL = 5, /* indirect function call */ | ||
| 220 | PERF_BR_RET = 6, /* function return */ | ||
| 221 | PERF_BR_SYSCALL = 7, /* syscall */ | ||
| 222 | PERF_BR_SYSRET = 8, /* syscall return */ | ||
| 223 | PERF_BR_COND_CALL = 9, /* conditional function call */ | ||
| 224 | PERF_BR_COND_RET = 10, /* conditional function return */ | ||
| 225 | PERF_BR_MAX, | ||
| 226 | }; | ||
| 227 | |||
| 204 | #define PERF_SAMPLE_BRANCH_PLM_ALL \ | 228 | #define PERF_SAMPLE_BRANCH_PLM_ALL \ |
| 205 | (PERF_SAMPLE_BRANCH_USER|\ | 229 | (PERF_SAMPLE_BRANCH_USER|\ |
| 206 | PERF_SAMPLE_BRANCH_KERNEL|\ | 230 | PERF_SAMPLE_BRANCH_KERNEL|\ |
| @@ -791,6 +815,7 @@ enum perf_event_type { · 584 unmodified lines | |||
| 791 | * { u64 transaction; } && PERF_SAMPLE_TRANSACTION | 815 | * { u64 transaction; } && PERF_SAMPLE_TRANSACTION |
| 792 | * { u64 abi; # enum perf_sample_regs_abi | 816 | * { u64 abi; # enum perf_sample_regs_abi |
| 793 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR | 817 | * u64 regs[weight(mask)]; } && PERF_SAMPLE_REGS_INTR |
| 818 | * { u64 phys_addr;} && PERF_SAMPLE_PHYS_ADDR | ||
| 794 | * }; | 819 | * }; |
| 795 | */ | 820 | */ |
| 796 | PERF_RECORD_SAMPLE = 9, | 821 | PERF_RECORD_SAMPLE = 9, |
| @@ -931,14 +956,20 @@ union perf_mem_data_src { · 134 unmodified lines | |||
| 931 | mem_snoop:5, /* snoop mode */ | 956 | mem_snoop:5, /* snoop mode */ |
| 932 | mem_lock:2, /* lock instr */ | 957 | mem_lock:2, /* lock instr */ |
| 933 | mem_dtlb:7, /* tlb access */ | 958 | mem_dtlb:7, /* tlb access */ |
| 934 | mem_rsvd:31; | 959 | mem_lvl_num:4, /* memory hierarchy level number */ |
| 960 | mem_remote:1, /* remote */ | ||
| 961 | mem_snoopx:2, /* snoop mode, ext */ | ||
| 962 | mem_rsvd:24; | ||
| 935 | }; | 963 | }; |
| 936 | }; | 964 | }; |
| 937 | #elif defined(__BIG_ENDIAN_BITFIELD) | 965 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 938 | union perf_mem_data_src { | 966 | union perf_mem_data_src { |
| 939 | __u64 val; | 967 | __u64 val; |
| 940 | struct { | 968 | struct { |
| 941 | __u64 mem_rsvd:31, | 969 | __u64 mem_rsvd:24, |
| 970 | mem_snoopx:2, /* snoop mode, ext */ | ||
| 971 | mem_remote:1, /* remote */ | ||
| 972 | mem_lvl_num:4, /* memory hierarchy level number */ | ||
| 942 | mem_dtlb:7, /* tlb access */ | 973 | mem_dtlb:7, /* tlb access */ |
| 943 | mem_lock:2, /* lock instr */ | 974 | mem_lock:2, /* lock instr */ |
| 944 | mem_snoop:5, /* snoop mode */ | 975 | mem_snoop:5, /* snoop mode */ |
| @@ -975,6 +1006,22 @@ union perf_mem_data_src { · 30 unmodified lines | |||
| 975 | #define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ | 1006 | #define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ |
| 976 | #define PERF_MEM_LVL_SHIFT 5 | 1007 | #define PERF_MEM_LVL_SHIFT 5 |
| 977 | 1008 | ||
| 1009 | #define PERF_MEM_REMOTE_REMOTE 0x01 /* Remote */ | ||
| 1010 | #define PERF_MEM_REMOTE_SHIFT 37 | ||
| 1011 | |||
| 1012 | #define PERF_MEM_LVLNUM_L1 0x01 /* L1 */ | ||
| 1013 | #define PERF_MEM_LVLNUM_L2 0x02 /* L2 */ | ||
| 1014 | #define PERF_MEM_LVLNUM_L3 0x03 /* L3 */ | ||
| 1015 | #define PERF_MEM_LVLNUM_L4 0x04 /* L4 */ | ||
| 1016 | /* 5-0xa available */ | ||
| 1017 | #define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */ | ||
| 1018 | #define PERF_MEM_LVLNUM_LFB 0x0c /* LFB */ | ||
| 1019 | #define PERF_MEM_LVLNUM_RAM 0x0d /* RAM */ | ||
| 1020 | #define PERF_MEM_LVLNUM_PMEM 0x0e /* PMEM */ | ||
| 1021 | #define PERF_MEM_LVLNUM_NA 0x0f /* N/A */ | ||
| 1022 | |||
| 1023 | #define PERF_MEM_LVLNUM_SHIFT 33 | ||
| 1024 | |||
| 978 | /* snoop mode */ | 1025 | /* snoop mode */ |
| 979 | #define PERF_MEM_SNOOP_NA 0x01 /* not available */ | 1026 | #define PERF_MEM_SNOOP_NA 0x01 /* not available */ |
| 980 | #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ | 1027 | #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ |
| @@ -983,6 +1030,10 @@ union perf_mem_data_src { · 2 unmodified lines | |||
| 983 | #define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */ | 1030 | #define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */ |
| 984 | #define PERF_MEM_SNOOP_SHIFT 19 | 1031 | #define PERF_MEM_SNOOP_SHIFT 19 |
| 985 | 1032 | ||
| 1033 | #define PERF_MEM_SNOOPX_FWD 0x01 /* forward */ | ||
| 1034 | /* 1 free */ | ||
| 1035 | #define PERF_MEM_SNOOPX_SHIFT 37 | ||
| 1036 | |||
| 986 | /* locked instruction */ | 1037 | /* locked instruction */ |
| 987 | #define PERF_MEM_LOCK_NA 0x01 /* not available */ | 1038 | #define PERF_MEM_LOCK_NA 0x01 /* not available */ |
| 988 | #define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */ | 1039 | #define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */ |
| @@ -1015,6 +1066,7 @@ union perf_mem_data_src { · 26 unmodified lines | |||
| 1015 | * in_tx: running in a hardware transaction | 1066 | * in_tx: running in a hardware transaction |
| 1016 | * abort: aborting a hardware transaction | 1067 | * abort: aborting a hardware transaction |
| 1017 | * cycles: cycles from last branch (or 0 if not supported) | 1068 | * cycles: cycles from last branch (or 0 if not supported) |
| 1069 | * type: branch type | ||
| 1018 | */ | 1070 | */ |
| 1019 | struct perf_branch_entry { | 1071 | struct perf_branch_entry { |
| 1020 | __u64 from; | 1072 | __u64 from; |
| @@ -1024,7 +1076,8 @@ struct perf_branch_entry { · 3 unmodified lines | |||
| 1024 | in_tx:1, /* in transaction */ | 1076 | in_tx:1, /* in transaction */ |
| 1025 | abort:1, /* transaction abort */ | 1077 | abort:1, /* transaction abort */ |
| 1026 | cycles:16, /* cycle count to last branch */ | 1078 | cycles:16, /* cycle count to last branch */ |
| 1027 | reserved:44; | 1079 | type:4, /* branch type */ |
| 1080 | reserved:40; | ||
| 1028 | }; | 1081 | }; |
| 1029 | 1082 | ||
| 1030 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ | 1083 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ |
| @@ -95,8 +95,8 @@ struct pps_kparams { · 94 unmodified lines | |||
| 95 | #define PPS_CAPTURECLEAR 0x02 /* capture clear events */ | 95 | #define PPS_CAPTURECLEAR 0x02 /* capture clear events */ |
| 96 | #define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */ | 96 | #define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */ |
| 97 | 97 | ||
| 98 | #define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */ | 98 | #define PPS_OFFSETASSERT 0x10 /* apply compensation for assert event */ |
| 99 | #define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */ | 99 | #define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear event */ |
| 100 | 100 | ||
| 101 | #define PPS_CANWAIT 0x100 /* can we wait for an event? */ | 101 | #define PPS_CANWAIT 0x100 /* can we wait for an event? */ |
| 102 | #define PPS_CANPOLL 0x200 /* bit reserved for future use */ | 102 | #define PPS_CANPOLL 0x200 /* bit reserved for future use */ |
| @@ -33,7 +33,6 @@ · 32 unmodified lines | |||
| 33 | #ifndef _UAPI_LINUX_QUOTA_ | 33 | #ifndef _UAPI_LINUX_QUOTA_ |
| 34 | #define _UAPI_LINUX_QUOTA_ | 34 | #define _UAPI_LINUX_QUOTA_ |
| 35 | 35 | ||
| 36 | #include <linux/errno.h> | ||
| 37 | #include <linux/types.h> | 36 | #include <linux/types.h> |
| 38 | 37 | ||
| 39 | #define __DQUOT_VERSION__ "dquot_6.6.0" | 38 | #define __DQUOT_VERSION__ "dquot_6.6.0" |
| @@ -324,9 +324,10 @@ struct mdp_superblock_1 { · 323 unmodified lines | |||
| 324 | #define MD_FEATURE_RECOVERY_BITMAP 128 /* recovery that is happening | 324 | #define MD_FEATURE_RECOVERY_BITMAP 128 /* recovery that is happening |
| 325 | * is guided by bitmap. | 325 | * is guided by bitmap. |
| 326 | */ | 326 | */ |
| 327 | #define MD_FEATURE_CLUSTERED 256 /* clustered MD */ | 327 | #define MD_FEATURE_CLUSTERED 256 /* clustered MD */ |
| 328 | #define MD_FEATURE_JOURNAL 512 /* support write cache */ | 328 | #define MD_FEATURE_JOURNAL 512 /* support write cache */ |
| 329 | #define MD_FEATURE_PPL 1024 /* support PPL */ | 329 | #define MD_FEATURE_PPL 1024 /* support PPL */ |
| 330 | #define MD_FEATURE_MULTIPLE_PPLS 2048 /* support for multiple PPLs */ | ||
| 330 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ | 331 | #define MD_FEATURE_ALL (MD_FEATURE_BITMAP_OFFSET \ |
| 331 | |MD_FEATURE_RECOVERY_OFFSET \ | 332 | |MD_FEATURE_RECOVERY_OFFSET \ |
| 332 | |MD_FEATURE_RESHAPE_ACTIVE \ | 333 | |MD_FEATURE_RESHAPE_ACTIVE \ |
| @@ -338,6 +339,7 @@ struct mdp_superblock_1 { · 5 unmodified lines | |||
| 338 | |MD_FEATURE_CLUSTERED \ | 339 | |MD_FEATURE_CLUSTERED \ |
| 339 | |MD_FEATURE_JOURNAL \ | 340 | |MD_FEATURE_JOURNAL \ |
| 340 | |MD_FEATURE_PPL \ | 341 | |MD_FEATURE_PPL \ |
| 342 | |MD_FEATURE_MULTIPLE_PPLS \ | ||
| 341 | ) | 343 | ) |
| 342 | 344 | ||
| 343 | struct r5l_payload_header { | 345 | struct r5l_payload_header { |
| @@ -683,10 +683,29 @@ struct tcamsg { · 682 unmodified lines | |||
| 683 | unsigned char tca__pad1; | 683 | unsigned char tca__pad1; |
| 684 | unsigned short tca__pad2; | 684 | unsigned short tca__pad2; |
| 685 | }; | 685 | }; |
| 686 | |||
| 687 | enum { | ||
| 688 | TCA_ROOT_UNSPEC, | ||
| 689 | TCA_ROOT_TAB, | ||
| 690 | #define TCA_ACT_TAB TCA_ROOT_TAB | ||
| 691 | #define TCAA_MAX TCA_ROOT_TAB | ||
| 692 | TCA_ROOT_FLAGS, | ||
| 693 | TCA_ROOT_COUNT, | ||
| 694 | TCA_ROOT_TIME_DELTA, /* in msecs */ | ||
| 695 | __TCA_ROOT_MAX, | ||
| 696 | #define TCA_ROOT_MAX (__TCA_ROOT_MAX - 1) | ||
| 697 | }; | ||
| 698 | |||
| 686 | #define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) | 699 | #define TA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcamsg)))) |
| 687 | #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) | 700 | #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg)) |
| 688 | #define TCA_ACT_TAB 1 /* attr type must be >=1 */ | 701 | /* tcamsg flags stored in attribute TCA_ROOT_FLAGS |
| 689 | #define TCAA_MAX 1 | 702 | * |
| 703 | * TCA_FLAG_LARGE_DUMP_ON user->kernel to request for larger than TCA_ACT_MAX_PRIO | ||
| 704 | * actions in a dump. All dump responses will contain the number of actions | ||
| 705 | * being dumped stored in for user app's consumption in TCA_ROOT_COUNT | ||
| 706 | * | ||
| 707 | */ | ||
| 708 | #define TCA_FLAG_LARGE_DUMP_ON (1 << 0) | ||
| 690 | 709 | ||
| 691 | /* New extended info filters for IFLA_EXT_MASK */ | 710 | /* New extended info filters for IFLA_EXT_MASK */ |
| 692 | #define RTEXT_FILTER_VF (1 << 0) | 711 | #define RTEXT_FILTER_VF (1 << 0) |
| @@ -0,0 +1,124 @@ | |||
| 1 | /* Types and definitions for AF_RXRPC. | ||
| 2 | * | ||
| 3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
| 4 | * Written by David Howells (dhowells@redhat.com) | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU General Public Licence | ||
| 8 | * as published by the Free Software Foundation; either version | ||
| 9 | * 2 of the Licence, or (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef _UAPI_LINUX_RXRPC_H | ||
| 13 | #define _UAPI_LINUX_RXRPC_H | ||
| 14 | |||
| 15 | #include <linux/types.h> | ||
| 16 | #include <linux/in.h> | ||
| 17 | #include <linux/in6.h> | ||
| 18 | |||
| 19 | /* | ||
| 20 | * RxRPC socket address | ||
| 21 | */ | ||
| 22 | struct sockaddr_rxrpc { | ||
| 23 | sa_family_t srx_family; /* address family */ | ||
| 24 | u16 srx_service; /* service desired */ | ||
| 25 | u16 transport_type; /* type of transport socket (SOCK_DGRAM) */ | ||
| 26 | u16 transport_len; /* length of transport address */ | ||
| 27 | union { | ||
| 28 | sa_family_t family; /* transport address family */ | ||
| 29 | struct sockaddr_in sin; /* IPv4 transport address */ | ||
| 30 | struct sockaddr_in6 sin6; /* IPv6 transport address */ | ||
| 31 | } transport; | ||
| 32 | }; | ||
| 33 | |||
| 34 | /* | ||
| 35 | * RxRPC socket options | ||
| 36 | */ | ||
| 37 | #define RXRPC_SECURITY_KEY 1 /* [clnt] set client security key */ | ||
| 38 | #define RXRPC_SECURITY_KEYRING 2 /* [srvr] set ring of server security keys */ | ||
| 39 | #define RXRPC_EXCLUSIVE_CONNECTION 3 /* Deprecated; use RXRPC_EXCLUSIVE_CALL instead */ | ||
| 40 | #define RXRPC_MIN_SECURITY_LEVEL 4 /* minimum security level */ | ||
| 41 | #define RXRPC_UPGRADEABLE_SERVICE 5 /* Upgrade service[0] -> service[1] */ | ||
| 42 | #define RXRPC_SUPPORTED_CMSG 6 /* Get highest supported control message type */ | ||
| 43 | |||
| 44 | /* | ||
| 45 | * RxRPC control messages | ||
| 46 | * - If neither abort or accept are specified, the message is a data message. | ||
| 47 | * - terminal messages mean that a user call ID tag can be recycled | ||
| 48 | * - s/r/- indicate whether these are applicable to sendmsg() and/or recvmsg() | ||
| 49 | */ | ||
| 50 | enum rxrpc_cmsg_type { | ||
| 51 | RXRPC_USER_CALL_ID = 1, /* sr: user call ID specifier */ | ||
| 52 | RXRPC_ABORT = 2, /* sr: abort request / notification [terminal] */ | ||
| 53 | RXRPC_ACK = 3, /* -r: [Service] RPC op final ACK received [terminal] */ | ||
| 54 | RXRPC_NET_ERROR = 5, /* -r: network error received [terminal] */ | ||
| 55 | RXRPC_BUSY = 6, /* -r: server busy received [terminal] */ | ||
| 56 | RXRPC_LOCAL_ERROR = 7, /* -r: local error generated [terminal] */ | ||
| 57 | RXRPC_NEW_CALL = 8, /* -r: [Service] new incoming call notification */ | ||
| 58 | RXRPC_ACCEPT = 9, /* s-: [Service] accept request */ | ||
| 59 | RXRPC_EXCLUSIVE_CALL = 10, /* s-: Call should be on exclusive connection */ | ||
| 60 | RXRPC_UPGRADE_SERVICE = 11, /* s-: Request service upgrade for client call */ | ||
| 61 | RXRPC_TX_LENGTH = 12, /* s-: Total length of Tx data */ | ||
| 62 | RXRPC__SUPPORTED | ||
| 63 | }; | ||
| 64 | |||
| 65 | /* | ||
| 66 | * RxRPC security levels | ||
| 67 | */ | ||
| 68 | #define RXRPC_SECURITY_PLAIN 0 /* plain secure-checksummed packets only */ | ||
| 69 | #define RXRPC_SECURITY_AUTH 1 /* authenticated packets */ | ||
| 70 | #define RXRPC_SECURITY_ENCRYPT 2 /* encrypted packets */ | ||
| 71 | |||
| 72 | /* | ||
| 73 | * RxRPC security indices | ||
| 74 | */ | ||
| 75 | #define RXRPC_SECURITY_NONE 0 /* no security protocol */ | ||
| 76 | #define RXRPC_SECURITY_RXKAD 2 /* kaserver or kerberos 4 */ | ||
| 77 | #define RXRPC_SECURITY_RXGK 4 /* gssapi-based */ | ||
| 78 | #define RXRPC_SECURITY_RXK5 5 /* kerberos 5 */ | ||
| 79 | |||
| 80 | /* | ||
| 81 | * RxRPC-level abort codes | ||
| 82 | */ | ||
| 83 | #define RX_CALL_DEAD -1 /* call/conn has been inactive and is shut down */ | ||
| 84 | #define RX_INVALID_OPERATION -2 /* invalid operation requested / attempted */ | ||
| 85 | #define RX_CALL_TIMEOUT -3 /* call timeout exceeded */ | ||
| 86 | #define RX_EOF -4 /* unexpected end of data on read op */ | ||
| 87 | #define RX_PROTOCOL_ERROR -5 /* low-level protocol error */ | ||
| 88 | #define RX_USER_ABORT -6 /* generic user abort */ | ||
| 89 | #define RX_ADDRINUSE -7 /* UDP port in use */ | ||
| 90 | #define RX_DEBUGI_BADTYPE -8 /* bad debugging packet type */ | ||
| 91 | |||
| 92 | /* | ||
| 93 | * (un)marshalling abort codes (rxgen) | ||
| 94 | */ | ||
| 95 | #define RXGEN_CC_MARSHAL -450 | ||
| 96 | #define RXGEN_CC_UNMARSHAL -451 | ||
| 97 | #define RXGEN_SS_MARSHAL -452 | ||
| 98 | #define RXGEN_SS_UNMARSHAL -453 | ||
| 99 | #define RXGEN_DECODE -454 | ||
| 100 | #define RXGEN_OPCODE -455 | ||
| 101 | #define RXGEN_SS_XDRFREE -456 | ||
| 102 | #define RXGEN_CC_XDRFREE -457 | ||
| 103 | |||
| 104 | /* | ||
| 105 | * Rx kerberos security abort codes | ||
| 106 | * - unfortunately we have no generalised security abort codes to say things | ||
| 107 | * like "unsupported security", so we have to use these instead and hope the | ||
| 108 | * other side understands | ||
| 109 | */ | ||
| 110 | #define RXKADINCONSISTENCY 19270400 /* security module structure inconsistent */ | ||
| 111 | #define RXKADPACKETSHORT 19270401 /* packet too short for security challenge */ | ||
| 112 | #define RXKADLEVELFAIL 19270402 /* security level negotiation failed */ | ||
| 113 | #define RXKADTICKETLEN 19270403 /* ticket length too short or too long */ | ||
| 114 | #define RXKADOUTOFSEQUENCE 19270404 /* packet had bad sequence number */ | ||
| 115 | #define RXKADNOAUTH 19270405 /* caller not authorised */ | ||
| 116 | #define RXKADBADKEY 19270406 /* illegal key: bad parity or weak */ | ||
| 117 | #define RXKADBADTICKET 19270407 /* security object was passed a bad ticket */ | ||
| 118 | #define RXKADUNKNOWNKEY 19270408 /* ticket contained unknown key version number */ | ||
| 119 | #define RXKADEXPIRED 19270409 /* authentication expired */ | ||
| 120 | #define RXKADSEALEDINCON 19270410 /* sealed data inconsistent */ | ||
| 121 | #define RXKADDATALEN 19270411 /* user data too long */ | ||
| 122 | #define RXKADILLEGALLEVEL 19270412 /* caller not authorised to use encrypted conns */ | ||
| 123 | |||
| 124 | #endif /* _UAPI_LINUX_RXRPC_H */ | ||
| @@ -11,27 +11,34 @@ · 10 unmodified lines | |||
| 11 | #define SECCOMP_MODE_FILTER 2 /* uses user-supplied filter. */ | 11 | #define SECCOMP_MODE_FILTER 2 /* uses user-supplied filter. */ |
| 12 | 12 | ||
| 13 | /* Valid operations for seccomp syscall. */ | 13 | /* Valid operations for seccomp syscall. */ |
| 14 | #define SECCOMP_SET_MODE_STRICT 0 | 14 | #define SECCOMP_SET_MODE_STRICT 0 |
| 15 | #define SECCOMP_SET_MODE_FILTER 1 | 15 | #define SECCOMP_SET_MODE_FILTER 1 |
| 16 | #define SECCOMP_GET_ACTION_AVAIL 2 | ||
| 16 | 17 | ||
| 17 | /* Valid flags for SECCOMP_SET_MODE_FILTER */ | 18 | /* Valid flags for SECCOMP_SET_MODE_FILTER */ |
| 18 | #define SECCOMP_FILTER_FLAG_TSYNC 1 | 19 | #define SECCOMP_FILTER_FLAG_TSYNC 1 |
| 20 | #define SECCOMP_FILTER_FLAG_LOG 2 | ||
| 19 | 21 | ||
| 20 | /* | 22 | /* |
| 21 | * All BPF programs must return a 32-bit value. | 23 | * All BPF programs must return a 32-bit value. |
| 22 | * The bottom 16-bits are for optional return data. | 24 | * The bottom 16-bits are for optional return data. |
| 23 | * The upper 16-bits are ordered from least permissive values to most. | 25 | * The upper 16-bits are ordered from least permissive values to most, |
| 26 | * as a signed value (so 0x8000000 is negative). | ||
| 24 | * | 27 | * |
| 25 | * The ordering ensures that a min_t() over composed return values always | 28 | * The ordering ensures that a min_t() over composed return values always |
| 26 | * selects the least permissive choice. | 29 | * selects the least permissive choice. |
| 27 | */ | 30 | */ |
| 28 | #define SECCOMP_RET_KILL 0x00000000U /* kill the task immediately */ | 31 | #define SECCOMP_RET_KILL_PROCESS 0x80000000U /* kill the process */ |
| 29 | #define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */ | 32 | #define SECCOMP_RET_KILL_THREAD 0x00000000U /* kill the thread */ |
| 30 | #define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */ | 33 | #define SECCOMP_RET_KILL SECCOMP_RET_KILL_THREAD |
| 31 | #define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */ | 34 | #define SECCOMP_RET_TRAP 0x00030000U /* disallow and force a SIGSYS */ |
| 32 | #define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */ | 35 | #define SECCOMP_RET_ERRNO 0x00050000U /* returns an errno */ |
| 36 | #define SECCOMP_RET_TRACE 0x7ff00000U /* pass to a tracer or disallow */ | ||
| 37 | #define SECCOMP_RET_LOG 0x7ffc0000U /* allow after logging */ | ||
| 38 | #define SECCOMP_RET_ALLOW 0x7fff0000U /* allow */ | ||
| 33 | 39 | ||
| 34 | /* Masks for the return value sections. */ | 40 | /* Masks for the return value sections. */ |
| 41 | #define SECCOMP_RET_ACTION_FULL 0xffff0000U | ||
| 35 | #define SECCOMP_RET_ACTION 0x7fff0000U | 42 | #define SECCOMP_RET_ACTION 0x7fff0000U |
| 36 | #define SECCOMP_RET_DATA 0x0000ffffU | 43 | #define SECCOMP_RET_DATA 0x0000ffffU |
| 37 | 44 | ||
| @@ -33,16 +33,26 @@ struct seg6_iptunnel_encap { · 32 unmodified lines | |||
| 33 | enum { | 33 | enum { |
| 34 | SEG6_IPTUN_MODE_INLINE, | 34 | SEG6_IPTUN_MODE_INLINE, |
| 35 | SEG6_IPTUN_MODE_ENCAP, | 35 | SEG6_IPTUN_MODE_ENCAP, |
| 36 | SEG6_IPTUN_MODE_L2ENCAP, | ||
| 36 | }; | 37 | }; |
| 37 | 38 | ||
| 38 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
| 39 | 40 | ||
| 40 | static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo) | 41 | static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo) |
| 41 | { | 42 | { |
| 42 | int encap = (tuninfo->mode == SEG6_IPTUN_MODE_ENCAP); | 43 | int head = 0; |
| 43 | 44 | ||
| 44 | return ((tuninfo->srh->hdrlen + 1) << 3) + | 45 | switch (tuninfo->mode) { |
| 45 | (encap * sizeof(struct ipv6hdr)); | 46 | case SEG6_IPTUN_MODE_INLINE: |
| 47 | break; | ||
| 48 | case SEG6_IPTUN_MODE_ENCAP: | ||
| 49 | head = sizeof(struct ipv6hdr); | ||
| 50 | break; | ||
| 51 | case SEG6_IPTUN_MODE_L2ENCAP: | ||
| 52 | return 0; | ||
| 53 | } | ||
| 54 | |||
| 55 | return ((tuninfo->srh->hdrlen + 1) << 3) + head; | ||
| 46 | } | 56 | } |
| 47 | 57 | ||
| 48 | #endif | 58 | #endif |
| @@ -0,0 +1,68 @@ | |||
| 1 | /* | ||
| 2 | * SR-IPv6 implementation | ||
| 3 | * | ||
| 4 | * Author: | ||
| 5 | * David Lebrun <david.lebrun@uclouvain.be> | ||
| 6 | * | ||
| 7 | * | ||
| 8 | * This program is free software; you can redistribute it and/or | ||
| 9 | * modify it under the terms of the GNU General Public License | ||
| 10 | * as published by the Free Software Foundation; either version | ||
| 11 | * 2 of the License, or (at your option) any later version. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef _UAPI_LINUX_SEG6_LOCAL_H | ||
| 15 | #define _UAPI_LINUX_SEG6_LOCAL_H | ||
| 16 | |||
| 17 | #include <linux/seg6.h> | ||
| 18 | |||
| 19 | enum { | ||
| 20 | SEG6_LOCAL_UNSPEC, | ||
| 21 | SEG6_LOCAL_ACTION, | ||
| 22 | SEG6_LOCAL_SRH, | ||
| 23 | SEG6_LOCAL_TABLE, | ||
| 24 | SEG6_LOCAL_NH4, | ||
| 25 | SEG6_LOCAL_NH6, | ||
| 26 | SEG6_LOCAL_IIF, | ||
| 27 | SEG6_LOCAL_OIF, | ||
| 28 | __SEG6_LOCAL_MAX, | ||
| 29 | }; | ||
| 30 | #define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1) | ||
| 31 | |||
| 32 | enum { | ||
| 33 | SEG6_LOCAL_ACTION_UNSPEC = 0, | ||
| 34 | /* node segment */ | ||
| 35 | SEG6_LOCAL_ACTION_END = 1, | ||
| 36 | /* adjacency segment (IPv6 cross-connect) */ | ||
| 37 | SEG6_LOCAL_ACTION_END_X = 2, | ||
| 38 | /* lookup of next seg NH in table */ | ||
| 39 | SEG6_LOCAL_ACTION_END_T = 3, | ||
| 40 | /* decap and L2 cross-connect */ | ||
| 41 | SEG6_LOCAL_ACTION_END_DX2 = 4, | ||
| 42 | /* decap and IPv6 cross-connect */ | ||
| 43 | SEG6_LOCAL_ACTION_END_DX6 = 5, | ||
| 44 | /* decap and IPv4 cross-connect */ | ||
| 45 | SEG6_LOCAL_ACTION_END_DX4 = 6, | ||
| 46 | /* decap and lookup of DA in v6 table */ | ||
| 47 | SEG6_LOCAL_ACTION_END_DT6 = 7, | ||
| 48 | /* decap and lookup of DA in v4 table */ | ||
| 49 | SEG6_LOCAL_ACTION_END_DT4 = 8, | ||
| 50 | /* binding segment with insertion */ | ||
| 51 | SEG6_LOCAL_ACTION_END_B6 = 9, | ||
| 52 | /* binding segment with encapsulation */ | ||
| 53 | SEG6_LOCAL_ACTION_END_B6_ENCAP = 10, | ||
| 54 | /* binding segment with MPLS encap */ | ||
| 55 | SEG6_LOCAL_ACTION_END_BM = 11, | ||
| 56 | /* lookup last seg in table */ | ||
| 57 | SEG6_LOCAL_ACTION_END_S = 12, | ||
| 58 | /* forward to SR-unaware VNF with static proxy */ | ||
| 59 | SEG6_LOCAL_ACTION_END_AS = 13, | ||
| 60 | /* forward to SR-unaware VNF with masquerading */ | ||
| 61 | SEG6_LOCAL_ACTION_END_AM = 14, | ||
| 62 | |||
| 63 | __SEG6_LOCAL_ACTION_MAX, | ||
| 64 | }; | ||
| 65 | |||
| 66 | #define SEG6_LOCAL_ACTION_MAX (__SEG6_LOCAL_ACTION_MAX - 1) | ||
| 67 | |||
| 68 | #endif | ||
| @@ -56,8 +56,6 @@ · 55 unmodified lines | |||
| 56 | #define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */ | 56 | #define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */ |
| 57 | #define PORT_RT2880 29 /* Ralink RT2880 internal UART */ | 57 | #define PORT_RT2880 29 /* Ralink RT2880 internal UART */ |
| 58 | #define PORT_16550A_FSL64 30 /* Freescale 16550 UART with 64 FIFOs */ | 58 | #define PORT_16550A_FSL64 30 /* Freescale 16550 UART with 64 FIFOs */ |
| 59 | #define PORT_DA830 31 /* TI DA8xx/66AK2x */ | ||
| 60 | #define PORT_MAX_8250 31 /* max port ID */ | ||
| 61 | 59 | ||
| 62 | /* | 60 | /* |
| 63 | * ARM specific type numbers. These are not currently guaranteed | 61 | * ARM specific type numbers. These are not currently guaranteed |
| @@ -70,12 +68,17 @@ · 6 unmodified lines | |||
| 70 | #define PORT_CLPS711X 33 | 68 | #define PORT_CLPS711X 33 |
| 71 | #define PORT_SA1100 34 | 69 | #define PORT_SA1100 34 |
| 72 | #define PORT_UART00 35 | 70 | #define PORT_UART00 35 |
| 71 | #define PORT_OWL 36 | ||
| 73 | #define PORT_21285 37 | 72 | #define PORT_21285 37 |
| 74 | 73 | ||
| 75 | /* Sparc type numbers. */ | 74 | /* Sparc type numbers. */ |
| 76 | #define PORT_SUNZILOG 38 | 75 | #define PORT_SUNZILOG 38 |
| 77 | #define PORT_SUNSAB 39 | 76 | #define PORT_SUNSAB 39 |
| 78 | 77 | ||
| 78 | /* Intel EG20 */ | ||
| 79 | #define PORT_PCH_8LINE 44 | ||
| 80 | #define PORT_PCH_2LINE 45 | ||
| 81 | |||
| 79 | /* DEC */ | 82 | /* DEC */ |
| 80 | #define PORT_DZ 46 | 83 | #define PORT_DZ 46 |
| 81 | #define PORT_ZS 47 | 84 | #define PORT_ZS 47 |
| @@ -205,8 +208,8 @@ · 123 unmodified lines | |||
| 205 | /* MAX310X */ | 208 | /* MAX310X */ |
| 206 | #define PORT_MAX310X 94 | 209 | #define PORT_MAX310X 94 |
| 207 | 210 | ||
| 208 | /* High Speed UART for Medfield */ | 211 | /* TI DA8xx/66AK2x */ |
| 209 | #define PORT_MFD 95 | 212 | #define PORT_DA830 95 |
| 210 | 213 | ||
| 211 | /* TI OMAP-UART */ | 214 | /* TI OMAP-UART */ |
| 212 | #define PORT_OMAP 96 | 215 | #define PORT_OMAP 96 |
| @@ -271,4 +274,7 @@ · 58 unmodified lines | |||
| 271 | /* MPS2 UART */ | 274 | /* MPS2 UART */ |
| 272 | #define PORT_MPS2UART 116 | 275 | #define PORT_MPS2UART 116 |
| 273 | 276 | ||
| 277 | /* MediaTek BTIF */ | ||
| 278 | #define PORT_MTK_BTIF 117 | ||
| 279 | |||
| 274 | #endif /* _UAPILINUX_SERIAL_CORE_H */ | 280 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |
| @@ -3,6 +3,7 @@ · 2 unmodified lines | |||
| 3 | 3 | ||
| 4 | #include <linux/ipc.h> | 4 | #include <linux/ipc.h> |
| 5 | #include <linux/errno.h> | 5 | #include <linux/errno.h> |
| 6 | #include <asm-generic/hugetlb_encode.h> | ||
| 6 | #ifndef __KERNEL__ | 7 | #ifndef __KERNEL__ |
| 7 | #include <unistd.h> | 8 | #include <unistd.h> |
| 8 | #endif | 9 | #endif |
| @@ -40,11 +41,37 @@ struct shmid_ds { · 31 unmodified lines | |||
| 40 | /* Include the definition of shmid64_ds and shminfo64 */ | 41 | /* Include the definition of shmid64_ds and shminfo64 */ |
| 41 | #include <asm/shmbuf.h> | 42 | #include <asm/shmbuf.h> |
| 42 | 43 | ||
| 43 | /* permission flag for shmget */ | 44 | /* |
| 45 | * shmget() shmflg values. | ||
| 46 | */ | ||
| 47 | /* The bottom nine bits are the same as open(2) mode flags */ | ||
| 44 | #define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ | 48 | #define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ |
| 45 | #define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ | 49 | #define SHM_W 0200 /* or S_IWUGO from <linux/stat.h> */ |
| 50 | /* Bits 9 & 10 are IPC_CREAT and IPC_EXCL */ | ||
| 51 | #define SHM_HUGETLB 04000 /* segment will use huge TLB pages */ | ||
| 52 | #define SHM_NORESERVE 010000 /* don't check for reservations */ | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Huge page size encoding when SHM_HUGETLB is specified, and a huge page | ||
| 56 | * size other than the default is desired. See hugetlb_encode.h | ||
| 57 | */ | ||
| 58 | #define SHM_HUGE_SHIFT HUGETLB_FLAG_ENCODE_SHIFT | ||
| 59 | #define SHM_HUGE_MASK HUGETLB_FLAG_ENCODE_MASK | ||
| 60 | |||
| 61 | #define SHM_HUGE_64KB HUGETLB_FLAG_ENCODE_64KB | ||
| 62 | #define SHM_HUGE_512KB HUGETLB_FLAG_ENCODE_512KB | ||
| 63 | #define SHM_HUGE_1MB HUGETLB_FLAG_ENCODE_1MB | ||
| 64 | #define SHM_HUGE_2MB HUGETLB_FLAG_ENCODE_2MB | ||
| 65 | #define SHM_HUGE_8MB HUGETLB_FLAG_ENCODE_8MB | ||
| 66 | #define SHM_HUGE_16MB HUGETLB_FLAG_ENCODE_16MB | ||
| 67 | #define SHM_HUGE_256MB HUGETLB_FLAG_ENCODE_256MB | ||
| 68 | #define SHM_HUGE_1GB HUGETLB_FLAG_ENCODE_1GB | ||
| 69 | #define SHM_HUGE_2GB HUGETLB_FLAG_ENCODE_2GB | ||
| 70 | #define SHM_HUGE_16GB HUGETLB_FLAG_ENCODE_16GB | ||
| 46 | 71 | ||
| 47 | /* mode for attach */ | 72 | /* |
| 73 | * shmat() shmflg values | ||
| 74 | */ | ||
| 48 | #define SHM_RDONLY 010000 /* read-only access */ | 75 | #define SHM_RDONLY 010000 /* read-only access */ |
| 49 | #define SHM_RND 020000 /* round attach address to SHMLBA boundary */ | 76 | #define SHM_RND 020000 /* round attach address to SHMLBA boundary */ |
| 50 | #define SHM_REMAP 040000 /* take-over region on attach */ | 77 | #define SHM_REMAP 040000 /* take-over region on attach */ |
| @@ -184,12 +184,7 @@ enum · 183 unmodified lines | |||
| 184 | LINUX_MIB_DELAYEDACKLOST, /* DelayedACKLost */ | 184 | LINUX_MIB_DELAYEDACKLOST, /* DelayedACKLost */ |
| 185 | LINUX_MIB_LISTENOVERFLOWS, /* ListenOverflows */ | 185 | LINUX_MIB_LISTENOVERFLOWS, /* ListenOverflows */ |
| 186 | LINUX_MIB_LISTENDROPS, /* ListenDrops */ | 186 | LINUX_MIB_LISTENDROPS, /* ListenDrops */ |
| 187 | LINUX_MIB_TCPPREQUEUED, /* TCPPrequeued */ | ||
| 188 | LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG, /* TCPDirectCopyFromBacklog */ | ||
| 189 | LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, /* TCPDirectCopyFromPrequeue */ | ||
| 190 | LINUX_MIB_TCPPREQUEUEDROPPED, /* TCPPrequeueDropped */ | ||
| 191 | LINUX_MIB_TCPHPHITS, /* TCPHPHits */ | 187 | LINUX_MIB_TCPHPHITS, /* TCPHPHits */ |
| 192 | LINUX_MIB_TCPHPHITSTOUSER, /* TCPHPHitsToUser */ | ||
| 193 | LINUX_MIB_TCPPUREACKS, /* TCPPureAcks */ | 188 | LINUX_MIB_TCPPUREACKS, /* TCPPureAcks */ |
| 194 | LINUX_MIB_TCPHPACKS, /* TCPHPAcks */ | 189 | LINUX_MIB_TCPHPACKS, /* TCPHPAcks */ |
| 195 | LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */ | 190 | LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */ |
| @@ -208,14 +203,12 @@ enum · 12 unmodified lines | |||
| 208 | LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */ | 203 | LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */ |
| 209 | LINUX_MIB_TCPLOSSFAILURES, /* TCPLossFailures */ | 204 | LINUX_MIB_TCPLOSSFAILURES, /* TCPLossFailures */ |
| 210 | LINUX_MIB_TCPFASTRETRANS, /* TCPFastRetrans */ | 205 | LINUX_MIB_TCPFASTRETRANS, /* TCPFastRetrans */ |
| 211 | LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */ | ||
| 212 | LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */ | 206 | LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */ |
| 213 | LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */ | 207 | LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */ |
| 214 | LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */ | 208 | LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */ |
| 215 | LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */ | 209 | LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */ |
| 216 | LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */ | 210 | LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */ |
| 217 | LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */ | 211 | LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */ |
| 218 | LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */ | ||
| 219 | LINUX_MIB_TCPRCVCOLLAPSED, /* TCPRcvCollapsed */ | 212 | LINUX_MIB_TCPRCVCOLLAPSED, /* TCPRcvCollapsed */ |
| 220 | LINUX_MIB_TCPDSACKOLDSENT, /* TCPDSACKOldSent */ | 213 | LINUX_MIB_TCPDSACKOLDSENT, /* TCPDSACKOldSent */ |
| 221 | LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */ | 214 | LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */ |
| @@ -231,6 +231,14 @@ enum { · 230 unmodified lines | |||
| 231 | TCP_NLA_SNDBUF_LIMITED, /* Time (usec) limited by send buffer */ | 231 | TCP_NLA_SNDBUF_LIMITED, /* Time (usec) limited by send buffer */ |
| 232 | TCP_NLA_DATA_SEGS_OUT, /* Data pkts sent including retransmission */ | 232 | TCP_NLA_DATA_SEGS_OUT, /* Data pkts sent including retransmission */ |
| 233 | TCP_NLA_TOTAL_RETRANS, /* Data pkts retransmitted */ | 233 | TCP_NLA_TOTAL_RETRANS, /* Data pkts retransmitted */ |
| 234 | TCP_NLA_PACING_RATE, /* Pacing rate in bytes per second */ | ||
| 235 | TCP_NLA_DELIVERY_RATE, /* Delivery rate in bytes per second */ | ||
| 236 | TCP_NLA_SND_CWND, /* Sending congestion window */ | ||
| 237 | TCP_NLA_REORDERING, /* Reordering metric */ | ||
| 238 | TCP_NLA_MIN_RTT, /* minimum RTT */ | ||
| 239 | TCP_NLA_RECUR_RETRANS, /* Recurring retransmits for the current pkt */ | ||
| 240 | TCP_NLA_DELIVERY_RATE_APP_LMT, /* delivery rate application limited ? */ | ||
| 241 | |||
| 234 | }; | 242 | }; |
| 235 | 243 | ||
| 236 | /* for TCP_MD5SIG socket option */ | 244 | /* for TCP_MD5SIG socket option */ |
| @@ -248,4 +256,13 @@ struct tcp_md5sig { · 11 unmodified lines | |||
| 248 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ | 256 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* key (binary) */ |
| 249 | }; | 257 | }; |
| 250 | 258 | ||
| 259 | /* INET_DIAG_MD5SIG */ | ||
| 260 | struct tcp_diag_md5sig { | ||
| 261 | __u8 tcpm_family; | ||
| 262 | __u8 tcpm_prefixlen; | ||
| 263 | __u16 tcpm_keylen; | ||
| 264 | __be32 tcpm_addr[4]; | ||
| 265 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; | ||
| 266 | }; | ||
| 267 | |||
| 251 | #endif /* _UAPI_LINUX_TCP_H */ | 268 | #endif /* _UAPI_LINUX_TCP_H */ |
| @@ -49,6 +49,7 @@ · 48 unmodified lines | |||
| 49 | #define TEE_MAX_ARG_SIZE 1024 | 49 | #define TEE_MAX_ARG_SIZE 1024 |
| 50 | 50 | ||
| 51 | #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ | 51 | #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ |
| 52 | #define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */ | ||
| 52 | 53 | ||
| 53 | /* | 54 | /* |
| 54 | * TEE Implementation ID | 55 | * TEE Implementation ID |
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * This file defines the USB charger type and state that are needed for | ||
| 3 | * USB device APIs. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _UAPI__LINUX_USB_CHARGER_H | ||
| 7 | #define _UAPI__LINUX_USB_CHARGER_H | ||
| 8 | |||
| 9 | /* | ||
| 10 | * USB charger type: | ||
| 11 | * SDP (Standard Downstream Port) | ||
| 12 | * DCP (Dedicated Charging Port) | ||
| 13 | * CDP (Charging Downstream Port) | ||
| 14 | * ACA (Accessory Charger Adapters) | ||
| 15 | */ | ||
| 16 | enum usb_charger_type { | ||
| 17 | UNKNOWN_TYPE, | ||
| 18 | SDP_TYPE, | ||
| 19 | DCP_TYPE, | ||
| 20 | CDP_TYPE, | ||
| 21 | ACA_TYPE, | ||
| 22 | }; | ||
| 23 | |||
| 24 | /* USB charger state */ | ||
| 25 | enum usb_charger_state { | ||
| 26 | USB_CHARGER_DEFAULT, | ||
| 27 | USB_CHARGER_PRESENT, | ||
| 28 | USB_CHARGER_ABSENT, | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif /* _UAPI__LINUX_USB_CHARGER_H */ | ||
| @@ -23,7 +23,9 @@ · 22 unmodified lines | |||
| 23 | UFFD_FEATURE_EVENT_REMOVE | \ | 23 | UFFD_FEATURE_EVENT_REMOVE | \ |
| 24 | UFFD_FEATURE_EVENT_UNMAP | \ | 24 | UFFD_FEATURE_EVENT_UNMAP | \ |
| 25 | UFFD_FEATURE_MISSING_HUGETLBFS | \ | 25 | UFFD_FEATURE_MISSING_HUGETLBFS | \ |
| 26 | UFFD_FEATURE_MISSING_SHMEM) | 26 | UFFD_FEATURE_MISSING_SHMEM | \ |
| 27 | UFFD_FEATURE_SIGBUS | \ | ||
| 28 | UFFD_FEATURE_THREAD_ID) | ||
| 27 | #define UFFD_API_IOCTLS \ | 29 | #define UFFD_API_IOCTLS \ |
| 28 | ((__u64)1 << _UFFDIO_REGISTER | \ | 30 | ((__u64)1 << _UFFDIO_REGISTER | \ |
| 29 | (__u64)1 << _UFFDIO_UNREGISTER | \ | 31 | (__u64)1 << _UFFDIO_UNREGISTER | \ |
| @@ -78,6 +80,9 @@ struct uffd_msg { · 48 unmodified lines | |||
| 78 | struct { | 80 | struct { |
| 79 | __u64 flags; | 81 | __u64 flags; |
| 80 | __u64 address; | 82 | __u64 address; |
| 83 | union { | ||
| 84 | __u32 ptid; | ||
| 85 | } feat; | ||
| 81 | } pagefault; | 86 | } pagefault; |
| 82 | 87 | ||
| 83 | struct { | 88 | struct { |
| @@ -153,6 +158,13 @@ struct uffdio_api { · 69 unmodified lines | |||
| 153 | * UFFD_FEATURE_MISSING_SHMEM works the same as | 158 | * UFFD_FEATURE_MISSING_SHMEM works the same as |
| 154 | * UFFD_FEATURE_MISSING_HUGETLBFS, but it applies to shmem | 159 | * UFFD_FEATURE_MISSING_HUGETLBFS, but it applies to shmem |
| 155 | * (i.e. tmpfs and other shmem based APIs). | 160 | * (i.e. tmpfs and other shmem based APIs). |
| 161 | * | ||
| 162 | * UFFD_FEATURE_SIGBUS feature means no page-fault | ||
| 163 | * (UFFD_EVENT_PAGEFAULT) event will be delivered, instead | ||
| 164 | * a SIGBUS signal will be sent to the faulting process. | ||
| 165 | * | ||
| 166 | * UFFD_FEATURE_THREAD_ID pid of the page faulted task_struct will | ||
| 167 | * be returned, if feature is not requested 0 will be returned. | ||
| 156 | */ | 168 | */ |
| 157 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) | 169 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) |
| 158 | #define UFFD_FEATURE_EVENT_FORK (1<<1) | 170 | #define UFFD_FEATURE_EVENT_FORK (1<<1) |
| @@ -161,6 +173,8 @@ struct uffdio_api { · 2 unmodified lines | |||
| 161 | #define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4) | 173 | #define UFFD_FEATURE_MISSING_HUGETLBFS (1<<4) |
| 162 | #define UFFD_FEATURE_MISSING_SHMEM (1<<5) | 174 | #define UFFD_FEATURE_MISSING_SHMEM (1<<5) |
| 163 | #define UFFD_FEATURE_EVENT_UNMAP (1<<6) | 175 | #define UFFD_FEATURE_EVENT_UNMAP (1<<6) |
| 176 | #define UFFD_FEATURE_SIGBUS (1<<7) | ||
| 177 | #define UFFD_FEATURE_THREAD_ID (1<<8) | ||
| 164 | __u64 features; | 178 | __u64 features; |
| 165 | 179 | ||
| 166 | __u64 ioctls; | 180 | __u64 ioctls; |
| @@ -603,6 +603,11 @@ struct v4l2_pix_format { · 602 unmodified lines | |||
| 603 | #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ | 603 | #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ |
| 604 | #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ | 604 | #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ |
| 605 | #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ | 605 | #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ |
| 606 | /* 12bit raw bayer packed, 6 bytes for every 4 pixels */ | ||
| 607 | #define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') | ||
| 608 | #define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') | ||
| 609 | #define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') | ||
| 610 | #define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') | ||
| 606 | #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ | 611 | #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ |
| 607 | #define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */ | 612 | #define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16 GBGB.. RGRG.. */ |
| 608 | #define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */ | 613 | #define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */ |
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef _UAPI_LINUX_VIRTIO_RING_H | 1 | #ifndef _UAPI_LINUX_VIRTIO_RING_H |
| 2 | #define _UAPI_LINUX_VIRTIO_RING_H | 2 | #define _UAPI_LINUX_VIRTIO_RING_H |
| 3 | /* An interface for efficient virtio implementation, currently for use by KVM | 3 | /* An interface for efficient virtio implementation, currently for use by KVM, |
| 4 | * and lguest, but hopefully others soon. Do NOT change this since it will | 4 | * but hopefully others soon. Do NOT change this since it will |
| 5 | * break existing servers and clients. | 5 | * break existing servers and clients. |
| 6 | * | 6 | * |
| 7 | * This header is BSD licensed so anyone can use the definitions to implement | 7 | * This header is BSD licensed so anyone can use the definitions to implement |
| @@ -304,6 +304,7 @@ enum xfrm_attr_type_t { · 303 unmodified lines | |||
| 304 | XFRMA_ADDRESS_FILTER, /* struct xfrm_address_filter */ | 304 | XFRMA_ADDRESS_FILTER, /* struct xfrm_address_filter */ |
| 305 | XFRMA_PAD, | 305 | XFRMA_PAD, |
| 306 | XFRMA_OFFLOAD_DEV, /* struct xfrm_state_offload */ | 306 | XFRMA_OFFLOAD_DEV, /* struct xfrm_state_offload */ |
| 307 | XFRMA_OUTPUT_MARK, /* __u32 */ | ||
| 307 | __XFRMA_MAX | 308 | __XFRMA_MAX |
| 308 | 309 | ||
| 309 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 310 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
| @@ -0,0 +1,84 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2017, Mellanox Technologies inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * This software is available to you under a choice of one of two | ||
| 5 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 6 | * General Public License (GPL) Version 2, available from the file | ||
| 7 | * COPYING in the main directory of this source tree, or the | ||
| 8 | * OpenIB.org BSD license below: | ||
| 9 | * | ||
| 10 | * Redistribution and use in source and binary forms, with or | ||
| 11 | * without modification, are permitted provided that the following | ||
| 12 | * conditions are met: | ||
| 13 | * | ||
| 14 | * - Redistributions of source code must retain the above | ||
| 15 | * copyright notice, this list of conditions and the following | ||
| 16 | * disclaimer. | ||
| 17 | * | ||
| 18 | * - Redistributions in binary form must reproduce the above | ||
| 19 | * copyright notice, this list of conditions and the following | ||
| 20 | * disclaimer in the documentation and/or other materials | ||
| 21 | * provided with the distribution. | ||
| 22 | * | ||
| 23 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 24 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 25 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 26 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 27 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 28 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 29 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 30 | * SOFTWARE. | ||
| 31 | */ | ||
| 32 | |||
| 33 | #ifndef IB_USER_IOCTL_VERBS_H | ||
| 34 | #define IB_USER_IOCTL_VERBS_H | ||
| 35 | |||
| 36 | #include <rdma/rdma_user_ioctl.h> | ||
| 37 | |||
| 38 | #define UVERBS_UDATA_DRIVER_DATA_NS 1 | ||
| 39 | #define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT) | ||
| 40 | |||
| 41 | enum uverbs_default_objects { | ||
| 42 | UVERBS_OBJECT_DEVICE, /* No instances of DEVICE are allowed */ | ||
| 43 | UVERBS_OBJECT_PD, | ||
| 44 | UVERBS_OBJECT_COMP_CHANNEL, | ||
| 45 | UVERBS_OBJECT_CQ, | ||
| 46 | UVERBS_OBJECT_QP, | ||
| 47 | UVERBS_OBJECT_SRQ, | ||
| 48 | UVERBS_OBJECT_AH, | ||
| 49 | UVERBS_OBJECT_MR, | ||
| 50 | UVERBS_OBJECT_MW, | ||
| 51 | UVERBS_OBJECT_FLOW, | ||
| 52 | UVERBS_OBJECT_XRCD, | ||
| 53 | UVERBS_OBJECT_RWQ_IND_TBL, | ||
| 54 | UVERBS_OBJECT_WQ, | ||
| 55 | UVERBS_OBJECT_LAST, | ||
| 56 | }; | ||
| 57 | |||
| 58 | enum { | ||
| 59 | UVERBS_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, | ||
| 60 | UVERBS_UHW_OUT, | ||
| 61 | }; | ||
| 62 | |||
| 63 | enum uverbs_create_cq_cmd_attr_ids { | ||
| 64 | CREATE_CQ_HANDLE, | ||
| 65 | CREATE_CQ_CQE, | ||
| 66 | CREATE_CQ_USER_HANDLE, | ||
| 67 | CREATE_CQ_COMP_CHANNEL, | ||
| 68 | CREATE_CQ_COMP_VECTOR, | ||
| 69 | CREATE_CQ_FLAGS, | ||
| 70 | CREATE_CQ_RESP_CQE, | ||
| 71 | }; | ||
| 72 | |||
| 73 | enum uverbs_destroy_cq_cmd_attr_ids { | ||
| 74 | DESTROY_CQ_HANDLE, | ||
| 75 | DESTROY_CQ_RESP, | ||
| 76 | }; | ||
| 77 | |||
| 78 | enum uverbs_actions_cq_ops { | ||
| 79 | UVERBS_CQ_CREATE, | ||
| 80 | UVERBS_CQ_DESTROY, | ||
| 81 | }; | ||
| 82 | |||
| 83 | #endif | ||
| 84 | |||
| @@ -236,6 +236,20 @@ struct ib_uverbs_rss_caps { · 235 unmodified lines | |||
| 236 | __u32 reserved; | 236 | __u32 reserved; |
| 237 | }; | 237 | }; |
| 238 | 238 | ||
| 239 | struct ib_uverbs_tm_caps { | ||
| 240 | /* Max size of rendezvous request message */ | ||
| 241 | __u32 max_rndv_hdr_size; | ||
| 242 | /* Max number of entries in tag matching list */ | ||
| 243 | __u32 max_num_tags; | ||
| 244 | /* TM flags */ | ||
| 245 | __u32 flags; | ||
| 246 | /* Max number of outstanding list operations */ | ||
| 247 | __u32 max_ops; | ||
| 248 | /* Max number of SGE in tag matching entry */ | ||
| 249 | __u32 max_sge; | ||
| 250 | __u32 reserved; | ||
| 251 | }; | ||
| 252 | |||
| 239 | struct ib_uverbs_ex_query_device_resp { | 253 | struct ib_uverbs_ex_query_device_resp { |
| 240 | struct ib_uverbs_query_device_resp base; | 254 | struct ib_uverbs_query_device_resp base; |
| 241 | __u32 comp_mask; | 255 | __u32 comp_mask; |
| @@ -247,6 +261,7 @@ struct ib_uverbs_ex_query_device_resp { · 5 unmodified lines | |||
| 247 | struct ib_uverbs_rss_caps rss_caps; | 261 | struct ib_uverbs_rss_caps rss_caps; |
| 248 | __u32 max_wq_type_rq; | 262 | __u32 max_wq_type_rq; |
| 249 | __u32 raw_packet_caps; | 263 | __u32 raw_packet_caps; |
| 264 | struct ib_uverbs_tm_caps xrq_caps; | ||
| 250 | }; | 265 | }; |
| 251 | 266 | ||
| 252 | struct ib_uverbs_query_port { | 267 | struct ib_uverbs_query_port { |
| @@ -578,7 +593,7 @@ struct ib_uverbs_ex_create_qp { · 325 unmodified lines | |||
| 578 | __u32 comp_mask; | 593 | __u32 comp_mask; |
| 579 | __u32 create_flags; | 594 | __u32 create_flags; |
| 580 | __u32 rwq_ind_tbl_handle; | 595 | __u32 rwq_ind_tbl_handle; |
| 581 | __u32 reserved1; | 596 | __u32 source_qpn; |
| 582 | }; | 597 | }; |
| 583 | 598 | ||
| 584 | struct ib_uverbs_open_qp { | 599 | struct ib_uverbs_open_qp { |
| @@ -1024,7 +1039,7 @@ struct ib_uverbs_create_xsrq { · 439 unmodified lines | |||
| 1024 | __u32 max_wr; | 1039 | __u32 max_wr; |
| 1025 | __u32 max_sge; | 1040 | __u32 max_sge; |
| 1026 | __u32 srq_limit; | 1041 | __u32 srq_limit; |
| 1027 | __u32 reserved; | 1042 | __u32 max_num_tags; |
| 1028 | __u32 xrcd_handle; | 1043 | __u32 xrcd_handle; |
| 1029 | __u32 cq_handle; | 1044 | __u32 cq_handle; |
| 1030 | __u64 driver_data[0]; | 1045 | __u64 driver_data[0]; |
| @@ -95,13 +95,63 @@ struct mlx4_ib_create_srq_resp { · 94 unmodified lines | |||
| 95 | __u32 reserved; | 95 | __u32 reserved; |
| 96 | }; | 96 | }; |
| 97 | 97 | ||
| 98 | struct mlx4_ib_create_qp_rss { | ||
| 99 | __u64 rx_hash_fields_mask; | ||
| 100 | __u8 rx_hash_function; | ||
| 101 | __u8 reserved[7]; | ||
| 102 | __u8 rx_hash_key[40]; | ||
| 103 | __u32 comp_mask; | ||
| 104 | __u32 reserved1; | ||
| 105 | }; | ||
| 106 | |||
| 98 | struct mlx4_ib_create_qp { | 107 | struct mlx4_ib_create_qp { |
| 99 | __u64 buf_addr; | 108 | __u64 buf_addr; |
| 100 | __u64 db_addr; | 109 | __u64 db_addr; |
| 101 | __u8 log_sq_bb_count; | 110 | __u8 log_sq_bb_count; |
| 102 | __u8 log_sq_stride; | 111 | __u8 log_sq_stride; |
| 103 | __u8 sq_no_prefetch; | 112 | __u8 sq_no_prefetch; |
| 104 | __u8 reserved[5]; | 113 | __u8 reserved; |
| 114 | __u32 inl_recv_sz; | ||
| 115 | }; | ||
| 116 | |||
| 117 | struct mlx4_ib_create_wq { | ||
| 118 | __u64 buf_addr; | ||
| 119 | __u64 db_addr; | ||
| 120 | __u8 log_range_size; | ||
| 121 | __u8 reserved[3]; | ||
| 122 | __u32 comp_mask; | ||
| 123 | }; | ||
| 124 | |||
| 125 | struct mlx4_ib_modify_wq { | ||
| 126 | __u32 comp_mask; | ||
| 127 | __u32 reserved; | ||
| 128 | }; | ||
| 129 | |||
| 130 | struct mlx4_ib_create_rwq_ind_tbl_resp { | ||
| 131 | __u32 response_length; | ||
| 132 | __u32 reserved; | ||
| 133 | }; | ||
| 134 | |||
| 135 | /* RX Hash function flags */ | ||
| 136 | enum mlx4_ib_rx_hash_function_flags { | ||
| 137 | MLX4_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0, | ||
| 138 | }; | ||
| 139 | |||
| 140 | /* | ||
| 141 | * RX Hash flags, these flags allows to set which incoming packet's field should | ||
| 142 | * participates in RX Hash. Each flag represent certain packet's field, | ||
| 143 | * when the flag is set the field that is represented by the flag will | ||
| 144 | * participate in RX Hash calculation. | ||
| 145 | */ | ||
| 146 | enum mlx4_ib_rx_hash_fields { | ||
| 147 | MLX4_IB_RX_HASH_SRC_IPV4 = 1 << 0, | ||
| 148 | MLX4_IB_RX_HASH_DST_IPV4 = 1 << 1, | ||
| 149 | MLX4_IB_RX_HASH_SRC_IPV6 = 1 << 2, | ||
| 150 | MLX4_IB_RX_HASH_DST_IPV6 = 1 << 3, | ||
| 151 | MLX4_IB_RX_HASH_SRC_PORT_TCP = 1 << 4, | ||
| 152 | MLX4_IB_RX_HASH_DST_PORT_TCP = 1 << 5, | ||
| 153 | MLX4_IB_RX_HASH_SRC_PORT_UDP = 1 << 6, | ||
| 154 | MLX4_IB_RX_HASH_DST_PORT_UDP = 1 << 7 | ||
| 105 | }; | 155 | }; |
| 106 | 156 | ||
| 107 | #endif /* MLX4_ABI_USER_H */ | 157 | #endif /* MLX4_ABI_USER_H */ |
| @@ -168,6 +168,28 @@ struct mlx5_packet_pacing_caps { · 167 unmodified lines | |||
| 168 | __u32 reserved; | 168 | __u32 reserved; |
| 169 | }; | 169 | }; |
| 170 | 170 | ||
| 171 | enum mlx5_ib_mpw_caps { | ||
| 172 | MPW_RESERVED = 1 << 0, | ||
| 173 | MLX5_IB_ALLOW_MPW = 1 << 1, | ||
| 174 | MLX5_IB_SUPPORT_EMPW = 1 << 2, | ||
| 175 | }; | ||
| 176 | |||
| 177 | enum mlx5_ib_sw_parsing_offloads { | ||
| 178 | MLX5_IB_SW_PARSING = 1 << 0, | ||
| 179 | MLX5_IB_SW_PARSING_CSUM = 1 << 1, | ||
| 180 | MLX5_IB_SW_PARSING_LSO = 1 << 2, | ||
| 181 | }; | ||
| 182 | |||
| 183 | struct mlx5_ib_sw_parsing_caps { | ||
| 184 | __u32 sw_parsing_offloads; /* enum mlx5_ib_sw_parsing_offloads */ | ||
| 185 | |||
| 186 | /* Corresponding bit will be set if qp type from | ||
| 187 | * 'enum ib_qp_type' is supported, e.g. | ||
| 188 | * supported_qpts |= 1 << IB_QPT_RAW_PACKET | ||
| 189 | */ | ||
| 190 | __u32 supported_qpts; | ||
| 191 | }; | ||
| 192 | |||
| 171 | struct mlx5_ib_query_device_resp { | 193 | struct mlx5_ib_query_device_resp { |
| 172 | __u32 comp_mask; | 194 | __u32 comp_mask; |
| 173 | __u32 response_length; | 195 | __u32 response_length; |
| @@ -177,6 +199,7 @@ struct mlx5_ib_query_device_resp { · 3 unmodified lines | |||
| 177 | struct mlx5_packet_pacing_caps packet_pacing_caps; | 199 | struct mlx5_packet_pacing_caps packet_pacing_caps; |
| 178 | __u32 mlx5_ib_support_multi_pkt_send_wqes; | 200 | __u32 mlx5_ib_support_multi_pkt_send_wqes; |
| 179 | __u32 reserved; | 201 | __u32 reserved; |
| 202 | struct mlx5_ib_sw_parsing_caps sw_parsing_caps; | ||
| 180 | }; | 203 | }; |
| 181 | 204 | ||
| 182 | struct mlx5_ib_create_cq { | 205 | struct mlx5_ib_create_cq { |
| @@ -49,6 +49,9 @@ struct qedr_alloc_ucontext_resp { · 48 unmodified lines | |||
| 49 | __u32 sges_per_recv_wr; | 49 | __u32 sges_per_recv_wr; |
| 50 | __u32 sges_per_srq_wr; | 50 | __u32 sges_per_srq_wr; |
| 51 | __u32 max_cqes; | 51 | __u32 max_cqes; |
| 52 | __u8 dpm_enabled; | ||
| 53 | __u8 wids_enabled; | ||
| 54 | __u16 wid_count; | ||
| 52 | }; | 55 | }; |
| 53 | 56 | ||
| 54 | struct qedr_alloc_pd_ureq { | 57 | struct qedr_alloc_pd_ureq { |
| @@ -8,7 +8,7 @@ enum { · 7 unmodified lines | |||
| 8 | RDMA_NL_IWCM, | 8 | RDMA_NL_IWCM, |
| 9 | RDMA_NL_RSVD, | 9 | RDMA_NL_RSVD, |
| 10 | RDMA_NL_LS, /* RDMA Local Services */ | 10 | RDMA_NL_LS, /* RDMA Local Services */ |
| 11 | RDMA_NL_I40IW, | 11 | RDMA_NL_NLDEV, /* RDMA device interface */ |
| 12 | RDMA_NL_NUM_CLIENTS | 12 | RDMA_NL_NUM_CLIENTS |
| 13 | }; | 13 | }; |
| 14 | 14 | ||
| @@ -222,4 +222,86 @@ struct rdma_nla_ls_gid { · 207 unmodified lines | |||
| 222 | __u8 gid[16]; | 222 | __u8 gid[16]; |
| 223 | }; | 223 | }; |
| 224 | 224 | ||
| 225 | enum rdma_nldev_command { | ||
| 226 | RDMA_NLDEV_CMD_UNSPEC, | ||
| 227 | |||
| 228 | RDMA_NLDEV_CMD_GET, /* can dump */ | ||
| 229 | RDMA_NLDEV_CMD_SET, | ||
| 230 | RDMA_NLDEV_CMD_NEW, | ||
| 231 | RDMA_NLDEV_CMD_DEL, | ||
| 232 | |||
| 233 | RDMA_NLDEV_CMD_PORT_GET, /* can dump */ | ||
| 234 | RDMA_NLDEV_CMD_PORT_SET, | ||
| 235 | RDMA_NLDEV_CMD_PORT_NEW, | ||
| 236 | RDMA_NLDEV_CMD_PORT_DEL, | ||
| 237 | |||
| 238 | RDMA_NLDEV_NUM_OPS | ||
| 239 | }; | ||
| 240 | |||
| 241 | enum rdma_nldev_attr { | ||
| 242 | /* don't change the order or add anything between, this is ABI! */ | ||
| 243 | RDMA_NLDEV_ATTR_UNSPEC, | ||
| 244 | |||
| 245 | /* Identifier for ib_device */ | ||
| 246 | RDMA_NLDEV_ATTR_DEV_INDEX, /* u32 */ | ||
| 247 | |||
| 248 | RDMA_NLDEV_ATTR_DEV_NAME, /* string */ | ||
| 249 | /* | ||
| 250 | * Device index together with port index are identifiers | ||
| 251 | * for port/link properties. | ||
| 252 | * | ||
| 253 | * For RDMA_NLDEV_CMD_GET commamnd, port index will return number | ||
| 254 | * of available ports in ib_device, while for port specific operations, | ||
| 255 | * it will be real port index as it appears in sysfs. Port index follows | ||
| 256 | * sysfs notation and starts from 1 for the first port. | ||
| 257 | */ | ||
| 258 | RDMA_NLDEV_ATTR_PORT_INDEX, /* u32 */ | ||
| 259 | |||
| 260 | /* | ||
| 261 | * Device and port capabilities | ||
| 262 | */ | ||
| 263 | RDMA_NLDEV_ATTR_CAP_FLAGS, /* u64 */ | ||
| 264 | |||
| 265 | /* | ||
| 266 | * FW version | ||
| 267 | */ | ||
| 268 | RDMA_NLDEV_ATTR_FW_VERSION, /* string */ | ||
| 269 | |||
| 270 | /* | ||
| 271 | * Node GUID (in host byte order) associated with the RDMA device. | ||
| 272 | */ | ||
| 273 | RDMA_NLDEV_ATTR_NODE_GUID, /* u64 */ | ||
| 274 | |||
| 275 | /* | ||
| 276 | * System image GUID (in host byte order) associated with | ||
| 277 | * this RDMA device and other devices which are part of a | ||
| 278 | * single system. | ||
| 279 | */ | ||
| 280 | RDMA_NLDEV_ATTR_SYS_IMAGE_GUID, /* u64 */ | ||
| 281 | |||
| 282 | /* | ||
| 283 | * Subnet prefix (in host byte order) | ||
| 284 | */ | ||
| 285 | RDMA_NLDEV_ATTR_SUBNET_PREFIX, /* u64 */ | ||
| 286 | |||
| 287 | /* | ||
| 288 | * Local Identifier (LID), | ||
| 289 | * According to IB specification, It is 16-bit address assigned | ||
| 290 | * by the Subnet Manager. Extended to be 32-bit for OmniPath users. | ||
| 291 | */ | ||
| 292 | RDMA_NLDEV_ATTR_LID, /* u32 */ | ||
| 293 | RDMA_NLDEV_ATTR_SM_LID, /* u32 */ | ||
| 294 | |||
| 295 | /* | ||
| 296 | * LID mask control (LMC) | ||
| 297 | */ | ||
| 298 | RDMA_NLDEV_ATTR_LMC, /* u8 */ | ||
| 299 | |||
| 300 | RDMA_NLDEV_ATTR_PORT_STATE, /* u8 */ | ||
| 301 | RDMA_NLDEV_ATTR_PORT_PHYS_STATE, /* u8 */ | ||
| 302 | |||
| 303 | RDMA_NLDEV_ATTR_DEV_NODE_TYPE, /* u8 */ | ||
| 304 | |||
| 305 | RDMA_NLDEV_ATTR_MAX | ||
| 306 | }; | ||
| 225 | #endif /* _UAPI_RDMA_NETLINK_H */ | 307 | #endif /* _UAPI_RDMA_NETLINK_H */ |
| @@ -43,6 +43,39 @@ · 42 unmodified lines | |||
| 43 | /* Legacy name, for user space application which already use it */ | 43 | /* Legacy name, for user space application which already use it */ |
| 44 | #define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC | 44 | #define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC |
| 45 | 45 | ||
| 46 | #define RDMA_VERBS_IOCTL \ | ||
| 47 | _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr) | ||
| 48 | |||
| 49 | #define UVERBS_ID_NS_MASK 0xF000 | ||
| 50 | #define UVERBS_ID_NS_SHIFT 12 | ||
| 51 | |||
| 52 | enum { | ||
| 53 | /* User input */ | ||
| 54 | UVERBS_ATTR_F_MANDATORY = 1U << 0, | ||
| 55 | /* | ||
| 56 | * Valid output bit should be ignored and considered set in | ||
| 57 | * mandatory fields. This bit is kernel output. | ||
| 58 | */ | ||
| 59 | UVERBS_ATTR_F_VALID_OUTPUT = 1U << 1, | ||
| 60 | }; | ||
| 61 | |||
| 62 | struct ib_uverbs_attr { | ||
| 63 | __u16 attr_id; /* command specific type attribute */ | ||
| 64 | __u16 len; /* only for pointers */ | ||
| 65 | __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */ | ||
| 66 | __u16 reserved; | ||
| 67 | __u64 data; /* ptr to command, inline data or idr/fd */ | ||
| 68 | }; | ||
| 69 | |||
| 70 | struct ib_uverbs_ioctl_hdr { | ||
| 71 | __u16 length; | ||
| 72 | __u16 object_id; | ||
| 73 | __u16 method_id; | ||
| 74 | __u16 num_attrs; | ||
| 75 | __u64 reserved; | ||
| 76 | struct ib_uverbs_attr attrs[0]; | ||
| 77 | }; | ||
| 78 | |||
| 46 | /* | 79 | /* |
| 47 | * General blocks assignments | 80 | * General blocks assignments |
| 48 | * It is closed on purpose do not expose it it user space | 81 | * It is closed on purpose do not expose it it user space |
| @@ -125,7 +125,8 @@ enum pvrdma_wc_flags { · 124 unmodified lines | |||
| 125 | PVRDMA_WC_IP_CSUM_OK = 1 << 3, | 125 | PVRDMA_WC_IP_CSUM_OK = 1 << 3, |
| 126 | PVRDMA_WC_WITH_SMAC = 1 << 4, | 126 | PVRDMA_WC_WITH_SMAC = 1 << 4, |
| 127 | PVRDMA_WC_WITH_VLAN = 1 << 5, | 127 | PVRDMA_WC_WITH_VLAN = 1 << 5, |
| 128 | PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_VLAN, | 128 | PVRDMA_WC_WITH_NETWORK_HDR_TYPE = 1 << 6, |
| 129 | PVRDMA_WC_FLAGS_MAX = PVRDMA_WC_WITH_NETWORK_HDR_TYPE, | ||
| 129 | }; | 130 | }; |
| 130 | 131 | ||
| 131 | struct pvrdma_alloc_ucontext_resp { | 132 | struct pvrdma_alloc_ucontext_resp { |
| @@ -283,7 +284,8 @@ struct pvrdma_cqe { · 151 unmodified lines | |||
| 283 | __u8 dlid_path_bits; | 284 | __u8 dlid_path_bits; |
| 284 | __u8 port_num; | 285 | __u8 port_num; |
| 285 | __u8 smac[6]; | 286 | __u8 smac[6]; |
| 286 | __u8 reserved2[7]; /* Pad to next power of 2 (64). */ | 287 | __u8 network_hdr_type; |
| 288 | __u8 reserved2[6]; /* Pad to next power of 2 (64). */ | ||
| 287 | }; | 289 | }; |
| 288 | 290 | ||
| 289 | #endif /* __VMW_PVRDMA_ABI_H__ */ | 291 | #endif /* __VMW_PVRDMA_ABI_H__ */ |
| @@ -163,8 +163,71 @@ · 162 unmodified lines | |||
| 163 | * | 163 | * |
| 164 | * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec | 164 | * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec |
| 165 | * | 165 | * |
| 166 | * %SKL_TKN_U32_PIPE_DIR: Specifies pipe direction. Can be | ||
| 167 | * playback/capture. | ||
| 168 | * | ||
| 169 | * %SKL_TKN_U32_NUM_CONFIGS: Number of pipe configs | ||
| 170 | * | ||
| 171 | * %SKL_TKN_U32_PATH_MEM_PGS: Size of memory (in pages) required for pipeline | ||
| 172 | * and its data | ||
| 173 | * | ||
| 174 | * %SKL_TKN_U32_PIPE_CONFIG_ID: Config id for the modules in the pipe | ||
| 175 | * and PCM params supported by that pipe | ||
| 176 | * config. This is used as index to fill | ||
| 177 | * up the pipe config and module config | ||
| 178 | * structure. | ||
| 179 | * | ||
| 180 | * %SKL_TKN_U32_CFG_FREQ: | ||
| 181 | * %SKL_TKN_U8_CFG_CHAN: | ||
| 182 | * %SKL_TKN_U8_CFG_BPS: PCM params (freq, channels, bits per sample) | ||
| 183 | * supported for each of the pipe configs. | ||
| 184 | * | ||
| 185 | * %SKL_TKN_CFG_MOD_RES_ID: Module's resource index for each of the | ||
| 186 | * pipe config | ||
| 187 | * | ||
| 188 | * %SKL_TKN_CFG_MOD_FMT_ID: Module's interface index for each of the | ||
| 189 | * pipe config | ||
| 190 | * | ||
| 191 | * %SKL_TKN_U8_NUM_MOD: Number of modules in the manifest | ||
| 192 | * | ||
| 193 | * %SKL_TKN_MM_U8_MOD_IDX: Current index of the module in the manifest | ||
| 194 | * | ||
| 195 | * %SKL_TKN_MM_U8_NUM_RES: Number of resources for the module | ||
| 196 | * | ||
| 197 | * %SKL_TKN_MM_U8_NUM_INTF: Number of interfaces for the module | ||
| 198 | * | ||
| 199 | * %SKL_TKN_MM_U32_RES_ID: Resource index for the resource info to | ||
| 200 | * be filled into. | ||
| 201 | * A module can support multiple resource | ||
| 202 | * configuration and is represnted as a | ||
| 203 | * resource table. This index is used to | ||
| 204 | * fill information into appropriate index. | ||
| 205 | * | ||
| 206 | * %SKL_TKN_MM_U32_CPS: DSP cycles per second | ||
| 207 | * | ||
| 208 | * %SKL_TKN_MM_U32_DMA_SIZE: Allocated buffer size for gateway DMA | ||
| 209 | * | ||
| 210 | * %SKL_TKN_MM_U32_CPC: DSP cycles allocated per frame | ||
| 211 | * | ||
| 212 | * %SKL_TKN_MM_U32_RES_PIN_ID: Resource pin index in the module | ||
| 213 | * | ||
| 214 | * %SKL_TKN_MM_U32_INTF_PIN_ID: Interface index in the module | ||
| 215 | * | ||
| 216 | * %SKL_TKN_MM_U32_PIN_BUF: Buffer size of the module pin | ||
| 217 | * | ||
| 218 | * %SKL_TKN_MM_U32_FMT_ID: Format index for each of the interface/ | ||
| 219 | * format information to be filled into. | ||
| 220 | * | ||
| 221 | * %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats | ||
| 222 | * %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats | ||
| 223 | * | ||
| 166 | * module_id and loadable flags dont have tokens as these values will be | 224 | * module_id and loadable flags dont have tokens as these values will be |
| 167 | * read from the DSP FW manifest | 225 | * read from the DSP FW manifest |
| 226 | * | ||
| 227 | * Tokens defined can be used either in the manifest or widget private data. | ||
| 228 | * | ||
| 229 | * SKL_TKN_MM is used as a suffix for all tokens that represent | ||
| 230 | * module data in the manifest. | ||
| 168 | */ | 231 | */ |
| 169 | enum SKL_TKNS { | 232 | enum SKL_TKNS { |
| 170 | SKL_TKN_UUID = 1, | 233 | SKL_TKN_UUID = 1, |
| @@ -218,7 +281,34 @@ enum SKL_TKNS { · 47 unmodified lines | |||
| 218 | SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */ | 281 | SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */ |
| 219 | SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS, | 282 | SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS, |
| 220 | SKL_TKN_U32_DMA_BUF_SIZE, | 283 | SKL_TKN_U32_DMA_BUF_SIZE, |
| 221 | SKL_TKN_MAX = SKL_TKN_U32_DMA_BUF_SIZE, | 284 | |
| 285 | SKL_TKN_U32_PIPE_DIRECTION, | ||
| 286 | SKL_TKN_U32_PIPE_CONFIG_ID, | ||
| 287 | SKL_TKN_U32_NUM_CONFIGS, | ||
| 288 | SKL_TKN_U32_PATH_MEM_PGS, | ||
| 289 | |||
| 290 | SKL_TKN_U32_CFG_FREQ, | ||
| 291 | SKL_TKN_U8_CFG_CHAN, | ||
| 292 | SKL_TKN_U8_CFG_BPS, | ||
| 293 | SKL_TKN_CFG_MOD_RES_ID, | ||
| 294 | SKL_TKN_CFG_MOD_FMT_ID, | ||
| 295 | SKL_TKN_U8_NUM_MOD, | ||
| 296 | |||
| 297 | SKL_TKN_MM_U8_MOD_IDX, | ||
| 298 | SKL_TKN_MM_U8_NUM_RES, | ||
| 299 | SKL_TKN_MM_U8_NUM_INTF, | ||
| 300 | SKL_TKN_MM_U32_RES_ID, | ||
| 301 | SKL_TKN_MM_U32_CPS, | ||
| 302 | SKL_TKN_MM_U32_DMA_SIZE, | ||
| 303 | SKL_TKN_MM_U32_CPC, | ||
| 304 | SKL_TKN_MM_U32_RES_PIN_ID, | ||
| 305 | SKL_TKN_MM_U32_INTF_PIN_ID, | ||
| 306 | SKL_TKN_MM_U32_PIN_BUF, | ||
| 307 | SKL_TKN_MM_U32_FMT_ID, | ||
| 308 | SKL_TKN_MM_U32_NUM_IN_FMT, | ||
| 309 | SKL_TKN_MM_U32_NUM_OUT_FMT, | ||
| 310 | |||
| 311 | SKL_TKN_MAX = SKL_TKN_MM_U32_NUM_OUT_FMT, | ||
| 222 | }; | 312 | }; |
| 223 | 313 | ||
| 224 | #endif | 314 | #endif |