drm-misc-next is still based on v4.16-rc7, and was getting a bit stale.
Showing the changes to include/uapi (89 of 13036 files). Show all
Unified · Split
| @@ -27,6 +27,9 @@ · 26 unmodified lines | |||
| 27 | # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ | 27 | # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ |
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | /* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */ | ||
| 31 | #define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */ | ||
| 32 | |||
| 30 | /* | 33 | /* |
| 31 | * Flags for mlock | 34 | * Flags for mlock |
| 32 | */ | 35 | */ |
| @@ -94,6 +94,9 @@ typedef struct siginfo { · 93 unmodified lines | |||
| 94 | unsigned int _flags; /* see ia64 si_flags */ | 94 | unsigned int _flags; /* see ia64 si_flags */ |
| 95 | unsigned long _isr; /* isr */ | 95 | unsigned long _isr; /* isr */ |
| 96 | #endif | 96 | #endif |
| 97 | |||
| 98 | #define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ | ||
| 99 | sizeof(short) : __alignof__(void *)) | ||
| 97 | union { | 100 | union { |
| 98 | /* | 101 | /* |
| 99 | * used when si_code=BUS_MCEERR_AR or | 102 | * used when si_code=BUS_MCEERR_AR or |
| @@ -102,13 +105,13 @@ typedef struct siginfo { · 2 unmodified lines | |||
| 102 | short _addr_lsb; /* LSB of the reported address */ | 105 | short _addr_lsb; /* LSB of the reported address */ |
| 103 | /* used when si_code=SEGV_BNDERR */ | 106 | /* used when si_code=SEGV_BNDERR */ |
| 104 | struct { | 107 | struct { |
| 105 | void *_dummy_bnd; | 108 | char _dummy_bnd[__ADDR_BND_PKEY_PAD]; |
| 106 | void __user *_lower; | 109 | void __user *_lower; |
| 107 | void __user *_upper; | 110 | void __user *_upper; |
| 108 | } _addr_bnd; | 111 | } _addr_bnd; |
| 109 | /* used when si_code=SEGV_PKUERR */ | 112 | /* used when si_code=SEGV_PKUERR */ |
| 110 | struct { | 113 | struct { |
| 111 | void *_dummy_pkey; | 114 | char _dummy_pkey[__ADDR_BND_PKEY_PAD]; |
| 112 | __u32 _pkey; | 115 | __u32 _pkey; |
| 113 | } _addr_pkey; | 116 | } _addr_pkey; |
| 114 | }; | 117 | }; |
| @@ -179,33 +182,16 @@ typedef struct siginfo { · 64 unmodified lines | |||
| 179 | * SIGILL si_codes | 182 | * SIGILL si_codes |
| 180 | */ | 183 | */ |
| 181 | #define ILL_ILLOPC 1 /* illegal opcode */ | 184 | #define ILL_ILLOPC 1 /* illegal opcode */ |
| 182 | #ifdef __bfin__ | ||
| 183 | # define ILL_ILLPARAOP 2 /* illegal opcode combine */ | ||
| 184 | #endif | ||
| 185 | #define ILL_ILLOPN 2 /* illegal operand */ | 185 | #define ILL_ILLOPN 2 /* illegal operand */ |
| 186 | #define ILL_ILLADR 3 /* illegal addressing mode */ | 186 | #define ILL_ILLADR 3 /* illegal addressing mode */ |
| 187 | #define ILL_ILLTRP 4 /* illegal trap */ | 187 | #define ILL_ILLTRP 4 /* illegal trap */ |
| 188 | #ifdef __bfin__ | ||
| 189 | # define ILL_ILLEXCPT 4 /* unrecoverable exception */ | ||
| 190 | #endif | ||
| 191 | #define ILL_PRVOPC 5 /* privileged opcode */ | 188 | #define ILL_PRVOPC 5 /* privileged opcode */ |
| 192 | #define ILL_PRVREG 6 /* privileged register */ | 189 | #define ILL_PRVREG 6 /* privileged register */ |
| 193 | #define ILL_COPROC 7 /* coprocessor error */ | 190 | #define ILL_COPROC 7 /* coprocessor error */ |
| 194 | #define ILL_BADSTK 8 /* internal stack error */ | 191 | #define ILL_BADSTK 8 /* internal stack error */ |
| 195 | #ifdef __bfin__ | 192 | #define ILL_BADIADDR 9 /* unimplemented instruction address */ |
| 196 | # define ILL_CPLB_VI 9 /* D/I CPLB protect violation */ | 193 | #define __ILL_BREAK 10 /* illegal break */ |
| 197 | # define ILL_CPLB_MISS 10 /* D/I CPLB miss */ | 194 | #define __ILL_BNDMOD 11 /* bundle-update (modification) in progress */ |
| 198 | # define ILL_CPLB_MULHIT 11 /* D/I CPLB multiple hit */ | ||
| 199 | #endif | ||
| 200 | #ifdef __tile__ | ||
| 201 | # define ILL_DBLFLT 9 /* double fault */ | ||
| 202 | # define ILL_HARDWALL 10 /* user networks hardwall violation */ | ||
| 203 | #endif | ||
| 204 | #ifdef __ia64__ | ||
| 205 | # define ILL_BADIADDR 9 /* unimplemented instruction address */ | ||
| 206 | # define __ILL_BREAK 10 /* illegal break */ | ||
| 207 | # define __ILL_BNDMOD 11 /* bundle-update (modification) in progress */ | ||
| 208 | #endif | ||
| 209 | #define NSIGILL 11 | 195 | #define NSIGILL 11 |
| 210 | 196 | ||
| 211 | /* | 197 | /* |
| @@ -219,34 +205,30 @@ typedef struct siginfo { · 7 unmodified lines | |||
| 219 | #define FPE_FLTRES 6 /* floating point inexact result */ | 205 | #define FPE_FLTRES 6 /* floating point inexact result */ |
| 220 | #define FPE_FLTINV 7 /* floating point invalid operation */ | 206 | #define FPE_FLTINV 7 /* floating point invalid operation */ |
| 221 | #define FPE_FLTSUB 8 /* subscript out of range */ | 207 | #define FPE_FLTSUB 8 /* subscript out of range */ |
| 222 | #ifdef __frv__ | 208 | #define __FPE_DECOVF 9 /* decimal overflow */ |
| 223 | # define FPE_MDAOVF 9 /* media overflow */ | 209 | #define __FPE_DECDIV 10 /* decimal division by zero */ |
| 224 | #endif | 210 | #define __FPE_DECERR 11 /* packed decimal error */ |
| 225 | #ifdef __ia64__ | 211 | #define __FPE_INVASC 12 /* invalid ASCII digit */ |
| 226 | # define __FPE_DECOVF 9 /* decimal overflow */ | 212 | #define __FPE_INVDEC 13 /* invalid decimal digit */ |
| 227 | # define __FPE_DECDIV 10 /* decimal division by zero */ | 213 | #define FPE_FLTUNK 14 /* undiagnosed floating-point exception */ |
| 228 | # define __FPE_DECERR 11 /* packed decimal error */ | 214 | #define FPE_CONDTRAP 15 /* trap on condition */ |
| 229 | # define __FPE_INVASC 12 /* invalid ASCII digit */ | 215 | #define NSIGFPE 15 |
| 230 | # define __FPE_INVDEC 13 /* invalid decimal digit */ | ||
| 231 | #endif | ||
| 232 | #define NSIGFPE 13 | ||
| 233 | 216 | ||
| 234 | /* | 217 | /* |
| 235 | * SIGSEGV si_codes | 218 | * SIGSEGV si_codes |
| 236 | */ | 219 | */ |
| 237 | #define SEGV_MAPERR 1 /* address not mapped to object */ | 220 | #define SEGV_MAPERR 1 /* address not mapped to object */ |
| 238 | #define SEGV_ACCERR 2 /* invalid permissions for mapped object */ | 221 | #define SEGV_ACCERR 2 /* invalid permissions for mapped object */ |
| 239 | #ifdef __bfin__ | 222 | #define SEGV_BNDERR 3 /* failed address bound checks */ |
| 240 | # define SEGV_STACKFLOW 3 /* stack overflow */ | ||
| 241 | #else | ||
| 242 | # define SEGV_BNDERR 3 /* failed address bound checks */ | ||
| 243 | #endif | ||
| 244 | #ifdef __ia64__ | 223 | #ifdef __ia64__ |
| 245 | # define __SEGV_PSTKOVF 4 /* paragraph stack overflow */ | 224 | # define __SEGV_PSTKOVF 4 /* paragraph stack overflow */ |
| 246 | #else | 225 | #else |
| 247 | # define SEGV_PKUERR 4 /* failed protection key checks */ | 226 | # define SEGV_PKUERR 4 /* failed protection key checks */ |
| 248 | #endif | 227 | #endif |
| 249 | #define NSIGSEGV 4 | 228 | #define SEGV_ACCADI 5 /* ADI not enabled for mapped object */ |
| 229 | #define SEGV_ADIDERR 6 /* Disrupting MCD error */ | ||
| 230 | #define SEGV_ADIPERR 7 /* Precise MCD exception */ | ||
| 231 | #define NSIGSEGV 7 | ||
| 250 | 232 | ||
| 251 | /* | 233 | /* |
| 252 | * SIGBUS si_codes | 234 | * SIGBUS si_codes |
| @@ -254,12 +236,8 @@ typedef struct siginfo { · 1 unmodified line | |||
| 254 | #define BUS_ADRALN 1 /* invalid address alignment */ | 236 | #define BUS_ADRALN 1 /* invalid address alignment */ |
| 255 | #define BUS_ADRERR 2 /* non-existent physical address */ | 237 | #define BUS_ADRERR 2 /* non-existent physical address */ |
| 256 | #define BUS_OBJERR 3 /* object specific hardware error */ | 238 | #define BUS_OBJERR 3 /* object specific hardware error */ |
| 257 | #ifdef __bfin__ | ||
| 258 | # define BUS_OPFETCH 4 /* error from instruction fetch */ | ||
| 259 | #else | ||
| 260 | /* hardware memory error consumed on a machine check: action required */ | 239 | /* hardware memory error consumed on a machine check: action required */ |
| 261 | # define BUS_MCEERR_AR 4 | 240 | #define BUS_MCEERR_AR 4 |
| 262 | #endif | ||
| 263 | /* hardware memory error detected in process but not consumed: action optional*/ | 241 | /* hardware memory error detected in process but not consumed: action optional*/ |
| 264 | #define BUS_MCEERR_AO 5 | 242 | #define BUS_MCEERR_AO 5 |
| 265 | #define NSIGBUS 5 | 243 | #define NSIGBUS 5 |
| @@ -271,12 +249,6 @@ typedef struct siginfo { · 5 unmodified lines | |||
| 271 | #define TRAP_TRACE 2 /* process trace trap */ | 249 | #define TRAP_TRACE 2 /* process trace trap */ |
| 272 | #define TRAP_BRANCH 3 /* process taken branch trap */ | 250 | #define TRAP_BRANCH 3 /* process taken branch trap */ |
| 273 | #define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */ | 251 | #define TRAP_HWBKPT 4 /* hardware breakpoint/watchpoint */ |
| 274 | #ifdef __bfin__ | ||
| 275 | # define TRAP_STEP 1 /* single-step breakpoint */ | ||
| 276 | # define TRAP_TRACEFLOW 2 /* trace buffer overflow */ | ||
| 277 | # define TRAP_WATCHPT 3 /* watchpoint match */ | ||
| 278 | # define TRAP_ILLTRAP 4 /* illegal trap */ | ||
| 279 | #endif | ||
| 280 | #define NSIGTRAP 4 | 252 | #define NSIGTRAP 4 |
| 281 | 253 | ||
| 282 | /* | 254 | /* |
| @@ -736,169 +736,6 @@ __SYSCALL(__NR_statx, sys_statx) · 735 unmodified lines | |||
| 736 | #undef __NR_syscalls | 736 | #undef __NR_syscalls |
| 737 | #define __NR_syscalls 292 | 737 | #define __NR_syscalls 292 |
| 738 | 738 | ||
| 739 | /* | ||
| 740 | * All syscalls below here should go away really, | ||
| 741 | * these are provided for both review and as a porting | ||
| 742 | * help for the C library version. | ||
| 743 | * | ||
| 744 | * Last chance: are any of these important enough to | ||
| 745 | * enable by default? | ||
| 746 | */ | ||
| 747 | #ifdef __ARCH_WANT_SYSCALL_NO_AT | ||
| 748 | #define __NR_open 1024 | ||
| 749 | __SYSCALL(__NR_open, sys_open) | ||
| 750 | #define __NR_link 1025 | ||
| 751 | __SYSCALL(__NR_link, sys_link) | ||
| 752 | #define __NR_unlink 1026 | ||
| 753 | __SYSCALL(__NR_unlink, sys_unlink) | ||
| 754 | #define __NR_mknod 1027 | ||
| 755 | __SYSCALL(__NR_mknod, sys_mknod) | ||
| 756 | #define __NR_chmod 1028 | ||
| 757 | __SYSCALL(__NR_chmod, sys_chmod) | ||
| 758 | #define __NR_chown 1029 | ||
| 759 | __SYSCALL(__NR_chown, sys_chown) | ||
| 760 | #define __NR_mkdir 1030 | ||
| 761 | __SYSCALL(__NR_mkdir, sys_mkdir) | ||
| 762 | #define __NR_rmdir 1031 | ||
| 763 | __SYSCALL(__NR_rmdir, sys_rmdir) | ||
| 764 | #define __NR_lchown 1032 | ||
| 765 | __SYSCALL(__NR_lchown, sys_lchown) | ||
| 766 | #define __NR_access 1033 | ||
| 767 | __SYSCALL(__NR_access, sys_access) | ||
| 768 | #define __NR_rename 1034 | ||
| 769 | __SYSCALL(__NR_rename, sys_rename) | ||
| 770 | #define __NR_readlink 1035 | ||
| 771 | __SYSCALL(__NR_readlink, sys_readlink) | ||
| 772 | #define __NR_symlink 1036 | ||
| 773 | __SYSCALL(__NR_symlink, sys_symlink) | ||
| 774 | #define __NR_utimes 1037 | ||
| 775 | __SYSCALL(__NR_utimes, sys_utimes) | ||
| 776 | #define __NR3264_stat 1038 | ||
| 777 | __SC_3264(__NR3264_stat, sys_stat64, sys_newstat) | ||
| 778 | #define __NR3264_lstat 1039 | ||
| 779 | __SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat) | ||
| 780 | |||
| 781 | #undef __NR_syscalls | ||
| 782 | #define __NR_syscalls (__NR3264_lstat+1) | ||
| 783 | #endif /* __ARCH_WANT_SYSCALL_NO_AT */ | ||
| 784 | |||
| 785 | #ifdef __ARCH_WANT_SYSCALL_NO_FLAGS | ||
| 786 | #define __NR_pipe 1040 | ||
| 787 | __SYSCALL(__NR_pipe, sys_pipe) | ||
| 788 | #define __NR_dup2 1041 | ||
| 789 | __SYSCALL(__NR_dup2, sys_dup2) | ||
| 790 | #define __NR_epoll_create 1042 | ||
| 791 | __SYSCALL(__NR_epoll_create, sys_epoll_create) | ||
| 792 | #define __NR_inotify_init 1043 | ||
| 793 | __SYSCALL(__NR_inotify_init, sys_inotify_init) | ||
| 794 | #define __NR_eventfd 1044 | ||
| 795 | __SYSCALL(__NR_eventfd, sys_eventfd) | ||
| 796 | #define __NR_signalfd 1045 | ||
| 797 | __SYSCALL(__NR_signalfd, sys_signalfd) | ||
| 798 | |||
| 799 | #undef __NR_syscalls | ||
| 800 | #define __NR_syscalls (__NR_signalfd+1) | ||
| 801 | #endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ | ||
| 802 | |||
| 803 | #if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \ | ||
| 804 | defined(__ARCH_WANT_SYSCALL_OFF_T) | ||
| 805 | #define __NR_sendfile 1046 | ||
| 806 | __SYSCALL(__NR_sendfile, sys_sendfile) | ||
| 807 | #define __NR_ftruncate 1047 | ||
| 808 | __SYSCALL(__NR_ftruncate, sys_ftruncate) | ||
| 809 | #define __NR_truncate 1048 | ||
| 810 | __SYSCALL(__NR_truncate, sys_truncate) | ||
| 811 | #define __NR_stat 1049 | ||
| 812 | __SYSCALL(__NR_stat, sys_newstat) | ||
| 813 | #define __NR_lstat 1050 | ||
| 814 | __SYSCALL(__NR_lstat, sys_newlstat) | ||
| 815 | #define __NR_fstat 1051 | ||
| 816 | __SYSCALL(__NR_fstat, sys_newfstat) | ||
| 817 | #define __NR_fcntl 1052 | ||
| 818 | __SYSCALL(__NR_fcntl, sys_fcntl) | ||
| 819 | #define __NR_fadvise64 1053 | ||
| 820 | #define __ARCH_WANT_SYS_FADVISE64 | ||
| 821 | __SYSCALL(__NR_fadvise64, sys_fadvise64) | ||
| 822 | #define __NR_newfstatat 1054 | ||
| 823 | #define __ARCH_WANT_SYS_NEWFSTATAT | ||
| 824 | __SYSCALL(__NR_newfstatat, sys_newfstatat) | ||
| 825 | #define __NR_fstatfs 1055 | ||
| 826 | __SYSCALL(__NR_fstatfs, sys_fstatfs) | ||
| 827 | #define __NR_statfs 1056 | ||
| 828 | __SYSCALL(__NR_statfs, sys_statfs) | ||
| 829 | #define __NR_lseek 1057 | ||
| 830 | __SYSCALL(__NR_lseek, sys_lseek) | ||
| 831 | #define __NR_mmap 1058 | ||
| 832 | __SYSCALL(__NR_mmap, sys_mmap) | ||
| 833 | |||
| 834 | #undef __NR_syscalls | ||
| 835 | #define __NR_syscalls (__NR_mmap+1) | ||
| 836 | #endif /* 32 bit off_t syscalls */ | ||
| 837 | |||
| 838 | #ifdef __ARCH_WANT_SYSCALL_DEPRECATED | ||
| 839 | #define __NR_alarm 1059 | ||
| 840 | #define __ARCH_WANT_SYS_ALARM | ||
| 841 | __SYSCALL(__NR_alarm, sys_alarm) | ||
| 842 | #define __NR_getpgrp 1060 | ||
| 843 | #define __ARCH_WANT_SYS_GETPGRP | ||
| 844 | __SYSCALL(__NR_getpgrp, sys_getpgrp) | ||
| 845 | #define __NR_pause 1061 | ||
| 846 | #define __ARCH_WANT_SYS_PAUSE | ||
| 847 | __SYSCALL(__NR_pause, sys_pause) | ||
| 848 | #define __NR_time 1062 | ||
| 849 | #define __ARCH_WANT_SYS_TIME | ||
| 850 | #define __ARCH_WANT_COMPAT_SYS_TIME | ||
| 851 | __SYSCALL(__NR_time, sys_time) | ||
| 852 | #define __NR_utime 1063 | ||
| 853 | #define __ARCH_WANT_SYS_UTIME | ||
| 854 | __SYSCALL(__NR_utime, sys_utime) | ||
| 855 | |||
| 856 | #define __NR_creat 1064 | ||
| 857 | __SYSCALL(__NR_creat, sys_creat) | ||
| 858 | #define __NR_getdents 1065 | ||
| 859 | #define __ARCH_WANT_SYS_GETDENTS | ||
| 860 | __SYSCALL(__NR_getdents, sys_getdents) | ||
| 861 | #define __NR_futimesat 1066 | ||
| 862 | __SYSCALL(__NR_futimesat, sys_futimesat) | ||
| 863 | #define __NR_select 1067 | ||
| 864 | #define __ARCH_WANT_SYS_SELECT | ||
| 865 | __SYSCALL(__NR_select, sys_select) | ||
| 866 | #define __NR_poll 1068 | ||
| 867 | __SYSCALL(__NR_poll, sys_poll) | ||
| 868 | #define __NR_epoll_wait 1069 | ||
| 869 | __SYSCALL(__NR_epoll_wait, sys_epoll_wait) | ||
| 870 | #define __NR_ustat 1070 | ||
| 871 | __SYSCALL(__NR_ustat, sys_ustat) | ||
| 872 | #define __NR_vfork 1071 | ||
| 873 | __SYSCALL(__NR_vfork, sys_vfork) | ||
| 874 | #define __NR_oldwait4 1072 | ||
| 875 | __SYSCALL(__NR_oldwait4, sys_wait4) | ||
| 876 | #define __NR_recv 1073 | ||
| 877 | __SYSCALL(__NR_recv, sys_recv) | ||
| 878 | #define __NR_send 1074 | ||
| 879 | __SYSCALL(__NR_send, sys_send) | ||
| 880 | #define __NR_bdflush 1075 | ||
| 881 | __SYSCALL(__NR_bdflush, sys_bdflush) | ||
| 882 | #define __NR_umount 1076 | ||
| 883 | __SYSCALL(__NR_umount, sys_oldumount) | ||
| 884 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
| 885 | #define __NR_uselib 1077 | ||
| 886 | __SYSCALL(__NR_uselib, sys_uselib) | ||
| 887 | #define __NR__sysctl 1078 | ||
| 888 | __SYSCALL(__NR__sysctl, sys_sysctl) | ||
| 889 | |||
| 890 | #define __NR_fork 1079 | ||
| 891 | #ifdef CONFIG_MMU | ||
| 892 | __SYSCALL(__NR_fork, sys_fork) | ||
| 893 | #else | ||
| 894 | __SYSCALL(__NR_fork, sys_ni_syscall) | ||
| 895 | #endif /* CONFIG_MMU */ | ||
| 896 | |||
| 897 | #undef __NR_syscalls | ||
| 898 | #define __NR_syscalls (__NR_fork+1) | ||
| 899 | |||
| 900 | #endif /* __ARCH_WANT_SYSCALL_DEPRECATED */ | ||
| 901 | |||
| 902 | /* | 739 | /* |
| 903 | * 32 bit systems traditionally used different | 740 | * 32 bit systems traditionally used different |
| 904 | * syscalls for off_t and loff_t arguments, while | 741 | * syscalls for off_t and loff_t arguments, while |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */ | 1 | /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) */ |
| 2 | /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: | 2 | /* Copyright (C) 2007-2018 B.A.T.M.A.N. contributors: |
| 3 | * | 3 | * |
| 4 | * Marek Lindner, Simon Wunderlich | 4 | * Marek Lindner, Simon Wunderlich |
| 5 | * | 5 | * |
| @@ -196,8 +196,6 @@ struct batadv_bla_claim_dst { · 190 unmodified lines | |||
| 196 | __be16 group; /* group id */ | 196 | __be16 group; /* group id */ |
| 197 | }; | 197 | }; |
| 198 | 198 | ||
| 199 | #pragma pack() | ||
| 200 | |||
| 201 | /** | 199 | /** |
| 202 | * struct batadv_ogm_packet - ogm (routing protocol) packet | 200 | * struct batadv_ogm_packet - ogm (routing protocol) packet |
| 203 | * @packet_type: batman-adv packet type, part of the general header | 201 | * @packet_type: batman-adv packet type, part of the general header |
| @@ -222,9 +220,6 @@ struct batadv_ogm_packet { · 18 unmodified lines | |||
| 222 | __u8 reserved; | 220 | __u8 reserved; |
| 223 | __u8 tq; | 221 | __u8 tq; |
| 224 | __be16 tvlv_len; | 222 | __be16 tvlv_len; |
| 225 | /* __packed is not needed as the struct size is divisible by 4, | ||
| 226 | * and the largest data type in this struct has a size of 4. | ||
| 227 | */ | ||
| 228 | }; | 223 | }; |
| 229 | 224 | ||
| 230 | #define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet) | 225 | #define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet) |
| @@ -249,9 +244,6 @@ struct batadv_ogm2_packet { · 18 unmodified lines | |||
| 249 | __u8 orig[ETH_ALEN]; | 244 | __u8 orig[ETH_ALEN]; |
| 250 | __be16 tvlv_len; | 245 | __be16 tvlv_len; |
| 251 | __be32 throughput; | 246 | __be32 throughput; |
| 252 | /* __packed is not needed as the struct size is divisible by 4, | ||
| 253 | * and the largest data type in this struct has a size of 4. | ||
| 254 | */ | ||
| 255 | }; | 247 | }; |
| 256 | 248 | ||
| 257 | #define BATADV_OGM2_HLEN sizeof(struct batadv_ogm2_packet) | 249 | #define BATADV_OGM2_HLEN sizeof(struct batadv_ogm2_packet) |
| @@ -405,7 +397,6 @@ struct batadv_icmp_packet_rr { · 147 unmodified lines | |||
| 405 | * misalignment of the payload after the ethernet header. It may also lead to | 397 | * misalignment of the payload after the ethernet header. It may also lead to |
| 406 | * leakage of information when the padding it not initialized before sending. | 398 | * leakage of information when the padding it not initialized before sending. |
| 407 | */ | 399 | */ |
| 408 | #pragma pack(2) | ||
| 409 | 400 | ||
| 410 | /** | 401 | /** |
| 411 | * struct batadv_unicast_packet - unicast packet for network payload | 402 | * struct batadv_unicast_packet - unicast packet for network payload |
| @@ -533,8 +524,6 @@ struct batadv_coded_packet { · 121 unmodified lines | |||
| 533 | __be16 coded_len; | 524 | __be16 coded_len; |
| 534 | }; | 525 | }; |
| 535 | 526 | ||
| 536 | #pragma pack() | ||
| 537 | |||
| 538 | /** | 527 | /** |
| 539 | * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload | 528 | * struct batadv_unicast_tvlv_packet - generic unicast packet with tvlv payload |
| 540 | * @packet_type: batman-adv packet type, part of the general header | 529 | * @packet_type: batman-adv packet type, part of the general header |
| @@ -641,4 +630,6 @@ struct batadv_tvlv_mcast_data { · 100 unmodified lines | |||
| 641 | __u8 reserved[3]; | 630 | __u8 reserved[3]; |
| 642 | }; | 631 | }; |
| 643 | 632 | ||
| 633 | #pragma pack() | ||
| 634 | |||
| 644 | #endif /* _UAPI_LINUX_BATADV_PACKET_H_ */ | 635 | #endif /* _UAPI_LINUX_BATADV_PACKET_H_ */ |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* SPDX-License-Identifier: MIT */ | 1 | /* SPDX-License-Identifier: MIT */ |
| 2 | /* Copyright (C) 2016-2017 B.A.T.M.A.N. contributors: | 2 | /* Copyright (C) 2016-2018 B.A.T.M.A.N. contributors: |
| 3 | * | 3 | * |
| 4 | * Matthias Schiffer | 4 | * Matthias Schiffer |
| 5 | * | 5 | * |
| @@ -91,6 +91,53 @@ enum batadv_tt_client_flags { · 85 unmodified lines | |||
| 91 | BATADV_TT_CLIENT_TEMP = (1 << 11), | 91 | BATADV_TT_CLIENT_TEMP = (1 << 11), |
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | /** | ||
| 95 | * enum batadv_mcast_flags_priv - Private, own multicast flags | ||
| 96 | * | ||
| 97 | * These are internal, multicast related flags. Currently they describe certain | ||
| 98 | * multicast related attributes of the segment this originator bridges into the | ||
| 99 | * mesh. | ||
| 100 | * | ||
| 101 | * Those attributes are used to determine the public multicast flags this | ||
| 102 | * originator is going to announce via TT. | ||
| 103 | * | ||
| 104 | * For netlink, if BATADV_MCAST_FLAGS_BRIDGED is unset then all querier | ||
| 105 | * related flags are undefined. | ||
| 106 | */ | ||
| 107 | enum batadv_mcast_flags_priv { | ||
| 108 | /** | ||
| 109 | * @BATADV_MCAST_FLAGS_BRIDGED: There is a bridge on top of the mesh | ||
| 110 | * interface. | ||
| 111 | */ | ||
| 112 | BATADV_MCAST_FLAGS_BRIDGED = (1 << 0), | ||
| 113 | |||
| 114 | /** | ||
| 115 | * @BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS: Whether an IGMP querier | ||
| 116 | * exists in the mesh | ||
| 117 | */ | ||
| 118 | BATADV_MCAST_FLAGS_QUERIER_IPV4_EXISTS = (1 << 1), | ||
| 119 | |||
| 120 | /** | ||
| 121 | * @BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS: Whether an MLD querier | ||
| 122 | * exists in the mesh | ||
| 123 | */ | ||
| 124 | BATADV_MCAST_FLAGS_QUERIER_IPV6_EXISTS = (1 << 2), | ||
| 125 | |||
| 126 | /** | ||
| 127 | * @BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING: If an IGMP querier | ||
| 128 | * exists, whether it is potentially shadowing multicast listeners | ||
| 129 | * (i.e. querier is behind our own bridge segment) | ||
| 130 | */ | ||
| 131 | BATADV_MCAST_FLAGS_QUERIER_IPV4_SHADOWING = (1 << 3), | ||
| 132 | |||
| 133 | /** | ||
| 134 | * @BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING: If an MLD querier | ||
| 135 | * exists, whether it is potentially shadowing multicast listeners | ||
| 136 | * (i.e. querier is behind our own bridge segment) | ||
| 137 | */ | ||
| 138 | BATADV_MCAST_FLAGS_QUERIER_IPV6_SHADOWING = (1 << 4), | ||
| 139 | }; | ||
| 140 | |||
| 94 | /** | 141 | /** |
| 95 | * enum batadv_nl_attrs - batman-adv netlink attributes | 142 | * enum batadv_nl_attrs - batman-adv netlink attributes |
| 96 | */ | 143 | */ |
| @@ -272,6 +319,31 @@ enum batadv_nl_attrs { · 175 unmodified lines | |||
| 272 | */ | 319 | */ |
| 273 | BATADV_ATTR_BLA_CRC, | 320 | BATADV_ATTR_BLA_CRC, |
| 274 | 321 | ||
| 322 | /** | ||
| 323 | * @BATADV_ATTR_DAT_CACHE_IP4ADDRESS: Client IPv4 address | ||
| 324 | */ | ||
| 325 | BATADV_ATTR_DAT_CACHE_IP4ADDRESS, | ||
| 326 | |||
| 327 | /** | ||
| 328 | * @BATADV_ATTR_DAT_CACHE_HWADDRESS: Client MAC address | ||
| 329 | */ | ||
| 330 | BATADV_ATTR_DAT_CACHE_HWADDRESS, | ||
| 331 | |||
| 332 | /** | ||
| 333 | * @BATADV_ATTR_DAT_CACHE_VID: VLAN ID | ||
| 334 | */ | ||
| 335 | BATADV_ATTR_DAT_CACHE_VID, | ||
| 336 | |||
| 337 | /** | ||
| 338 | * @BATADV_ATTR_MCAST_FLAGS: Per originator multicast flags | ||
| 339 | */ | ||
| 340 | BATADV_ATTR_MCAST_FLAGS, | ||
| 341 | |||
| 342 | /** | ||
| 343 | * @BATADV_ATTR_MCAST_FLAGS_PRIV: Private, own multicast flags | ||
| 344 | */ | ||
| 345 | BATADV_ATTR_MCAST_FLAGS_PRIV, | ||
| 346 | |||
| 275 | /* add attributes above here, update the policy in netlink.c */ | 347 | /* add attributes above here, update the policy in netlink.c */ |
| 276 | 348 | ||
| 277 | /** | 349 | /** |
| @@ -361,6 +433,16 @@ enum batadv_nl_commands { · 83 unmodified lines | |||
| 361 | */ | 433 | */ |
| 362 | BATADV_CMD_GET_BLA_BACKBONE, | 434 | BATADV_CMD_GET_BLA_BACKBONE, |
| 363 | 435 | ||
| 436 | /** | ||
| 437 | * @BATADV_CMD_GET_DAT_CACHE: Query list of DAT cache entries | ||
| 438 | */ | ||
| 439 | BATADV_CMD_GET_DAT_CACHE, | ||
| 440 | |||
| 441 | /** | ||
| 442 | * @BATADV_CMD_GET_MCAST_FLAGS: Query list of multicast flags | ||
| 443 | */ | ||
| 444 | BATADV_CMD_GET_MCAST_FLAGS, | ||
| 445 | |||
| 364 | /* add new commands above here */ | 446 | /* add new commands above here */ |
| 365 | 447 | ||
| 366 | /** | 448 | /** |
| @@ -101,7 +101,7 @@ enum blktrace_notify { · 100 unmodified lines | |||
| 101 | struct blk_io_trace { | 101 | struct blk_io_trace { |
| 102 | __u32 magic; /* MAGIC << 8 | version */ | 102 | __u32 magic; /* MAGIC << 8 | version */ |
| 103 | __u32 sequence; /* event number */ | 103 | __u32 sequence; /* event number */ |
| 104 | __u64 time; /* in microseconds */ | 104 | __u64 time; /* in nanoseconds */ |
| 105 | __u64 sector; /* disk offset */ | 105 | __u64 sector; /* disk offset */ |
| 106 | __u32 bytes; /* transfer length */ | 106 | __u32 bytes; /* transfer length */ |
| 107 | __u32 action; /* what happened */ | 107 | __u32 action; /* what happened */ |
| @@ -94,6 +94,7 @@ enum bpf_cmd { · 93 unmodified lines | |||
| 94 | BPF_MAP_GET_FD_BY_ID, | 94 | BPF_MAP_GET_FD_BY_ID, |
| 95 | BPF_OBJ_GET_INFO_BY_FD, | 95 | BPF_OBJ_GET_INFO_BY_FD, |
| 96 | BPF_PROG_QUERY, | 96 | BPF_PROG_QUERY, |
| 97 | BPF_RAW_TRACEPOINT_OPEN, | ||
| 97 | }; | 98 | }; |
| 98 | 99 | ||
| 99 | enum bpf_map_type { | 100 | enum bpf_map_type { |
| @@ -133,6 +134,9 @@ enum bpf_prog_type { · 33 unmodified lines | |||
| 133 | BPF_PROG_TYPE_SOCK_OPS, | 134 | BPF_PROG_TYPE_SOCK_OPS, |
| 134 | BPF_PROG_TYPE_SK_SKB, | 135 | BPF_PROG_TYPE_SK_SKB, |
| 135 | BPF_PROG_TYPE_CGROUP_DEVICE, | 136 | BPF_PROG_TYPE_CGROUP_DEVICE, |
| 137 | BPF_PROG_TYPE_SK_MSG, | ||
| 138 | BPF_PROG_TYPE_RAW_TRACEPOINT, | ||
| 139 | BPF_PROG_TYPE_CGROUP_SOCK_ADDR, | ||
| 136 | }; | 140 | }; |
| 137 | 141 | ||
| 138 | enum bpf_attach_type { | 142 | enum bpf_attach_type { |
| @@ -143,6 +147,13 @@ enum bpf_attach_type { · 4 unmodified lines | |||
| 143 | BPF_SK_SKB_STREAM_PARSER, | 147 | BPF_SK_SKB_STREAM_PARSER, |
| 144 | BPF_SK_SKB_STREAM_VERDICT, | 148 | BPF_SK_SKB_STREAM_VERDICT, |
| 145 | BPF_CGROUP_DEVICE, | 149 | BPF_CGROUP_DEVICE, |
| 150 | BPF_SK_MSG_VERDICT, | ||
| 151 | BPF_CGROUP_INET4_BIND, | ||
| 152 | BPF_CGROUP_INET6_BIND, | ||
| 153 | BPF_CGROUP_INET4_CONNECT, | ||
| 154 | BPF_CGROUP_INET6_CONNECT, | ||
| 155 | BPF_CGROUP_INET4_POST_BIND, | ||
| 156 | BPF_CGROUP_INET6_POST_BIND, | ||
| 146 | __MAX_BPF_ATTACH_TYPE | 157 | __MAX_BPF_ATTACH_TYPE |
| 147 | }; | 158 | }; |
| 148 | 159 | ||
| @@ -231,6 +242,28 @@ enum bpf_attach_type { · 82 unmodified lines | |||
| 231 | #define BPF_F_RDONLY (1U << 3) | 242 | #define BPF_F_RDONLY (1U << 3) |
| 232 | #define BPF_F_WRONLY (1U << 4) | 243 | #define BPF_F_WRONLY (1U << 4) |
| 233 | 244 | ||
| 245 | /* Flag for stack_map, store build_id+offset instead of pointer */ | ||
| 246 | #define BPF_F_STACK_BUILD_ID (1U << 5) | ||
| 247 | |||
| 248 | enum bpf_stack_build_id_status { | ||
| 249 | /* user space need an empty entry to identify end of a trace */ | ||
| 250 | BPF_STACK_BUILD_ID_EMPTY = 0, | ||
| 251 | /* with valid build_id and offset */ | ||
| 252 | BPF_STACK_BUILD_ID_VALID = 1, | ||
| 253 | /* couldn't get build_id, fallback to ip */ | ||
| 254 | BPF_STACK_BUILD_ID_IP = 2, | ||
| 255 | }; | ||
| 256 | |||
| 257 | #define BPF_BUILD_ID_SIZE 20 | ||
| 258 | struct bpf_stack_build_id { | ||
| 259 | __s32 status; | ||
| 260 | unsigned char build_id[BPF_BUILD_ID_SIZE]; | ||
| 261 | union { | ||
| 262 | __u64 offset; | ||
| 263 | __u64 ip; | ||
| 264 | }; | ||
| 265 | }; | ||
| 266 | |||
| 234 | union bpf_attr { | 267 | union bpf_attr { |
| 235 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ | 268 | struct { /* anonymous struct used by BPF_MAP_CREATE command */ |
| 236 | __u32 map_type; /* one of enum bpf_map_type */ | 269 | __u32 map_type; /* one of enum bpf_map_type */ |
| @@ -270,6 +303,11 @@ union bpf_attr { · 33 unmodified lines | |||
| 270 | __u32 prog_flags; | 303 | __u32 prog_flags; |
| 271 | char prog_name[BPF_OBJ_NAME_LEN]; | 304 | char prog_name[BPF_OBJ_NAME_LEN]; |
| 272 | __u32 prog_ifindex; /* ifindex of netdev to prep for */ | 305 | __u32 prog_ifindex; /* ifindex of netdev to prep for */ |
| 306 | /* For some prog types expected attach type must be known at | ||
| 307 | * load time to verify attach type specific parts of prog | ||
| 308 | * (context accesses, allowed helpers, etc). | ||
| 309 | */ | ||
| 310 | __u32 expected_attach_type; | ||
| 273 | }; | 311 | }; |
| 274 | 312 | ||
| 275 | struct { /* anonymous struct used by BPF_OBJ_* commands */ | 313 | struct { /* anonymous struct used by BPF_OBJ_* commands */ |
| @@ -320,6 +358,11 @@ union bpf_attr { · 44 unmodified lines | |||
| 320 | __aligned_u64 prog_ids; | 358 | __aligned_u64 prog_ids; |
| 321 | __u32 prog_cnt; | 359 | __u32 prog_cnt; |
| 322 | } query; | 360 | } query; |
| 361 | |||
| 362 | struct { | ||
| 363 | __u64 name; | ||
| 364 | __u32 prog_fd; | ||
| 365 | } raw_tracepoint; | ||
| 323 | } __attribute__((aligned(8))); | 366 | } __attribute__((aligned(8))); |
| 324 | 367 | ||
| 325 | /* BPF helper function descriptions: | 368 | /* BPF helper function descriptions: |
| @@ -696,6 +739,22 @@ union bpf_attr { · 370 unmodified lines | |||
| 696 | * int bpf_override_return(pt_regs, rc) | 739 | * int bpf_override_return(pt_regs, rc) |
| 697 | * @pt_regs: pointer to struct pt_regs | 740 | * @pt_regs: pointer to struct pt_regs |
| 698 | * @rc: the return value to set | 741 | * @rc: the return value to set |
| 742 | * | ||
| 743 | * int bpf_msg_redirect_map(map, key, flags) | ||
| 744 | * Redirect msg to a sock in map using key as a lookup key for the | ||
| 745 | * sock in map. | ||
| 746 | * @map: pointer to sockmap | ||
| 747 | * @key: key to lookup sock in map | ||
| 748 | * @flags: reserved for future use | ||
| 749 | * Return: SK_PASS | ||
| 750 | * | ||
| 751 | * int bpf_bind(ctx, addr, addr_len) | ||
| 752 | * Bind socket to address. Only binding to IP is supported, no port can be | ||
| 753 | * set in addr. | ||
| 754 | * @ctx: pointer to context of type bpf_sock_addr | ||
| 755 | * @addr: pointer to struct sockaddr to bind socket to | ||
| 756 | * @addr_len: length of sockaddr structure | ||
| 757 | * Return: 0 on success or negative error code | ||
| 699 | */ | 758 | */ |
| 700 | #define __BPF_FUNC_MAPPER(FN) \ | 759 | #define __BPF_FUNC_MAPPER(FN) \ |
| 701 | FN(unspec), \ | 760 | FN(unspec), \ |
| @@ -757,7 +816,12 @@ union bpf_attr { · 55 unmodified lines | |||
| 757 | FN(perf_prog_read_value), \ | 816 | FN(perf_prog_read_value), \ |
| 758 | FN(getsockopt), \ | 817 | FN(getsockopt), \ |
| 759 | FN(override_return), \ | 818 | FN(override_return), \ |
| 760 | FN(sock_ops_cb_flags_set), | 819 | FN(sock_ops_cb_flags_set), \ |
| 820 | FN(msg_redirect_map), \ | ||
| 821 | FN(msg_apply_bytes), \ | ||
| 822 | FN(msg_cork_bytes), \ | ||
| 823 | FN(msg_pull_data), \ | ||
| 824 | FN(bind), | ||
| 761 | 825 | ||
| 762 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper | 826 | /* integer value in 'imm' field of BPF_CALL instruction selects which helper |
| 763 | * function eBPF program intends to call | 827 | * function eBPF program intends to call |
| @@ -800,6 +864,7 @@ enum bpf_func_id { · 36 unmodified lines | |||
| 800 | /* BPF_FUNC_skb_set_tunnel_key flags. */ | 864 | /* BPF_FUNC_skb_set_tunnel_key flags. */ |
| 801 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) | 865 | #define BPF_F_ZERO_CSUM_TX (1ULL << 1) |
| 802 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) | 866 | #define BPF_F_DONT_FRAGMENT (1ULL << 2) |
| 867 | #define BPF_F_SEQ_NUMBER (1ULL << 3) | ||
| 803 | 868 | ||
| 804 | /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and | 869 | /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and |
| 805 | * BPF_FUNC_perf_event_read_value flags. | 870 | * BPF_FUNC_perf_event_read_value flags. |
| @@ -885,6 +950,15 @@ struct bpf_sock { · 79 unmodified lines | |||
| 885 | __u32 protocol; | 950 | __u32 protocol; |
| 886 | __u32 mark; | 951 | __u32 mark; |
| 887 | __u32 priority; | 952 | __u32 priority; |
| 953 | __u32 src_ip4; /* Allows 1,2,4-byte read. | ||
| 954 | * Stored in network byte order. | ||
| 955 | */ | ||
| 956 | __u32 src_ip6[4]; /* Allows 1,2,4-byte read. | ||
| 957 | * Stored in network byte order. | ||
| 958 | */ | ||
| 959 | __u32 src_port; /* Allows 4-byte read. | ||
| 960 | * Stored in host byte order | ||
| 961 | */ | ||
| 888 | }; | 962 | }; |
| 889 | 963 | ||
| 890 | #define XDP_PACKET_HEADROOM 256 | 964 | #define XDP_PACKET_HEADROOM 256 |
| @@ -919,6 +993,14 @@ enum sk_action { · 28 unmodified lines | |||
| 919 | SK_PASS, | 993 | SK_PASS, |
| 920 | }; | 994 | }; |
| 921 | 995 | ||
| 996 | /* user accessible metadata for SK_MSG packet hook, new fields must | ||
| 997 | * be added to the end of this structure | ||
| 998 | */ | ||
| 999 | struct sk_msg_md { | ||
| 1000 | void *data; | ||
| 1001 | void *data_end; | ||
| 1002 | }; | ||
| 1003 | |||
| 922 | #define BPF_TAG_SIZE 8 | 1004 | #define BPF_TAG_SIZE 8 |
| 923 | 1005 | ||
| 924 | struct bpf_prog_info { | 1006 | struct bpf_prog_info { |
| @@ -952,6 +1034,26 @@ struct bpf_map_info { · 27 unmodified lines | |||
| 952 | __u64 netns_ino; | 1034 | __u64 netns_ino; |
| 953 | } __attribute__((aligned(8))); | 1035 | } __attribute__((aligned(8))); |
| 954 | 1036 | ||
| 1037 | /* User bpf_sock_addr struct to access socket fields and sockaddr struct passed | ||
| 1038 | * by user and intended to be used by socket (e.g. to bind to, depends on | ||
| 1039 | * attach attach type). | ||
| 1040 | */ | ||
| 1041 | struct bpf_sock_addr { | ||
| 1042 | __u32 user_family; /* Allows 4-byte read, but no write. */ | ||
| 1043 | __u32 user_ip4; /* Allows 1,2,4-byte read and 4-byte write. | ||
| 1044 | * Stored in network byte order. | ||
| 1045 | */ | ||
| 1046 | __u32 user_ip6[4]; /* Allows 1,2,4-byte read an 4-byte write. | ||
| 1047 | * Stored in network byte order. | ||
| 1048 | */ | ||
| 1049 | __u32 user_port; /* Allows 4-byte read and write. | ||
| 1050 | * Stored in network byte order | ||
| 1051 | */ | ||
| 1052 | __u32 family; /* Allows 4-byte read, but no write */ | ||
| 1053 | __u32 type; /* Allows 4-byte read, but no write */ | ||
| 1054 | __u32 protocol; /* Allows 4-byte read, but no write */ | ||
| 1055 | }; | ||
| 1056 | |||
| 955 | /* User bpf_sock_ops struct to access socket values and specify request ops | 1057 | /* User bpf_sock_ops struct to access socket values and specify request ops |
| 956 | * and their replies. | 1058 | * and their replies. |
| 957 | * Some of this fields are in network (bigendian) byte order and may need | 1059 | * Some of this fields are in network (bigendian) byte order and may need |
| @@ -1106,4 +1208,8 @@ struct bpf_cgroup_dev_ctx { · 148 unmodified lines | |||
| 1106 | __u32 minor; | 1208 | __u32 minor; |
| 1107 | }; | 1209 | }; |
| 1108 | 1210 | ||
| 1211 | struct bpf_raw_tracepoint_args { | ||
| 1212 | __u64 args[0]; | ||
| 1213 | }; | ||
| 1214 | |||
| 1109 | #endif /* _UAPI__LINUX_BPF_H__ */ | 1215 | #endif /* _UAPI__LINUX_BPF_H__ */ |
| @@ -13,6 +13,7 @@ · 12 unmodified lines | |||
| 13 | struct bpf_perf_event_data { | 13 | struct bpf_perf_event_data { |
| 14 | bpf_user_pt_regs_t regs; | 14 | bpf_user_pt_regs_t regs; |
| 15 | __u64 sample_period; | 15 | __u64 sample_period; |
| 16 | __u64 addr; | ||
| 16 | }; | 17 | }; |
| 17 | 18 | ||
| 18 | #endif /* _UAPI__LINUX_BPF_PERF_EVENT_H__ */ | 19 | #endif /* _UAPI__LINUX_BPF_PERF_EVENT_H__ */ |
| @@ -3,35 +3,6 @@ · 2 unmodified lines | |||
| 3 | * cec - HDMI Consumer Electronics Control message functions | 3 | * cec - HDMI Consumer Electronics Control message functions |
| 4 | * | 4 | * |
| 5 | * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. | 5 | * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. |
| 6 | * | ||
| 7 | * This program is free software; you may redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; version 2 of the License. | ||
| 10 | * | ||
| 11 | * Alternatively you can redistribute this file under the terms of the | ||
| 12 | * BSD license as stated below: | ||
| 13 | * | ||
| 14 | * Redistribution and use in source and binary forms, with or without | ||
| 15 | * modification, are permitted provided that the following conditions | ||
| 16 | * are met: | ||
| 17 | * 1. Redistributions of source code must retain the above copyright | ||
| 18 | * notice, this list of conditions and the following disclaimer. | ||
| 19 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 20 | * notice, this list of conditions and the following disclaimer in | ||
| 21 | * the documentation and/or other materials provided with the | ||
| 22 | * distribution. | ||
| 23 | * 3. The names of its contributors may not be used to endorse or promote | ||
| 24 | * products derived from this software without specific prior written | ||
| 25 | * permission. | ||
| 26 | * | ||
| 27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 28 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 29 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 30 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 31 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 32 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 33 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 34 | * SOFTWARE. | ||
| 35 | */ | 6 | */ |
| 36 | 7 | ||
| 37 | #ifndef _CEC_UAPI_FUNCS_H | 8 | #ifndef _CEC_UAPI_FUNCS_H |
| @@ -3,35 +3,6 @@ · 2 unmodified lines | |||
| 3 | * cec - HDMI Consumer Electronics Control public header | 3 | * cec - HDMI Consumer Electronics Control public header |
| 4 | * | 4 | * |
| 5 | * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. | 5 | * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved. |
| 6 | * | ||
| 7 | * This program is free software; you may redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; version 2 of the License. | ||
| 10 | * | ||
| 11 | * Alternatively you can redistribute this file under the terms of the | ||
| 12 | * BSD license as stated below: | ||
| 13 | * | ||
| 14 | * Redistribution and use in source and binary forms, with or without | ||
| 15 | * modification, are permitted provided that the following conditions | ||
| 16 | * are met: | ||
| 17 | * 1. Redistributions of source code must retain the above copyright | ||
| 18 | * notice, this list of conditions and the following disclaimer. | ||
| 19 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 20 | * notice, this list of conditions and the following disclaimer in | ||
| 21 | * the documentation and/or other materials provided with the | ||
| 22 | * distribution. | ||
| 23 | * 3. The names of its contributors may not be used to endorse or promote | ||
| 24 | * products derived from this software without specific prior written | ||
| 25 | * permission. | ||
| 26 | * | ||
| 27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 28 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 29 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 30 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 31 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 32 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 33 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 34 | * SOFTWARE. | ||
| 35 | */ | 6 | */ |
| 36 | 7 | ||
| 37 | #ifndef _CEC_UAPI_H | 8 | #ifndef _CEC_UAPI_H |
| @@ -1,8 +1,8 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | /* const.h: Macros for dealing with constants. */ | 2 | /* const.h: Macros for dealing with constants. */ |
| 3 | 3 | ||
| 4 | #ifndef _LINUX_CONST_H | 4 | #ifndef _UAPI_LINUX_CONST_H |
| 5 | #define _LINUX_CONST_H | 5 | #define _UAPI_LINUX_CONST_H |
| 6 | 6 | ||
| 7 | /* Some constant macros are used in both assembler and | 7 | /* Some constant macros are used in both assembler and |
| 8 | * C code. Therefore we cannot annotate them always with | 8 | * C code. Therefore we cannot annotate them always with |
| @@ -22,7 +22,10 @@ · 13 unmodified lines | |||
| 22 | #define _AT(T,X) ((T)(X)) | 22 | #define _AT(T,X) ((T)(X)) |
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | #define _BITUL(x) (_AC(1,UL) << (x)) | 25 | #define _UL(x) (_AC(x, UL)) |
| 26 | #define _BITULL(x) (_AC(1,ULL) << (x)) | 26 | #define _ULL(x) (_AC(x, ULL)) |
| 27 | 27 | ||
| 28 | #endif /* !(_LINUX_CONST_H) */ | 28 | #define _BITUL(x) (_UL(1) << (x)) |
| 29 | #define _BITULL(x) (_ULL(1) << (x)) | ||
| 30 | |||
| 31 | #endif /* _UAPI_LINUX_CONST_H */ | ||
| @@ -270,9 +270,9 @@ enum { · 269 unmodified lines | |||
| 270 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 270 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
| 271 | 271 | ||
| 272 | #define DM_VERSION_MAJOR 4 | 272 | #define DM_VERSION_MAJOR 4 |
| 273 | #define DM_VERSION_MINOR 37 | 273 | #define DM_VERSION_MINOR 39 |
| 274 | #define DM_VERSION_PATCHLEVEL 0 | 274 | #define DM_VERSION_PATCHLEVEL 0 |
| 275 | #define DM_VERSION_EXTRA "-ioctl (2017-09-20)" | 275 | #define DM_VERSION_EXTRA "-ioctl (2018-04-03)" |
| 276 | 276 | ||
| 277 | /* Status bits */ | 277 | /* Status bits */ |
| 278 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 278 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
| @@ -420,9 +420,6 @@ typedef struct elf64_shdr { · 419 unmodified lines | |||
| 420 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ | 420 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ |
| 421 | #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ | 421 | #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ |
| 422 | #define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */ | 422 | #define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */ |
| 423 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ | ||
| 424 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ | ||
| 425 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ | ||
| 426 | #define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */ | 423 | #define NT_ARC_V2 0x600 /* ARCv2 accumulator/extra registers */ |
| 427 | 424 | ||
| 428 | /* Note header in a PT_NOTE section */ | 425 | /* Note header in a PT_NOTE section */ |
| @@ -217,10 +217,14 @@ struct ethtool_value { · 216 unmodified lines | |||
| 217 | __u32 data; | 217 | __u32 data; |
| 218 | }; | 218 | }; |
| 219 | 219 | ||
| 220 | #define PFC_STORM_PREVENTION_AUTO 0xffff | ||
| 221 | #define PFC_STORM_PREVENTION_DISABLE 0 | ||
| 222 | |||
| 220 | enum tunable_id { | 223 | enum tunable_id { |
| 221 | ETHTOOL_ID_UNSPEC, | 224 | ETHTOOL_ID_UNSPEC, |
| 222 | ETHTOOL_RX_COPYBREAK, | 225 | ETHTOOL_RX_COPYBREAK, |
| 223 | ETHTOOL_TX_COPYBREAK, | 226 | ETHTOOL_TX_COPYBREAK, |
| 227 | ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */ | ||
| 224 | /* | 228 | /* |
| 225 | * Add your fresh new tubale attribute above and remember to update | 229 | * Add your fresh new tubale attribute above and remember to update |
| 226 | * tunable_strings[] in net/core/ethtool.c | 230 | * tunable_strings[] in net/core/ethtool.c |
| @@ -914,12 +918,15 @@ static inline __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie) · 687 unmodified lines | |||
| 914 | * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW | 918 | * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW |
| 915 | * @data: Command-dependent value | 919 | * @data: Command-dependent value |
| 916 | * @fs: Flow classification rule | 920 | * @fs: Flow classification rule |
| 921 | * @rss_context: RSS context to be affected | ||
| 917 | * @rule_cnt: Number of rules to be affected | 922 | * @rule_cnt: Number of rules to be affected |
| 918 | * @rule_locs: Array of used rule locations | 923 | * @rule_locs: Array of used rule locations |
| 919 | * | 924 | * |
| 920 | * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating | 925 | * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating |
| 921 | * the fields included in the flow hash, e.g. %RXH_IP_SRC. The following | 926 | * the fields included in the flow hash, e.g. %RXH_IP_SRC. The following |
| 922 | * structure fields must not be used. | 927 | * structure fields must not be used, except that if @flow_type includes |
| 928 | * the %FLOW_RSS flag, then @rss_context determines which RSS context to | ||
| 929 | * act on. | ||
| 923 | * | 930 | * |
| 924 | * For %ETHTOOL_GRXRINGS, @data is set to the number of RX rings/queues | 931 | * For %ETHTOOL_GRXRINGS, @data is set to the number of RX rings/queues |
| 925 | * on return. | 932 | * on return. |
| @@ -931,7 +938,9 @@ static inline __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie) · 5 unmodified lines | |||
| 931 | * set in @data then special location values should not be used. | 938 | * set in @data then special location values should not be used. |
| 932 | * | 939 | * |
| 933 | * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the location of an | 940 | * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the location of an |
| 934 | * existing rule on entry and @fs contains the rule on return. | 941 | * existing rule on entry and @fs contains the rule on return; if |
| 942 | * @fs.@flow_type includes the %FLOW_RSS flag, then @rss_context is | ||
| 943 | * filled with the RSS context ID associated with the rule. | ||
| 935 | * | 944 | * |
| 936 | * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the | 945 | * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the |
| 937 | * user buffer for @rule_locs on entry. On return, @data is the size | 946 | * user buffer for @rule_locs on entry. On return, @data is the size |
| @@ -942,7 +951,11 @@ static inline __u64 ethtool_get_flow_spec_ring_vf(__u64 ring_cookie) · 4 unmodified lines | |||
| 942 | * For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update. | 951 | * For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update. |
| 943 | * @fs.@location either specifies the location to use or is a special | 952 | * @fs.@location either specifies the location to use or is a special |
| 944 | * location value with %RX_CLS_LOC_SPECIAL flag set. On return, | 953 | * location value with %RX_CLS_LOC_SPECIAL flag set. On return, |
| 945 | * @fs.@location is the actual rule location. | 954 | * @fs.@location is the actual rule location. If @fs.@flow_type |
| 955 | * includes the %FLOW_RSS flag, @rss_context is the RSS context ID to | ||
| 956 | * use for flow spreading traffic which matches this rule. The value | ||
| 957 | * from the rxfh indirection table will be added to @fs.@ring_cookie | ||
| 958 | * to choose which ring to deliver to. | ||
| 946 | * | 959 | * |
| 947 | * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an | 960 | * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an |
| 948 | * existing rule on entry. | 961 | * existing rule on entry. |
| @@ -963,7 +976,10 @@ struct ethtool_rxnfc { · 14 unmodified lines | |||
| 963 | __u32 flow_type; | 976 | __u32 flow_type; |
| 964 | __u64 data; | 977 | __u64 data; |
| 965 | struct ethtool_rx_flow_spec fs; | 978 | struct ethtool_rx_flow_spec fs; |
| 966 | __u32 rule_cnt; | 979 | union { |
| 980 | __u32 rule_cnt; | ||
| 981 | __u32 rss_context; | ||
| 982 | }; | ||
| 967 | __u32 rule_locs[0]; | 983 | __u32 rule_locs[0]; |
| 968 | }; | 984 | }; |
| 969 | 985 | ||
| @@ -990,7 +1006,11 @@ struct ethtool_rxfh_indir { · 20 unmodified lines | |||
| 990 | /** | 1006 | /** |
| 991 | * struct ethtool_rxfh - command to get/set RX flow hash indir or/and hash key. | 1007 | * struct ethtool_rxfh - command to get/set RX flow hash indir or/and hash key. |
| 992 | * @cmd: Specific command number - %ETHTOOL_GRSSH or %ETHTOOL_SRSSH | 1008 | * @cmd: Specific command number - %ETHTOOL_GRSSH or %ETHTOOL_SRSSH |
| 993 | * @rss_context: RSS context identifier. | 1009 | * @rss_context: RSS context identifier. Context 0 is the default for normal |
| 1010 | * traffic; other contexts can be referenced as the destination for RX flow | ||
| 1011 | * classification rules. %ETH_RXFH_CONTEXT_ALLOC is used with command | ||
| 1012 | * %ETHTOOL_SRSSH to allocate a new RSS context; on return this field will | ||
| 1013 | * contain the ID of the newly allocated context. | ||
| 994 | * @indir_size: On entry, the array size of the user buffer for the | 1014 | * @indir_size: On entry, the array size of the user buffer for the |
| 995 | * indirection table, which may be zero, or (for %ETHTOOL_SRSSH), | 1015 | * indirection table, which may be zero, or (for %ETHTOOL_SRSSH), |
| 996 | * %ETH_RXFH_INDIR_NO_CHANGE. On return from %ETHTOOL_GRSSH, | 1016 | * %ETH_RXFH_INDIR_NO_CHANGE. On return from %ETHTOOL_GRSSH, |
| @@ -1009,7 +1029,8 @@ struct ethtool_rxfh_indir { · 12 unmodified lines | |||
| 1009 | * size should be returned. For %ETHTOOL_SRSSH, an @indir_size of | 1029 | * size should be returned. For %ETHTOOL_SRSSH, an @indir_size of |
| 1010 | * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested | 1030 | * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested |
| 1011 | * and a @indir_size of zero means the indir table should be reset to default | 1031 | * and a @indir_size of zero means the indir table should be reset to default |
| 1012 | * values. An hfunc of zero means that hash function setting is not requested. | 1032 | * values (if @rss_context == 0) or that the RSS context should be deleted. |
| 1033 | * An hfunc of zero means that hash function setting is not requested. | ||
| 1013 | */ | 1034 | */ |
| 1014 | struct ethtool_rxfh { | 1035 | struct ethtool_rxfh { |
| 1015 | __u32 cmd; | 1036 | __u32 cmd; |
| @@ -1021,6 +1042,7 @@ struct ethtool_rxfh { · 5 unmodified lines | |||
| 1021 | __u32 rsvd32; | 1042 | __u32 rsvd32; |
| 1022 | __u32 rss_config[0]; | 1043 | __u32 rss_config[0]; |
| 1023 | }; | 1044 | }; |
| 1045 | #define ETH_RXFH_CONTEXT_ALLOC 0xffffffff | ||
| 1024 | #define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff | 1046 | #define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff |
| 1025 | 1047 | ||
| 1026 | /** | 1048 | /** |
| @@ -1635,6 +1657,8 @@ static inline int ethtool_validate_duplex(__u8 duplex) · 608 unmodified lines | |||
| 1635 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ | 1657 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ |
| 1636 | #define FLOW_EXT 0x80000000 | 1658 | #define FLOW_EXT 0x80000000 |
| 1637 | #define FLOW_MAC_EXT 0x40000000 | 1659 | #define FLOW_MAC_EXT 0x40000000 |
| 1660 | /* Flag to enable RSS spreading of traffic matching rule (nfc only) */ | ||
| 1661 | #define FLOW_RSS 0x20000000 | ||
| 1638 | 1662 | ||
| 1639 | /* L3-L4 network traffic flow hash options */ | 1663 | /* L3-L4 network traffic flow hash options */ |
| 1640 | #define RXH_L2DA (1 << 1) | 1664 | #define RXH_L2DA (1 << 1) |
| @@ -23,7 +23,7 @@ struct fib_rule_hdr { · 22 unmodified lines | |||
| 23 | __u8 tos; | 23 | __u8 tos; |
| 24 | 24 | ||
| 25 | __u8 table; | 25 | __u8 table; |
| 26 | __u8 res1; /* reserved */ | 26 | __u8 res1; /* reserved */ |
| 27 | __u8 res2; /* reserved */ | 27 | __u8 res2; /* reserved */ |
| 28 | __u8 action; | 28 | __u8 action; |
| 29 | 29 | ||
| @@ -35,6 +35,11 @@ struct fib_rule_uid_range { · 5 unmodified lines | |||
| 35 | __u32 end; | 35 | __u32 end; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | struct fib_rule_port_range { | ||
| 39 | __u16 start; | ||
| 40 | __u16 end; | ||
| 41 | }; | ||
| 42 | |||
| 38 | enum { | 43 | enum { |
| 39 | FRA_UNSPEC, | 44 | FRA_UNSPEC, |
| 40 | FRA_DST, /* destination address */ | 45 | FRA_DST, /* destination address */ |
| @@ -58,6 +63,10 @@ enum { · 17 unmodified lines | |||
| 58 | FRA_PAD, | 63 | FRA_PAD, |
| 59 | FRA_L3MDEV, /* iif or oif is l3mdev goto its table */ | 64 | FRA_L3MDEV, /* iif or oif is l3mdev goto its table */ |
| 60 | FRA_UID_RANGE, /* UID range */ | 65 | FRA_UID_RANGE, /* UID range */ |
| 66 | FRA_PROTOCOL, /* Originator of the rule */ | ||
| 67 | FRA_IP_PROTO, /* ip proto */ | ||
| 68 | FRA_SPORT_RANGE, /* sport */ | ||
| 69 | FRA_DPORT_RANGE, /* dport */ | ||
| 61 | __FRA_MAX | 70 | __FRA_MAX |
| 62 | }; | 71 | }; |
| 63 | 72 | ||
| @@ -89,6 +89,7 @@ · 88 unmodified lines | |||
| 89 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ | 89 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ |
| 90 | #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */ | 90 | #define ETH_P_8021AD 0x88A8 /* 802.1ad Service VLAN */ |
| 91 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ | 91 | #define ETH_P_802_EX1 0x88B5 /* 802.1 Local Experimental 1. */ |
| 92 | #define ETH_P_PREAUTH 0x88C7 /* 802.11 Preauthentication */ | ||
| 92 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 93 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
| 93 | #define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */ | 94 | #define ETH_P_MACSEC 0x88E5 /* 802.1ae MACsec */ |
| 94 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ | 95 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ |
| @@ -941,4 +941,43 @@ enum { · 940 unmodified lines | |||
| 941 | IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */ | 941 | IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */ |
| 942 | }; | 942 | }; |
| 943 | 943 | ||
| 944 | /* tun section */ | ||
| 945 | |||
| 946 | enum { | ||
| 947 | IFLA_TUN_UNSPEC, | ||
| 948 | IFLA_TUN_OWNER, | ||
| 949 | IFLA_TUN_GROUP, | ||
| 950 | IFLA_TUN_TYPE, | ||
| 951 | IFLA_TUN_PI, | ||
| 952 | IFLA_TUN_VNET_HDR, | ||
| 953 | IFLA_TUN_PERSIST, | ||
| 954 | IFLA_TUN_MULTI_QUEUE, | ||
| 955 | IFLA_TUN_NUM_QUEUES, | ||
| 956 | IFLA_TUN_NUM_DISABLED_QUEUES, | ||
| 957 | __IFLA_TUN_MAX, | ||
| 958 | }; | ||
| 959 | |||
| 960 | #define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1) | ||
| 961 | |||
| 962 | /* rmnet section */ | ||
| 963 | |||
| 964 | #define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0) | ||
| 965 | #define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1) | ||
| 966 | #define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2) | ||
| 967 | #define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3) | ||
| 968 | |||
| 969 | enum { | ||
| 970 | IFLA_RMNET_UNSPEC, | ||
| 971 | IFLA_RMNET_MUX_ID, | ||
| 972 | IFLA_RMNET_FLAGS, | ||
| 973 | __IFLA_RMNET_MAX, | ||
| 974 | }; | ||
| 975 | |||
| 976 | #define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1) | ||
| 977 | |||
| 978 | struct ifla_rmnet_flags { | ||
| 979 | __u32 flags; | ||
| 980 | __u32 mask; | ||
| 981 | }; | ||
| 982 | |||
| 944 | #endif /* _UAPI_LINUX_IF_LINK_H */ | 983 | #endif /* _UAPI_LINUX_IF_LINK_H */ |
| @@ -71,5 +71,13 @@ struct inotify_event { · 70 unmodified lines | |||
| 71 | #define IN_CLOEXEC O_CLOEXEC | 71 | #define IN_CLOEXEC O_CLOEXEC |
| 72 | #define IN_NONBLOCK O_NONBLOCK | 72 | #define IN_NONBLOCK O_NONBLOCK |
| 73 | 73 | ||
| 74 | /* | ||
| 75 | * ioctl numbers: inotify uses 'I' prefix for all ioctls, | ||
| 76 | * except historical FIONREAD, which is based on 'T'. | ||
| 77 | * | ||
| 78 | * INOTIFY_IOC_SETNEXTWD: set desired number of next created | ||
| 79 | * watch descriptor. | ||
| 80 | */ | ||
| 81 | #define INOTIFY_IOC_SETNEXTWD _IOW('I', 0, __s32) | ||
| 74 | 82 | ||
| 75 | #endif /* _UAPI_LINUX_INOTIFY_H */ | 83 | #endif /* _UAPI_LINUX_INOTIFY_H */ |
| @@ -10,26 +10,6 @@ · 9 unmodified lines | |||
| 10 | * | 10 | * |
| 11 | * Copyright 2002 MontaVista Software Inc. | 11 | * Copyright 2002 MontaVista Software Inc. |
| 12 | * | 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify it | ||
| 14 | * under the terms of the GNU General Public License as published by the | ||
| 15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 16 | * option) any later version. | ||
| 17 | * | ||
| 18 | * | ||
| 19 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
| 20 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
| 21 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
| 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||
| 25 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
| 26 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | ||
| 27 | * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||
| 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 29 | * | ||
| 30 | * You should have received a copy of the GNU General Public License along | ||
| 31 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 32 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 33 | */ | 13 | */ |
| 34 | 14 | ||
| 35 | #ifndef _UAPI__LINUX_IPMI_H | 15 | #ifndef _UAPI__LINUX_IPMI_H |
| @@ -0,0 +1,16 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2015-2018, Intel Corporation. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #ifndef _UAPI_LINUX_IPMI_BMC_H | ||
| 7 | #define _UAPI_LINUX_IPMI_BMC_H | ||
| 8 | |||
| 9 | #include <linux/ioctl.h> | ||
| 10 | |||
| 11 | #define __IPMI_BMC_IOCTL_MAGIC 0xB1 | ||
| 12 | #define IPMI_BMC_IOCTL_SET_SMS_ATN _IO(__IPMI_BMC_IOCTL_MAGIC, 0x00) | ||
| 13 | #define IPMI_BMC_IOCTL_CLEAR_SMS_ATN _IO(__IPMI_BMC_IOCTL_MAGIC, 0x01) | ||
| 14 | #define IPMI_BMC_IOCTL_FORCE_ABORT _IO(__IPMI_BMC_IOCTL_MAGIC, 0x02) | ||
| 15 | |||
| 16 | #endif /* _UAPI_LINUX_IPMI_BMC_H */ | ||
| @@ -10,26 +10,6 @@ · 9 unmodified lines | |||
| 10 | * | 10 | * |
| 11 | * Copyright 2002 MontaVista Software Inc. | 11 | * Copyright 2002 MontaVista Software Inc. |
| 12 | * | 12 | * |
| 13 | * This program is free software; you can redistribute it and/or modify it | ||
| 14 | * under the terms of the GNU General Public License as published by the | ||
| 15 | * Free Software Foundation; either version 2 of the License, or (at your | ||
| 16 | * option) any later version. | ||
| 17 | * | ||
| 18 | * | ||
| 19 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
| 20 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
| 21 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
| 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS | ||
| 25 | * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
| 26 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR | ||
| 27 | * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||
| 28 | * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 29 | * | ||
| 30 | * You should have received a copy of the GNU General Public License along | ||
| 31 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 32 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 33 | */ | 13 | */ |
| 34 | 14 | ||
| 35 | #ifndef __LINUX_IPMI_MSGDEFS_H | 15 | #ifndef __LINUX_IPMI_MSGDEFS_H |
| @@ -1,252 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /********************************************************************* | ||
| 3 | * | ||
| 4 | * Filename: irda.h | ||
| 5 | * Version: | ||
| 6 | * Description: | ||
| 7 | * Status: Experimental. | ||
| 8 | * Author: Dag Brattli <dagb@cs.uit.no> | ||
| 9 | * Created at: Mon Mar 8 14:06:12 1999 | ||
| 10 | * Modified at: Sat Dec 25 16:06:42 1999 | ||
| 11 | * Modified by: Dag Brattli <dagb@cs.uit.no> | ||
| 12 | * | ||
| 13 | * Copyright (c) 1999 Dag Brattli, All Rights Reserved. | ||
| 14 | * | ||
| 15 | * This program is free software; you can redistribute it and/or | ||
| 16 | * modify it under the terms of the GNU General Public License as | ||
| 17 | * published by the Free Software Foundation; either version 2 of | ||
| 18 | * the License, or (at your option) any later version. | ||
| 19 | * | ||
| 20 | * Neither Dag Brattli nor University of Tromsø admit liability nor | ||
| 21 | * provide warranty for any of this software. This material is | ||
| 22 | * provided "AS-IS" and at no charge. | ||
| 23 | * | ||
| 24 | ********************************************************************/ | ||
| 25 | |||
| 26 | #ifndef KERNEL_IRDA_H | ||
| 27 | #define KERNEL_IRDA_H | ||
| 28 | |||
| 29 | #include <linux/types.h> | ||
| 30 | #include <linux/socket.h> | ||
| 31 | |||
| 32 | /* Note that this file is shared with user space. */ | ||
| 33 | |||
| 34 | /* Hint bit positions for first hint byte */ | ||
| 35 | #define HINT_PNP 0x01 | ||
| 36 | #define HINT_PDA 0x02 | ||
| 37 | #define HINT_COMPUTER 0x04 | ||
| 38 | #define HINT_PRINTER 0x08 | ||
| 39 | #define HINT_MODEM 0x10 | ||
| 40 | #define HINT_FAX 0x20 | ||
| 41 | #define HINT_LAN 0x40 | ||
| 42 | #define HINT_EXTENSION 0x80 | ||
| 43 | |||
| 44 | /* Hint bit positions for second hint byte (first extension byte) */ | ||
| 45 | #define HINT_TELEPHONY 0x01 | ||
| 46 | #define HINT_FILE_SERVER 0x02 | ||
| 47 | #define HINT_COMM 0x04 | ||
| 48 | #define HINT_MESSAGE 0x08 | ||
| 49 | #define HINT_HTTP 0x10 | ||
| 50 | #define HINT_OBEX 0x20 | ||
| 51 | |||
| 52 | /* IrLMP character code values */ | ||
| 53 | #define CS_ASCII 0x00 | ||
| 54 | #define CS_ISO_8859_1 0x01 | ||
| 55 | #define CS_ISO_8859_2 0x02 | ||
| 56 | #define CS_ISO_8859_3 0x03 | ||
| 57 | #define CS_ISO_8859_4 0x04 | ||
| 58 | #define CS_ISO_8859_5 0x05 | ||
| 59 | #define CS_ISO_8859_6 0x06 | ||
| 60 | #define CS_ISO_8859_7 0x07 | ||
| 61 | #define CS_ISO_8859_8 0x08 | ||
| 62 | #define CS_ISO_8859_9 0x09 | ||
| 63 | #define CS_UNICODE 0xff | ||
| 64 | |||
| 65 | /* These are the currently known dongles */ | ||
| 66 | typedef enum { | ||
| 67 | IRDA_TEKRAM_DONGLE = 0, | ||
| 68 | IRDA_ESI_DONGLE = 1, | ||
| 69 | IRDA_ACTISYS_DONGLE = 2, | ||
| 70 | IRDA_ACTISYS_PLUS_DONGLE = 3, | ||
| 71 | IRDA_GIRBIL_DONGLE = 4, | ||
| 72 | IRDA_LITELINK_DONGLE = 5, | ||
| 73 | IRDA_AIRPORT_DONGLE = 6, | ||
| 74 | IRDA_OLD_BELKIN_DONGLE = 7, | ||
| 75 | IRDA_EP7211_IR = 8, | ||
| 76 | IRDA_MCP2120_DONGLE = 9, | ||
| 77 | IRDA_ACT200L_DONGLE = 10, | ||
| 78 | IRDA_MA600_DONGLE = 11, | ||
| 79 | IRDA_TOIM3232_DONGLE = 12, | ||
| 80 | IRDA_EP7211_DONGLE = 13, | ||
| 81 | } IRDA_DONGLE; | ||
| 82 | |||
| 83 | /* Protocol types to be used for SOCK_DGRAM */ | ||
| 84 | enum { | ||
| 85 | IRDAPROTO_UNITDATA = 0, | ||
| 86 | IRDAPROTO_ULTRA = 1, | ||
| 87 | IRDAPROTO_MAX | ||
| 88 | }; | ||
| 89 | |||
| 90 | #define SOL_IRLMP 266 /* Same as SOL_IRDA for now */ | ||
| 91 | #define SOL_IRTTP 266 /* Same as SOL_IRDA for now */ | ||
| 92 | |||
| 93 | #define IRLMP_ENUMDEVICES 1 /* Return discovery log */ | ||
| 94 | #define IRLMP_IAS_SET 2 /* Set an attribute in local IAS */ | ||
| 95 | #define IRLMP_IAS_QUERY 3 /* Query remote IAS for attribute */ | ||
| 96 | #define IRLMP_HINTS_SET 4 /* Set hint bits advertised */ | ||
| 97 | #define IRLMP_QOS_SET 5 | ||
| 98 | #define IRLMP_QOS_GET 6 | ||
| 99 | #define IRLMP_MAX_SDU_SIZE 7 | ||
| 100 | #define IRLMP_IAS_GET 8 /* Get an attribute from local IAS */ | ||
| 101 | #define IRLMP_IAS_DEL 9 /* Remove attribute from local IAS */ | ||
| 102 | #define IRLMP_HINT_MASK_SET 10 /* Set discovery filter */ | ||
| 103 | #define IRLMP_WAITDEVICE 11 /* Wait for a new discovery */ | ||
| 104 | |||
| 105 | #define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE /* Compatibility */ | ||
| 106 | |||
| 107 | #define IAS_MAX_STRING 256 /* See IrLMP 1.1, 4.3.3.2 */ | ||
| 108 | #define IAS_MAX_OCTET_STRING 1024 /* See IrLMP 1.1, 4.3.3.2 */ | ||
| 109 | #define IAS_MAX_CLASSNAME 60 /* See IrLMP 1.1, 4.3.1 */ | ||
| 110 | #define IAS_MAX_ATTRIBNAME 60 /* See IrLMP 1.1, 4.3.3.1 */ | ||
| 111 | #define IAS_MAX_ATTRIBNUMBER 256 /* See IrLMP 1.1, 4.3.3.1 */ | ||
| 112 | /* For user space backward compatibility - may be fixed in kernel 2.5.X | ||
| 113 | * Note : need 60+1 ('\0'), make it 64 for alignement - Jean II */ | ||
| 114 | #define IAS_EXPORT_CLASSNAME 64 | ||
| 115 | #define IAS_EXPORT_ATTRIBNAME 256 | ||
| 116 | |||
| 117 | /* Attribute type needed for struct irda_ias_set */ | ||
| 118 | #define IAS_MISSING 0 | ||
| 119 | #define IAS_INTEGER 1 | ||
| 120 | #define IAS_OCT_SEQ 2 | ||
| 121 | #define IAS_STRING 3 | ||
| 122 | |||
| 123 | #define LSAP_ANY 0xff | ||
| 124 | |||
| 125 | struct sockaddr_irda { | ||
| 126 | __kernel_sa_family_t sir_family; /* AF_IRDA */ | ||
| 127 | __u8 sir_lsap_sel; /* LSAP selector */ | ||
| 128 | __u32 sir_addr; /* Device address */ | ||
| 129 | char sir_name[25]; /* Usually <service>:IrDA:TinyTP */ | ||
| 130 | }; | ||
| 131 | |||
| 132 | struct irda_device_info { | ||
| 133 | __u32 saddr; /* Address of local interface */ | ||
| 134 | __u32 daddr; /* Address of remote device */ | ||
| 135 | char info[22]; /* Description */ | ||
| 136 | __u8 charset; /* Charset used for description */ | ||
| 137 | __u8 hints[2]; /* Hint bits */ | ||
| 138 | }; | ||
| 139 | |||
| 140 | struct irda_device_list { | ||
| 141 | __u32 len; | ||
| 142 | struct irda_device_info dev[1]; | ||
| 143 | }; | ||
| 144 | |||
| 145 | struct irda_ias_set { | ||
| 146 | char irda_class_name[IAS_EXPORT_CLASSNAME]; | ||
| 147 | char irda_attrib_name[IAS_EXPORT_ATTRIBNAME]; | ||
| 148 | unsigned int irda_attrib_type; | ||
| 149 | union { | ||
| 150 | unsigned int irda_attrib_int; | ||
| 151 | struct { | ||
| 152 | unsigned short len; | ||
| 153 | __u8 octet_seq[IAS_MAX_OCTET_STRING]; | ||
| 154 | } irda_attrib_octet_seq; | ||
| 155 | struct { | ||
| 156 | __u8 len; | ||
| 157 | __u8 charset; | ||
| 158 | __u8 string[IAS_MAX_STRING]; | ||
| 159 | } irda_attrib_string; | ||
| 160 | } attribute; | ||
| 161 | __u32 daddr; /* Address of device (for some queries only) */ | ||
| 162 | }; | ||
| 163 | |||
| 164 | /* Some private IOCTL's (max 16) */ | ||
| 165 | #define SIOCSDONGLE (SIOCDEVPRIVATE + 0) | ||
| 166 | #define SIOCGDONGLE (SIOCDEVPRIVATE + 1) | ||
| 167 | #define SIOCSBANDWIDTH (SIOCDEVPRIVATE + 2) | ||
| 168 | #define SIOCSMEDIABUSY (SIOCDEVPRIVATE + 3) | ||
| 169 | #define SIOCGMEDIABUSY (SIOCDEVPRIVATE + 4) | ||
| 170 | #define SIOCGRECEIVING (SIOCDEVPRIVATE + 5) | ||
| 171 | #define SIOCSMODE (SIOCDEVPRIVATE + 6) | ||
| 172 | #define SIOCGMODE (SIOCDEVPRIVATE + 7) | ||
| 173 | #define SIOCSDTRRTS (SIOCDEVPRIVATE + 8) | ||
| 174 | #define SIOCGQOS (SIOCDEVPRIVATE + 9) | ||
| 175 | |||
| 176 | /* No reason to include <linux/if.h> just because of this one ;-) */ | ||
| 177 | #define IRNAMSIZ 16 | ||
| 178 | |||
| 179 | /* IrDA quality of service information (must not exceed 16 bytes) */ | ||
| 180 | struct if_irda_qos { | ||
| 181 | unsigned long baudrate; | ||
| 182 | unsigned short data_size; | ||
| 183 | unsigned short window_size; | ||
| 184 | unsigned short min_turn_time; | ||
| 185 | unsigned short max_turn_time; | ||
| 186 | unsigned char add_bofs; | ||
| 187 | unsigned char link_disc; | ||
| 188 | }; | ||
| 189 | |||
| 190 | /* For setting RTS and DTR lines of a dongle */ | ||
| 191 | struct if_irda_line { | ||
| 192 | __u8 dtr; | ||
| 193 | __u8 rts; | ||
| 194 | }; | ||
| 195 | |||
| 196 | /* IrDA interface configuration (data part must not exceed 16 bytes) */ | ||
| 197 | struct if_irda_req { | ||
| 198 | union { | ||
| 199 | char ifrn_name[IRNAMSIZ]; /* if name, e.g. "irda0" */ | ||
| 200 | } ifr_ifrn; | ||
| 201 | |||
| 202 | /* Data part */ | ||
| 203 | union { | ||
| 204 | struct if_irda_line ifru_line; | ||
| 205 | struct if_irda_qos ifru_qos; | ||
| 206 | unsigned short ifru_flags; | ||
| 207 | unsigned int ifru_receiving; | ||
| 208 | unsigned int ifru_mode; | ||
| 209 | unsigned int ifru_dongle; | ||
| 210 | } ifr_ifru; | ||
| 211 | }; | ||
| 212 | |||
| 213 | #define ifr_baudrate ifr_ifru.ifru_qos.baudrate | ||
| 214 | #define ifr_receiving ifr_ifru.ifru_receiving | ||
| 215 | #define ifr_dongle ifr_ifru.ifru_dongle | ||
| 216 | #define ifr_mode ifr_ifru.ifru_mode | ||
| 217 | #define ifr_dtr ifr_ifru.ifru_line.dtr | ||
| 218 | #define ifr_rts ifr_ifru.ifru_line.rts | ||
| 219 | |||
| 220 | |||
| 221 | /* IrDA netlink definitions */ | ||
| 222 | #define IRDA_NL_NAME "irda" | ||
| 223 | #define IRDA_NL_VERSION 1 | ||
| 224 | |||
| 225 | enum irda_nl_commands { | ||
| 226 | IRDA_NL_CMD_UNSPEC, | ||
| 227 | IRDA_NL_CMD_SET_MODE, | ||
| 228 | IRDA_NL_CMD_GET_MODE, | ||
| 229 | |||
| 230 | __IRDA_NL_CMD_AFTER_LAST | ||
| 231 | }; | ||
| 232 | #define IRDA_NL_CMD_MAX (__IRDA_NL_CMD_AFTER_LAST - 1) | ||
| 233 | |||
| 234 | enum nl80211_attrs { | ||
| 235 | IRDA_NL_ATTR_UNSPEC, | ||
| 236 | IRDA_NL_ATTR_IFNAME, | ||
| 237 | IRDA_NL_ATTR_MODE, | ||
| 238 | |||
| 239 | __IRDA_NL_ATTR_AFTER_LAST | ||
| 240 | }; | ||
| 241 | #define IRDA_NL_ATTR_MAX (__IRDA_NL_ATTR_AFTER_LAST - 1) | ||
| 242 | |||
| 243 | /* IrDA modes */ | ||
| 244 | #define IRDA_MODE_PRIMARY 0x1 | ||
| 245 | #define IRDA_MODE_SECONDARY 0x2 | ||
| 246 | #define IRDA_MODE_MONITOR 0x4 | ||
| 247 | |||
| 248 | #endif /* KERNEL_IRDA_H */ | ||
| 249 | |||
| 250 | |||
| 251 | |||
| 252 | |||
| @@ -1,721 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | #ifndef __LINUX_IXJUSER_H | ||
| 3 | #define __LINUX_IXJUSER_H | ||
| 4 | |||
| 5 | /****************************************************************************** | ||
| 6 | * | ||
| 7 | * ixjuser.h | ||
| 8 | * | ||
| 9 | * Device Driver for Quicknet Technologies, Inc.'s Telephony cards | ||
| 10 | * including the Internet PhoneJACK, Internet PhoneJACK Lite, | ||
| 11 | * Internet PhoneJACK PCI, Internet LineJACK, Internet PhoneCARD and | ||
| 12 | * SmartCABLE | ||
| 13 | * | ||
| 14 | * (c) Copyright 1999-2001 Quicknet Technologies, Inc. | ||
| 15 | * | ||
| 16 | * This program is free software; you can redistribute it and/or | ||
| 17 | * modify it under the terms of the GNU General Public License | ||
| 18 | * as published by the Free Software Foundation; either version | ||
| 19 | * 2 of the License, or (at your option) any later version. | ||
| 20 | * | ||
| 21 | * Author: Ed Okerson, <eokerson@quicknet.net> | ||
| 22 | * | ||
| 23 | * Contributors: Greg Herlein, <gherlein@quicknet.net> | ||
| 24 | * David W. Erhart, <derhart@quicknet.net> | ||
| 25 | * John Sellers, <jsellers@quicknet.net> | ||
| 26 | * Mike Preston, <mpreston@quicknet.net> | ||
| 27 | * | ||
| 28 | * More information about the hardware related to this driver can be found | ||
| 29 | * at our website: http://www.quicknet.net | ||
| 30 | * | ||
| 31 | * Fixes: | ||
| 32 | * | ||
| 33 | * IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR | ||
| 34 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT | ||
| 35 | * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF QUICKNET | ||
| 36 | * TECHNOLOGIES, INC.HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 37 | * | ||
| 38 | * QUICKNET TECHNOLOGIES, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, | ||
| 39 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
| 40 | * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS | ||
| 41 | * ON AN "AS IS" BASIS, AND QUICKNET TECHNOLOGIES, INC. HAS NO OBLIGATION | ||
| 42 | * TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | ||
| 43 | * | ||
| 44 | *****************************************************************************/ | ||
| 45 | |||
| 46 | #include <linux/telephony.h> | ||
| 47 | |||
| 48 | |||
| 49 | /****************************************************************************** | ||
| 50 | * | ||
| 51 | * IOCTL's used for the Quicknet Telephony Cards | ||
| 52 | * | ||
| 53 | * If you use the IXJCTL_TESTRAM command, the card must be power cycled to | ||
| 54 | * reset the SRAM values before further use. | ||
| 55 | * | ||
| 56 | ******************************************************************************/ | ||
| 57 | |||
| 58 | #define IXJCTL_DSP_RESET _IO ('q', 0xC0) | ||
| 59 | |||
| 60 | #define IXJCTL_RING PHONE_RING | ||
| 61 | #define IXJCTL_HOOKSTATE PHONE_HOOKSTATE | ||
| 62 | #define IXJCTL_MAXRINGS PHONE_MAXRINGS | ||
| 63 | #define IXJCTL_RING_CADENCE PHONE_RING_CADENCE | ||
| 64 | #define IXJCTL_RING_START PHONE_RING_START | ||
| 65 | #define IXJCTL_RING_STOP PHONE_RING_STOP | ||
| 66 | |||
| 67 | #define IXJCTL_CARDTYPE _IOR ('q', 0xC1, int) | ||
| 68 | #define IXJCTL_SERIAL _IOR ('q', 0xC2, int) | ||
| 69 | #define IXJCTL_DSP_TYPE _IOR ('q', 0xC3, int) | ||
| 70 | #define IXJCTL_DSP_VERSION _IOR ('q', 0xC4, int) | ||
| 71 | #define IXJCTL_VERSION _IOR ('q', 0xDA, char *) | ||
| 72 | #define IXJCTL_DSP_IDLE _IO ('q', 0xC5) | ||
| 73 | #define IXJCTL_TESTRAM _IO ('q', 0xC6) | ||
| 74 | |||
| 75 | /****************************************************************************** | ||
| 76 | * | ||
| 77 | * This group of IOCTLs deal with the record settings of the DSP | ||
| 78 | * | ||
| 79 | * The IXJCTL_REC_DEPTH command sets the internal buffer depth of the DSP. | ||
| 80 | * Setting a lower depth reduces latency, but increases the demand of the | ||
| 81 | * application to service the driver without frame loss. The DSP has 480 | ||
| 82 | * bytes of physical buffer memory for the record channel so the true | ||
| 83 | * maximum limit is determined by how many frames will fit in the buffer. | ||
| 84 | * | ||
| 85 | * 1 uncompressed (480 byte) 16-bit linear frame. | ||
| 86 | * 2 uncompressed (240 byte) 8-bit A-law/mu-law frames. | ||
| 87 | * 15 TrueSpeech 8.5 frames. | ||
| 88 | * 20 TrueSpeech 6.3,5.3,4.8 or 4.1 frames. | ||
| 89 | * | ||
| 90 | * The default in the driver is currently set to 2 frames. | ||
| 91 | * | ||
| 92 | * The IXJCTL_REC_VOLUME and IXJCTL_PLAY_VOLUME commands both use a Q8 | ||
| 93 | * number as a parameter, 0x100 scales the signal by 1.0, 0x200 scales the | ||
| 94 | * signal by 2.0, 0x80 scales the signal by 0.5. No protection is given | ||
| 95 | * against over-scaling, if the multiplication factor times the input | ||
| 96 | * signal exceeds 16 bits, overflow distortion will occur. The default | ||
| 97 | * setting is 0x100 (1.0). | ||
| 98 | * | ||
| 99 | * The IXJCTL_REC_LEVEL returns the average signal level (not r.m.s.) on | ||
| 100 | * the most recently recorded frame as a 16 bit value. | ||
| 101 | ******************************************************************************/ | ||
| 102 | |||
| 103 | #define IXJCTL_REC_CODEC PHONE_REC_CODEC | ||
| 104 | #define IXJCTL_REC_START PHONE_REC_START | ||
| 105 | #define IXJCTL_REC_STOP PHONE_REC_STOP | ||
| 106 | #define IXJCTL_REC_DEPTH PHONE_REC_DEPTH | ||
| 107 | #define IXJCTL_FRAME PHONE_FRAME | ||
| 108 | #define IXJCTL_REC_VOLUME PHONE_REC_VOLUME | ||
| 109 | #define IXJCTL_REC_LEVEL PHONE_REC_LEVEL | ||
| 110 | |||
| 111 | typedef enum { | ||
| 112 | f300_640 = 4, f300_500, f1100, f350, f400, f480, f440, f620, f20_50, | ||
| 113 | f133_200, f300, f300_420, f330, f300_425, f330_440, f340, f350_400, | ||
| 114 | f350_440, f350_450, f360, f380_420, f392, f400_425, f400_440, f400_450, | ||
| 115 | f420, f425, f425_450, f425_475, f435, f440_450, f440_480, f445, f450, | ||
| 116 | f452, f475, f480_620, f494, f500, f520, f523, f525, f540_660, f587, | ||
| 117 | f590, f600, f660, f700, f740, f750, f750_1450, f770, f800, f816, f850, | ||
| 118 | f857_1645, f900, f900_1300, f935_1215, f941_1477, f942, f950, f950_1400, | ||
| 119 | f975, f1000, f1020, f1050, f1100_1750, f1140, f1200, f1209, f1330, f1336, | ||
| 120 | lf1366, f1380, f1400, f1477, f1600, f1633_1638, f1800, f1860 | ||
| 121 | } IXJ_FILTER_FREQ; | ||
| 122 | |||
| 123 | typedef struct { | ||
| 124 | unsigned int filter; | ||
| 125 | IXJ_FILTER_FREQ freq; | ||
| 126 | char enable; | ||
| 127 | } IXJ_FILTER; | ||
| 128 | |||
| 129 | typedef struct { | ||
| 130 | char enable; | ||
| 131 | char en_filter; | ||
| 132 | unsigned int filter; | ||
| 133 | unsigned int on1; | ||
| 134 | unsigned int off1; | ||
| 135 | unsigned int on2; | ||
| 136 | unsigned int off2; | ||
| 137 | unsigned int on3; | ||
| 138 | unsigned int off3; | ||
| 139 | } IXJ_FILTER_CADENCE; | ||
| 140 | |||
| 141 | #define IXJCTL_SET_FILTER _IOW ('q', 0xC7, IXJ_FILTER *) | ||
| 142 | #define IXJCTL_SET_FILTER_RAW _IOW ('q', 0xDD, IXJ_FILTER_RAW *) | ||
| 143 | #define IXJCTL_GET_FILTER_HIST _IOW ('q', 0xC8, int) | ||
| 144 | #define IXJCTL_FILTER_CADENCE _IOW ('q', 0xD6, IXJ_FILTER_CADENCE *) | ||
| 145 | #define IXJCTL_PLAY_CID _IO ('q', 0xD7) | ||
| 146 | /****************************************************************************** | ||
| 147 | * | ||
| 148 | * This IOCTL allows you to reassign values in the tone index table. The | ||
| 149 | * tone table has 32 entries (0 - 31), but the driver only allows entries | ||
| 150 | * 13 - 27 to be modified, entry 0 is reserved for silence and 1 - 12 are | ||
| 151 | * the standard DTMF digits and 28 - 31 are the DTMF tones for A, B, C & D. | ||
| 152 | * The positions used internally for Call Progress Tones are as follows: | ||
| 153 | * Dial Tone - 25 | ||
| 154 | * Ring Back - 26 | ||
| 155 | * Busy Signal - 27 | ||
| 156 | * | ||
| 157 | * The freq values are calculated as: | ||
| 158 | * freq = cos(2 * PI * frequency / 8000) | ||
| 159 | * | ||
| 160 | * The most commonly needed values are already calculated and listed in the | ||
| 161 | * enum IXJ_TONE_FREQ. Each tone index can have two frequencies with | ||
| 162 | * different gains, if you are only using a single frequency set the unused | ||
| 163 | * one to 0. | ||
| 164 | * | ||
| 165 | * The gain values range from 0 to 15 indicating +6dB to -24dB in 2dB | ||
| 166 | * increments. | ||
| 167 | * | ||
| 168 | ******************************************************************************/ | ||
| 169 | |||
| 170 | typedef enum { | ||
| 171 | hz20 = 0x7ffa, | ||
| 172 | hz50 = 0x7fe5, | ||
| 173 | hz133 = 0x7f4c, | ||
| 174 | hz200 = 0x7e6b, | ||
| 175 | hz261 = 0x7d50, /* .63 C1 */ | ||
| 176 | hz277 = 0x7cfa, /* .18 CS1 */ | ||
| 177 | hz293 = 0x7c9f, /* .66 D1 */ | ||
| 178 | hz300 = 0x7c75, | ||
| 179 | hz311 = 0x7c32, /* .13 DS1 */ | ||
| 180 | hz329 = 0x7bbf, /* .63 E1 */ | ||
| 181 | hz330 = 0x7bb8, | ||
| 182 | hz340 = 0x7b75, | ||
| 183 | hz349 = 0x7b37, /* .23 F1 */ | ||
| 184 | hz350 = 0x7b30, | ||
| 185 | hz360 = 0x7ae9, | ||
| 186 | hz369 = 0x7aa8, /* .99 FS1 */ | ||
| 187 | hz380 = 0x7a56, | ||
| 188 | hz392 = 0x79fa, /* .00 G1 */ | ||
| 189 | hz400 = 0x79bb, | ||
| 190 | hz415 = 0x7941, /* .30 GS1 */ | ||
| 191 | hz420 = 0x7918, | ||
| 192 | hz425 = 0x78ee, | ||
| 193 | hz435 = 0x7899, | ||
| 194 | hz440 = 0x786d, /* .00 A1 */ | ||
| 195 | hz445 = 0x7842, | ||
| 196 | hz450 = 0x7815, | ||
| 197 | hz452 = 0x7803, | ||
| 198 | hz466 = 0x7784, /* .16 AS1 */ | ||
| 199 | hz475 = 0x7731, | ||
| 200 | hz480 = 0x7701, | ||
| 201 | hz493 = 0x7685, /* .88 B1 */ | ||
| 202 | hz494 = 0x767b, | ||
| 203 | hz500 = 0x7640, | ||
| 204 | hz520 = 0x7578, | ||
| 205 | hz523 = 0x7559, /* .25 C2 */ | ||
| 206 | hz525 = 0x7544, | ||
| 207 | hz540 = 0x74a7, | ||
| 208 | hz554 = 0x7411, /* .37 CS2 */ | ||
| 209 | hz587 = 0x72a1, /* .33 D2 */ | ||
| 210 | hz590 = 0x727f, | ||
| 211 | hz600 = 0x720b, | ||
| 212 | hz620 = 0x711e, | ||
| 213 | hz622 = 0x7106, /* .25 DS2 */ | ||
| 214 | hz659 = 0x6f3b, /* .26 E2 */ | ||
| 215 | hz660 = 0x6f2e, | ||
| 216 | hz698 = 0x6d3d, /* .46 F2 */ | ||
| 217 | hz700 = 0x6d22, | ||
| 218 | hz739 = 0x6b09, /* .99 FS2 */ | ||
| 219 | hz740 = 0x6afa, | ||
| 220 | hz750 = 0x6a6c, | ||
| 221 | hz770 = 0x694b, | ||
| 222 | hz783 = 0x688b, /* .99 G2 */ | ||
| 223 | hz800 = 0x678d, | ||
| 224 | hz816 = 0x6698, | ||
| 225 | hz830 = 0x65bf, /* .61 GS2 */ | ||
| 226 | hz850 = 0x6484, | ||
| 227 | hz857 = 0x6414, | ||
| 228 | hz880 = 0x629f, /* .00 A2 */ | ||
| 229 | hz900 = 0x6154, | ||
| 230 | hz932 = 0x5f35, /* .33 AS2 */ | ||
| 231 | hz935 = 0x5f01, | ||
| 232 | hz941 = 0x5e9a, | ||
| 233 | hz942 = 0x5e88, | ||
| 234 | hz950 = 0x5dfd, | ||
| 235 | hz975 = 0x5c44, | ||
| 236 | hz1000 = 0x5a81, | ||
| 237 | hz1020 = 0x5912, | ||
| 238 | hz1050 = 0x56e2, | ||
| 239 | hz1100 = 0x5320, | ||
| 240 | hz1140 = 0x5007, | ||
| 241 | hz1200 = 0x4b3b, | ||
| 242 | hz1209 = 0x4a80, | ||
| 243 | hz1215 = 0x4a02, | ||
| 244 | hz1250 = 0x471c, | ||
| 245 | hz1300 = 0x42e0, | ||
| 246 | hz1330 = 0x4049, | ||
| 247 | hz1336 = 0x3fc4, | ||
| 248 | hz1366 = 0x3d22, | ||
| 249 | hz1380 = 0x3be4, | ||
| 250 | hz1400 = 0x3a1b, | ||
| 251 | hz1450 = 0x3596, | ||
| 252 | hz1477 = 0x331c, | ||
| 253 | hz1500 = 0x30fb, | ||
| 254 | hz1600 = 0x278d, | ||
| 255 | hz1633 = 0x2462, | ||
| 256 | hz1638 = 0x23e7, | ||
| 257 | hz1645 = 0x233a, | ||
| 258 | hz1750 = 0x18f8, | ||
| 259 | hz1800 = 0x1405, | ||
| 260 | hz1860 = 0xe0b, | ||
| 261 | hz2100 = 0xf5f6, | ||
| 262 | hz2130 = 0xf2f5, | ||
| 263 | hz2450 = 0xd3b3, | ||
| 264 | hz2750 = 0xb8e4 | ||
| 265 | } IXJ_FREQ; | ||
| 266 | |||
| 267 | typedef enum { | ||
| 268 | C1 = hz261, | ||
| 269 | CS1 = hz277, | ||
| 270 | D1 = hz293, | ||
| 271 | DS1 = hz311, | ||
| 272 | E1 = hz329, | ||
| 273 | F1 = hz349, | ||
| 274 | FS1 = hz369, | ||
| 275 | G1 = hz392, | ||
| 276 | GS1 = hz415, | ||
| 277 | A1 = hz440, | ||
| 278 | AS1 = hz466, | ||
| 279 | B1 = hz493, | ||
| 280 | C2 = hz523, | ||
| 281 | CS2 = hz554, | ||
| 282 | D2 = hz587, | ||
| 283 | DS2 = hz622, | ||
| 284 | E2 = hz659, | ||
| 285 | F2 = hz698, | ||
| 286 | FS2 = hz739, | ||
| 287 | G2 = hz783, | ||
| 288 | GS2 = hz830, | ||
| 289 | A2 = hz880, | ||
| 290 | AS2 = hz932, | ||
| 291 | } IXJ_NOTE; | ||
| 292 | |||
| 293 | typedef struct { | ||
| 294 | int tone_index; | ||
| 295 | int freq0; | ||
| 296 | int gain0; | ||
| 297 | int freq1; | ||
| 298 | int gain1; | ||
| 299 | } IXJ_TONE; | ||
| 300 | |||
| 301 | #define IXJCTL_INIT_TONE _IOW ('q', 0xC9, IXJ_TONE *) | ||
| 302 | |||
| 303 | /****************************************************************************** | ||
| 304 | * | ||
| 305 | * The IXJCTL_TONE_CADENCE ioctl defines tone sequences used for various | ||
| 306 | * Call Progress Tones (CPT). This is accomplished by setting up an array of | ||
| 307 | * IXJ_CADENCE_ELEMENT structures that sequentially define the states of | ||
| 308 | * the tone sequence. The tone_on_time and tone_off time are in | ||
| 309 | * 250 microsecond intervals. A pointer to this array is passed to the | ||
| 310 | * driver as the ce element of an IXJ_CADENCE structure. The elements_used | ||
| 311 | * must be set to the number of IXJ_CADENCE_ELEMENTS in the array. The | ||
| 312 | * termination variable defines what to do at the end of a cadence, the | ||
| 313 | * options are to play the cadence once and stop, to repeat the last | ||
| 314 | * element of the cadence indefinitely, or to repeat the entire cadence | ||
| 315 | * indefinitely. The ce variable is a pointer to the array of IXJ_TONE | ||
| 316 | * structures. If the freq0 variable is non-zero, the tone table contents | ||
| 317 | * for the tone_index are updated to the frequencies and gains defined. It | ||
| 318 | * should be noted that DTMF tones cannot be reassigned, so if DTMF tone | ||
| 319 | * table indexes are used in a cadence the frequency and gain variables will | ||
| 320 | * be ignored. | ||
| 321 | * | ||
| 322 | * If the array elements contain frequency parameters the driver will | ||
| 323 | * initialize the needed tone table elements and begin playing the tone, | ||
| 324 | * there is no preset limit on the number of elements in the cadence. If | ||
| 325 | * there is more than one frequency used in the cadence, sequential elements | ||
| 326 | * of different frequencies MUST use different tone table indexes. Only one | ||
| 327 | * cadence can be played at a time. It is possible to build complex | ||
| 328 | * cadences with multiple frequencies using 2 tone table indexes by | ||
| 329 | * alternating between them. | ||
| 330 | * | ||
| 331 | ******************************************************************************/ | ||
| 332 | |||
| 333 | typedef struct { | ||
| 334 | int index; | ||
| 335 | int tone_on_time; | ||
| 336 | int tone_off_time; | ||
| 337 | int freq0; | ||
| 338 | int gain0; | ||
| 339 | int freq1; | ||
| 340 | int gain1; | ||
| 341 | } IXJ_CADENCE_ELEMENT; | ||
| 342 | |||
| 343 | typedef enum { | ||
| 344 | PLAY_ONCE, | ||
| 345 | REPEAT_LAST_ELEMENT, | ||
| 346 | REPEAT_ALL | ||
| 347 | } IXJ_CADENCE_TERM; | ||
| 348 | |||
| 349 | typedef struct { | ||
| 350 | int elements_used; | ||
| 351 | IXJ_CADENCE_TERM termination; | ||
| 352 | IXJ_CADENCE_ELEMENT __user *ce; | ||
| 353 | } IXJ_CADENCE; | ||
| 354 | |||
| 355 | #define IXJCTL_TONE_CADENCE _IOW ('q', 0xCA, IXJ_CADENCE *) | ||
| 356 | /****************************************************************************** | ||
| 357 | * | ||
| 358 | * This group of IOCTLs deal with the playback settings of the DSP | ||
| 359 | * | ||
| 360 | ******************************************************************************/ | ||
| 361 | |||
| 362 | #define IXJCTL_PLAY_CODEC PHONE_PLAY_CODEC | ||
| 363 | #define IXJCTL_PLAY_START PHONE_PLAY_START | ||
| 364 | #define IXJCTL_PLAY_STOP PHONE_PLAY_STOP | ||
| 365 | #define IXJCTL_PLAY_DEPTH PHONE_PLAY_DEPTH | ||
| 366 | #define IXJCTL_PLAY_VOLUME PHONE_PLAY_VOLUME | ||
| 367 | #define IXJCTL_PLAY_LEVEL PHONE_PLAY_LEVEL | ||
| 368 | |||
| 369 | /****************************************************************************** | ||
| 370 | * | ||
| 371 | * This group of IOCTLs deal with the Acoustic Echo Cancellation settings | ||
| 372 | * of the DSP | ||
| 373 | * | ||
| 374 | * Issuing the IXJCTL_AEC_START command with a value of AEC_OFF has the | ||
| 375 | * same effect as IXJCTL_AEC_STOP. This is to simplify slider bar | ||
| 376 | * controls. IXJCTL_AEC_GET_LEVEL returns the current setting of the AEC. | ||
| 377 | ******************************************************************************/ | ||
| 378 | #define IXJCTL_AEC_START _IOW ('q', 0xCB, int) | ||
| 379 | #define IXJCTL_AEC_STOP _IO ('q', 0xCC) | ||
| 380 | #define IXJCTL_AEC_GET_LEVEL _IO ('q', 0xCD) | ||
| 381 | |||
| 382 | #define AEC_OFF 0 | ||
| 383 | #define AEC_LOW 1 | ||
| 384 | #define AEC_MED 2 | ||
| 385 | #define AEC_HIGH 3 | ||
| 386 | #define AEC_AUTO 4 | ||
| 387 | #define AEC_AGC 5 | ||
| 388 | /****************************************************************************** | ||
| 389 | * | ||
| 390 | * Call Progress Tones, DTMF, etc. | ||
| 391 | * IXJCTL_DTMF_OOB determines if DTMF signaling is sent as Out-Of-Band | ||
| 392 | * only. If you pass a 1, DTMF is suppressed from the audio stream. | ||
| 393 | * Tone on and off times are in 250 microsecond intervals so | ||
| 394 | * ioctl(ixj1, IXJCTL_SET_TONE_ON_TIME, 360); | ||
| 395 | * will set the tone on time of board ixj1 to 360 * 250us = 90ms | ||
| 396 | * the default values of tone on and off times is 840 or 210ms | ||
| 397 | ******************************************************************************/ | ||
| 398 | |||
| 399 | #define IXJCTL_DTMF_READY PHONE_DTMF_READY | ||
| 400 | #define IXJCTL_GET_DTMF PHONE_GET_DTMF | ||
| 401 | #define IXJCTL_GET_DTMF_ASCII PHONE_GET_DTMF_ASCII | ||
| 402 | #define IXJCTL_DTMF_OOB PHONE_DTMF_OOB | ||
| 403 | #define IXJCTL_EXCEPTION PHONE_EXCEPTION | ||
| 404 | #define IXJCTL_PLAY_TONE PHONE_PLAY_TONE | ||
| 405 | #define IXJCTL_SET_TONE_ON_TIME PHONE_SET_TONE_ON_TIME | ||
| 406 | #define IXJCTL_SET_TONE_OFF_TIME PHONE_SET_TONE_OFF_TIME | ||
| 407 | #define IXJCTL_GET_TONE_ON_TIME PHONE_GET_TONE_ON_TIME | ||
| 408 | #define IXJCTL_GET_TONE_OFF_TIME PHONE_GET_TONE_OFF_TIME | ||
| 409 | #define IXJCTL_GET_TONE_STATE PHONE_GET_TONE_STATE | ||
| 410 | #define IXJCTL_BUSY PHONE_BUSY | ||
| 411 | #define IXJCTL_RINGBACK PHONE_RINGBACK | ||
| 412 | #define IXJCTL_DIALTONE PHONE_DIALTONE | ||
| 413 | #define IXJCTL_CPT_STOP PHONE_CPT_STOP | ||
| 414 | |||
| 415 | /****************************************************************************** | ||
| 416 | * LineJACK specific IOCTLs | ||
| 417 | * | ||
| 418 | * The lsb 4 bits of the LED argument represent the state of each of the 4 | ||
| 419 | * LED's on the LineJACK | ||
| 420 | ******************************************************************************/ | ||
| 421 | |||
| 422 | #define IXJCTL_SET_LED _IOW ('q', 0xCE, int) | ||
| 423 | #define IXJCTL_MIXER _IOW ('q', 0xCF, int) | ||
| 424 | |||
| 425 | /****************************************************************************** | ||
| 426 | * | ||
| 427 | * The master volume controls use attenuation with 32 levels from 0 to -62dB | ||
| 428 | * with steps of 2dB each, the defines should be OR'ed together then sent | ||
| 429 | * as the parameter to the mixer command to change the mixer settings. | ||
| 430 | * | ||
| 431 | ******************************************************************************/ | ||
| 432 | #define MIXER_MASTER_L 0x0000 | ||
| 433 | #define MIXER_MASTER_R 0x0100 | ||
| 434 | #define ATT00DB 0x00 | ||
| 435 | #define ATT02DB 0x01 | ||
| 436 | #define ATT04DB 0x02 | ||
| 437 | #define ATT06DB 0x03 | ||
| 438 | #define ATT08DB 0x04 | ||
| 439 | #define ATT10DB 0x05 | ||
| 440 | #define ATT12DB 0x06 | ||
| 441 | #define ATT14DB 0x07 | ||
| 442 | #define ATT16DB 0x08 | ||
| 443 | #define ATT18DB 0x09 | ||
| 444 | #define ATT20DB 0x0A | ||
| 445 | #define ATT22DB 0x0B | ||
| 446 | #define ATT24DB 0x0C | ||
| 447 | #define ATT26DB 0x0D | ||
| 448 | #define ATT28DB 0x0E | ||
| 449 | #define ATT30DB 0x0F | ||
| 450 | #define ATT32DB 0x10 | ||
| 451 | #define ATT34DB 0x11 | ||
| 452 | #define ATT36DB 0x12 | ||
| 453 | #define ATT38DB 0x13 | ||
| 454 | #define ATT40DB 0x14 | ||
| 455 | #define ATT42DB 0x15 | ||
| 456 | #define ATT44DB 0x16 | ||
| 457 | #define ATT46DB 0x17 | ||
| 458 | #define ATT48DB 0x18 | ||
| 459 | #define ATT50DB 0x19 | ||
| 460 | #define ATT52DB 0x1A | ||
| 461 | #define ATT54DB 0x1B | ||
| 462 | #define ATT56DB 0x1C | ||
| 463 | #define ATT58DB 0x1D | ||
| 464 | #define ATT60DB 0x1E | ||
| 465 | #define ATT62DB 0x1F | ||
| 466 | #define MASTER_MUTE 0x80 | ||
| 467 | |||
| 468 | /****************************************************************************** | ||
| 469 | * | ||
| 470 | * The input volume controls use gain with 32 levels from +12dB to -50dB | ||
| 471 | * with steps of 2dB each, the defines should be OR'ed together then sent | ||
| 472 | * as the parameter to the mixer command to change the mixer settings. | ||
| 473 | * | ||
| 474 | ******************************************************************************/ | ||
| 475 | #define MIXER_PORT_CD_L 0x0600 | ||
| 476 | #define MIXER_PORT_CD_R 0x0700 | ||
| 477 | #define MIXER_PORT_LINE_IN_L 0x0800 | ||
| 478 | #define MIXER_PORT_LINE_IN_R 0x0900 | ||
| 479 | #define MIXER_PORT_POTS_REC 0x0C00 | ||
| 480 | #define MIXER_PORT_MIC 0x0E00 | ||
| 481 | |||
| 482 | #define GAIN12DB 0x00 | ||
| 483 | #define GAIN10DB 0x01 | ||
| 484 | #define GAIN08DB 0x02 | ||
| 485 | #define GAIN06DB 0x03 | ||
| 486 | #define GAIN04DB 0x04 | ||
| 487 | #define GAIN02DB 0x05 | ||
| 488 | #define GAIN00DB 0x06 | ||
| 489 | #define GAIN_02DB 0x07 | ||
| 490 | #define GAIN_04DB 0x08 | ||
| 491 | #define GAIN_06DB 0x09 | ||
| 492 | #define GAIN_08DB 0x0A | ||
| 493 | #define GAIN_10DB 0x0B | ||
| 494 | #define GAIN_12DB 0x0C | ||
| 495 | #define GAIN_14DB 0x0D | ||
| 496 | #define GAIN_16DB 0x0E | ||
| 497 | #define GAIN_18DB 0x0F | ||
| 498 | #define GAIN_20DB 0x10 | ||
| 499 | #define GAIN_22DB 0x11 | ||
| 500 | #define GAIN_24DB 0x12 | ||
| 501 | #define GAIN_26DB 0x13 | ||
| 502 | #define GAIN_28DB 0x14 | ||
| 503 | #define GAIN_30DB 0x15 | ||
| 504 | #define GAIN_32DB 0x16 | ||
| 505 | #define GAIN_34DB 0x17 | ||
| 506 | #define GAIN_36DB 0x18 | ||
| 507 | #define GAIN_38DB 0x19 | ||
| 508 | #define GAIN_40DB 0x1A | ||
| 509 | #define GAIN_42DB 0x1B | ||
| 510 | #define GAIN_44DB 0x1C | ||
| 511 | #define GAIN_46DB 0x1D | ||
| 512 | #define GAIN_48DB 0x1E | ||
| 513 | #define GAIN_50DB 0x1F | ||
| 514 | #define INPUT_MUTE 0x80 | ||
| 515 | |||
| 516 | /****************************************************************************** | ||
| 517 | * | ||
| 518 | * The POTS volume control use attenuation with 8 levels from 0dB to -28dB | ||
| 519 | * with steps of 4dB each, the defines should be OR'ed together then sent | ||
| 520 | * as the parameter to the mixer command to change the mixer settings. | ||
| 521 | * | ||
| 522 | ******************************************************************************/ | ||
| 523 | #define MIXER_PORT_POTS_PLAY 0x0F00 | ||
| 524 | |||
| 525 | #define POTS_ATT_00DB 0x00 | ||
| 526 | #define POTS_ATT_04DB 0x01 | ||
| 527 | #define POTS_ATT_08DB 0x02 | ||
| 528 | #define POTS_ATT_12DB 0x03 | ||
| 529 | #define POTS_ATT_16DB 0x04 | ||
| 530 | #define POTS_ATT_20DB 0x05 | ||
| 531 | #define POTS_ATT_24DB 0x06 | ||
| 532 | #define POTS_ATT_28DB 0x07 | ||
| 533 | #define POTS_MUTE 0x80 | ||
| 534 | |||
| 535 | /****************************************************************************** | ||
| 536 | * | ||
| 537 | * The DAA controls the interface to the PSTN port. The driver loads the | ||
| 538 | * US coefficients by default, so if you live in a different country you | ||
| 539 | * need to load the set for your countries phone system. | ||
| 540 | * | ||
| 541 | ******************************************************************************/ | ||
| 542 | #define IXJCTL_DAA_COEFF_SET _IOW ('q', 0xD0, int) | ||
| 543 | |||
| 544 | #define DAA_US 1 /*PITA 8kHz */ | ||
| 545 | #define DAA_UK 2 /*ISAR34 8kHz */ | ||
| 546 | #define DAA_FRANCE 3 /* */ | ||
| 547 | #define DAA_GERMANY 4 | ||
| 548 | #define DAA_AUSTRALIA 5 | ||
| 549 | #define DAA_JAPAN 6 | ||
| 550 | |||
| 551 | /****************************************************************************** | ||
| 552 | * | ||
| 553 | * Use IXJCTL_PORT to set or query the port the card is set to. If the | ||
| 554 | * argument is set to PORT_QUERY, the return value of the ioctl will | ||
| 555 | * indicate which port is currently in use, otherwise it will change the | ||
| 556 | * port. | ||
| 557 | * | ||
| 558 | ******************************************************************************/ | ||
| 559 | #define IXJCTL_PORT _IOW ('q', 0xD1, int) | ||
| 560 | |||
| 561 | #define PORT_QUERY 0 | ||
| 562 | #define PORT_POTS 1 | ||
| 563 | #define PORT_PSTN 2 | ||
| 564 | #define PORT_SPEAKER 3 | ||
| 565 | #define PORT_HANDSET 4 | ||
| 566 | |||
| 567 | #define IXJCTL_PSTN_SET_STATE PHONE_PSTN_SET_STATE | ||
| 568 | #define IXJCTL_PSTN_GET_STATE PHONE_PSTN_GET_STATE | ||
| 569 | |||
| 570 | #define PSTN_ON_HOOK 0 | ||
| 571 | #define PSTN_RINGING 1 | ||
| 572 | #define PSTN_OFF_HOOK 2 | ||
| 573 | #define PSTN_PULSE_DIAL 3 | ||
| 574 | |||
| 575 | /****************************************************************************** | ||
| 576 | * | ||
| 577 | * The DAA Analog GAIN sets 2 parameters at one time, the receive gain (AGRR), | ||
| 578 | * and the transmit gain (AGX). OR together the components and pass them | ||
| 579 | * as the parameter to IXJCTL_DAA_AGAIN. The default setting is both at 0dB. | ||
| 580 | * | ||
| 581 | ******************************************************************************/ | ||
| 582 | #define IXJCTL_DAA_AGAIN _IOW ('q', 0xD2, int) | ||
| 583 | |||
| 584 | #define AGRR00DB 0x00 /* Analog gain in receive direction 0dB */ | ||
| 585 | #define AGRR3_5DB 0x10 /* Analog gain in receive direction 3.5dB */ | ||
| 586 | #define AGRR06DB 0x30 /* Analog gain in receive direction 6dB */ | ||
| 587 | |||
| 588 | #define AGX00DB 0x00 /* Analog gain in transmit direction 0dB */ | ||
| 589 | #define AGX_6DB 0x04 /* Analog gain in transmit direction -6dB */ | ||
| 590 | #define AGX3_5DB 0x08 /* Analog gain in transmit direction 3.5dB */ | ||
| 591 | #define AGX_2_5B 0x0C /* Analog gain in transmit direction -2.5dB */ | ||
| 592 | |||
| 593 | #define IXJCTL_PSTN_LINETEST _IO ('q', 0xD3) | ||
| 594 | |||
| 595 | #define IXJCTL_CID _IOR ('q', 0xD4, PHONE_CID *) | ||
| 596 | #define IXJCTL_VMWI _IOR ('q', 0xD8, int) | ||
| 597 | #define IXJCTL_CIDCW _IOW ('q', 0xD9, PHONE_CID *) | ||
| 598 | /****************************************************************************** | ||
| 599 | * | ||
| 600 | * The wink duration is tunable with this ioctl. The default wink duration | ||
| 601 | * is 320ms. You do not need to use this ioctl if you do not require a | ||
| 602 | * different wink duration. | ||
| 603 | * | ||
| 604 | ******************************************************************************/ | ||
| 605 | #define IXJCTL_WINK_DURATION PHONE_WINK_DURATION | ||
| 606 | |||
| 607 | /****************************************************************************** | ||
| 608 | * | ||
| 609 | * This ioctl will connect the POTS port to the PSTN port on the LineJACK | ||
| 610 | * In order for this to work properly the port selection should be set to | ||
| 611 | * the PSTN port with IXJCTL_PORT prior to calling this ioctl. This will | ||
| 612 | * enable conference calls between PSTN callers and network callers. | ||
| 613 | * Passing a 1 to this ioctl enables the POTS<->PSTN connection while | ||
| 614 | * passing a 0 turns it back off. | ||
| 615 | * | ||
| 616 | ******************************************************************************/ | ||
| 617 | #define IXJCTL_POTS_PSTN _IOW ('q', 0xD5, int) | ||
| 618 | |||
| 619 | /****************************************************************************** | ||
| 620 | * | ||
| 621 | * IOCTLs added by request. | ||
| 622 | * | ||
| 623 | * IXJCTL_HZ sets the value your Linux kernel uses for HZ as defined in | ||
| 624 | * /usr/include/asm/param.h, this determines the fundamental | ||
| 625 | * frequency of the clock ticks on your Linux system. The kernel | ||
| 626 | * must be rebuilt if you change this value, also all modules you | ||
| 627 | * use (except this one) must be recompiled. The default value | ||
| 628 | * is 100, and you only need to use this IOCTL if you use some | ||
| 629 | * other value. | ||
| 630 | * | ||
| 631 | * | ||
| 632 | * IXJCTL_RATE sets the number of times per second that the driver polls | ||
| 633 | * the DSP. This value cannot be larger than HZ. By | ||
| 634 | * increasing both of these values, you may be able to reduce | ||
| 635 | * latency because the max hang time that can exist between the | ||
| 636 | * driver and the DSP will be reduced. | ||
| 637 | * | ||
| 638 | ******************************************************************************/ | ||
| 639 | |||
| 640 | #define IXJCTL_HZ _IOW ('q', 0xE0, int) | ||
| 641 | #define IXJCTL_RATE _IOW ('q', 0xE1, int) | ||
| 642 | #define IXJCTL_FRAMES_READ _IOR ('q', 0xE2, unsigned long) | ||
| 643 | #define IXJCTL_FRAMES_WRITTEN _IOR ('q', 0xE3, unsigned long) | ||
| 644 | #define IXJCTL_READ_WAIT _IOR ('q', 0xE4, unsigned long) | ||
| 645 | #define IXJCTL_WRITE_WAIT _IOR ('q', 0xE5, unsigned long) | ||
| 646 | #define IXJCTL_DRYBUFFER_READ _IOR ('q', 0xE6, unsigned long) | ||
| 647 | #define IXJCTL_DRYBUFFER_CLEAR _IO ('q', 0xE7) | ||
| 648 | #define IXJCTL_DTMF_PRESCALE _IOW ('q', 0xE8, int) | ||
| 649 | |||
| 650 | /****************************************************************************** | ||
| 651 | * | ||
| 652 | * This ioctl allows the user application to control what events the driver | ||
| 653 | * will send signals for, and what signals it will send for which event. | ||
| 654 | * By default, if signaling is enabled, all events will send SIGIO when | ||
| 655 | * they occur. To disable signals for an event set the signal to 0. | ||
| 656 | * | ||
| 657 | ******************************************************************************/ | ||
| 658 | typedef enum { | ||
| 659 | SIG_DTMF_READY, | ||
| 660 | SIG_HOOKSTATE, | ||
| 661 | SIG_FLASH, | ||
| 662 | SIG_PSTN_RING, | ||
| 663 | SIG_CALLER_ID, | ||
| 664 | SIG_PSTN_WINK, | ||
| 665 | SIG_F0, SIG_F1, SIG_F2, SIG_F3, | ||
| 666 | SIG_FC0, SIG_FC1, SIG_FC2, SIG_FC3, | ||
| 667 | SIG_READ_READY = 33, | ||
| 668 | SIG_WRITE_READY = 34 | ||
| 669 | } IXJ_SIGEVENT; | ||
| 670 | |||
| 671 | typedef struct { | ||
| 672 | unsigned int event; | ||
| 673 | int signal; | ||
| 674 | } IXJ_SIGDEF; | ||
| 675 | |||
| 676 | #define IXJCTL_SIGCTL _IOW ('q', 0xE9, IXJ_SIGDEF *) | ||
| 677 | |||
| 678 | /****************************************************************************** | ||
| 679 | * | ||
| 680 | * These ioctls allow the user application to change the gain in the | ||
| 681 | * Smart Cable of the Internet Phone Card. Sending -1 as a value will cause | ||
| 682 | * return value to be the current setting. Valid values to set are 0x00 - 0x1F | ||
| 683 | * | ||
| 684 | * 11111 = +12 dB | ||
| 685 | * 10111 = 0 dB | ||
| 686 | * 00000 = -34.5 dB | ||
| 687 | * | ||
| 688 | * IXJCTL_SC_RXG sets the Receive gain | ||
| 689 | * IXJCTL_SC_TXG sets the Transmit gain | ||
| 690 | * | ||
| 691 | ******************************************************************************/ | ||
| 692 | #define IXJCTL_SC_RXG _IOW ('q', 0xEA, int) | ||
| 693 | #define IXJCTL_SC_TXG _IOW ('q', 0xEB, int) | ||
| 694 | |||
| 695 | /****************************************************************************** | ||
| 696 | * | ||
| 697 | * The intercom IOCTL's short the output from one card to the input of the | ||
| 698 | * other and vice versa (actually done in the DSP read function). It is only | ||
| 699 | * necessary to execute the IOCTL on one card, but it is necessary to have | ||
| 700 | * both devices open to be able to detect hook switch changes. The record | ||
| 701 | * codec and rate of each card must match the playback codec and rate of | ||
| 702 | * the other card for this to work properly. | ||
| 703 | * | ||
| 704 | ******************************************************************************/ | ||
| 705 | |||
| 706 | #define IXJCTL_INTERCOM_START _IOW ('q', 0xFD, int) | ||
| 707 | #define IXJCTL_INTERCOM_STOP _IOW ('q', 0xFE, int) | ||
| 708 | |||
| 709 | /****************************************************************************** | ||
| 710 | * | ||
| 711 | * new structure for accessing raw filter information | ||
| 712 | * | ||
| 713 | ******************************************************************************/ | ||
| 714 | |||
| 715 | typedef struct { | ||
| 716 | unsigned int filter; | ||
| 717 | char enable; | ||
| 718 | unsigned int coeff[19]; | ||
| 719 | } IXJ_FILTER_RAW; | ||
| 720 | |||
| 721 | #endif | ||
| @@ -396,6 +396,10 @@ struct kvm_run { · 395 unmodified lines | |||
| 396 | char padding[256]; | 396 | char padding[256]; |
| 397 | }; | 397 | }; |
| 398 | 398 | ||
| 399 | /* 2048 is the size of the char array used to bound/pad the size | ||
| 400 | * of the union that holds sync regs. | ||
| 401 | */ | ||
| 402 | #define SYNC_REGS_SIZE_BYTES 2048 | ||
| 399 | /* | 403 | /* |
| 400 | * shared registers between kvm and userspace. | 404 | * shared registers between kvm and userspace. |
| 401 | * kvm_valid_regs specifies the register classes set by the host | 405 | * kvm_valid_regs specifies the register classes set by the host |
| @@ -407,7 +411,7 @@ struct kvm_run { · 5 unmodified lines | |||
| 407 | __u64 kvm_dirty_regs; | 411 | __u64 kvm_dirty_regs; |
| 408 | union { | 412 | union { |
| 409 | struct kvm_sync_regs regs; | 413 | struct kvm_sync_regs regs; |
| 410 | char padding[2048]; | 414 | char padding[SYNC_REGS_SIZE_BYTES]; |
| 411 | } s; | 415 | } s; |
| 412 | }; | 416 | }; |
| 413 | 417 | ||
| @@ -672,6 +676,13 @@ struct kvm_ioeventfd { · 258 unmodified lines | |||
| 672 | __u8 pad[36]; | 676 | __u8 pad[36]; |
| 673 | }; | 677 | }; |
| 674 | 678 | ||
| 679 | #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) | ||
| 680 | #define KVM_X86_DISABLE_EXITS_HTL (1 << 1) | ||
| 681 | #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) | ||
| 682 | #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ | ||
| 683 | KVM_X86_DISABLE_EXITS_HTL | \ | ||
| 684 | KVM_X86_DISABLE_EXITS_PAUSE) | ||
| 685 | |||
| 675 | /* for KVM_ENABLE_CAP */ | 686 | /* for KVM_ENABLE_CAP */ |
| 676 | struct kvm_enable_cap { | 687 | struct kvm_enable_cap { |
| 677 | /* in */ | 688 | /* in */ |
| @@ -925,7 +936,7 @@ struct kvm_ppc_resize_hpt { · 247 unmodified lines | |||
| 925 | #define KVM_CAP_S390_GS 140 | 936 | #define KVM_CAP_S390_GS 140 |
| 926 | #define KVM_CAP_S390_AIS 141 | 937 | #define KVM_CAP_S390_AIS 141 |
| 927 | #define KVM_CAP_SPAPR_TCE_VFIO 142 | 938 | #define KVM_CAP_SPAPR_TCE_VFIO 142 |
| 928 | #define KVM_CAP_X86_GUEST_MWAIT 143 | 939 | #define KVM_CAP_X86_DISABLE_EXITS 143 |
| 929 | #define KVM_CAP_ARM_USER_IRQ 144 | 940 | #define KVM_CAP_ARM_USER_IRQ 144 |
| 930 | #define KVM_CAP_S390_CMMA_MIGRATION 145 | 941 | #define KVM_CAP_S390_CMMA_MIGRATION 145 |
| 931 | #define KVM_CAP_PPC_FWNMI 146 | 942 | #define KVM_CAP_PPC_FWNMI 146 |
| @@ -936,6 +947,7 @@ struct kvm_ppc_resize_hpt { · 4 unmodified lines | |||
| 936 | #define KVM_CAP_PPC_GET_CPU_CHAR 151 | 947 | #define KVM_CAP_PPC_GET_CPU_CHAR 151 |
| 937 | #define KVM_CAP_S390_BPB 152 | 948 | #define KVM_CAP_S390_BPB 152 |
| 938 | #define KVM_CAP_GET_MSR_FEATURES 153 | 949 | #define KVM_CAP_GET_MSR_FEATURES 153 |
| 950 | #define KVM_CAP_HYPERV_EVENTFD 154 | ||
| 939 | 951 | ||
| 940 | #ifdef KVM_CAP_IRQ_ROUTING | 952 | #ifdef KVM_CAP_IRQ_ROUTING |
| 941 | 953 | ||
| @@ -1375,6 +1387,10 @@ struct kvm_enc_region { · 433 unmodified lines | |||
| 1375 | #define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region) | 1387 | #define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region) |
| 1376 | #define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region) | 1388 | #define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region) |
| 1377 | 1389 | ||
| 1390 | /* Available with KVM_CAP_HYPERV_EVENTFD */ | ||
| 1391 | #define KVM_HYPERV_EVENTFD _IOW(KVMIO, 0xbd, struct kvm_hyperv_eventfd) | ||
| 1392 | |||
| 1393 | |||
| 1378 | /* Secure Encrypted Virtualization command */ | 1394 | /* Secure Encrypted Virtualization command */ |
| 1379 | enum sev_cmd_id { | 1395 | enum sev_cmd_id { |
| 1380 | /* Guest initialization commands */ | 1396 | /* Guest initialization commands */ |
| @@ -1515,4 +1531,14 @@ struct kvm_assigned_msix_entry { · 134 unmodified lines | |||
| 1515 | #define KVM_ARM_DEV_EL1_PTIMER (1 << 1) | 1531 | #define KVM_ARM_DEV_EL1_PTIMER (1 << 1) |
| 1516 | #define KVM_ARM_DEV_PMU (1 << 2) | 1532 | #define KVM_ARM_DEV_PMU (1 << 2) |
| 1517 | 1533 | ||
| 1534 | struct kvm_hyperv_eventfd { | ||
| 1535 | __u32 conn_id; | ||
| 1536 | __s32 fd; | ||
| 1537 | __u32 flags; | ||
| 1538 | __u32 padding[3]; | ||
| 1539 | }; | ||
| 1540 | |||
| 1541 | #define KVM_HYPERV_CONN_ID_MASK 0x00ffffff | ||
| 1542 | #define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0) | ||
| 1543 | |||
| 1518 | #endif /* __LINUX_KVM_H */ | 1544 | #endif /* __LINUX_KVM_H */ |
| @@ -185,6 +185,7 @@ struct lirc_scancode { · 184 unmodified lines | |||
| 185 | * @RC_PROTO_SHARP: Sharp protocol | 185 | * @RC_PROTO_SHARP: Sharp protocol |
| 186 | * @RC_PROTO_XMP: XMP protocol | 186 | * @RC_PROTO_XMP: XMP protocol |
| 187 | * @RC_PROTO_CEC: CEC protocol | 187 | * @RC_PROTO_CEC: CEC protocol |
| 188 | * @RC_PROTO_IMON: iMon Pad protocol | ||
| 188 | */ | 189 | */ |
| 189 | enum rc_proto { | 190 | enum rc_proto { |
| 190 | RC_PROTO_UNKNOWN = 0, | 191 | RC_PROTO_UNKNOWN = 0, |
| @@ -210,6 +211,7 @@ enum rc_proto { · 19 unmodified lines | |||
| 210 | RC_PROTO_SHARP = 20, | 211 | RC_PROTO_SHARP = 20, |
| 211 | RC_PROTO_XMP = 21, | 212 | RC_PROTO_XMP = 21, |
| 212 | RC_PROTO_CEC = 22, | 213 | RC_PROTO_CEC = 22, |
| 214 | RC_PROTO_IMON = 23, | ||
| 213 | }; | 215 | }; |
| 214 | 216 | ||
| 215 | #endif | 217 | #endif |
| @@ -15,10 +15,6 @@ · 14 unmodified lines | |||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. |
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | */ | 18 | */ |
| 23 | 19 | ||
| 24 | #ifndef __LINUX_MEDIA_H | 20 | #ifndef __LINUX_MEDIA_H |
| @@ -42,108 +38,66 @@ struct media_device_info { · 17 unmodified lines | |||
| 42 | __u32 reserved[31]; | 38 | __u32 reserved[31]; |
| 43 | }; | 39 | }; |
| 44 | 40 | ||
| 45 | #define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Initial value to be used when a new entity is created | ||
| 49 | * Drivers should change it to something useful | ||
| 50 | */ | ||
| 51 | #define MEDIA_ENT_F_UNKNOWN 0x00000000 | ||
| 52 | |||
| 53 | /* | 41 | /* |
| 54 | * Base number ranges for entity functions | 42 | * Base number ranges for entity functions |
| 55 | * | 43 | * |
| 56 | * NOTE: those ranges and entity function number are phased just to | 44 | * NOTE: Userspace should not rely on these ranges to identify a group |
| 57 | * make it easier to maintain this file. Userspace should not rely on | 45 | * of function types, as newer functions can be added with any name within |
| 58 | * the ranges to identify a group of function types, as newer | 46 | * the full u32 range. |
| 59 | * functions can be added with any name within the full u32 range. | 47 | * |
| 60 | */ | 48 | * Some older functions use the MEDIA_ENT_F_OLD_*_BASE range. Do not |
| 61 | #define MEDIA_ENT_F_BASE 0x00000000 | 49 | * change this, this is for backwards compatibility. When adding new |
| 62 | #define MEDIA_ENT_F_OLD_BASE 0x00010000 | 50 | * functions always use MEDIA_ENT_F_BASE. |
| 63 | #define MEDIA_ENT_F_OLD_SUBDEV_BASE 0x00020000 | ||
| 64 | |||
| 65 | /* | ||
| 66 | * DVB entities | ||
| 67 | */ | 51 | */ |
| 68 | #define MEDIA_ENT_F_DTV_DEMOD (MEDIA_ENT_F_BASE + 0x00001) | 52 | #define MEDIA_ENT_F_BASE 0x00000000 |
| 69 | #define MEDIA_ENT_F_TS_DEMUX (MEDIA_ENT_F_BASE + 0x00002) | 53 | #define MEDIA_ENT_F_OLD_BASE 0x00010000 |
| 70 | #define MEDIA_ENT_F_DTV_CA (MEDIA_ENT_F_BASE + 0x00003) | 54 | #define MEDIA_ENT_F_OLD_SUBDEV_BASE 0x00020000 |
| 71 | #define MEDIA_ENT_F_DTV_NET_DECAP (MEDIA_ENT_F_BASE + 0x00004) | ||
| 72 | 55 | ||
| 73 | /* | 56 | /* |
| 74 | * I/O entities | 57 | * Initial value to be used when a new entity is created |
| 58 | * Drivers should change it to something useful. | ||
| 75 | */ | 59 | */ |
| 76 | #define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 0x01001) | 60 | #define MEDIA_ENT_F_UNKNOWN MEDIA_ENT_F_BASE |
| 77 | #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002) | ||
| 78 | #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003) | ||
| 79 | 61 | ||
| 80 | /* | 62 | /* |
| 81 | * Analog TV IF-PLL decoders | 63 | * Subdevs are initialized with MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN in order |
| 82 | * | 64 | * to preserve backward compatibility. Drivers must change to the proper |
| 83 | * It is a responsibility of the master/bridge drivers to create links | 65 | * subdev type before registering the entity. |
| 84 | * for MEDIA_ENT_F_IF_VID_DECODER and MEDIA_ENT_F_IF_AUD_DECODER. | ||
| 85 | */ | 66 | */ |
| 86 | #define MEDIA_ENT_F_IF_VID_DECODER (MEDIA_ENT_F_BASE + 0x02001) | 67 | #define MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN MEDIA_ENT_F_OLD_SUBDEV_BASE |
| 87 | #define MEDIA_ENT_F_IF_AUD_DECODER (MEDIA_ENT_F_BASE + 0x02002) | ||
| 88 | 68 | ||
| 89 | /* | 69 | /* |
| 90 | * Audio Entity Functions | 70 | * DVB entity functions |
| 91 | */ | 71 | */ |
| 92 | #define MEDIA_ENT_F_AUDIO_CAPTURE (MEDIA_ENT_F_BASE + 0x03001) | 72 | #define MEDIA_ENT_F_DTV_DEMOD (MEDIA_ENT_F_BASE + 0x00001) |
| 93 | #define MEDIA_ENT_F_AUDIO_PLAYBACK (MEDIA_ENT_F_BASE + 0x03002) | 73 | #define MEDIA_ENT_F_TS_DEMUX (MEDIA_ENT_F_BASE + 0x00002) |
| 94 | #define MEDIA_ENT_F_AUDIO_MIXER (MEDIA_ENT_F_BASE + 0x03003) | 74 | #define MEDIA_ENT_F_DTV_CA (MEDIA_ENT_F_BASE + 0x00003) |
| 75 | #define MEDIA_ENT_F_DTV_NET_DECAP (MEDIA_ENT_F_BASE + 0x00004) | ||
| 95 | 76 | ||
| 96 | /* | 77 | /* |
| 97 | * Processing entities | 78 | * I/O entity functions |
| 98 | */ | 79 | */ |
| 99 | #define MEDIA_ENT_F_PROC_VIDEO_COMPOSER (MEDIA_ENT_F_BASE + 0x4001) | 80 | #define MEDIA_ENT_F_IO_V4L (MEDIA_ENT_F_OLD_BASE + 1) |
| 100 | #define MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER (MEDIA_ENT_F_BASE + 0x4002) | 81 | #define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 0x01001) |
| 101 | #define MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV (MEDIA_ENT_F_BASE + 0x4003) | 82 | #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002) |
| 102 | #define MEDIA_ENT_F_PROC_VIDEO_LUT (MEDIA_ENT_F_BASE + 0x4004) | 83 | #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003) |
| 103 | #define MEDIA_ENT_F_PROC_VIDEO_SCALER (MEDIA_ENT_F_BASE + 0x4005) | ||
| 104 | #define MEDIA_ENT_F_PROC_VIDEO_STATISTICS (MEDIA_ENT_F_BASE + 0x4006) | ||
| 105 | 84 | ||
| 106 | /* | 85 | /* |
| 107 | * Switch and bridge entitites | 86 | * Sensor functions |
| 108 | */ | 87 | */ |
| 109 | #define MEDIA_ENT_F_VID_MUX (MEDIA_ENT_F_BASE + 0x5001) | 88 | #define MEDIA_ENT_F_CAM_SENSOR (MEDIA_ENT_F_OLD_SUBDEV_BASE + 1) |
| 110 | #define MEDIA_ENT_F_VID_IF_BRIDGE (MEDIA_ENT_F_BASE + 0x5002) | 89 | #define MEDIA_ENT_F_FLASH (MEDIA_ENT_F_OLD_SUBDEV_BASE + 2) |
| 90 | #define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3) | ||
| 111 | 91 | ||
| 112 | /* | 92 | /* |
| 113 | * Connectors | 93 | * Video decoder functions |
| 114 | */ | 94 | */ |
| 115 | /* It is a responsibility of the entity drivers to add connectors and links */ | 95 | #define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4) |
| 116 | #ifdef __KERNEL__ | 96 | #define MEDIA_ENT_F_DTV_DECODER (MEDIA_ENT_F_BASE + 0x6001) |
| 117 | /* | ||
| 118 | * For now, it should not be used in userspace, as some | ||
| 119 | * definitions may change | ||
| 120 | */ | ||
| 121 | |||
| 122 | #define MEDIA_ENT_F_CONN_RF (MEDIA_ENT_F_BASE + 0x30001) | ||
| 123 | #define MEDIA_ENT_F_CONN_SVIDEO (MEDIA_ENT_F_BASE + 0x30002) | ||
| 124 | #define MEDIA_ENT_F_CONN_COMPOSITE (MEDIA_ENT_F_BASE + 0x30003) | ||
| 125 | |||
| 126 | #endif | ||
| 127 | 97 | ||
| 128 | /* | 98 | /* |
| 129 | * Don't touch on those. The ranges MEDIA_ENT_F_OLD_BASE and | 99 | * Digital TV, analog TV, radio and/or software defined radio tuner functions. |
| 130 | * MEDIA_ENT_F_OLD_SUBDEV_BASE are kept to keep backward compatibility | ||
| 131 | * with the legacy v1 API.The number range is out of range by purpose: | ||
| 132 | * several previously reserved numbers got excluded from this range. | ||
| 133 | * | 100 | * |
| 134 | * Subdevs are initialized with MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN, | ||
| 135 | * in order to preserve backward compatibility. | ||
| 136 | * Drivers must change to the proper subdev type before | ||
| 137 | * registering the entity. | ||
| 138 | */ | ||
| 139 | |||
| 140 | #define MEDIA_ENT_F_IO_V4L (MEDIA_ENT_F_OLD_BASE + 1) | ||
| 141 | |||
| 142 | #define MEDIA_ENT_F_CAM_SENSOR (MEDIA_ENT_F_OLD_SUBDEV_BASE + 1) | ||
| 143 | #define MEDIA_ENT_F_FLASH (MEDIA_ENT_F_OLD_SUBDEV_BASE + 2) | ||
| 144 | #define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3) | ||
| 145 | #define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4) | ||
| 146 | /* | ||
| 147 | * It is a responsibility of the master/bridge drivers to add connectors | 101 | * It is a responsibility of the master/bridge drivers to add connectors |
| 148 | * and links for MEDIA_ENT_F_TUNER. Please notice that some old tuners | 102 | * and links for MEDIA_ENT_F_TUNER. Please notice that some old tuners |
| 149 | * may require the usage of separate I2C chips to decode analog TV signals, | 103 | * may require the usage of separate I2C chips to decode analog TV signals, |
| @@ -151,49 +105,46 @@ struct media_device_info { · 1 unmodified line | |||
| 151 | * On such cases, the IF-PLL staging is mapped via one or two entities: | 105 | * On such cases, the IF-PLL staging is mapped via one or two entities: |
| 152 | * MEDIA_ENT_F_IF_VID_DECODER and/or MEDIA_ENT_F_IF_AUD_DECODER. | 106 | * MEDIA_ENT_F_IF_VID_DECODER and/or MEDIA_ENT_F_IF_AUD_DECODER. |
| 153 | */ | 107 | */ |
| 154 | #define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5) | 108 | #define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5) |
| 155 | 109 | ||
| 156 | #define MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN MEDIA_ENT_F_OLD_SUBDEV_BASE | 110 | /* |
| 111 | * Analog TV IF-PLL decoder functions | ||
| 112 | * | ||
| 113 | * It is a responsibility of the master/bridge drivers to create links | ||
| 114 | * for MEDIA_ENT_F_IF_VID_DECODER and MEDIA_ENT_F_IF_AUD_DECODER. | ||
| 115 | */ | ||
| 116 | #define MEDIA_ENT_F_IF_VID_DECODER (MEDIA_ENT_F_BASE + 0x02001) | ||
| 117 | #define MEDIA_ENT_F_IF_AUD_DECODER (MEDIA_ENT_F_BASE + 0x02002) | ||
| 157 | 118 | ||
| 158 | #if !defined(__KERNEL__) || defined(__NEED_MEDIA_LEGACY_API) | 119 | /* |
| 120 | * Audio entity functions | ||
| 121 | */ | ||
| 122 | #define MEDIA_ENT_F_AUDIO_CAPTURE (MEDIA_ENT_F_BASE + 0x03001) | ||
| 123 | #define MEDIA_ENT_F_AUDIO_PLAYBACK (MEDIA_ENT_F_BASE + 0x03002) | ||
| 124 | #define MEDIA_ENT_F_AUDIO_MIXER (MEDIA_ENT_F_BASE + 0x03003) | ||
| 159 | 125 | ||
| 160 | /* | 126 | /* |
| 161 | * Legacy symbols used to avoid userspace compilation breakages | 127 | * Processing entity functions |
| 162 | * | ||
| 163 | * Those symbols map the entity function into types and should be | ||
| 164 | * used only on legacy programs for legacy hardware. Don't rely | ||
| 165 | * on those for MEDIA_IOC_G_TOPOLOGY. | ||
| 166 | */ | 128 | */ |
| 167 | #define MEDIA_ENT_TYPE_SHIFT 16 | 129 | #define MEDIA_ENT_F_PROC_VIDEO_COMPOSER (MEDIA_ENT_F_BASE + 0x4001) |
| 168 | #define MEDIA_ENT_TYPE_MASK 0x00ff0000 | 130 | #define MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER (MEDIA_ENT_F_BASE + 0x4002) |
| 169 | #define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff | 131 | #define MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV (MEDIA_ENT_F_BASE + 0x4003) |
| 170 | 132 | #define MEDIA_ENT_F_PROC_VIDEO_LUT (MEDIA_ENT_F_BASE + 0x4004) | |
| 171 | /* End of the old subdev reserved numberspace */ | 133 | #define MEDIA_ENT_F_PROC_VIDEO_SCALER (MEDIA_ENT_F_BASE + 0x4005) |
| 172 | #define MEDIA_ENT_T_DEVNODE_UNKNOWN (MEDIA_ENT_T_DEVNODE | \ | 134 | #define MEDIA_ENT_F_PROC_VIDEO_STATISTICS (MEDIA_ENT_F_BASE + 0x4006) |
| 173 | MEDIA_ENT_SUBTYPE_MASK) | ||
| 174 | |||
| 175 | #define MEDIA_ENT_T_DEVNODE MEDIA_ENT_F_OLD_BASE | ||
| 176 | #define MEDIA_ENT_T_DEVNODE_V4L MEDIA_ENT_F_IO_V4L | ||
| 177 | #define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2) | ||
| 178 | #define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3) | ||
| 179 | #define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4) | ||
| 180 | |||
| 181 | #define MEDIA_ENT_T_UNKNOWN MEDIA_ENT_F_UNKNOWN | ||
| 182 | #define MEDIA_ENT_T_V4L2_VIDEO MEDIA_ENT_F_IO_V4L | ||
| 183 | #define MEDIA_ENT_T_V4L2_SUBDEV MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN | ||
| 184 | #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR MEDIA_ENT_F_CAM_SENSOR | ||
| 185 | #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH MEDIA_ENT_F_FLASH | ||
| 186 | #define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS | ||
| 187 | #define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER | ||
| 188 | #define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER | ||
| 189 | 135 | ||
| 190 | /* Obsolete symbol for media_version, no longer used in the kernel */ | 136 | /* |
| 191 | #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) | 137 | * Switch and bridge entity functions |
| 192 | #endif | 138 | */ |
| 139 | #define MEDIA_ENT_F_VID_MUX (MEDIA_ENT_F_BASE + 0x5001) | ||
| 140 | #define MEDIA_ENT_F_VID_IF_BRIDGE (MEDIA_ENT_F_BASE + 0x5002) | ||
| 193 | 141 | ||
| 194 | /* Entity flags */ | 142 | /* Entity flags */ |
| 195 | #define MEDIA_ENT_FL_DEFAULT (1 << 0) | 143 | #define MEDIA_ENT_FL_DEFAULT (1 << 0) |
| 196 | #define MEDIA_ENT_FL_CONNECTOR (1 << 1) | 144 | #define MEDIA_ENT_FL_CONNECTOR (1 << 1) |
| 145 | |||
| 146 | /* OR with the entity id value to find the next entity */ | ||
| 147 | #define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) | ||
| 197 | 148 | ||
| 198 | struct media_entity_desc { | 149 | struct media_entity_desc { |
| 199 | __u32 id; | 150 | __u32 id; |
| @@ -214,7 +165,7 @@ struct media_entity_desc { · 14 unmodified lines | |||
| 214 | __u32 minor; | 165 | __u32 minor; |
| 215 | } dev; | 166 | } dev; |
| 216 | 167 | ||
| 217 | #if 1 | 168 | #if !defined(__KERNEL__) |
| 218 | /* | 169 | /* |
| 219 | * TODO: this shouldn't have been added without | 170 | * TODO: this shouldn't have been added without |
| 220 | * actual drivers that use this. When the first real driver | 171 | * actual drivers that use this. When the first real driver |
| @@ -225,24 +176,17 @@ struct media_entity_desc { · 4 unmodified lines | |||
| 225 | * contain the subdevice information. In addition, struct dev | 176 | * contain the subdevice information. In addition, struct dev |
| 226 | * can only refer to a single device, and not to multiple (e.g. | 177 | * can only refer to a single device, and not to multiple (e.g. |
| 227 | * pcm and mixer devices). | 178 | * pcm and mixer devices). |
| 228 | * | ||
| 229 | * So for now mark this as a to do. | ||
| 230 | */ | 179 | */ |
| 231 | struct { | 180 | struct { |
| 232 | __u32 card; | 181 | __u32 card; |
| 233 | __u32 device; | 182 | __u32 device; |
| 234 | __u32 subdevice; | 183 | __u32 subdevice; |
| 235 | } alsa; | 184 | } alsa; |
| 236 | #endif | ||
| 237 | 185 | ||
| 238 | #if 1 | ||
| 239 | /* | 186 | /* |
| 240 | * DEPRECATED: previous node specifications. Kept just to | 187 | * DEPRECATED: previous node specifications. Kept just to |
| 241 | * avoid breaking compilation, but media_entity_desc.dev | 188 | * avoid breaking compilation. Use media_entity_desc.dev |
| 242 | * should be used instead. In particular, alsa and dvb | 189 | * instead. |
| 243 | * fields below are wrong: for all devnodes, there should | ||
| 244 | * be just major/minor inside the struct, as this is enough | ||
| 245 | * to represent any devnode, no matter what type. | ||
| 246 | */ | 190 | */ |
| 247 | struct { | 191 | struct { |
| 248 | __u32 major; | 192 | __u32 major; |
| @@ -261,9 +205,9 @@ struct media_entity_desc { · 12 unmodified lines | |||
| 261 | }; | 205 | }; |
| 262 | }; | 206 | }; |
| 263 | 207 | ||
| 264 | #define MEDIA_PAD_FL_SINK (1 << 0) | 208 | #define MEDIA_PAD_FL_SINK (1 << 0) |
| 265 | #define MEDIA_PAD_FL_SOURCE (1 << 1) | 209 | #define MEDIA_PAD_FL_SOURCE (1 << 1) |
| 266 | #define MEDIA_PAD_FL_MUST_CONNECT (1 << 2) | 210 | #define MEDIA_PAD_FL_MUST_CONNECT (1 << 2) |
| 267 | 211 | ||
| 268 | struct media_pad_desc { | 212 | struct media_pad_desc { |
| 269 | __u32 entity; /* entity ID */ | 213 | __u32 entity; /* entity ID */ |
| @@ -272,13 +216,13 @@ struct media_pad_desc { · 2 unmodified lines | |||
| 272 | __u32 reserved[2]; | 216 | __u32 reserved[2]; |
| 273 | }; | 217 | }; |
| 274 | 218 | ||
| 275 | #define MEDIA_LNK_FL_ENABLED (1 << 0) | 219 | #define MEDIA_LNK_FL_ENABLED (1 << 0) |
| 276 | #define MEDIA_LNK_FL_IMMUTABLE (1 << 1) | 220 | #define MEDIA_LNK_FL_IMMUTABLE (1 << 1) |
| 277 | #define MEDIA_LNK_FL_DYNAMIC (1 << 2) | 221 | #define MEDIA_LNK_FL_DYNAMIC (1 << 2) |
| 278 | 222 | ||
| 279 | #define MEDIA_LNK_FL_LINK_TYPE (0xf << 28) | 223 | #define MEDIA_LNK_FL_LINK_TYPE (0xf << 28) |
| 280 | # define MEDIA_LNK_FL_DATA_LINK (0 << 28) | 224 | # define MEDIA_LNK_FL_DATA_LINK (0 << 28) |
| 281 | # define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28) | 225 | # define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28) |
| 282 | 226 | ||
| 283 | struct media_link_desc { | 227 | struct media_link_desc { |
| 284 | struct media_pad_desc source; | 228 | struct media_pad_desc source; |
| @@ -298,57 +242,47 @@ struct media_links_enum { · 13 unmodified lines | |||
| 298 | 242 | ||
| 299 | /* Interface type ranges */ | 243 | /* Interface type ranges */ |
| 300 | 244 | ||
| 301 | #define MEDIA_INTF_T_DVB_BASE 0x00000100 | 245 | #define MEDIA_INTF_T_DVB_BASE 0x00000100 |
| 302 | #define MEDIA_INTF_T_V4L_BASE 0x00000200 | 246 | #define MEDIA_INTF_T_V4L_BASE 0x00000200 |
| 303 | #define MEDIA_INTF_T_ALSA_BASE 0x00000300 | ||
| 304 | 247 | ||
| 305 | /* Interface types */ | 248 | /* Interface types */ |
| 306 | 249 | ||
| 307 | #define MEDIA_INTF_T_DVB_FE (MEDIA_INTF_T_DVB_BASE) | 250 | #define MEDIA_INTF_T_DVB_FE (MEDIA_INTF_T_DVB_BASE) |
| 308 | #define MEDIA_INTF_T_DVB_DEMUX (MEDIA_INTF_T_DVB_BASE + 1) | 251 | #define MEDIA_INTF_T_DVB_DEMUX (MEDIA_INTF_T_DVB_BASE + 1) |
| 309 | #define MEDIA_INTF_T_DVB_DVR (MEDIA_INTF_T_DVB_BASE + 2) | 252 | #define MEDIA_INTF_T_DVB_DVR (MEDIA_INTF_T_DVB_BASE + 2) |
| 310 | #define MEDIA_INTF_T_DVB_CA (MEDIA_INTF_T_DVB_BASE + 3) | 253 | #define MEDIA_INTF_T_DVB_CA (MEDIA_INTF_T_DVB_BASE + 3) |
| 311 | #define MEDIA_INTF_T_DVB_NET (MEDIA_INTF_T_DVB_BASE + 4) | 254 | #define MEDIA_INTF_T_DVB_NET (MEDIA_INTF_T_DVB_BASE + 4) |
| 312 | 255 | ||
| 313 | #define MEDIA_INTF_T_V4L_VIDEO (MEDIA_INTF_T_V4L_BASE) | 256 | #define MEDIA_INTF_T_V4L_VIDEO (MEDIA_INTF_T_V4L_BASE) |
| 314 | #define MEDIA_INTF_T_V4L_VBI (MEDIA_INTF_T_V4L_BASE + 1) | 257 | #define MEDIA_INTF_T_V4L_VBI (MEDIA_INTF_T_V4L_BASE + 1) |
| 315 | #define MEDIA_INTF_T_V4L_RADIO (MEDIA_INTF_T_V4L_BASE + 2) | 258 | #define MEDIA_INTF_T_V4L_RADIO (MEDIA_INTF_T_V4L_BASE + 2) |
| 316 | #define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3) | 259 | #define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3) |
| 317 | #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) | 260 | #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) |
| 318 | #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) | 261 | #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) |
| 319 | 262 | ||
| 320 | #define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) | 263 | #if defined(__KERNEL__) |
| 321 | #define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) | ||
| 322 | #define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2) | ||
| 323 | #define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3) | ||
| 324 | #define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4) | ||
| 325 | #define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5) | ||
| 326 | #define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6) | ||
| 327 | #define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) | ||
| 328 | 264 | ||
| 329 | /* | 265 | /* |
| 330 | * MC next gen API definitions | 266 | * Connector functions |
| 331 | * | 267 | * |
| 332 | * NOTE: The declarations below are close to the MC RFC for the Media | 268 | * For now these should not be used in userspace, as some definitions may |
| 333 | * Controller, the next generation. Yet, there are a few adjustments | 269 | * change. |
| 334 | * to do, as we want to be able to have a functional API before | ||
| 335 | * the MC properties change. Those will be properly marked below. | ||
| 336 | * Please also notice that I removed "num_pads", "num_links", | ||
| 337 | * from the proposal, as a proper userspace application will likely | ||
| 338 | * use lists for pads/links, just as we intend to do in Kernelspace. | ||
| 339 | * The API definition should be freed from fields that are bound to | ||
| 340 | * some specific data structure. | ||
| 341 | * | 270 | * |
| 342 | * FIXME: Currently, I opted to name the new types as "media_v2", as this | 271 | * It is the responsibility of the entity drivers to add connectors and links. |
| 343 | * won't cause any conflict with the Kernelspace namespace, nor with | ||
| 344 | * the previous kAPI media_*_desc namespace. This can be changed | ||
| 345 | * later, before the adding this API upstream. | ||
| 346 | */ | 272 | */ |
| 273 | #define MEDIA_ENT_F_CONN_RF (MEDIA_ENT_F_BASE + 0x30001) | ||
| 274 | #define MEDIA_ENT_F_CONN_SVIDEO (MEDIA_ENT_F_BASE + 0x30002) | ||
| 275 | #define MEDIA_ENT_F_CONN_COMPOSITE (MEDIA_ENT_F_BASE + 0x30003) | ||
| 347 | 276 | ||
| 277 | #endif | ||
| 278 | |||
| 279 | /* | ||
| 280 | * MC next gen API definitions | ||
| 281 | */ | ||
| 348 | 282 | ||
| 349 | struct media_v2_entity { | 283 | struct media_v2_entity { |
| 350 | __u32 id; | 284 | __u32 id; |
| 351 | char name[64]; /* FIXME: move to a property? (RFC says so) */ | 285 | char name[64]; |
| 352 | __u32 function; /* Main function of the entity */ | 286 | __u32 function; /* Main function of the entity */ |
| 353 | __u32 reserved[6]; | 287 | __u32 reserved[6]; |
| 354 | } __attribute__ ((packed)); | 288 | } __attribute__ ((packed)); |
| @@ -408,10 +342,62 @@ struct media_v2_topology { · 53 unmodified lines | |||
| 408 | 342 | ||
| 409 | /* ioctls */ | 343 | /* ioctls */ |
| 410 | 344 | ||
| 411 | #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) | 345 | #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) |
| 412 | #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) | 346 | #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) |
| 413 | #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) | 347 | #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) |
| 414 | #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) | 348 | #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) |
| 415 | #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) | 349 | #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) |
| 350 | |||
| 351 | #if !defined(__KERNEL__) || defined(__NEED_MEDIA_LEGACY_API) | ||
| 352 | |||
| 353 | /* | ||
| 354 | * Legacy symbols used to avoid userspace compilation breakages. | ||
| 355 | * Do not use any of this in new applications! | ||
| 356 | * | ||
| 357 | * Those symbols map the entity function into types and should be | ||
| 358 | * used only on legacy programs for legacy hardware. Don't rely | ||
| 359 | * on those for MEDIA_IOC_G_TOPOLOGY. | ||
| 360 | */ | ||
| 361 | #define MEDIA_ENT_TYPE_SHIFT 16 | ||
| 362 | #define MEDIA_ENT_TYPE_MASK 0x00ff0000 | ||
| 363 | #define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff | ||
| 364 | |||
| 365 | #define MEDIA_ENT_T_DEVNODE_UNKNOWN (MEDIA_ENT_F_OLD_BASE | \ | ||
| 366 | MEDIA_ENT_SUBTYPE_MASK) | ||
| 367 | |||
| 368 | #define MEDIA_ENT_T_DEVNODE MEDIA_ENT_F_OLD_BASE | ||
| 369 | #define MEDIA_ENT_T_DEVNODE_V4L MEDIA_ENT_F_IO_V4L | ||
| 370 | #define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_F_OLD_BASE + 2) | ||
| 371 | #define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_F_OLD_BASE + 3) | ||
| 372 | #define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_F_OLD_BASE + 4) | ||
| 373 | |||
| 374 | #define MEDIA_ENT_T_UNKNOWN MEDIA_ENT_F_UNKNOWN | ||
| 375 | #define MEDIA_ENT_T_V4L2_VIDEO MEDIA_ENT_F_IO_V4L | ||
| 376 | #define MEDIA_ENT_T_V4L2_SUBDEV MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN | ||
| 377 | #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR MEDIA_ENT_F_CAM_SENSOR | ||
| 378 | #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH MEDIA_ENT_F_FLASH | ||
| 379 | #define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS | ||
| 380 | #define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER | ||
| 381 | #define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER | ||
| 382 | |||
| 383 | /* | ||
| 384 | * There is still no ALSA support in the media controller. These | ||
| 385 | * defines should not have been added and we leave them here only | ||
| 386 | * in case some application tries to use these defines. | ||
| 387 | */ | ||
| 388 | #define MEDIA_INTF_T_ALSA_BASE 0x00000300 | ||
| 389 | #define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) | ||
| 390 | #define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) | ||
| 391 | #define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2) | ||
| 392 | #define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3) | ||
| 393 | #define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4) | ||
| 394 | #define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5) | ||
| 395 | #define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6) | ||
| 396 | #define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) | ||
| 397 | |||
| 398 | /* Obsolete symbol for media_version, no longer used in the kernel */ | ||
| 399 | #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) | ||
| 400 | |||
| 401 | #endif | ||
| 416 | 402 | ||
| 417 | #endif /* __LINUX_MEDIA_H */ | 403 | #endif /* __LINUX_MEDIA_H */ |
| @@ -10,7 +10,9 @@ · 9 unmodified lines | |||
| 10 | * The MS-DOS filesystem constants/structures | 10 | * The MS-DOS filesystem constants/structures |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #ifndef SECTOR_SIZE | ||
| 13 | #define SECTOR_SIZE 512 /* sector size (bytes) */ | 14 | #define SECTOR_SIZE 512 /* sector size (bytes) */ |
| 15 | #endif | ||
| 14 | #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ | 16 | #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ |
| 15 | #define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */ | 17 | #define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */ |
| 16 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ | 18 | #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ |
| @@ -7,6 +7,7 @@ · 6 unmodified lines | |||
| 7 | /* ipcs ctl commands */ | 7 | /* ipcs ctl commands */ |
| 8 | #define MSG_STAT 11 | 8 | #define MSG_STAT 11 |
| 9 | #define MSG_INFO 12 | 9 | #define MSG_INFO 12 |
| 10 | #define MSG_STAT_ANY 13 | ||
| 10 | 11 | ||
| 11 | /* msgrcv options */ | 12 | /* msgrcv options */ |
| 12 | #define MSG_NOERROR 010000 /* no error if message is too big */ | 13 | #define MSG_NOERROR 010000 /* no error if message is too big */ |
| @@ -0,0 +1,115 @@ | |||
| 1 | /* | ||
| 2 | * Copyright Samuel Mendoza-Jonas, IBM Corporation 2018. | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __UAPI_NCSI_NETLINK_H__ | ||
| 11 | #define __UAPI_NCSI_NETLINK_H__ | ||
| 12 | |||
| 13 | /** | ||
| 14 | * enum ncsi_nl_commands - supported NCSI commands | ||
| 15 | * | ||
| 16 | * @NCSI_CMD_UNSPEC: unspecified command to catch errors | ||
| 17 | * @NCSI_CMD_PKG_INFO: list package and channel attributes. Requires | ||
| 18 | * NCSI_ATTR_IFINDEX. If NCSI_ATTR_PACKAGE_ID is specified returns the | ||
| 19 | * specific package and its channels - otherwise a dump request returns | ||
| 20 | * all packages and their associated channels. | ||
| 21 | * @NCSI_CMD_SET_INTERFACE: set preferred package and channel combination. | ||
| 22 | * Requires NCSI_ATTR_IFINDEX and the preferred NCSI_ATTR_PACKAGE_ID and | ||
| 23 | * optionally the preferred NCSI_ATTR_CHANNEL_ID. | ||
| 24 | * @NCSI_CMD_CLEAR_INTERFACE: clear any preferred package/channel combination. | ||
| 25 | * Requires NCSI_ATTR_IFINDEX. | ||
| 26 | * @NCSI_CMD_MAX: highest command number | ||
| 27 | */ | ||
| 28 | enum ncsi_nl_commands { | ||
| 29 | NCSI_CMD_UNSPEC, | ||
| 30 | NCSI_CMD_PKG_INFO, | ||
| 31 | NCSI_CMD_SET_INTERFACE, | ||
| 32 | NCSI_CMD_CLEAR_INTERFACE, | ||
| 33 | |||
| 34 | __NCSI_CMD_AFTER_LAST, | ||
| 35 | NCSI_CMD_MAX = __NCSI_CMD_AFTER_LAST - 1 | ||
| 36 | }; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * enum ncsi_nl_attrs - General NCSI netlink attributes | ||
| 40 | * | ||
| 41 | * @NCSI_ATTR_UNSPEC: unspecified attributes to catch errors | ||
| 42 | * @NCSI_ATTR_IFINDEX: ifindex of network device using NCSI | ||
| 43 | * @NCSI_ATTR_PACKAGE_LIST: nested array of NCSI_PKG_ATTR attributes | ||
| 44 | * @NCSI_ATTR_PACKAGE_ID: package ID | ||
| 45 | * @NCSI_ATTR_CHANNEL_ID: channel ID | ||
| 46 | * @NCSI_ATTR_MAX: highest attribute number | ||
| 47 | */ | ||
| 48 | enum ncsi_nl_attrs { | ||
| 49 | NCSI_ATTR_UNSPEC, | ||
| 50 | NCSI_ATTR_IFINDEX, | ||
| 51 | NCSI_ATTR_PACKAGE_LIST, | ||
| 52 | NCSI_ATTR_PACKAGE_ID, | ||
| 53 | NCSI_ATTR_CHANNEL_ID, | ||
| 54 | |||
| 55 | __NCSI_ATTR_AFTER_LAST, | ||
| 56 | NCSI_ATTR_MAX = __NCSI_ATTR_AFTER_LAST - 1 | ||
| 57 | }; | ||
| 58 | |||
| 59 | /** | ||
| 60 | * enum ncsi_nl_pkg_attrs - NCSI netlink package-specific attributes | ||
| 61 | * | ||
| 62 | * @NCSI_PKG_ATTR_UNSPEC: unspecified attributes to catch errors | ||
| 63 | * @NCSI_PKG_ATTR: nested array of package attributes | ||
| 64 | * @NCSI_PKG_ATTR_ID: package ID | ||
| 65 | * @NCSI_PKG_ATTR_FORCED: flag signifying a package has been set as preferred | ||
| 66 | * @NCSI_PKG_ATTR_CHANNEL_LIST: nested array of NCSI_CHANNEL_ATTR attributes | ||
| 67 | * @NCSI_PKG_ATTR_MAX: highest attribute number | ||
| 68 | */ | ||
| 69 | enum ncsi_nl_pkg_attrs { | ||
| 70 | NCSI_PKG_ATTR_UNSPEC, | ||
| 71 | NCSI_PKG_ATTR, | ||
| 72 | NCSI_PKG_ATTR_ID, | ||
| 73 | NCSI_PKG_ATTR_FORCED, | ||
| 74 | NCSI_PKG_ATTR_CHANNEL_LIST, | ||
| 75 | |||
| 76 | __NCSI_PKG_ATTR_AFTER_LAST, | ||
| 77 | NCSI_PKG_ATTR_MAX = __NCSI_PKG_ATTR_AFTER_LAST - 1 | ||
| 78 | }; | ||
| 79 | |||
| 80 | /** | ||
| 81 | * enum ncsi_nl_channel_attrs - NCSI netlink channel-specific attributes | ||
| 82 | * | ||
| 83 | * @NCSI_CHANNEL_ATTR_UNSPEC: unspecified attributes to catch errors | ||
| 84 | * @NCSI_CHANNEL_ATTR: nested array of channel attributes | ||
| 85 | * @NCSI_CHANNEL_ATTR_ID: channel ID | ||
| 86 | * @NCSI_CHANNEL_ATTR_VERSION_MAJOR: channel major version number | ||
| 87 | * @NCSI_CHANNEL_ATTR_VERSION_MINOR: channel minor version number | ||
| 88 | * @NCSI_CHANNEL_ATTR_VERSION_STR: channel version string | ||
| 89 | * @NCSI_CHANNEL_ATTR_LINK_STATE: channel link state flags | ||
| 90 | * @NCSI_CHANNEL_ATTR_ACTIVE: channels with this flag are in | ||
| 91 | * NCSI_CHANNEL_ACTIVE state | ||
| 92 | * @NCSI_CHANNEL_ATTR_FORCED: flag signifying a channel has been set as | ||
| 93 | * preferred | ||
| 94 | * @NCSI_CHANNEL_ATTR_VLAN_LIST: nested array of NCSI_CHANNEL_ATTR_VLAN_IDs | ||
| 95 | * @NCSI_CHANNEL_ATTR_VLAN_ID: VLAN ID being filtered on this channel | ||
| 96 | * @NCSI_CHANNEL_ATTR_MAX: highest attribute number | ||
| 97 | */ | ||
| 98 | enum ncsi_nl_channel_attrs { | ||
| 99 | NCSI_CHANNEL_ATTR_UNSPEC, | ||
| 100 | NCSI_CHANNEL_ATTR, | ||
| 101 | NCSI_CHANNEL_ATTR_ID, | ||
| 102 | NCSI_CHANNEL_ATTR_VERSION_MAJOR, | ||
| 103 | NCSI_CHANNEL_ATTR_VERSION_MINOR, | ||
| 104 | NCSI_CHANNEL_ATTR_VERSION_STR, | ||
| 105 | NCSI_CHANNEL_ATTR_LINK_STATE, | ||
| 106 | NCSI_CHANNEL_ATTR_ACTIVE, | ||
| 107 | NCSI_CHANNEL_ATTR_FORCED, | ||
| 108 | NCSI_CHANNEL_ATTR_VLAN_LIST, | ||
| 109 | NCSI_CHANNEL_ATTR_VLAN_ID, | ||
| 110 | |||
| 111 | __NCSI_CHANNEL_ATTR_AFTER_LAST, | ||
| 112 | NCSI_CHANNEL_ATTR_MAX = __NCSI_CHANNEL_ATTR_AFTER_LAST - 1 | ||
| 113 | }; | ||
| 114 | |||
| 115 | #endif /* __UAPI_NCSI_NETLINK_H__ */ | ||
| @@ -129,6 +129,7 @@ enum ip_conntrack_events { · 128 unmodified lines | |||
| 129 | IPCT_NATSEQADJ = IPCT_SEQADJ, | 129 | IPCT_NATSEQADJ = IPCT_SEQADJ, |
| 130 | IPCT_SECMARK, /* new security mark has been set */ | 130 | IPCT_SECMARK, /* new security mark has been set */ |
| 131 | IPCT_LABEL, /* new connlabel has been set */ | 131 | IPCT_LABEL, /* new connlabel has been set */ |
| 132 | IPCT_SYNPROXY, /* synproxy has been set */ | ||
| 132 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
| 133 | __IPCT_MAX | 134 | __IPCT_MAX |
| 134 | #endif | 135 | #endif |
| @@ -909,8 +909,8 @@ enum nft_rt_attributes { · 908 unmodified lines | |||
| 909 | * @NFT_CT_EXPIRATION: relative conntrack expiration time in ms | 909 | * @NFT_CT_EXPIRATION: relative conntrack expiration time in ms |
| 910 | * @NFT_CT_HELPER: connection tracking helper assigned to conntrack | 910 | * @NFT_CT_HELPER: connection tracking helper assigned to conntrack |
| 911 | * @NFT_CT_L3PROTOCOL: conntrack layer 3 protocol | 911 | * @NFT_CT_L3PROTOCOL: conntrack layer 3 protocol |
| 912 | * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address) | 912 | * @NFT_CT_SRC: conntrack layer 3 protocol source (IPv4/IPv6 address, deprecated) |
| 913 | * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address) | 913 | * @NFT_CT_DST: conntrack layer 3 protocol destination (IPv4/IPv6 address, deprecated) |
| 914 | * @NFT_CT_PROTOCOL: conntrack layer 4 protocol | 914 | * @NFT_CT_PROTOCOL: conntrack layer 4 protocol |
| 915 | * @NFT_CT_PROTO_SRC: conntrack layer 4 protocol source | 915 | * @NFT_CT_PROTO_SRC: conntrack layer 4 protocol source |
| 916 | * @NFT_CT_PROTO_DST: conntrack layer 4 protocol destination | 916 | * @NFT_CT_PROTO_DST: conntrack layer 4 protocol destination |
| @@ -920,6 +920,10 @@ enum nft_rt_attributes { · 3 unmodified lines | |||
| 920 | * @NFT_CT_AVGPKT: conntrack average bytes per packet | 920 | * @NFT_CT_AVGPKT: conntrack average bytes per packet |
| 921 | * @NFT_CT_ZONE: conntrack zone | 921 | * @NFT_CT_ZONE: conntrack zone |
| 922 | * @NFT_CT_EVENTMASK: ctnetlink events to be generated for this conntrack | 922 | * @NFT_CT_EVENTMASK: ctnetlink events to be generated for this conntrack |
| 923 | * @NFT_CT_SRC_IP: conntrack layer 3 protocol source (IPv4 address) | ||
| 924 | * @NFT_CT_DST_IP: conntrack layer 3 protocol destination (IPv4 address) | ||
| 925 | * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address) | ||
| 926 | * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address) | ||
| 923 | */ | 927 | */ |
| 924 | enum nft_ct_keys { | 928 | enum nft_ct_keys { |
| 925 | NFT_CT_STATE, | 929 | NFT_CT_STATE, |
| @@ -941,6 +945,10 @@ enum nft_ct_keys { · 15 unmodified lines | |||
| 941 | NFT_CT_AVGPKT, | 945 | NFT_CT_AVGPKT, |
| 942 | NFT_CT_ZONE, | 946 | NFT_CT_ZONE, |
| 943 | NFT_CT_EVENTMASK, | 947 | NFT_CT_EVENTMASK, |
| 948 | NFT_CT_SRC_IP, | ||
| 949 | NFT_CT_DST_IP, | ||
| 950 | NFT_CT_SRC_IP6, | ||
| 951 | NFT_CT_DST_IP6, | ||
| 944 | }; | 952 | }; |
| 945 | 953 | ||
| 946 | /** | 954 | /** |
| @@ -54,6 +54,7 @@ enum ctattr_type { · 53 unmodified lines | |||
| 54 | CTA_MARK_MASK, | 54 | CTA_MARK_MASK, |
| 55 | CTA_LABELS, | 55 | CTA_LABELS, |
| 56 | CTA_LABELS_MASK, | 56 | CTA_LABELS_MASK, |
| 57 | CTA_SYNPROXY, | ||
| 57 | __CTA_MAX | 58 | __CTA_MAX |
| 58 | }; | 59 | }; |
| 59 | #define CTA_MAX (__CTA_MAX - 1) | 60 | #define CTA_MAX (__CTA_MAX - 1) |
| @@ -190,6 +191,15 @@ enum ctattr_natseq { · 130 unmodified lines | |||
| 190 | }; | 191 | }; |
| 191 | #define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1) | 192 | #define CTA_NAT_SEQ_MAX (__CTA_NAT_SEQ_MAX - 1) |
| 192 | 193 | ||
| 194 | enum ctattr_synproxy { | ||
| 195 | CTA_SYNPROXY_UNSPEC, | ||
| 196 | CTA_SYNPROXY_ISN, | ||
| 197 | CTA_SYNPROXY_ITS, | ||
| 198 | CTA_SYNPROXY_TSOFF, | ||
| 199 | __CTA_SYNPROXY_MAX, | ||
| 200 | }; | ||
| 201 | #define CTA_SYNPROXY_MAX (__CTA_SYNPROXY_MAX - 1) | ||
| 202 | |||
| 193 | enum ctattr_expect { | 203 | enum ctattr_expect { |
| 194 | CTA_EXPECT_UNSPEC, | 204 | CTA_EXPECT_UNSPEC, |
| 195 | CTA_EXPECT_MASTER, | 205 | CTA_EXPECT_MASTER, |
| @@ -19,11 +19,21 @@ enum { · 18 unmodified lines | |||
| 19 | XT_CONNMARK_RESTORE | 19 | XT_CONNMARK_RESTORE |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | enum { | ||
| 23 | D_SHIFT_LEFT = 0, | ||
| 24 | D_SHIFT_RIGHT, | ||
| 25 | }; | ||
| 26 | |||
| 22 | struct xt_connmark_tginfo1 { | 27 | struct xt_connmark_tginfo1 { |
| 23 | __u32 ctmark, ctmask, nfmask; | 28 | __u32 ctmark, ctmask, nfmask; |
| 24 | __u8 mode; | 29 | __u8 mode; |
| 25 | }; | 30 | }; |
| 26 | 31 | ||
| 32 | struct xt_connmark_tginfo2 { | ||
| 33 | __u32 ctmark, ctmask, nfmask; | ||
| 34 | __u8 shift_dir, shift_bits, mode; | ||
| 35 | }; | ||
| 36 | |||
| 27 | struct xt_connmark_mtinfo1 { | 37 | struct xt_connmark_mtinfo1 { |
| 28 | __u32 mark, mask; | 38 | __u32 mark, mask; |
| 29 | __u8 invert; | 39 | __u8 invert; |
| @@ -24,8 +24,10 @@ · 23 unmodified lines | |||
| 24 | #define EBT_IP_PROTO 0x08 | 24 | #define EBT_IP_PROTO 0x08 |
| 25 | #define EBT_IP_SPORT 0x10 | 25 | #define EBT_IP_SPORT 0x10 |
| 26 | #define EBT_IP_DPORT 0x20 | 26 | #define EBT_IP_DPORT 0x20 |
| 27 | #define EBT_IP_ICMP 0x40 | ||
| 28 | #define EBT_IP_IGMP 0x80 | ||
| 27 | #define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO |\ | 29 | #define EBT_IP_MASK (EBT_IP_SOURCE | EBT_IP_DEST | EBT_IP_TOS | EBT_IP_PROTO |\ |
| 28 | EBT_IP_SPORT | EBT_IP_DPORT ) | 30 | EBT_IP_SPORT | EBT_IP_DPORT | EBT_IP_ICMP | EBT_IP_IGMP) |
| 29 | #define EBT_IP_MATCH "ip" | 31 | #define EBT_IP_MATCH "ip" |
| 30 | 32 | ||
| 31 | /* the same values are used for the invflags */ | 33 | /* the same values are used for the invflags */ |
| @@ -38,8 +40,15 @@ struct ebt_ip_info { · 6 unmodified lines | |||
| 38 | __u8 protocol; | 40 | __u8 protocol; |
| 39 | __u8 bitmask; | 41 | __u8 bitmask; |
| 40 | __u8 invflags; | 42 | __u8 invflags; |
| 41 | __u16 sport[2]; | 43 | union { |
| 42 | __u16 dport[2]; | 44 | __u16 sport[2]; |
| 45 | __u8 icmp_type[2]; | ||
| 46 | __u8 igmp_type[2]; | ||
| 47 | }; | ||
| 48 | union { | ||
| 49 | __u16 dport[2]; | ||
| 50 | __u8 icmp_code[2]; | ||
| 51 | }; | ||
| 43 | }; | 52 | }; |
| 44 | 53 | ||
| 45 | #endif | 54 | #endif |
| @@ -20,6 +20,7 @@ · 19 unmodified lines | |||
| 20 | #define EBT_TABLE_MAXNAMELEN 32 | 20 | #define EBT_TABLE_MAXNAMELEN 32 |
| 21 | #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN | 21 | #define EBT_CHAIN_MAXNAMELEN EBT_TABLE_MAXNAMELEN |
| 22 | #define EBT_FUNCTION_MAXNAMELEN EBT_TABLE_MAXNAMELEN | 22 | #define EBT_FUNCTION_MAXNAMELEN EBT_TABLE_MAXNAMELEN |
| 23 | #define EBT_EXTENSION_MAXNAMELEN 31 | ||
| 23 | 24 | ||
| 24 | /* verdicts >0 are "branches" */ | 25 | /* verdicts >0 are "branches" */ |
| 25 | #define EBT_ACCEPT -1 | 26 | #define EBT_ACCEPT -1 |
| @@ -120,7 +121,10 @@ struct ebt_entries { · 94 unmodified lines | |||
| 120 | 121 | ||
| 121 | struct ebt_entry_match { | 122 | struct ebt_entry_match { |
| 122 | union { | 123 | union { |
| 123 | char name[EBT_FUNCTION_MAXNAMELEN]; | 124 | struct { |
| 125 | char name[EBT_EXTENSION_MAXNAMELEN]; | ||
| 126 | uint8_t revision; | ||
| 127 | }; | ||
| 124 | struct xt_match *match; | 128 | struct xt_match *match; |
| 125 | } u; | 129 | } u; |
| 126 | /* size of data */ | 130 | /* size of data */ |
| @@ -130,7 +134,10 @@ struct ebt_entry_match { · 3 unmodified lines | |||
| 130 | 134 | ||
| 131 | struct ebt_entry_watcher { | 135 | struct ebt_entry_watcher { |
| 132 | union { | 136 | union { |
| 133 | char name[EBT_FUNCTION_MAXNAMELEN]; | 137 | struct { |
| 138 | char name[EBT_EXTENSION_MAXNAMELEN]; | ||
| 139 | uint8_t revision; | ||
| 140 | }; | ||
| 134 | struct xt_target *watcher; | 141 | struct xt_target *watcher; |
| 135 | } u; | 142 | } u; |
| 136 | /* size of data */ | 143 | /* size of data */ |
| @@ -140,7 +147,10 @@ struct ebt_entry_watcher { · 3 unmodified lines | |||
| 140 | 147 | ||
| 141 | struct ebt_entry_target { | 148 | struct ebt_entry_target { |
| 142 | union { | 149 | union { |
| 143 | char name[EBT_FUNCTION_MAXNAMELEN]; | 150 | struct { |
| 151 | char name[EBT_EXTENSION_MAXNAMELEN]; | ||
| 152 | uint8_t revision; | ||
| 153 | }; | ||
| 144 | struct xt_target *target; | 154 | struct xt_target *target; |
| 145 | } u; | 155 | } u; |
| 146 | /* size of data */ | 156 | /* size of data */ |
| @@ -542,7 +542,8 @@ · 541 unmodified lines | |||
| 542 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP, | 542 | * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP, |
| 543 | * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, | 543 | * %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT, |
| 544 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, | 544 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, |
| 545 | * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, %NL80211_ATTR_MAC_HINT, and | 545 | * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT, |
| 546 | * %NL80211_ATTR_CONTROL_PORT_OVER_NL80211, %NL80211_ATTR_MAC_HINT, and | ||
| 546 | * %NL80211_ATTR_WIPHY_FREQ_HINT. | 547 | * %NL80211_ATTR_WIPHY_FREQ_HINT. |
| 547 | * If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are | 548 | * If included, %NL80211_ATTR_MAC and %NL80211_ATTR_WIPHY_FREQ are |
| 548 | * restrictions on BSS selection, i.e., they effectively prevent roaming | 549 | * restrictions on BSS selection, i.e., they effectively prevent roaming |
| @@ -990,8 +991,45 @@ · 441 unmodified lines | |||
| 990 | * &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed | 991 | * &NL80211_CMD_CONNECT or &NL80211_CMD_ROAM. If the 4 way handshake failed |
| 991 | * &NL80211_CMD_DISCONNECT should be indicated instead. | 992 | * &NL80211_CMD_DISCONNECT should be indicated instead. |
| 992 | * | 993 | * |
| 994 | * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request | ||
| 995 | * and RX notification. This command is used both as a request to transmit | ||
| 996 | * a control port frame and as a notification that a control port frame | ||
| 997 | * has been received. %NL80211_ATTR_FRAME is used to specify the | ||
| 998 | * frame contents. The frame is the raw EAPoL data, without ethernet or | ||
| 999 | * 802.11 headers. | ||
| 1000 | * When used as an event indication %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, | ||
| 1001 | * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT and %NL80211_ATTR_MAC are added | ||
| 1002 | * indicating the protocol type of the received frame; whether the frame | ||
| 1003 | * was received unencrypted and the MAC address of the peer respectively. | ||
| 1004 | * | ||
| 993 | * @NL80211_CMD_RELOAD_REGDB: Request that the regdb firmware file is reloaded. | 1005 | * @NL80211_CMD_RELOAD_REGDB: Request that the regdb firmware file is reloaded. |
| 994 | * | 1006 | * |
| 1007 | * @NL80211_CMD_EXTERNAL_AUTH: This interface is exclusively defined for host | ||
| 1008 | * drivers that do not define separate commands for authentication and | ||
| 1009 | * association, but rely on user space for the authentication to happen. | ||
| 1010 | * This interface acts both as the event request (driver to user space) | ||
| 1011 | * to trigger the authentication and command response (userspace to | ||
| 1012 | * driver) to indicate the authentication status. | ||
| 1013 | * | ||
| 1014 | * User space uses the %NL80211_CMD_CONNECT command to the host driver to | ||
| 1015 | * trigger a connection. The host driver selects a BSS and further uses | ||
| 1016 | * this interface to offload only the authentication part to the user | ||
| 1017 | * space. Authentication frames are passed between the driver and user | ||
| 1018 | * space through the %NL80211_CMD_FRAME interface. Host driver proceeds | ||
| 1019 | * further with the association after getting successful authentication | ||
| 1020 | * status. User space indicates the authentication status through | ||
| 1021 | * %NL80211_ATTR_STATUS_CODE attribute in %NL80211_CMD_EXTERNAL_AUTH | ||
| 1022 | * command interface. | ||
| 1023 | * | ||
| 1024 | * Host driver reports this status on an authentication failure to the | ||
| 1025 | * user space through the connect result as the user space would have | ||
| 1026 | * initiated the connection through the connect request. | ||
| 1027 | * | ||
| 1028 | * @NL80211_CMD_STA_OPMODE_CHANGED: An event that notify station's | ||
| 1029 | * ht opmode or vht opmode changes using any of &NL80211_ATTR_SMPS_MODE, | ||
| 1030 | * &NL80211_ATTR_CHANNEL_WIDTH,&NL80211_ATTR_NSS attributes with its | ||
| 1031 | * address(specified in &NL80211_ATTR_MAC). | ||
| 1032 | * | ||
| 995 | * @NL80211_CMD_MAX: highest used command number | 1033 | * @NL80211_CMD_MAX: highest used command number |
| 996 | * @__NL80211_CMD_AFTER_LAST: internal use | 1034 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 997 | */ | 1035 | */ |
| @@ -1198,6 +1236,12 @@ enum nl80211_commands { · 200 unmodified lines | |||
| 1198 | 1236 | ||
| 1199 | NL80211_CMD_RELOAD_REGDB, | 1237 | NL80211_CMD_RELOAD_REGDB, |
| 1200 | 1238 | ||
| 1239 | NL80211_CMD_EXTERNAL_AUTH, | ||
| 1240 | |||
| 1241 | NL80211_CMD_STA_OPMODE_CHANGED, | ||
| 1242 | |||
| 1243 | NL80211_CMD_CONTROL_PORT_FRAME, | ||
| 1244 | |||
| 1201 | /* add new commands above here */ | 1245 | /* add new commands above here */ |
| 1202 | 1246 | ||
| 1203 | /* used to define NL80211_CMD_MAX below */ | 1247 | /* used to define NL80211_CMD_MAX below */ |
| @@ -1445,6 +1489,15 @@ enum nl80211_commands { · 241 unmodified lines | |||
| 1445 | * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with | 1489 | * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with |
| 1446 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom | 1490 | * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom |
| 1447 | * ethertype frames used for key negotiation must not be encrypted. | 1491 | * ethertype frames used for key negotiation must not be encrypted. |
| 1492 | * @NL80211_ATTR_CONTROL_PORT_OVER_NL80211: A flag indicating whether control | ||
| 1493 | * port frames (e.g. of type given in %NL80211_ATTR_CONTROL_PORT_ETHERTYPE) | ||
| 1494 | * will be sent directly to the network interface or sent via the NL80211 | ||
| 1495 | * socket. If this attribute is missing, then legacy behavior of sending | ||
| 1496 | * control port frames directly to the network interface is used. If the | ||
| 1497 | * flag is included, then control port frames are sent over NL80211 instead | ||
| 1498 | * using %CMD_CONTROL_PORT_FRAME. If control port routing over NL80211 is | ||
| 1499 | * to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER | ||
| 1500 | * flag. | ||
| 1448 | * | 1501 | * |
| 1449 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. | 1502 | * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver. |
| 1450 | * We recommend using nested, driver-specific attributes within this. | 1503 | * We recommend using nested, driver-specific attributes within this. |
| @@ -1932,6 +1985,12 @@ enum nl80211_commands { · 481 unmodified lines | |||
| 1932 | * multicast group. | 1985 | * multicast group. |
| 1933 | * If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the | 1986 | * If set during %NL80211_CMD_ASSOCIATE or %NL80211_CMD_CONNECT the |
| 1934 | * station will deauthenticate when the socket is closed. | 1987 | * station will deauthenticate when the socket is closed. |
| 1988 | * If set during %NL80211_CMD_JOIN_IBSS the IBSS will be automatically | ||
| 1989 | * torn down when the socket is closed. | ||
| 1990 | * If set during %NL80211_CMD_JOIN_MESH the mesh setup will be | ||
| 1991 | * automatically torn down when the socket is closed. | ||
| 1992 | * If set during %NL80211_CMD_START_AP the AP will be automatically | ||
| 1993 | * disabled when the socket is closed. | ||
| 1935 | * | 1994 | * |
| 1936 | * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is | 1995 | * @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is |
| 1937 | * the TDLS link initiator. | 1996 | * the TDLS link initiator. |
| @@ -2153,6 +2212,19 @@ enum nl80211_commands { · 215 unmodified lines | |||
| 2153 | * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT. | 2212 | * @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT. |
| 2154 | * @NL80211_ATTR_PORT_AUTHORIZED: (reserved) | 2213 | * @NL80211_ATTR_PORT_AUTHORIZED: (reserved) |
| 2155 | * | 2214 | * |
| 2215 | * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external | ||
| 2216 | * authentication operation (u32 attribute with an | ||
| 2217 | * &enum nl80211_external_auth_action value). This is used with the | ||
| 2218 | * &NL80211_CMD_EXTERNAL_AUTH request event. | ||
| 2219 | * @NL80211_ATTR_EXTERNAL_AUTH_SUPPORT: Flag attribute indicating that the user | ||
| 2220 | * space supports external authentication. This attribute shall be used | ||
| 2221 | * only with %NL80211_CMD_CONNECT request. The driver may offload | ||
| 2222 | * authentication processing to user space if this capability is indicated | ||
| 2223 | * in NL80211_CMD_CONNECT requests from the user space. | ||
| 2224 | * | ||
| 2225 | * @NL80211_ATTR_NSS: Station's New/updated RX_NSS value notified using this | ||
| 2226 | * u8 attribute. This is used with %NL80211_CMD_STA_OPMODE_CHANGED. | ||
| 2227 | * | ||
| 2156 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available | 2228 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2157 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 2229 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2158 | * @__NL80211_ATTR_AFTER_LAST: internal use | 2230 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -2579,6 +2651,14 @@ enum nl80211_attrs { · 420 unmodified lines | |||
| 2579 | NL80211_ATTR_PMKR0_NAME, | 2651 | NL80211_ATTR_PMKR0_NAME, |
| 2580 | NL80211_ATTR_PORT_AUTHORIZED, | 2652 | NL80211_ATTR_PORT_AUTHORIZED, |
| 2581 | 2653 | ||
| 2654 | NL80211_ATTR_EXTERNAL_AUTH_ACTION, | ||
| 2655 | NL80211_ATTR_EXTERNAL_AUTH_SUPPORT, | ||
| 2656 | |||
| 2657 | NL80211_ATTR_NSS, | ||
| 2658 | NL80211_ATTR_ACK_SIGNAL, | ||
| 2659 | |||
| 2660 | NL80211_ATTR_CONTROL_PORT_OVER_NL80211, | ||
| 2661 | |||
| 2582 | /* add attributes here, update the policy in nl80211.c */ | 2662 | /* add attributes here, update the policy in nl80211.c */ |
| 2583 | 2663 | ||
| 2584 | __NL80211_ATTR_AFTER_LAST, | 2664 | __NL80211_ATTR_AFTER_LAST, |
| @@ -2899,6 +2979,7 @@ enum nl80211_sta_bss_param { · 314 unmodified lines | |||
| 2899 | * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames | 2979 | * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames |
| 2900 | * received from the station (u64, usec) | 2980 | * received from the station (u64, usec) |
| 2901 | * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment | 2981 | * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment |
| 2982 | * @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm) | ||
| 2902 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 2983 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 2903 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 2984 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
| 2904 | */ | 2985 | */ |
| @@ -2937,6 +3018,7 @@ enum nl80211_sta_info { · 32 unmodified lines | |||
| 2937 | NL80211_STA_INFO_TID_STATS, | 3018 | NL80211_STA_INFO_TID_STATS, |
| 2938 | NL80211_STA_INFO_RX_DURATION, | 3019 | NL80211_STA_INFO_RX_DURATION, |
| 2939 | NL80211_STA_INFO_PAD, | 3020 | NL80211_STA_INFO_PAD, |
| 3021 | NL80211_STA_INFO_ACK_SIGNAL, | ||
| 2940 | 3022 | ||
| 2941 | /* keep last */ | 3023 | /* keep last */ |
| 2942 | __NL80211_STA_INFO_AFTER_LAST, | 3024 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -4945,6 +5027,17 @@ enum nl80211_feature_flags { · 2002 unmodified lines | |||
| 4945 | * probe request tx deferral and suppression | 5027 | * probe request tx deferral and suppression |
| 4946 | * @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL | 5028 | * @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL |
| 4947 | * value in %NL80211_ATTR_USE_MFP. | 5029 | * value in %NL80211_ATTR_USE_MFP. |
| 5030 | * @NL80211_EXT_FEATURE_LOW_SPAN_SCAN: Driver supports low span scan. | ||
| 5031 | * @NL80211_EXT_FEATURE_LOW_POWER_SCAN: Driver supports low power scan. | ||
| 5032 | * @NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN: Driver supports high accuracy scan. | ||
| 5033 | * @NL80211_EXT_FEATURE_DFS_OFFLOAD: HW/driver will offload DFS actions. | ||
| 5034 | * Device or driver will do all DFS-related actions by itself, | ||
| 5035 | * informing user-space about CAC progress, radar detection event, | ||
| 5036 | * channel change triggered by radar detection event. | ||
| 5037 | * No need to start CAC from user-space, no need to react to | ||
| 5038 | * "radar detected" event. | ||
| 5039 | * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and | ||
| 5040 | * receiving control port frames over nl80211 instead of the netdevice. | ||
| 4948 | * | 5041 | * |
| 4949 | * @NUM_NL80211_EXT_FEATURES: number of extended features. | 5042 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 4950 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. | 5043 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| @@ -4972,6 +5065,11 @@ enum nl80211_ext_feature_index { · 21 unmodified lines | |||
| 4972 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE, | 5065 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE, |
| 4973 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION, | 5066 | NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION, |
| 4974 | NL80211_EXT_FEATURE_MFP_OPTIONAL, | 5067 | NL80211_EXT_FEATURE_MFP_OPTIONAL, |
| 5068 | NL80211_EXT_FEATURE_LOW_SPAN_SCAN, | ||
| 5069 | NL80211_EXT_FEATURE_LOW_POWER_SCAN, | ||
| 5070 | NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN, | ||
| 5071 | NL80211_EXT_FEATURE_DFS_OFFLOAD, | ||
| 5072 | NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211, | ||
| 4975 | 5073 | ||
| 4976 | /* add new features before the definition below */ | 5074 | /* add new features before the definition below */ |
| 4977 | NUM_NL80211_EXT_FEATURES, | 5075 | NUM_NL80211_EXT_FEATURES, |
| @@ -5032,6 +5130,10 @@ enum nl80211_timeout_reason { · 54 unmodified lines | |||
| 5032 | * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN | 5130 | * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN |
| 5033 | * requests. | 5131 | * requests. |
| 5034 | * | 5132 | * |
| 5133 | * NL80211_SCAN_FLAG_LOW_SPAN, NL80211_SCAN_FLAG_LOW_POWER, and | ||
| 5134 | * NL80211_SCAN_FLAG_HIGH_ACCURACY flags are exclusive of each other, i.e., only | ||
| 5135 | * one of them can be used in the request. | ||
| 5136 | * | ||
| 5035 | * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority | 5137 | * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority |
| 5036 | * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning | 5138 | * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning |
| 5037 | * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured | 5139 | * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured |
| @@ -5059,7 +5161,20 @@ enum nl80211_timeout_reason { · 21 unmodified lines | |||
| 5059 | * and suppression (if it has received a broadcast Probe Response frame, | 5161 | * and suppression (if it has received a broadcast Probe Response frame, |
| 5060 | * Beacon frame or FILS Discovery frame from an AP that the STA considers | 5162 | * Beacon frame or FILS Discovery frame from an AP that the STA considers |
| 5061 | * a suitable candidate for (re-)association - suitable in terms of | 5163 | * a suitable candidate for (re-)association - suitable in terms of |
| 5062 | * SSID and/or RSSI | 5164 | * SSID and/or RSSI. |
| 5165 | * @NL80211_SCAN_FLAG_LOW_SPAN: Span corresponds to the total time taken to | ||
| 5166 | * accomplish the scan. Thus, this flag intends the driver to perform the | ||
| 5167 | * scan request with lesser span/duration. It is specific to the driver | ||
| 5168 | * implementations on how this is accomplished. Scan accuracy may get | ||
| 5169 | * impacted with this flag. | ||
| 5170 | * @NL80211_SCAN_FLAG_LOW_POWER: This flag intends the scan attempts to consume | ||
| 5171 | * optimal possible power. Drivers can resort to their specific means to | ||
| 5172 | * optimize the power. Scan accuracy may get impacted with this flag. | ||
| 5173 | * @NL80211_SCAN_FLAG_HIGH_ACCURACY: Accuracy here intends to the extent of scan | ||
| 5174 | * results obtained. Thus HIGH_ACCURACY scan flag aims to get maximum | ||
| 5175 | * possible scan results. This flag hints the driver to use the best | ||
| 5176 | * possible scan configuration to improve the accuracy in scanning. | ||
| 5177 | * Latency and power use may get impacted with this flag. | ||
| 5063 | */ | 5178 | */ |
| 5064 | enum nl80211_scan_flags { | 5179 | enum nl80211_scan_flags { |
| 5065 | NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, | 5180 | NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0, |
| @@ -5070,6 +5185,9 @@ enum nl80211_scan_flags { · 4 unmodified lines | |||
| 5070 | NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 1<<5, | 5185 | NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 1<<5, |
| 5071 | NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 1<<6, | 5186 | NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 1<<6, |
| 5072 | NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 1<<7, | 5187 | NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 1<<7, |
| 5188 | NL80211_SCAN_FLAG_LOW_SPAN = 1<<8, | ||
| 5189 | NL80211_SCAN_FLAG_LOW_POWER = 1<<9, | ||
| 5190 | NL80211_SCAN_FLAG_HIGH_ACCURACY = 1<<10, | ||
| 5073 | }; | 5191 | }; |
| 5074 | 5192 | ||
| 5075 | /** | 5193 | /** |
| @@ -5127,6 +5245,8 @@ enum nl80211_smps_mode { · 51 unmodified lines | |||
| 5127 | * non-operating channel is expired and no longer valid. New CAC must | 5245 | * non-operating channel is expired and no longer valid. New CAC must |
| 5128 | * be done on this channel before starting the operation. This is not | 5246 | * be done on this channel before starting the operation. This is not |
| 5129 | * applicable for ETSI dfs domain where pre-CAC is valid for ever. | 5247 | * applicable for ETSI dfs domain where pre-CAC is valid for ever. |
| 5248 | * @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started, | ||
| 5249 | * should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled. | ||
| 5130 | */ | 5250 | */ |
| 5131 | enum nl80211_radar_event { | 5251 | enum nl80211_radar_event { |
| 5132 | NL80211_RADAR_DETECTED, | 5252 | NL80211_RADAR_DETECTED, |
| @@ -5134,6 +5254,7 @@ enum nl80211_radar_event { · 1 unmodified line | |||
| 5134 | NL80211_RADAR_CAC_ABORTED, | 5254 | NL80211_RADAR_CAC_ABORTED, |
| 5135 | NL80211_RADAR_NOP_FINISHED, | 5255 | NL80211_RADAR_NOP_FINISHED, |
| 5136 | NL80211_RADAR_PRE_CAC_EXPIRED, | 5256 | NL80211_RADAR_PRE_CAC_EXPIRED, |
| 5257 | NL80211_RADAR_CAC_STARTED, | ||
| 5137 | }; | 5258 | }; |
| 5138 | 5259 | ||
| 5139 | /** | 5260 | /** |
| @@ -5469,4 +5590,15 @@ enum nl80211_nan_match_attributes { · 329 unmodified lines | |||
| 5469 | NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1 | 5590 | NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1 |
| 5470 | }; | 5591 | }; |
| 5471 | 5592 | ||
| 5593 | /** | ||
| 5594 | * nl80211_external_auth_action - Action to perform with external | ||
| 5595 | * authentication request. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION. | ||
| 5596 | * @NL80211_EXTERNAL_AUTH_START: Start the authentication. | ||
| 5597 | * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication. | ||
| 5598 | */ | ||
| 5599 | enum nl80211_external_auth_action { | ||
| 5600 | NL80211_EXTERNAL_AUTH_START, | ||
| 5601 | NL80211_EXTERNAL_AUTH_ABORT, | ||
| 5602 | }; | ||
| 5603 | |||
| 5472 | #endif /* __LINUX_NL80211_H */ | 5604 | #endif /* __LINUX_NL80211_H */ |
| @@ -520,6 +520,7 @@ · 519 unmodified lines | |||
| 520 | #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ | 520 | #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ |
| 521 | #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ | 521 | #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ |
| 522 | #define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */ | 522 | #define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */ |
| 523 | #define PCI_EXP_LNKCAP_SLS_16_0GB 0x00000004 /* LNKCAP2 SLS Vector bit 3 */ | ||
| 523 | #define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */ | 524 | #define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */ |
| 524 | #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ | 525 | #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ |
| 525 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ | 526 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ |
| @@ -547,6 +548,7 @@ · 21 unmodified lines | |||
| 547 | #define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ | 548 | #define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ |
| 548 | #define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ | 549 | #define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ |
| 549 | #define PCI_EXP_LNKSTA_CLS_8_0GB 0x0003 /* Current Link Speed 8.0GT/s */ | 550 | #define PCI_EXP_LNKSTA_CLS_8_0GB 0x0003 /* Current Link Speed 8.0GT/s */ |
| 551 | #define PCI_EXP_LNKSTA_CLS_16_0GB 0x0004 /* Current Link Speed 16.0GT/s */ | ||
| 550 | #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */ | 552 | #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */ |
| 551 | #define PCI_EXP_LNKSTA_NLW_X1 0x0010 /* Current Link Width x1 */ | 553 | #define PCI_EXP_LNKSTA_NLW_X1 0x0010 /* Current Link Width x1 */ |
| 552 | #define PCI_EXP_LNKSTA_NLW_X2 0x0020 /* Current Link Width x2 */ | 554 | #define PCI_EXP_LNKSTA_NLW_X2 0x0020 /* Current Link Width x2 */ |
| @@ -648,8 +650,9 @@ · 95 unmodified lines | |||
| 648 | #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints without link end here */ | 650 | #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints without link end here */ |
| 649 | #define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */ | 651 | #define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */ |
| 650 | #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ | 652 | #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ |
| 651 | #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5.0GT/s */ | 653 | #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5GT/s */ |
| 652 | #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008 /* Supported Speed 8.0GT/s */ | 654 | #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008 /* Supported Speed 8GT/s */ |
| 655 | #define PCI_EXP_LNKCAP2_SLS_16_0GB 0x00000010 /* Supported Speed 16GT/s */ | ||
| 653 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ | 656 | #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ |
| 654 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ | 657 | #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ |
| 655 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ | 658 | #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ |
| @@ -380,10 +380,14 @@ struct perf_event_attr { · 379 unmodified lines | |||
| 380 | __u32 bp_type; | 380 | __u32 bp_type; |
| 381 | union { | 381 | union { |
| 382 | __u64 bp_addr; | 382 | __u64 bp_addr; |
| 383 | __u64 kprobe_func; /* for perf_kprobe */ | ||
| 384 | __u64 uprobe_path; /* for perf_uprobe */ | ||
| 383 | __u64 config1; /* extension of config */ | 385 | __u64 config1; /* extension of config */ |
| 384 | }; | 386 | }; |
| 385 | union { | 387 | union { |
| 386 | __u64 bp_len; | 388 | __u64 bp_len; |
| 389 | __u64 kprobe_addr; /* when kprobe_func == NULL */ | ||
| 390 | __u64 probe_offset; /* for perf_[k,u]probe */ | ||
| 387 | __u64 config2; /* extension of config1 */ | 391 | __u64 config2; /* extension of config1 */ |
| 388 | }; | 392 | }; |
| 389 | __u64 branch_sample_type; /* enum perf_branch_sample_type */ | 393 | __u64 branch_sample_type; /* enum perf_branch_sample_type */ |
| @@ -444,17 +448,18 @@ struct perf_event_query_bpf { · 54 unmodified lines | |||
| 444 | /* | 448 | /* |
| 445 | * Ioctls that can be done on a perf event fd: | 449 | * Ioctls that can be done on a perf event fd: |
| 446 | */ | 450 | */ |
| 447 | #define PERF_EVENT_IOC_ENABLE _IO ('$', 0) | 451 | #define PERF_EVENT_IOC_ENABLE _IO ('$', 0) |
| 448 | #define PERF_EVENT_IOC_DISABLE _IO ('$', 1) | 452 | #define PERF_EVENT_IOC_DISABLE _IO ('$', 1) |
| 449 | #define PERF_EVENT_IOC_REFRESH _IO ('$', 2) | 453 | #define PERF_EVENT_IOC_REFRESH _IO ('$', 2) |
| 450 | #define PERF_EVENT_IOC_RESET _IO ('$', 3) | 454 | #define PERF_EVENT_IOC_RESET _IO ('$', 3) |
| 451 | #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64) | 455 | #define PERF_EVENT_IOC_PERIOD _IOW('$', 4, __u64) |
| 452 | #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) | 456 | #define PERF_EVENT_IOC_SET_OUTPUT _IO ('$', 5) |
| 453 | #define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) | 457 | #define PERF_EVENT_IOC_SET_FILTER _IOW('$', 6, char *) |
| 454 | #define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *) | 458 | #define PERF_EVENT_IOC_ID _IOR('$', 7, __u64 *) |
| 455 | #define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32) | 459 | #define PERF_EVENT_IOC_SET_BPF _IOW('$', 8, __u32) |
| 456 | #define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32) | 460 | #define PERF_EVENT_IOC_PAUSE_OUTPUT _IOW('$', 9, __u32) |
| 457 | #define PERF_EVENT_IOC_QUERY_BPF _IOWR('$', 10, struct perf_event_query_bpf *) | 461 | #define PERF_EVENT_IOC_QUERY_BPF _IOWR('$', 10, struct perf_event_query_bpf *) |
| 462 | #define PERF_EVENT_IOC_MODIFY_ATTRIBUTES _IOW('$', 11, struct perf_event_attr *) | ||
| 458 | 463 | ||
| 459 | enum perf_event_ioc_flags { | 464 | enum perf_event_ioc_flags { |
| 460 | PERF_IOC_FLAG_GROUP = 1U << 0, | 465 | PERF_IOC_FLAG_GROUP = 1U << 0, |
| @@ -645,11 +650,23 @@ struct perf_event_mmap_page { · 184 unmodified lines | |||
| 645 | #define PERF_RECORD_MISC_COMM_EXEC (1 << 13) | 650 | #define PERF_RECORD_MISC_COMM_EXEC (1 << 13) |
| 646 | #define PERF_RECORD_MISC_SWITCH_OUT (1 << 13) | 651 | #define PERF_RECORD_MISC_SWITCH_OUT (1 << 13) |
| 647 | /* | 652 | /* |
| 648 | * Indicates that the content of PERF_SAMPLE_IP points to | 653 | * These PERF_RECORD_MISC_* flags below are safely reused |
| 649 | * the actual instruction that triggered the event. See also | 654 | * for the following events: |
| 650 | * perf_event_attr::precise_ip. | 655 | * |
| 656 | * PERF_RECORD_MISC_EXACT_IP - PERF_RECORD_SAMPLE of precise events | ||
| 657 | * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT - PERF_RECORD_SWITCH* events | ||
| 658 | * | ||
| 659 | * | ||
| 660 | * PERF_RECORD_MISC_EXACT_IP: | ||
| 661 | * Indicates that the content of PERF_SAMPLE_IP points to | ||
| 662 | * the actual instruction that triggered the event. See also | ||
| 663 | * perf_event_attr::precise_ip. | ||
| 664 | * | ||
| 665 | * PERF_RECORD_MISC_SWITCH_OUT_PREEMPT: | ||
| 666 | * Indicates that thread was preempted in TASK_RUNNING state. | ||
| 651 | */ | 667 | */ |
| 652 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) | 668 | #define PERF_RECORD_MISC_EXACT_IP (1 << 14) |
| 669 | #define PERF_RECORD_MISC_SWITCH_OUT_PREEMPT (1 << 14) | ||
| 653 | /* | 670 | /* |
| 654 | * Reserve the last bit to indicate some extended misc field | 671 | * Reserve the last bit to indicate some extended misc field |
| 655 | */ | 672 | */ |
| @@ -475,6 +475,7 @@ enum { · 474 unmodified lines | |||
| 475 | 475 | ||
| 476 | enum { | 476 | enum { |
| 477 | TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0), | 477 | TCA_FLOWER_KEY_FLAGS_IS_FRAGMENT = (1 << 0), |
| 478 | TCA_FLOWER_KEY_FLAGS_FRAG_IS_FIRST = (1 << 1), | ||
| 478 | }; | 479 | }; |
| 479 | 480 | ||
| 480 | /* Match-all classifier */ | 481 | /* Match-all classifier */ |
| @@ -555,7 +556,8 @@ enum { · 74 unmodified lines | |||
| 555 | #define TCF_EM_VLAN 6 | 556 | #define TCF_EM_VLAN 6 |
| 556 | #define TCF_EM_CANID 7 | 557 | #define TCF_EM_CANID 7 |
| 557 | #define TCF_EM_IPSET 8 | 558 | #define TCF_EM_IPSET 8 |
| 558 | #define TCF_EM_MAX 8 | 559 | #define TCF_EM_IPT 9 |
| 560 | #define TCF_EM_MAX 9 | ||
| 559 | 561 | ||
| 560 | enum { | 562 | enum { |
| 561 | TCF_EM_PROG_TC | 563 | TCF_EM_PROG_TC |
| @@ -0,0 +1,97 @@ | |||
| 1 | /* SPDX-License-Identifier: BSD-3-Clause */ | ||
| 2 | #ifndef _LINUX_FW_CFG_H | ||
| 3 | #define _LINUX_FW_CFG_H | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | |||
| 7 | #define FW_CFG_ACPI_DEVICE_ID "QEMU0002" | ||
| 8 | |||
| 9 | /* selector key values for "well-known" fw_cfg entries */ | ||
| 10 | #define FW_CFG_SIGNATURE 0x00 | ||
| 11 | #define FW_CFG_ID 0x01 | ||
| 12 | #define FW_CFG_UUID 0x02 | ||
| 13 | #define FW_CFG_RAM_SIZE 0x03 | ||
| 14 | #define FW_CFG_NOGRAPHIC 0x04 | ||
| 15 | #define FW_CFG_NB_CPUS 0x05 | ||
| 16 | #define FW_CFG_MACHINE_ID 0x06 | ||
| 17 | #define FW_CFG_KERNEL_ADDR 0x07 | ||
| 18 | #define FW_CFG_KERNEL_SIZE 0x08 | ||
| 19 | #define FW_CFG_KERNEL_CMDLINE 0x09 | ||
| 20 | #define FW_CFG_INITRD_ADDR 0x0a | ||
| 21 | #define FW_CFG_INITRD_SIZE 0x0b | ||
| 22 | #define FW_CFG_BOOT_DEVICE 0x0c | ||
| 23 | #define FW_CFG_NUMA 0x0d | ||
| 24 | #define FW_CFG_BOOT_MENU 0x0e | ||
| 25 | #define FW_CFG_MAX_CPUS 0x0f | ||
| 26 | #define FW_CFG_KERNEL_ENTRY 0x10 | ||
| 27 | #define FW_CFG_KERNEL_DATA 0x11 | ||
| 28 | #define FW_CFG_INITRD_DATA 0x12 | ||
| 29 | #define FW_CFG_CMDLINE_ADDR 0x13 | ||
| 30 | #define FW_CFG_CMDLINE_SIZE 0x14 | ||
| 31 | #define FW_CFG_CMDLINE_DATA 0x15 | ||
| 32 | #define FW_CFG_SETUP_ADDR 0x16 | ||
| 33 | #define FW_CFG_SETUP_SIZE 0x17 | ||
| 34 | #define FW_CFG_SETUP_DATA 0x18 | ||
| 35 | #define FW_CFG_FILE_DIR 0x19 | ||
| 36 | |||
| 37 | #define FW_CFG_FILE_FIRST 0x20 | ||
| 38 | #define FW_CFG_FILE_SLOTS_MIN 0x10 | ||
| 39 | |||
| 40 | #define FW_CFG_WRITE_CHANNEL 0x4000 | ||
| 41 | #define FW_CFG_ARCH_LOCAL 0x8000 | ||
| 42 | #define FW_CFG_ENTRY_MASK (~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL)) | ||
| 43 | |||
| 44 | #define FW_CFG_INVALID 0xffff | ||
| 45 | |||
| 46 | /* width in bytes of fw_cfg control register */ | ||
| 47 | #define FW_CFG_CTL_SIZE 0x02 | ||
| 48 | |||
| 49 | /* fw_cfg "file name" is up to 56 characters (including terminating nul) */ | ||
| 50 | #define FW_CFG_MAX_FILE_PATH 56 | ||
| 51 | |||
| 52 | /* size in bytes of fw_cfg signature */ | ||
| 53 | #define FW_CFG_SIG_SIZE 4 | ||
| 54 | |||
| 55 | /* FW_CFG_ID bits */ | ||
| 56 | #define FW_CFG_VERSION 0x01 | ||
| 57 | #define FW_CFG_VERSION_DMA 0x02 | ||
| 58 | |||
| 59 | /* fw_cfg file directory entry type */ | ||
| 60 | struct fw_cfg_file { | ||
| 61 | __be32 size; | ||
| 62 | __be16 select; | ||
| 63 | __u16 reserved; | ||
| 64 | char name[FW_CFG_MAX_FILE_PATH]; | ||
| 65 | }; | ||
| 66 | |||
| 67 | /* FW_CFG_DMA_CONTROL bits */ | ||
| 68 | #define FW_CFG_DMA_CTL_ERROR 0x01 | ||
| 69 | #define FW_CFG_DMA_CTL_READ 0x02 | ||
| 70 | #define FW_CFG_DMA_CTL_SKIP 0x04 | ||
| 71 | #define FW_CFG_DMA_CTL_SELECT 0x08 | ||
| 72 | #define FW_CFG_DMA_CTL_WRITE 0x10 | ||
| 73 | |||
| 74 | #define FW_CFG_DMA_SIGNATURE 0x51454d5520434647ULL /* "QEMU CFG" */ | ||
| 75 | |||
| 76 | /* Control as first field allows for different structures selected by this | ||
| 77 | * field, which might be useful in the future | ||
| 78 | */ | ||
| 79 | struct fw_cfg_dma_access { | ||
| 80 | __be32 control; | ||
| 81 | __be32 length; | ||
| 82 | __be64 address; | ||
| 83 | }; | ||
| 84 | |||
| 85 | #define FW_CFG_VMCOREINFO_FILENAME "etc/vmcoreinfo" | ||
| 86 | |||
| 87 | #define FW_CFG_VMCOREINFO_FORMAT_NONE 0x0 | ||
| 88 | #define FW_CFG_VMCOREINFO_FORMAT_ELF 0x1 | ||
| 89 | |||
| 90 | struct fw_cfg_vmcoreinfo { | ||
| 91 | __le16 host_format; | ||
| 92 | __le16 guest_format; | ||
| 93 | __le32 size; | ||
| 94 | __le64 paddr; | ||
| 95 | }; | ||
| 96 | |||
| 97 | #endif | ||
| @@ -35,6 +35,9 @@ · 34 unmodified lines | |||
| 35 | /* Clear the entropy pool and associated counters. (Superuser only.) */ | 35 | /* Clear the entropy pool and associated counters. (Superuser only.) */ |
| 36 | #define RNDCLEARPOOL _IO( 'R', 0x06 ) | 36 | #define RNDCLEARPOOL _IO( 'R', 0x06 ) |
| 37 | 37 | ||
| 38 | /* Reseed CRNG. (Superuser only.) */ | ||
| 39 | #define RNDRESEEDCRNG _IO( 'R', 0x07 ) | ||
| 40 | |||
| 38 | struct rand_pool_info { | 41 | struct rand_pool_info { |
| 39 | int entropy_count; | 42 | int entropy_count; |
| 40 | int buf_size; | 43 | int buf_size; |
| @@ -103,6 +103,8 @@ · 102 unmodified lines | |||
| 103 | #define RDS_CMSG_MASKED_ATOMIC_FADD 8 | 103 | #define RDS_CMSG_MASKED_ATOMIC_FADD 8 |
| 104 | #define RDS_CMSG_MASKED_ATOMIC_CSWP 9 | 104 | #define RDS_CMSG_MASKED_ATOMIC_CSWP 9 |
| 105 | #define RDS_CMSG_RXPATH_LATENCY 11 | 105 | #define RDS_CMSG_RXPATH_LATENCY 11 |
| 106 | #define RDS_CMSG_ZCOPY_COOKIE 12 | ||
| 107 | #define RDS_CMSG_ZCOPY_COMPLETION 13 | ||
| 106 | 108 | ||
| 107 | #define RDS_INFO_FIRST 10000 | 109 | #define RDS_INFO_FIRST 10000 |
| 108 | #define RDS_INFO_COUNTERS 10000 | 110 | #define RDS_INFO_COUNTERS 10000 |
| @@ -316,6 +318,12 @@ struct rds_rdma_notify { · 207 unmodified lines | |||
| 316 | #define RDS_RDMA_DROPPED 3 | 318 | #define RDS_RDMA_DROPPED 3 |
| 317 | #define RDS_RDMA_OTHER_ERROR 4 | 319 | #define RDS_RDMA_OTHER_ERROR 4 |
| 318 | 320 | ||
| 321 | #define RDS_MAX_ZCOOKIES 8 | ||
| 322 | struct rds_zcopy_cookies { | ||
| 323 | __u32 num; | ||
| 324 | __u32 cookies[RDS_MAX_ZCOOKIES]; | ||
| 325 | }; | ||
| 326 | |||
| 319 | /* | 327 | /* |
| 320 | * Common set of flags for all RDMA related structs | 328 | * Common set of flags for all RDMA related structs |
| 321 | */ | 329 | */ |
| @@ -99,6 +99,7 @@ typedef __s32 sctp_assoc_t; · 98 unmodified lines | |||
| 99 | #define SCTP_RECVRCVINFO 32 | 99 | #define SCTP_RECVRCVINFO 32 |
| 100 | #define SCTP_RECVNXTINFO 33 | 100 | #define SCTP_RECVNXTINFO 33 |
| 101 | #define SCTP_DEFAULT_SNDINFO 34 | 101 | #define SCTP_DEFAULT_SNDINFO 34 |
| 102 | #define SCTP_AUTH_DEACTIVATE_KEY 35 | ||
| 102 | 103 | ||
| 103 | /* Internal Socket Options. Some of the sctp library functions are | 104 | /* Internal Socket Options. Some of the sctp library functions are |
| 104 | * implemented using these socket options. | 105 | * implemented using these socket options. |
| @@ -126,6 +127,7 @@ typedef __s32 sctp_assoc_t; · 21 unmodified lines | |||
| 126 | #define SCTP_STREAM_SCHEDULER 123 | 127 | #define SCTP_STREAM_SCHEDULER 123 |
| 127 | #define SCTP_STREAM_SCHEDULER_VALUE 124 | 128 | #define SCTP_STREAM_SCHEDULER_VALUE 124 |
| 128 | #define SCTP_INTERLEAVING_SUPPORTED 125 | 129 | #define SCTP_INTERLEAVING_SUPPORTED 125 |
| 130 | #define SCTP_SENDMSG_CONNECT 126 | ||
| 129 | 131 | ||
| 130 | /* PR-SCTP policies */ | 132 | /* PR-SCTP policies */ |
| 131 | #define SCTP_PR_SCTP_NONE 0x0000 | 133 | #define SCTP_PR_SCTP_NONE 0x0000 |
| @@ -260,6 +262,31 @@ struct sctp_nxtinfo { · 128 unmodified lines | |||
| 260 | sctp_assoc_t nxt_assoc_id; | 262 | sctp_assoc_t nxt_assoc_id; |
| 261 | }; | 263 | }; |
| 262 | 264 | ||
| 265 | /* 5.3.7 SCTP PR-SCTP Information Structure (SCTP_PRINFO) | ||
| 266 | * | ||
| 267 | * This cmsghdr structure specifies SCTP options for sendmsg(). | ||
| 268 | * | ||
| 269 | * cmsg_level cmsg_type cmsg_data[] | ||
| 270 | * ------------ ------------ ------------------- | ||
| 271 | * IPPROTO_SCTP SCTP_PRINFO struct sctp_prinfo | ||
| 272 | */ | ||
| 273 | struct sctp_prinfo { | ||
| 274 | __u16 pr_policy; | ||
| 275 | __u32 pr_value; | ||
| 276 | }; | ||
| 277 | |||
| 278 | /* 5.3.8 SCTP AUTH Information Structure (SCTP_AUTHINFO) | ||
| 279 | * | ||
| 280 | * This cmsghdr structure specifies SCTP options for sendmsg(). | ||
| 281 | * | ||
| 282 | * cmsg_level cmsg_type cmsg_data[] | ||
| 283 | * ------------ ------------ ------------------- | ||
| 284 | * IPPROTO_SCTP SCTP_AUTHINFO struct sctp_authinfo | ||
| 285 | */ | ||
| 286 | struct sctp_authinfo { | ||
| 287 | __u16 auth_keynumber; | ||
| 288 | }; | ||
| 289 | |||
| 263 | /* | 290 | /* |
| 264 | * sinfo_flags: 16 bits (unsigned integer) | 291 | * sinfo_flags: 16 bits (unsigned integer) |
| 265 | * | 292 | * |
| @@ -271,6 +298,8 @@ enum sctp_sinfo_flags { · 5 unmodified lines | |||
| 271 | SCTP_ADDR_OVER = (1 << 1), /* Override the primary destination. */ | 298 | SCTP_ADDR_OVER = (1 << 1), /* Override the primary destination. */ |
| 272 | SCTP_ABORT = (1 << 2), /* Send an ABORT message to the peer. */ | 299 | SCTP_ABORT = (1 << 2), /* Send an ABORT message to the peer. */ |
| 273 | SCTP_SACK_IMMEDIATELY = (1 << 3), /* SACK should be sent without delay. */ | 300 | SCTP_SACK_IMMEDIATELY = (1 << 3), /* SACK should be sent without delay. */ |
| 301 | /* 2 bits here have been used by SCTP_PR_SCTP_MASK */ | ||
| 302 | SCTP_SENDALL = (1 << 6), | ||
| 274 | SCTP_NOTIFICATION = MSG_NOTIFICATION, /* Next message is not user msg but notification. */ | 303 | SCTP_NOTIFICATION = MSG_NOTIFICATION, /* Next message is not user msg but notification. */ |
| 275 | SCTP_EOF = MSG_FIN, /* Initiate graceful shutdown process. */ | 304 | SCTP_EOF = MSG_FIN, /* Initiate graceful shutdown process. */ |
| 276 | }; | 305 | }; |
| @@ -293,6 +322,14 @@ typedef enum sctp_cmsg_type { · 16 unmodified lines | |||
| 293 | #define SCTP_RCVINFO SCTP_RCVINFO | 322 | #define SCTP_RCVINFO SCTP_RCVINFO |
| 294 | SCTP_NXTINFO, /* 5.3.6 SCTP Next Receive Information Structure */ | 323 | SCTP_NXTINFO, /* 5.3.6 SCTP Next Receive Information Structure */ |
| 295 | #define SCTP_NXTINFO SCTP_NXTINFO | 324 | #define SCTP_NXTINFO SCTP_NXTINFO |
| 325 | SCTP_PRINFO, /* 5.3.7 SCTP PR-SCTP Information Structure */ | ||
| 326 | #define SCTP_PRINFO SCTP_PRINFO | ||
| 327 | SCTP_AUTHINFO, /* 5.3.8 SCTP AUTH Information Structure */ | ||
| 328 | #define SCTP_AUTHINFO SCTP_AUTHINFO | ||
| 329 | SCTP_DSTADDRV4, /* 5.3.9 SCTP Destination IPv4 Address Structure */ | ||
| 330 | #define SCTP_DSTADDRV4 SCTP_DSTADDRV4 | ||
| 331 | SCTP_DSTADDRV6, /* 5.3.10 SCTP Destination IPv6 Address Structure */ | ||
| 332 | #define SCTP_DSTADDRV6 SCTP_DSTADDRV6 | ||
| 296 | } sctp_cmsg_t; | 333 | } sctp_cmsg_t; |
| 297 | 334 | ||
| 298 | /* | 335 | /* |
| @@ -482,7 +519,12 @@ struct sctp_authkey_event { · 183 unmodified lines | |||
| 482 | sctp_assoc_t auth_assoc_id; | 519 | sctp_assoc_t auth_assoc_id; |
| 483 | }; | 520 | }; |
| 484 | 521 | ||
| 485 | enum { SCTP_AUTH_NEWKEY = 0, }; | 522 | enum { |
| 523 | SCTP_AUTH_NEW_KEY, | ||
| 524 | #define SCTP_AUTH_NEWKEY SCTP_AUTH_NEW_KEY /* compatible with before */ | ||
| 525 | SCTP_AUTH_FREE_KEY, | ||
| 526 | SCTP_AUTH_NO_AUTH, | ||
| 527 | }; | ||
| 486 | 528 | ||
| 487 | /* | 529 | /* |
| 488 | * 6.1.9. SCTP_SENDER_DRY_EVENT | 530 | * 6.1.9. SCTP_SENDER_DRY_EVENT |
| @@ -19,6 +19,7 @@ · 18 unmodified lines | |||
| 19 | /* ipcs ctl cmds */ | 19 | /* ipcs ctl cmds */ |
| 20 | #define SEM_STAT 18 | 20 | #define SEM_STAT 18 |
| 21 | #define SEM_INFO 19 | 21 | #define SEM_INFO 19 |
| 22 | #define SEM_STAT_ANY 20 | ||
| 22 | 23 | ||
| 23 | /* Obsolete, used only for backwards compatibility and libc5 compiles */ | 24 | /* Obsolete, used only for backwards compatibility and libc5 compiles */ |
| 24 | struct semid_ds { | 25 | struct semid_ds { |
| @@ -76,6 +76,9 @@ · 75 unmodified lines | |||
| 76 | #define PORT_SUNZILOG 38 | 76 | #define PORT_SUNZILOG 38 |
| 77 | #define PORT_SUNSAB 39 | 77 | #define PORT_SUNSAB 39 |
| 78 | 78 | ||
| 79 | /* Nuvoton UART */ | ||
| 80 | #define PORT_NPCM 40 | ||
| 81 | |||
| 79 | /* Intel EG20 */ | 82 | /* Intel EG20 */ |
| 80 | #define PORT_PCH_8LINE 44 | 83 | #define PORT_PCH_8LINE 44 |
| 81 | #define PORT_PCH_2LINE 45 | 84 | #define PORT_PCH_2LINE 45 |
| @@ -83,8 +83,9 @@ struct shmid_ds { · 82 unmodified lines | |||
| 83 | #define SHM_UNLOCK 12 | 83 | #define SHM_UNLOCK 12 |
| 84 | 84 | ||
| 85 | /* ipcs ctl commands */ | 85 | /* ipcs ctl commands */ |
| 86 | #define SHM_STAT 13 | 86 | #define SHM_STAT 13 |
| 87 | #define SHM_INFO 14 | 87 | #define SHM_INFO 14 |
| 88 | #define SHM_STAT_ANY 15 | ||
| 88 | 89 | ||
| 89 | /* Obsolete, used only for backwards compatibility */ | 90 | /* Obsolete, used only for backwards compatibility */ |
| 90 | struct shminfo { | 91 | struct shminfo { |
| @@ -3,15 +3,6 @@ · 2 unmodified lines | |||
| 3 | * System Trace Module (STM) userspace interfaces | 3 | * System Trace Module (STM) userspace interfaces |
| 4 | * Copyright (c) 2014, Intel Corporation. | 4 | * Copyright (c) 2014, Intel Corporation. |
| 5 | * | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms and conditions of the GNU General Public License, | ||
| 8 | * version 2, as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 13 | * more details. | ||
| 14 | * | ||
| 15 | * STM class implements generic infrastructure for System Trace Module devices | 6 | * STM class implements generic infrastructure for System Trace Module devices |
| 16 | * as defined in MIPI STPv2 specification. | 7 | * as defined in MIPI STPv2 specification. |
| 17 | */ | 8 | */ |
| @@ -21,6 +12,10 @@ · 3 unmodified lines | |||
| 21 | 12 | ||
| 22 | #include <linux/types.h> | 13 | #include <linux/types.h> |
| 23 | 14 | ||
| 15 | /* Maximum allowed master and channel values */ | ||
| 16 | #define STP_MASTER_MAX 0xffff | ||
| 17 | #define STP_CHANNEL_MAX 0xffff | ||
| 18 | |||
| 24 | /** | 19 | /** |
| 25 | * struct stp_policy_id - identification for the STP policy | 20 | * struct stp_policy_id - identification for the STP policy |
| 26 | * @size: size of the structure including real id[] length | 21 | * @size: size of the structure including real id[] length |
| @@ -780,24 +780,6 @@ enum { · 779 unmodified lines | |||
| 780 | NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5, | 780 | NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5, |
| 781 | }; | 781 | }; |
| 782 | 782 | ||
| 783 | /* proc/sys/net/irda */ | ||
| 784 | enum { | ||
| 785 | NET_IRDA_DISCOVERY=1, | ||
| 786 | NET_IRDA_DEVNAME=2, | ||
| 787 | NET_IRDA_DEBUG=3, | ||
| 788 | NET_IRDA_FAST_POLL=4, | ||
| 789 | NET_IRDA_DISCOVERY_SLOTS=5, | ||
| 790 | NET_IRDA_DISCOVERY_TIMEOUT=6, | ||
| 791 | NET_IRDA_SLOT_TIMEOUT=7, | ||
| 792 | NET_IRDA_MAX_BAUD_RATE=8, | ||
| 793 | NET_IRDA_MIN_TX_TURN_TIME=9, | ||
| 794 | NET_IRDA_MAX_TX_DATA_SIZE=10, | ||
| 795 | NET_IRDA_MAX_TX_WINDOW=11, | ||
| 796 | NET_IRDA_MAX_NOREPLY_TIME=12, | ||
| 797 | NET_IRDA_WARN_NOREPLY_TIME=13, | ||
| 798 | NET_IRDA_LAP_KEEPALIVE_TIME=14, | ||
| 799 | }; | ||
| 800 | |||
| 801 | 783 | ||
| 802 | /* CTL_FS names: */ | 784 | /* CTL_FS names: */ |
| 803 | enum | 785 | enum |
| @@ -0,0 +1,20 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef __LINUX_TC_EM_IPT_H | ||
| 3 | #define __LINUX_TC_EM_IPT_H | ||
| 4 | |||
| 5 | #include <linux/types.h> | ||
| 6 | #include <linux/pkt_cls.h> | ||
| 7 | |||
| 8 | enum { | ||
| 9 | TCA_EM_IPT_UNSPEC, | ||
| 10 | TCA_EM_IPT_HOOK, | ||
| 11 | TCA_EM_IPT_MATCH_NAME, | ||
| 12 | TCA_EM_IPT_MATCH_REVISION, | ||
| 13 | TCA_EM_IPT_NFPROTO, | ||
| 14 | TCA_EM_IPT_MATCH_DATA, | ||
| 15 | __TCA_EM_IPT_MAX | ||
| 16 | }; | ||
| 17 | |||
| 18 | #define TCA_EM_IPT_MAX (__TCA_EM_IPT_MAX - 1) | ||
| 19 | |||
| 20 | #endif | ||
| @@ -241,6 +241,9 @@ enum { · 240 unmodified lines | |||
| 241 | TCP_NLA_MIN_RTT, /* minimum RTT */ | 241 | TCP_NLA_MIN_RTT, /* minimum RTT */ |
| 242 | TCP_NLA_RECUR_RETRANS, /* Recurring retransmits for the current pkt */ | 242 | TCP_NLA_RECUR_RETRANS, /* Recurring retransmits for the current pkt */ |
| 243 | TCP_NLA_DELIVERY_RATE_APP_LMT, /* delivery rate application limited ? */ | 243 | TCP_NLA_DELIVERY_RATE_APP_LMT, /* delivery rate application limited ? */ |
| 244 | TCP_NLA_SNDQ_SIZE, /* Data (bytes) pending in send queue */ | ||
| 245 | TCP_NLA_CA_STATE, /* ca_state of socket */ | ||
| 246 | TCP_NLA_SND_SSTHRESH, /* Slow start size threshold */ | ||
| 244 | 247 | ||
| 245 | }; | 248 | }; |
| 246 | 249 | ||
| @@ -1,263 +0,0 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 2 | /****************************************************************************** | ||
| 3 | * | ||
| 4 | * telephony.h | ||
| 5 | * | ||
| 6 | * Basic Linux Telephony Interface | ||
| 7 | * | ||
| 8 | * (c) Copyright 1999-2001 Quicknet Technologies, Inc. | ||
| 9 | * | ||
| 10 | * This program is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU General Public License | ||
| 12 | * as published by the Free Software Foundation; either version | ||
| 13 | * 2 of the License, or (at your option) any later version. | ||
| 14 | * | ||
| 15 | * Authors: Ed Okerson, <eokerson@quicknet.net> | ||
| 16 | * Greg Herlein, <gherlein@quicknet.net> | ||
| 17 | * | ||
| 18 | * Contributors: Alan Cox, <alan@lxorguk.ukuu.org.uk> | ||
| 19 | * David W. Erhart, <derhart@quicknet.net> | ||
| 20 | * | ||
| 21 | * IN NO EVENT SHALL QUICKNET TECHNOLOGIES, INC. BE LIABLE TO ANY PARTY FOR | ||
| 22 | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT | ||
| 23 | * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF QUICKNET | ||
| 24 | * TECHNOLOGIES, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 25 | * | ||
| 26 | * QUICKNET TECHNOLOGIES, INC. SPECIFICALLY DISCLAIMS ANY WARRANTIES, | ||
| 27 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
| 28 | * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS | ||
| 29 | * ON AN "AS IS" BASIS, AND QUICKNET TECHNOLOGIES, INC. HAS NO OBLIGATION | ||
| 30 | * TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | ||
| 31 | * | ||
| 32 | *****************************************************************************/ | ||
| 33 | |||
| 34 | #ifndef TELEPHONY_H | ||
| 35 | #define TELEPHONY_H | ||
| 36 | |||
| 37 | #define TELEPHONY_VERSION 3013 | ||
| 38 | |||
| 39 | #define PHONE_VENDOR_IXJ 1 | ||
| 40 | #define PHONE_VENDOR_QUICKNET PHONE_VENDOR_IXJ | ||
| 41 | #define PHONE_VENDOR_VOICETRONIX 2 | ||
| 42 | #define PHONE_VENDOR_ACULAB 3 | ||
| 43 | #define PHONE_VENDOR_DIGI 4 | ||
| 44 | #define PHONE_VENDOR_FRANKLIN 5 | ||
| 45 | |||
| 46 | /****************************************************************************** | ||
| 47 | * Vendor Summary Information Area | ||
| 48 | * | ||
| 49 | * Quicknet Technologies, Inc. - makes low density analog telephony cards | ||
| 50 | * with audio compression, POTS and PSTN interfaces (www.quicknet.net) | ||
| 51 | * | ||
| 52 | * (other vendors following this API shuld add a short description of | ||
| 53 | * the telephony products they support under Linux) | ||
| 54 | * | ||
| 55 | *****************************************************************************/ | ||
| 56 | #define QTI_PHONEJACK 100 | ||
| 57 | #define QTI_LINEJACK 300 | ||
| 58 | #define QTI_PHONEJACK_LITE 400 | ||
| 59 | #define QTI_PHONEJACK_PCI 500 | ||
| 60 | #define QTI_PHONECARD 600 | ||
| 61 | |||
| 62 | /****************************************************************************** | ||
| 63 | * | ||
| 64 | * The capabilities ioctls can inform you of the capabilities of each phone | ||
| 65 | * device installed in your system. The PHONECTL_CAPABILITIES ioctl | ||
| 66 | * returns an integer value indicating the number of capabilities the | ||
| 67 | * device has. The PHONECTL_CAPABILITIES_LIST will fill an array of | ||
| 68 | * capability structs with all of its capabilities. The | ||
| 69 | * PHONECTL_CAPABILITIES_CHECK takes a single capability struct and returns | ||
| 70 | * a TRUE if the device has that capability, otherwise it returns false. | ||
| 71 | * | ||
| 72 | ******************************************************************************/ | ||
| 73 | typedef enum { | ||
| 74 | vendor = 0, | ||
| 75 | device, | ||
| 76 | port, | ||
| 77 | codec, | ||
| 78 | dsp | ||
| 79 | } phone_cap; | ||
| 80 | |||
| 81 | struct phone_capability { | ||
| 82 | char desc[80]; | ||
| 83 | phone_cap captype; | ||
| 84 | int cap; | ||
| 85 | int handle; | ||
| 86 | }; | ||
| 87 | |||
| 88 | typedef enum { | ||
| 89 | pots = 0, | ||
| 90 | pstn, | ||
| 91 | handset, | ||
| 92 | speaker | ||
| 93 | } phone_ports; | ||
| 94 | |||
| 95 | #define PHONE_CAPABILITIES _IO ('q', 0x80) | ||
| 96 | #define PHONE_CAPABILITIES_LIST _IOR ('q', 0x81, struct phone_capability *) | ||
| 97 | #define PHONE_CAPABILITIES_CHECK _IOW ('q', 0x82, struct phone_capability *) | ||
| 98 | |||
| 99 | typedef struct { | ||
| 100 | char month[3]; | ||
| 101 | char day[3]; | ||
| 102 | char hour[3]; | ||
| 103 | char min[3]; | ||
| 104 | int numlen; | ||
| 105 | char number[11]; | ||
| 106 | int namelen; | ||
| 107 | char name[80]; | ||
| 108 | } PHONE_CID; | ||
| 109 | |||
| 110 | #define PHONE_RING _IO ('q', 0x83) | ||
| 111 | #define PHONE_HOOKSTATE _IO ('q', 0x84) | ||
| 112 | #define PHONE_MAXRINGS _IOW ('q', 0x85, char) | ||
| 113 | #define PHONE_RING_CADENCE _IOW ('q', 0x86, short) | ||
| 114 | #define OLD_PHONE_RING_START _IO ('q', 0x87) | ||
| 115 | #define PHONE_RING_START _IOW ('q', 0x87, PHONE_CID *) | ||
| 116 | #define PHONE_RING_STOP _IO ('q', 0x88) | ||
| 117 | |||
| 118 | #define USA_RING_CADENCE 0xC0C0 | ||
| 119 | |||
| 120 | #define PHONE_REC_CODEC _IOW ('q', 0x89, int) | ||
| 121 | #define PHONE_REC_START _IO ('q', 0x8A) | ||
| 122 | #define PHONE_REC_STOP _IO ('q', 0x8B) | ||
| 123 | #define PHONE_REC_DEPTH _IOW ('q', 0x8C, int) | ||
| 124 | #define PHONE_FRAME _IOW ('q', 0x8D, int) | ||
| 125 | #define PHONE_REC_VOLUME _IOW ('q', 0x8E, int) | ||
| 126 | #define PHONE_REC_VOLUME_LINEAR _IOW ('q', 0xDB, int) | ||
| 127 | #define PHONE_REC_LEVEL _IO ('q', 0x8F) | ||
| 128 | |||
| 129 | #define PHONE_PLAY_CODEC _IOW ('q', 0x90, int) | ||
| 130 | #define PHONE_PLAY_START _IO ('q', 0x91) | ||
| 131 | #define PHONE_PLAY_STOP _IO ('q', 0x92) | ||
| 132 | #define PHONE_PLAY_DEPTH _IOW ('q', 0x93, int) | ||
| 133 | #define PHONE_PLAY_VOLUME _IOW ('q', 0x94, int) | ||
| 134 | #define PHONE_PLAY_VOLUME_LINEAR _IOW ('q', 0xDC, int) | ||
| 135 | #define PHONE_PLAY_LEVEL _IO ('q', 0x95) | ||
| 136 | #define PHONE_DTMF_READY _IOR ('q', 0x96, int) | ||
| 137 | #define PHONE_GET_DTMF _IOR ('q', 0x97, int) | ||
| 138 | #define PHONE_GET_DTMF_ASCII _IOR ('q', 0x98, int) | ||
| 139 | #define PHONE_DTMF_OOB _IOW ('q', 0x99, int) | ||
| 140 | #define PHONE_EXCEPTION _IOR ('q', 0x9A, int) | ||
| 141 | #define PHONE_PLAY_TONE _IOW ('q', 0x9B, char) | ||
| 142 | #define PHONE_SET_TONE_ON_TIME _IOW ('q', 0x9C, int) | ||
| 143 | #define PHONE_SET_TONE_OFF_TIME _IOW ('q', 0x9D, int) | ||
| 144 | #define PHONE_GET_TONE_ON_TIME _IO ('q', 0x9E) | ||
| 145 | #define PHONE_GET_TONE_OFF_TIME _IO ('q', 0x9F) | ||
| 146 | #define PHONE_GET_TONE_STATE _IO ('q', 0xA0) | ||
| 147 | #define PHONE_BUSY _IO ('q', 0xA1) | ||
| 148 | #define PHONE_RINGBACK _IO ('q', 0xA2) | ||
| 149 | #define PHONE_DIALTONE _IO ('q', 0xA3) | ||
| 150 | #define PHONE_CPT_STOP _IO ('q', 0xA4) | ||
| 151 | |||
| 152 | #define PHONE_PSTN_SET_STATE _IOW ('q', 0xA4, int) | ||
| 153 | #define PHONE_PSTN_GET_STATE _IO ('q', 0xA5) | ||
| 154 | |||
| 155 | #define PSTN_ON_HOOK 0 | ||
| 156 | #define PSTN_RINGING 1 | ||
| 157 | #define PSTN_OFF_HOOK 2 | ||
| 158 | #define PSTN_PULSE_DIAL 3 | ||
| 159 | |||
| 160 | /****************************************************************************** | ||
| 161 | * | ||
| 162 | * The wink duration is tunable with this ioctl. The default wink duration | ||
| 163 | * is 320ms. You do not need to use this ioctl if you do not require a | ||
| 164 | * different wink duration. | ||
| 165 | * | ||
| 166 | ******************************************************************************/ | ||
| 167 | #define PHONE_WINK_DURATION _IOW ('q', 0xA6, int) | ||
| 168 | #define PHONE_WINK _IOW ('q', 0xAA, int) | ||
| 169 | |||
| 170 | /****************************************************************************** | ||
| 171 | * | ||
| 172 | * Codec Definitions | ||
| 173 | * | ||
| 174 | ******************************************************************************/ | ||
| 175 | typedef enum { | ||
| 176 | G723_63 = 1, | ||
| 177 | G723_53 = 2, | ||
| 178 | TS85 = 3, | ||
| 179 | TS48 = 4, | ||
| 180 | TS41 = 5, | ||
| 181 | G728 = 6, | ||
| 182 | G729 = 7, | ||
| 183 | ULAW = 8, | ||
| 184 | ALAW = 9, | ||
| 185 | LINEAR16 = 10, | ||
| 186 | LINEAR8 = 11, | ||
| 187 | WSS = 12, | ||
| 188 | G729B = 13 | ||
| 189 | } phone_codec; | ||
| 190 | |||
| 191 | struct phone_codec_data | ||
| 192 | { | ||
| 193 | phone_codec type; | ||
| 194 | unsigned short buf_min, buf_opt, buf_max; | ||
| 195 | }; | ||
| 196 | |||
| 197 | #define PHONE_QUERY_CODEC _IOWR ('q', 0xA7, struct phone_codec_data *) | ||
| 198 | #define PHONE_PSTN_LINETEST _IO ('q', 0xA8) | ||
| 199 | |||
| 200 | /****************************************************************************** | ||
| 201 | * | ||
| 202 | * This controls the VAD/CNG functionality of G.723.1. The driver will | ||
| 203 | * always pass full size frames, any unused bytes will be padded with zeros, | ||
| 204 | * and frames passed to the driver should also be padded with zeros. The | ||
| 205 | * frame type is encoded in the least significant two bits of the first | ||
| 206 | * WORD of the frame as follows: | ||
| 207 | * | ||
| 208 | * bits 1-0 Frame Type Data Rate Significant Words | ||
| 209 | * 00 0 G.723.1 6.3 12 | ||
| 210 | * 01 1 G.723.1 5.3 10 | ||
| 211 | * 10 2 VAD/CNG 2 | ||
| 212 | * 11 3 Repeat last CNG 2 bits | ||
| 213 | * | ||
| 214 | ******************************************************************************/ | ||
| 215 | #define PHONE_VAD _IOW ('q', 0xA9, int) | ||
| 216 | |||
| 217 | |||
| 218 | /****************************************************************************** | ||
| 219 | * | ||
| 220 | * The exception structure allows us to multiplex multiple events onto the | ||
| 221 | * select() exception set. If any of these flags are set select() will | ||
| 222 | * return with a positive indication on the exception set. The dtmf_ready | ||
| 223 | * bit indicates if there is data waiting in the DTMF buffer. The | ||
| 224 | * hookstate bit is set if there is a change in hookstate status, it does not | ||
| 225 | * indicate the current state of the hookswitch. The pstn_ring bit | ||
| 226 | * indicates that the DAA on a LineJACK card has detected ring voltage on | ||
| 227 | * the PSTN port. The caller_id bit indicates that caller_id data has been | ||
| 228 | * received and is available. The pstn_wink bit indicates that the DAA on | ||
| 229 | * the LineJACK has received a wink from the telco switch. The f0, f1, f2 | ||
| 230 | * and f3 bits indicate that the filter has been triggered by detecting the | ||
| 231 | * frequency programmed into that filter. | ||
| 232 | * | ||
| 233 | * The remaining bits should be set to zero. They will become defined over time | ||
| 234 | * for other interface cards and their needs. | ||
| 235 | * | ||
| 236 | ******************************************************************************/ | ||
| 237 | struct phone_except | ||
| 238 | { | ||
| 239 | unsigned int dtmf_ready:1; | ||
| 240 | unsigned int hookstate:1; | ||
| 241 | unsigned int pstn_ring:1; | ||
| 242 | unsigned int caller_id:1; | ||
| 243 | unsigned int pstn_wink:1; | ||
| 244 | unsigned int f0:1; | ||
| 245 | unsigned int f1:1; | ||
| 246 | unsigned int f2:1; | ||
| 247 | unsigned int f3:1; | ||
| 248 | unsigned int flash:1; | ||
| 249 | unsigned int fc0:1; | ||
| 250 | unsigned int fc1:1; | ||
| 251 | unsigned int fc2:1; | ||
| 252 | unsigned int fc3:1; | ||
| 253 | unsigned int reserved:18; | ||
| 254 | }; | ||
| 255 | |||
| 256 | union telephony_exception { | ||
| 257 | struct phone_except bits; | ||
| 258 | unsigned int bytes; | ||
| 259 | }; | ||
| 260 | |||
| 261 | |||
| 262 | #endif /* TELEPHONY_H */ | ||
| 263 | |||
| @@ -42,6 +42,18 @@ struct itimerval { · 41 unmodified lines | |||
| 42 | struct timeval it_value; /* current value */ | 42 | struct timeval it_value; /* current value */ |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | /* | ||
| 46 | * legacy timeval structure, only embedded in structures that | ||
| 47 | * traditionally used 'timeval' to pass time intervals (not absolute | ||
| 48 | * times). Do not add new users. If user space fails to compile | ||
| 49 | * here, this is probably because it is not y2038 safe and needs to | ||
| 50 | * be changed to use another interface. | ||
| 51 | */ | ||
| 52 | struct __kernel_old_timeval { | ||
| 53 | __kernel_long_t tv_sec; | ||
| 54 | __kernel_long_t tv_usec; | ||
| 55 | }; | ||
| 56 | |||
| 45 | /* | 57 | /* |
| 46 | * The IDs of the various system clocks (for POSIX.1b interval timers): | 58 | * The IDs of the various system clocks (for POSIX.1b interval timers): |
| 47 | */ | 59 | */ |
| @@ -45,81 +45,38 @@ · 44 unmodified lines | |||
| 45 | * TIPC addressing primitives | 45 | * TIPC addressing primitives |
| 46 | */ | 46 | */ |
| 47 | 47 | ||
| 48 | struct tipc_portid { | 48 | struct tipc_socket_addr { |
| 49 | __u32 ref; | 49 | __u32 ref; |
| 50 | __u32 node; | 50 | __u32 node; |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | struct tipc_name { | 53 | struct tipc_service_addr { |
| 54 | __u32 type; | 54 | __u32 type; |
| 55 | __u32 instance; | 55 | __u32 instance; |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| 58 | struct tipc_name_seq { | 58 | struct tipc_service_range { |
| 59 | __u32 type; | 59 | __u32 type; |
| 60 | __u32 lower; | 60 | __u32 lower; |
| 61 | __u32 upper; | 61 | __u32 upper; |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | /* TIPC Address Size, Offset, Mask specification for Z.C.N | ||
| 65 | */ | ||
| 66 | #define TIPC_NODE_BITS 12 | ||
| 67 | #define TIPC_CLUSTER_BITS 12 | ||
| 68 | #define TIPC_ZONE_BITS 8 | ||
| 69 | |||
| 70 | #define TIPC_NODE_OFFSET 0 | ||
| 71 | #define TIPC_CLUSTER_OFFSET TIPC_NODE_BITS | ||
| 72 | #define TIPC_ZONE_OFFSET (TIPC_CLUSTER_OFFSET + TIPC_CLUSTER_BITS) | ||
| 73 | |||
| 74 | #define TIPC_NODE_SIZE ((1UL << TIPC_NODE_BITS) - 1) | ||
| 75 | #define TIPC_CLUSTER_SIZE ((1UL << TIPC_CLUSTER_BITS) - 1) | ||
| 76 | #define TIPC_ZONE_SIZE ((1UL << TIPC_ZONE_BITS) - 1) | ||
| 77 | |||
| 78 | #define TIPC_NODE_MASK (TIPC_NODE_SIZE << TIPC_NODE_OFFSET) | ||
| 79 | #define TIPC_CLUSTER_MASK (TIPC_CLUSTER_SIZE << TIPC_CLUSTER_OFFSET) | ||
| 80 | #define TIPC_ZONE_MASK (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET) | ||
| 81 | |||
| 82 | #define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK) | ||
| 83 | |||
| 84 | static inline __u32 tipc_addr(unsigned int zone, | ||
| 85 | unsigned int cluster, | ||
| 86 | unsigned int node) | ||
| 87 | { | ||
| 88 | return (zone << TIPC_ZONE_OFFSET) | | ||
| 89 | (cluster << TIPC_CLUSTER_OFFSET) | | ||
| 90 | node; | ||
| 91 | } | ||
| 92 | |||
| 93 | static inline unsigned int tipc_zone(__u32 addr) | ||
| 94 | { | ||
| 95 | return addr >> TIPC_ZONE_OFFSET; | ||
| 96 | } | ||
| 97 | |||
| 98 | static inline unsigned int tipc_cluster(__u32 addr) | ||
| 99 | { | ||
| 100 | return (addr & TIPC_CLUSTER_MASK) >> TIPC_CLUSTER_OFFSET; | ||
| 101 | } | ||
| 102 | |||
| 103 | static inline unsigned int tipc_node(__u32 addr) | ||
| 104 | { | ||
| 105 | return addr & TIPC_NODE_MASK; | ||
| 106 | } | ||
| 107 | |||
| 108 | /* | 64 | /* |
| 109 | * Application-accessible port name types | 65 | * Application-accessible service types |
| 110 | */ | 66 | */ |
| 111 | 67 | ||
| 112 | #define TIPC_CFG_SRV 0 /* configuration service name type */ | 68 | #define TIPC_NODE_STATE 0 /* node state service type */ |
| 113 | #define TIPC_TOP_SRV 1 /* topology service name type */ | 69 | #define TIPC_TOP_SRV 1 /* topology server service type */ |
| 114 | #define TIPC_LINK_STATE 2 /* link state name type */ | 70 | #define TIPC_LINK_STATE 2 /* link state service type */ |
| 115 | #define TIPC_RESERVED_TYPES 64 /* lowest user-publishable name type */ | 71 | #define TIPC_RESERVED_TYPES 64 /* lowest user-allowed service type */ |
| 116 | 72 | ||
| 117 | /* | 73 | /* |
| 118 | * Publication scopes when binding port names and port name sequences | 74 | * Publication scopes when binding service / service range |
| 119 | */ | 75 | */ |
| 120 | #define TIPC_ZONE_SCOPE 1 | 76 | enum tipc_scope { |
| 121 | #define TIPC_CLUSTER_SCOPE 2 | 77 | TIPC_CLUSTER_SCOPE = 2, /* 0 can also be used */ |
| 122 | #define TIPC_NODE_SCOPE 3 | 78 | TIPC_NODE_SCOPE = 3 |
| 79 | }; | ||
| 123 | 80 | ||
| 124 | /* | 81 | /* |
| 125 | * Limiting values for messages | 82 | * Limiting values for messages |
| @@ -151,28 +108,28 @@ static inline unsigned int tipc_node(__u32 addr) · 25 unmodified lines | |||
| 151 | * TIPC topology subscription service definitions | 108 | * TIPC topology subscription service definitions |
| 152 | */ | 109 | */ |
| 153 | 110 | ||
| 154 | #define TIPC_SUB_PORTS 0x01 /* filter for port availability */ | 111 | #define TIPC_SUB_PORTS 0x01 /* filter: evt at each match */ |
| 155 | #define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ | 112 | #define TIPC_SUB_SERVICE 0x02 /* filter: evt at first up/last down */ |
| 156 | #define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ | 113 | #define TIPC_SUB_CANCEL 0x04 /* filter: cancel a subscription */ |
| 157 | 114 | ||
| 158 | #define TIPC_WAIT_FOREVER (~0) /* timeout for permanent subscription */ | 115 | #define TIPC_WAIT_FOREVER (~0) /* timeout for permanent subscription */ |
| 159 | 116 | ||
| 160 | struct tipc_subscr { | 117 | struct tipc_subscr { |
| 161 | struct tipc_name_seq seq; /* name sequence of interest */ | 118 | struct tipc_service_range seq; /* range of interest */ |
| 162 | __u32 timeout; /* subscription duration (in ms) */ | 119 | __u32 timeout; /* subscription duration (in ms) */ |
| 163 | __u32 filter; /* bitmask of filter options */ | 120 | __u32 filter; /* bitmask of filter options */ |
| 164 | char usr_handle[8]; /* available for subscriber use */ | 121 | char usr_handle[8]; /* available for subscriber use */ |
| 165 | }; | 122 | }; |
| 166 | 123 | ||
| 167 | #define TIPC_PUBLISHED 1 /* publication event */ | 124 | #define TIPC_PUBLISHED 1 /* publication event */ |
| 168 | #define TIPC_WITHDRAWN 2 /* withdraw event */ | 125 | #define TIPC_WITHDRAWN 2 /* withdrawal event */ |
| 169 | #define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */ | 126 | #define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */ |
| 170 | 127 | ||
| 171 | struct tipc_event { | 128 | struct tipc_event { |
| 172 | __u32 event; /* event type */ | 129 | __u32 event; /* event type */ |
| 173 | __u32 found_lower; /* matching name seq instances */ | 130 | __u32 found_lower; /* matching range */ |
| 174 | __u32 found_upper; /* " " " " */ | 131 | __u32 found_upper; /* " " */ |
| 175 | struct tipc_portid port; /* associated port */ | 132 | struct tipc_socket_addr port; /* associated socket */ |
| 176 | struct tipc_subscr s; /* associated subscription */ | 133 | struct tipc_subscr s; /* associated subscription */ |
| 177 | }; | 134 | }; |
| 178 | 135 | ||
| @@ -192,20 +149,20 @@ struct tipc_event { · 13 unmodified lines | |||
| 192 | #define SOL_TIPC 271 | 149 | #define SOL_TIPC 271 |
| 193 | #endif | 150 | #endif |
| 194 | 151 | ||
| 195 | #define TIPC_ADDR_NAMESEQ 1 | 152 | #define TIPC_ADDR_MCAST 1 |
| 196 | #define TIPC_ADDR_MCAST 1 | 153 | #define TIPC_SERVICE_RANGE 1 |
| 197 | #define TIPC_ADDR_NAME 2 | 154 | #define TIPC_SERVICE_ADDR 2 |
| 198 | #define TIPC_ADDR_ID 3 | 155 | #define TIPC_SOCKET_ADDR 3 |
| 199 | 156 | ||
| 200 | struct sockaddr_tipc { | 157 | struct sockaddr_tipc { |
| 201 | unsigned short family; | 158 | unsigned short family; |
| 202 | unsigned char addrtype; | 159 | unsigned char addrtype; |
| 203 | signed char scope; | 160 | signed char scope; |
| 204 | union { | 161 | union { |
| 205 | struct tipc_portid id; | 162 | struct tipc_socket_addr id; |
| 206 | struct tipc_name_seq nameseq; | 163 | struct tipc_service_range nameseq; |
| 207 | struct { | 164 | struct { |
| 208 | struct tipc_name name; | 165 | struct tipc_service_addr name; |
| 209 | __u32 domain; | 166 | __u32 domain; |
| 210 | } name; | 167 | } name; |
| 211 | } addr; | 168 | } addr; |
| @@ -243,7 +200,7 @@ struct sockaddr_tipc { · 31 unmodified lines | |||
| 243 | struct tipc_group_req { | 200 | struct tipc_group_req { |
| 244 | __u32 type; /* group id */ | 201 | __u32 type; /* group id */ |
| 245 | __u32 instance; /* member id */ | 202 | __u32 instance; /* member id */ |
| 246 | __u32 scope; /* zone/cluster/node */ | 203 | __u32 scope; /* cluster/node */ |
| 247 | __u32 flags; | 204 | __u32 flags; |
| 248 | }; | 205 | }; |
| 249 | 206 | ||
| @@ -259,7 +216,7 @@ struct tipc_group_req { · 9 unmodified lines | |||
| 259 | #define TIPC_MAX_MEDIA_NAME 16 | 216 | #define TIPC_MAX_MEDIA_NAME 16 |
| 260 | #define TIPC_MAX_IF_NAME 16 | 217 | #define TIPC_MAX_IF_NAME 16 |
| 261 | #define TIPC_MAX_BEARER_NAME 32 | 218 | #define TIPC_MAX_BEARER_NAME 32 |
| 262 | #define TIPC_MAX_LINK_NAME 60 | 219 | #define TIPC_MAX_LINK_NAME 68 |
| 263 | 220 | ||
| 264 | #define SIOCGETLINKNAME SIOCPROTOPRIVATE | 221 | #define SIOCGETLINKNAME SIOCPROTOPRIVATE |
| 265 | 222 | ||
| @@ -268,4 +225,62 @@ struct tipc_sioc_ln_req { · 2 unmodified lines | |||
| 268 | __u32 bearer_id; | 225 | __u32 bearer_id; |
| 269 | char linkname[TIPC_MAX_LINK_NAME]; | 226 | char linkname[TIPC_MAX_LINK_NAME]; |
| 270 | }; | 227 | }; |
| 228 | |||
| 229 | |||
| 230 | /* The macros and functions below are deprecated: | ||
| 231 | */ | ||
| 232 | |||
| 233 | #define TIPC_CFG_SRV 0 | ||
| 234 | #define TIPC_ZONE_SCOPE 1 | ||
| 235 | |||
| 236 | #define TIPC_ADDR_NAMESEQ 1 | ||
| 237 | #define TIPC_ADDR_NAME 2 | ||
| 238 | #define TIPC_ADDR_ID 3 | ||
| 239 | |||
| 240 | #define TIPC_NODE_BITS 12 | ||
| 241 | #define TIPC_CLUSTER_BITS 12 | ||
| 242 | #define TIPC_ZONE_BITS 8 | ||
| 243 | |||
| 244 | #define TIPC_NODE_OFFSET 0 | ||
| 245 | #define TIPC_CLUSTER_OFFSET TIPC_NODE_BITS | ||
| 246 | #define TIPC_ZONE_OFFSET (TIPC_CLUSTER_OFFSET + TIPC_CLUSTER_BITS) | ||
| 247 | |||
| 248 | #define TIPC_NODE_SIZE ((1UL << TIPC_NODE_BITS) - 1) | ||
| 249 | #define TIPC_CLUSTER_SIZE ((1UL << TIPC_CLUSTER_BITS) - 1) | ||
| 250 | #define TIPC_ZONE_SIZE ((1UL << TIPC_ZONE_BITS) - 1) | ||
| 251 | |||
| 252 | #define TIPC_NODE_MASK (TIPC_NODE_SIZE << TIPC_NODE_OFFSET) | ||
| 253 | #define TIPC_CLUSTER_MASK (TIPC_CLUSTER_SIZE << TIPC_CLUSTER_OFFSET) | ||
| 254 | #define TIPC_ZONE_MASK (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET) | ||
| 255 | |||
| 256 | #define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK) | ||
| 257 | |||
| 258 | #define tipc_portid tipc_socket_addr | ||
| 259 | #define tipc_name tipc_service_addr | ||
| 260 | #define tipc_name_seq tipc_service_range | ||
| 261 | |||
| 262 | static inline __u32 tipc_addr(unsigned int zone, | ||
| 263 | unsigned int cluster, | ||
| 264 | unsigned int node) | ||
| 265 | { | ||
| 266 | return (zone << TIPC_ZONE_OFFSET) | | ||
| 267 | (cluster << TIPC_CLUSTER_OFFSET) | | ||
| 268 | node; | ||
| 269 | } | ||
| 270 | |||
| 271 | static inline unsigned int tipc_zone(__u32 addr) | ||
| 272 | { | ||
| 273 | return addr >> TIPC_ZONE_OFFSET; | ||
| 274 | } | ||
| 275 | |||
| 276 | static inline unsigned int tipc_cluster(__u32 addr) | ||
| 277 | { | ||
| 278 | return (addr & TIPC_CLUSTER_MASK) >> TIPC_CLUSTER_OFFSET; | ||
| 279 | } | ||
| 280 | |||
| 281 | static inline unsigned int tipc_node(__u32 addr) | ||
| 282 | { | ||
| 283 | return addr & TIPC_NODE_MASK; | ||
| 284 | } | ||
| 285 | |||
| 271 | #endif | 286 | #endif |
| @@ -114,6 +114,13 @@ enum { · 113 unmodified lines | |||
| 114 | TIPC_NLA_SOCK_REF, /* u32 */ | 114 | TIPC_NLA_SOCK_REF, /* u32 */ |
| 115 | TIPC_NLA_SOCK_CON, /* nest */ | 115 | TIPC_NLA_SOCK_CON, /* nest */ |
| 116 | TIPC_NLA_SOCK_HAS_PUBL, /* flag */ | 116 | TIPC_NLA_SOCK_HAS_PUBL, /* flag */ |
| 117 | TIPC_NLA_SOCK_STAT, /* nest */ | ||
| 118 | TIPC_NLA_SOCK_TYPE, /* u32 */ | ||
| 119 | TIPC_NLA_SOCK_INO, /* u32 */ | ||
| 120 | TIPC_NLA_SOCK_UID, /* u32 */ | ||
| 121 | TIPC_NLA_SOCK_TIPC_STATE, /* u32 */ | ||
| 122 | TIPC_NLA_SOCK_COOKIE, /* u64 */ | ||
| 123 | TIPC_NLA_SOCK_PAD, /* flag */ | ||
| 117 | 124 | ||
| 118 | __TIPC_NLA_SOCK_MAX, | 125 | __TIPC_NLA_SOCK_MAX, |
| 119 | TIPC_NLA_SOCK_MAX = __TIPC_NLA_SOCK_MAX - 1 | 126 | TIPC_NLA_SOCK_MAX = __TIPC_NLA_SOCK_MAX - 1 |
| @@ -162,6 +169,8 @@ enum { · 42 unmodified lines | |||
| 162 | TIPC_NLA_NET_UNSPEC, | 169 | TIPC_NLA_NET_UNSPEC, |
| 163 | TIPC_NLA_NET_ID, /* u32 */ | 170 | TIPC_NLA_NET_ID, /* u32 */ |
| 164 | TIPC_NLA_NET_ADDR, /* u32 */ | 171 | TIPC_NLA_NET_ADDR, /* u32 */ |
| 172 | TIPC_NLA_NET_NODEID, /* u64 */ | ||
| 173 | TIPC_NLA_NET_NODEID_W1, /* u64 */ | ||
| 165 | 174 | ||
| 166 | __TIPC_NLA_NET_MAX, | 175 | __TIPC_NLA_NET_MAX, |
| 167 | TIPC_NLA_NET_MAX = __TIPC_NLA_NET_MAX - 1 | 176 | TIPC_NLA_NET_MAX = __TIPC_NLA_NET_MAX - 1 |
| @@ -238,6 +247,18 @@ enum { · 70 unmodified lines | |||
| 238 | TIPC_NLA_CON_MAX = __TIPC_NLA_CON_MAX - 1 | 247 | TIPC_NLA_CON_MAX = __TIPC_NLA_CON_MAX - 1 |
| 239 | }; | 248 | }; |
| 240 | 249 | ||
| 250 | /* Nest, socket statistics info */ | ||
| 251 | enum { | ||
| 252 | TIPC_NLA_SOCK_STAT_RCVQ, /* u32 */ | ||
| 253 | TIPC_NLA_SOCK_STAT_SENDQ, /* u32 */ | ||
| 254 | TIPC_NLA_SOCK_STAT_LINK_CONG, /* flag */ | ||
| 255 | TIPC_NLA_SOCK_STAT_CONN_CONG, /* flag */ | ||
| 256 | TIPC_NLA_SOCK_STAT_DROP, /* u32 */ | ||
| 257 | |||
| 258 | __TIPC_NLA_SOCK_STAT_MAX, | ||
| 259 | TIPC_NLA_SOCK_STAT_MAX = __TIPC_NLA_SOCK_STAT_MAX - 1 | ||
| 260 | }; | ||
| 261 | |||
| 241 | /* Nest, link propreties. Valid for link, media and bearer */ | 262 | /* Nest, link propreties. Valid for link, media and bearer */ |
| 242 | enum { | 263 | enum { |
| 243 | TIPC_NLA_PROP_UNSPEC, | 264 | TIPC_NLA_PROP_UNSPEC, |
| @@ -0,0 +1,17 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* AF_TIPC sock_diag interface for querying open sockets */ | ||
| 3 | |||
| 4 | #ifndef _UAPI__TIPC_SOCKETS_DIAG_H__ | ||
| 5 | #define _UAPI__TIPC_SOCKETS_DIAG_H__ | ||
| 6 | |||
| 7 | #include <linux/types.h> | ||
| 8 | #include <linux/sock_diag.h> | ||
| 9 | |||
| 10 | /* Request */ | ||
| 11 | struct tipc_sock_diag_req { | ||
| 12 | __u8 sdiag_family; /* must be AF_TIPC */ | ||
| 13 | __u8 sdiag_protocol; /* must be 0 */ | ||
| 14 | __u16 pad; /* must be 0 */ | ||
| 15 | __u32 tidiag_states; /* query*/ | ||
| 16 | }; | ||
| 17 | #endif /* _UAPI__TIPC_SOCKETS_DIAG_H__ */ | ||
| @@ -38,6 +38,7 @@ · 37 unmodified lines | |||
| 38 | 38 | ||
| 39 | /* TLS socket options */ | 39 | /* TLS socket options */ |
| 40 | #define TLS_TX 1 /* Set transmit parameters */ | 40 | #define TLS_TX 1 /* Set transmit parameters */ |
| 41 | #define TLS_RX 2 /* Set receive parameters */ | ||
| 41 | 42 | ||
| 42 | /* Supported versions */ | 43 | /* Supported versions */ |
| 43 | #define TLS_VERSION_MINOR(ver) ((ver) & 0xFF) | 44 | #define TLS_VERSION_MINOR(ver) ((ver) & 0xFF) |
| @@ -59,6 +60,7 @@ · 15 unmodified lines | |||
| 59 | #define TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE 8 | 60 | #define TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE 8 |
| 60 | 61 | ||
| 61 | #define TLS_SET_RECORD_TYPE 1 | 62 | #define TLS_SET_RECORD_TYPE 1 |
| 63 | #define TLS_GET_RECORD_TYPE 2 | ||
| 62 | 64 | ||
| 63 | struct tls_crypto_info { | 65 | struct tls_crypto_info { |
| 64 | __u16 version; | 66 | __u16 version; |
| @@ -27,6 +27,7 @@ · 26 unmodified lines | |||
| 27 | /* bInterfaceProtocol values to denote the version of the standard used */ | 27 | /* bInterfaceProtocol values to denote the version of the standard used */ |
| 28 | #define UAC_VERSION_1 0x00 | 28 | #define UAC_VERSION_1 0x00 |
| 29 | #define UAC_VERSION_2 0x20 | 29 | #define UAC_VERSION_2 0x20 |
| 30 | #define UAC_VERSION_3 0x30 | ||
| 30 | 31 | ||
| 31 | /* A.2 Audio Interface Subclass Codes */ | 32 | /* A.2 Audio Interface Subclass Codes */ |
| 32 | #define USB_SUBCLASS_AUDIOCONTROL 0x01 | 33 | #define USB_SUBCLASS_AUDIOCONTROL 0x01 |
| @@ -589,6 +589,98 @@ enum v4l2_vp8_golden_frame_sel { · 588 unmodified lines | |||
| 589 | #define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_MPEG_BASE+510) | 589 | #define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_MPEG_BASE+510) |
| 590 | #define V4L2_CID_MPEG_VIDEO_VPX_PROFILE (V4L2_CID_MPEG_BASE+511) | 590 | #define V4L2_CID_MPEG_VIDEO_VPX_PROFILE (V4L2_CID_MPEG_BASE+511) |
| 591 | 591 | ||
| 592 | /* CIDs for HEVC encoding. */ | ||
| 593 | |||
| 594 | #define V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (V4L2_CID_MPEG_BASE + 600) | ||
| 595 | #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (V4L2_CID_MPEG_BASE + 601) | ||
| 596 | #define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (V4L2_CID_MPEG_BASE + 602) | ||
| 597 | #define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (V4L2_CID_MPEG_BASE + 603) | ||
| 598 | #define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (V4L2_CID_MPEG_BASE + 604) | ||
| 599 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (V4L2_CID_MPEG_BASE + 605) | ||
| 600 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE (V4L2_CID_MPEG_BASE + 606) | ||
| 601 | enum v4l2_mpeg_video_hevc_hier_coding_type { | ||
| 602 | V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B = 0, | ||
| 603 | V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P = 1, | ||
| 604 | }; | ||
| 605 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (V4L2_CID_MPEG_BASE + 607) | ||
| 606 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (V4L2_CID_MPEG_BASE + 608) | ||
| 607 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (V4L2_CID_MPEG_BASE + 609) | ||
| 608 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (V4L2_CID_MPEG_BASE + 610) | ||
| 609 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (V4L2_CID_MPEG_BASE + 611) | ||
| 610 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (V4L2_CID_MPEG_BASE + 612) | ||
| 611 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (V4L2_CID_MPEG_BASE + 613) | ||
| 612 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (V4L2_CID_MPEG_BASE + 614) | ||
| 613 | #define V4L2_CID_MPEG_VIDEO_HEVC_PROFILE (V4L2_CID_MPEG_BASE + 615) | ||
| 614 | enum v4l2_mpeg_video_hevc_profile { | ||
| 615 | V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN = 0, | ||
| 616 | V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE = 1, | ||
| 617 | V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 = 2, | ||
| 618 | }; | ||
| 619 | #define V4L2_CID_MPEG_VIDEO_HEVC_LEVEL (V4L2_CID_MPEG_BASE + 616) | ||
| 620 | enum v4l2_mpeg_video_hevc_level { | ||
| 621 | V4L2_MPEG_VIDEO_HEVC_LEVEL_1 = 0, | ||
| 622 | V4L2_MPEG_VIDEO_HEVC_LEVEL_2 = 1, | ||
| 623 | V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1 = 2, | ||
| 624 | V4L2_MPEG_VIDEO_HEVC_LEVEL_3 = 3, | ||
| 625 | V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1 = 4, | ||
| 626 | V4L2_MPEG_VIDEO_HEVC_LEVEL_4 = 5, | ||
| 627 | V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1 = 6, | ||
| 628 | V4L2_MPEG_VIDEO_HEVC_LEVEL_5 = 7, | ||
| 629 | V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1 = 8, | ||
| 630 | V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2 = 9, | ||
| 631 | V4L2_MPEG_VIDEO_HEVC_LEVEL_6 = 10, | ||
| 632 | V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1 = 11, | ||
| 633 | V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2 = 12, | ||
| 634 | }; | ||
| 635 | #define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (V4L2_CID_MPEG_BASE + 617) | ||
| 636 | #define V4L2_CID_MPEG_VIDEO_HEVC_TIER (V4L2_CID_MPEG_BASE + 618) | ||
| 637 | enum v4l2_mpeg_video_hevc_tier { | ||
| 638 | V4L2_MPEG_VIDEO_HEVC_TIER_MAIN = 0, | ||
| 639 | V4L2_MPEG_VIDEO_HEVC_TIER_HIGH = 1, | ||
| 640 | }; | ||
| 641 | #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (V4L2_CID_MPEG_BASE + 619) | ||
| 642 | #define V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE + 620) | ||
| 643 | enum v4l2_cid_mpeg_video_hevc_loop_filter_mode { | ||
| 644 | V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED = 0, | ||
| 645 | V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED = 1, | ||
| 646 | V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2, | ||
| 647 | }; | ||
| 648 | #define V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (V4L2_CID_MPEG_BASE + 621) | ||
| 649 | #define V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (V4L2_CID_MPEG_BASE + 622) | ||
| 650 | #define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE (V4L2_CID_MPEG_BASE + 623) | ||
| 651 | enum v4l2_cid_mpeg_video_hevc_refresh_type { | ||
| 652 | V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE = 0, | ||
| 653 | V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA = 1, | ||
| 654 | V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR = 2, | ||
| 655 | }; | ||
| 656 | #define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (V4L2_CID_MPEG_BASE + 624) | ||
| 657 | #define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (V4L2_CID_MPEG_BASE + 625) | ||
| 658 | #define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (V4L2_CID_MPEG_BASE + 626) | ||
| 659 | #define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (V4L2_CID_MPEG_BASE + 627) | ||
| 660 | #define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (V4L2_CID_MPEG_BASE + 628) | ||
| 661 | #define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (V4L2_CID_MPEG_BASE + 629) | ||
| 662 | #define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (V4L2_CID_MPEG_BASE + 630) | ||
| 663 | #define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (V4L2_CID_MPEG_BASE + 631) | ||
| 664 | #define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT (V4L2_CID_MPEG_BASE + 632) | ||
| 665 | #define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (V4L2_CID_MPEG_BASE + 633) | ||
| 666 | #define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (V4L2_CID_MPEG_BASE + 634) | ||
| 667 | #define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD (V4L2_CID_MPEG_BASE + 635) | ||
| 668 | enum v4l2_cid_mpeg_video_hevc_size_of_length_field { | ||
| 669 | V4L2_MPEG_VIDEO_HEVC_SIZE_0 = 0, | ||
| 670 | V4L2_MPEG_VIDEO_HEVC_SIZE_1 = 1, | ||
| 671 | V4L2_MPEG_VIDEO_HEVC_SIZE_2 = 2, | ||
| 672 | V4L2_MPEG_VIDEO_HEVC_SIZE_4 = 3, | ||
| 673 | }; | ||
| 674 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (V4L2_CID_MPEG_BASE + 636) | ||
| 675 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (V4L2_CID_MPEG_BASE + 637) | ||
| 676 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (V4L2_CID_MPEG_BASE + 638) | ||
| 677 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (V4L2_CID_MPEG_BASE + 639) | ||
| 678 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (V4L2_CID_MPEG_BASE + 640) | ||
| 679 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (V4L2_CID_MPEG_BASE + 641) | ||
| 680 | #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_MPEG_BASE + 642) | ||
| 681 | #define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643) | ||
| 682 | #define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644) | ||
| 683 | |||
| 592 | /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ | 684 | /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ |
| 593 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) | 685 | #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) |
| 594 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) | 686 | #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) |
| @@ -657,7 +749,6 @@ enum v4l2_mpeg_mfc51_video_force_frame_type { · 62 unmodified lines | |||
| 657 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53) | 749 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53) |
| 658 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54) | 750 | #define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54) |
| 659 | 751 | ||
| 660 | |||
| 661 | /* Camera class control IDs */ | 752 | /* Camera class control IDs */ |
| 662 | 753 | ||
| 663 | #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) | 754 | #define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) |
| @@ -18,8 +18,8 @@ · 17 unmodified lines | |||
| 18 | 18 | ||
| 19 | /** | 19 | /** |
| 20 | * struct v4l2_mbus_framefmt - frame format on the media bus | 20 | * struct v4l2_mbus_framefmt - frame format on the media bus |
| 21 | * @width: frame width | 21 | * @width: image width |
| 22 | * @height: frame height | 22 | * @height: image height |
| 23 | * @code: data format code (from enum v4l2_mbus_pixelcode) | 23 | * @code: data format code (from enum v4l2_mbus_pixelcode) |
| 24 | * @field: used interlacing type (from enum v4l2_field) | 24 | * @field: used interlacing type (from enum v4l2_field) |
| 25 | * @colorspace: colorspace of the data (from enum v4l2_colorspace) | 25 | * @colorspace: colorspace of the data (from enum v4l2_colorspace) |
| @@ -575,6 +575,33 @@ struct vfio_device_gfx_plane_info { · 574 unmodified lines | |||
| 575 | 575 | ||
| 576 | #define VFIO_DEVICE_GET_GFX_DMABUF _IO(VFIO_TYPE, VFIO_BASE + 15) | 576 | #define VFIO_DEVICE_GET_GFX_DMABUF _IO(VFIO_TYPE, VFIO_BASE + 15) |
| 577 | 577 | ||
| 578 | /** | ||
| 579 | * VFIO_DEVICE_IOEVENTFD - _IOW(VFIO_TYPE, VFIO_BASE + 16, | ||
| 580 | * struct vfio_device_ioeventfd) | ||
| 581 | * | ||
| 582 | * Perform a write to the device at the specified device fd offset, with | ||
| 583 | * the specified data and width when the provided eventfd is triggered. | ||
| 584 | * vfio bus drivers may not support this for all regions, for all widths, | ||
| 585 | * or at all. vfio-pci currently only enables support for BAR regions, | ||
| 586 | * excluding the MSI-X vector table. | ||
| 587 | * | ||
| 588 | * Return: 0 on success, -errno on failure. | ||
| 589 | */ | ||
| 590 | struct vfio_device_ioeventfd { | ||
| 591 | __u32 argsz; | ||
| 592 | __u32 flags; | ||
| 593 | #define VFIO_DEVICE_IOEVENTFD_8 (1 << 0) /* 1-byte write */ | ||
| 594 | #define VFIO_DEVICE_IOEVENTFD_16 (1 << 1) /* 2-byte write */ | ||
| 595 | #define VFIO_DEVICE_IOEVENTFD_32 (1 << 2) /* 4-byte write */ | ||
| 596 | #define VFIO_DEVICE_IOEVENTFD_64 (1 << 3) /* 8-byte write */ | ||
| 597 | #define VFIO_DEVICE_IOEVENTFD_SIZE_MASK (0xf) | ||
| 598 | __u64 offset; /* device fd offset of write */ | ||
| 599 | __u64 data; /* data to be written */ | ||
| 600 | __s32 fd; /* -1 for de-assignment */ | ||
| 601 | }; | ||
| 602 | |||
| 603 | #define VFIO_DEVICE_IOEVENTFD _IO(VFIO_TYPE, VFIO_BASE + 16) | ||
| 604 | |||
| 578 | /* -------- API for Type1 VFIO IOMMU -------- */ | 605 | /* -------- API for Type1 VFIO IOMMU -------- */ |
| 579 | 606 | ||
| 580 | /** | 607 | /** |
| @@ -635,6 +635,7 @@ struct v4l2_pix_format { · 634 unmodified lines | |||
| 635 | #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ | 635 | #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ |
| 636 | #define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */ | 636 | #define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */ |
| 637 | #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ | 637 | #define V4L2_PIX_FMT_VP9 v4l2_fourcc('V', 'P', '9', '0') /* VP9 */ |
| 638 | #define V4L2_PIX_FMT_HEVC v4l2_fourcc('H', 'E', 'V', 'C') /* HEVC aka H.265 */ | ||
| 638 | 639 | ||
| 639 | /* Vendor-specific formats */ | 640 | /* Vendor-specific formats */ |
| 640 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | 641 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ |
| @@ -53,7 +53,24 @@ struct virtio_balloon_config { · 52 unmodified lines | |||
| 53 | #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */ | 53 | #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */ |
| 54 | #define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */ | 54 | #define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */ |
| 55 | #define VIRTIO_BALLOON_S_CACHES 7 /* Disk caches */ | 55 | #define VIRTIO_BALLOON_S_CACHES 7 /* Disk caches */ |
| 56 | #define VIRTIO_BALLOON_S_NR 8 | 56 | #define VIRTIO_BALLOON_S_HTLB_PGALLOC 8 /* Hugetlb page allocations */ |
| 57 | #define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */ | ||
| 58 | #define VIRTIO_BALLOON_S_NR 10 | ||
| 59 | |||
| 60 | #define VIRTIO_BALLOON_S_NAMES_WITH_PREFIX(VIRTIO_BALLOON_S_NAMES_prefix) { \ | ||
| 61 | VIRTIO_BALLOON_S_NAMES_prefix "swap-in", \ | ||
| 62 | VIRTIO_BALLOON_S_NAMES_prefix "swap-out", \ | ||
| 63 | VIRTIO_BALLOON_S_NAMES_prefix "major-faults", \ | ||
| 64 | VIRTIO_BALLOON_S_NAMES_prefix "minor-faults", \ | ||
| 65 | VIRTIO_BALLOON_S_NAMES_prefix "free-memory", \ | ||
| 66 | VIRTIO_BALLOON_S_NAMES_prefix "total-memory", \ | ||
| 67 | VIRTIO_BALLOON_S_NAMES_prefix "available-memory", \ | ||
| 68 | VIRTIO_BALLOON_S_NAMES_prefix "disk-caches", \ | ||
| 69 | VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-allocations", \ | ||
| 70 | VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-failures" \ | ||
| 71 | } | ||
| 72 | |||
| 73 | #define VIRTIO_BALLOON_S_NAMES VIRTIO_BALLOON_S_NAMES_WITH_PREFIX("") | ||
| 57 | 74 | ||
| 58 | /* | 75 | /* |
| 59 | * Memory statistics structure. | 76 | * Memory statistics structure. |
| @@ -53,15 +53,20 @@ struct bnxt_re_uctx_resp { · 52 unmodified lines | |||
| 53 | __u32 rsvd; | 53 | __u32 rsvd; |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | /* | ||
| 57 | * This struct is placed after the ib_uverbs_alloc_pd_resp struct, which is | ||
| 58 | * not 8 byted aligned. To avoid undesired padding in various cases we have to | ||
| 59 | * set this struct to packed. | ||
| 60 | */ | ||
| 56 | struct bnxt_re_pd_resp { | 61 | struct bnxt_re_pd_resp { |
| 57 | __u32 pdid; | 62 | __u32 pdid; |
| 58 | __u32 dpi; | 63 | __u32 dpi; |
| 59 | __u64 dbr; | 64 | __u64 dbr; |
| 60 | }; | 65 | } __attribute__((packed, aligned(4))); |
| 61 | 66 | ||
| 62 | struct bnxt_re_cq_req { | 67 | struct bnxt_re_cq_req { |
| 63 | __u64 cq_va; | 68 | __aligned_u64 cq_va; |
| 64 | __u64 cq_handle; | 69 | __aligned_u64 cq_handle; |
| 65 | }; | 70 | }; |
| 66 | 71 | ||
| 67 | struct bnxt_re_cq_resp { | 72 | struct bnxt_re_cq_resp { |
| @@ -72,9 +77,9 @@ struct bnxt_re_cq_resp { · 4 unmodified lines | |||
| 72 | }; | 77 | }; |
| 73 | 78 | ||
| 74 | struct bnxt_re_qp_req { | 79 | struct bnxt_re_qp_req { |
| 75 | __u64 qpsva; | 80 | __aligned_u64 qpsva; |
| 76 | __u64 qprva; | 81 | __aligned_u64 qprva; |
| 77 | __u64 qp_handle; | 82 | __aligned_u64 qp_handle; |
| 78 | }; | 83 | }; |
| 79 | 84 | ||
| 80 | struct bnxt_re_qp_resp { | 85 | struct bnxt_re_qp_resp { |
| @@ -83,8 +88,8 @@ struct bnxt_re_qp_resp { · 2 unmodified lines | |||
| 83 | }; | 88 | }; |
| 84 | 89 | ||
| 85 | struct bnxt_re_srq_req { | 90 | struct bnxt_re_srq_req { |
| 86 | __u64 srqva; | 91 | __aligned_u64 srqva; |
| 87 | __u64 srq_handle; | 92 | __aligned_u64 srq_handle; |
| 88 | }; | 93 | }; |
| 89 | 94 | ||
| 90 | struct bnxt_re_srq_resp { | 95 | struct bnxt_re_srq_resp { |
| @@ -41,21 +41,21 @@ · 40 unmodified lines | |||
| 41 | * Make sure that all structs defined in this file remain laid out so | 41 | * Make sure that all structs defined in this file remain laid out so |
| 42 | * that they pack the same way on 32-bit and 64-bit architectures (to | 42 | * that they pack the same way on 32-bit and 64-bit architectures (to |
| 43 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | 43 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). |
| 44 | * In particular do not use pointer types -- pass pointers in __u64 | 44 | * In particular do not use pointer types -- pass pointers in __aligned_u64 |
| 45 | * instead. | 45 | * instead. |
| 46 | */ | 46 | */ |
| 47 | struct iwch_create_cq_req { | 47 | struct iwch_create_cq_req { |
| 48 | __u64 user_rptr_addr; | 48 | __aligned_u64 user_rptr_addr; |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | struct iwch_create_cq_resp_v0 { | 51 | struct iwch_create_cq_resp_v0 { |
| 52 | __u64 key; | 52 | __aligned_u64 key; |
| 53 | __u32 cqid; | 53 | __u32 cqid; |
| 54 | __u32 size_log2; | 54 | __u32 size_log2; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | struct iwch_create_cq_resp { | 57 | struct iwch_create_cq_resp { |
| 58 | __u64 key; | 58 | __aligned_u64 key; |
| 59 | __u32 cqid; | 59 | __u32 cqid; |
| 60 | __u32 size_log2; | 60 | __u32 size_log2; |
| 61 | __u32 memsize; | 61 | __u32 memsize; |
| @@ -63,8 +63,8 @@ struct iwch_create_cq_resp { · 1 unmodified line | |||
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | struct iwch_create_qp_resp { | 65 | struct iwch_create_qp_resp { |
| 66 | __u64 key; | 66 | __aligned_u64 key; |
| 67 | __u64 db_key; | 67 | __aligned_u64 db_key; |
| 68 | __u32 qpid; | 68 | __u32 qpid; |
| 69 | __u32 size_log2; | 69 | __u32 size_log2; |
| 70 | __u32 sq_size_log2; | 70 | __u32 sq_size_log2; |
| @@ -74,4 +74,9 @@ struct iwch_create_qp_resp { · 3 unmodified lines | |||
| 74 | struct iwch_reg_user_mr_resp { | 74 | struct iwch_reg_user_mr_resp { |
| 75 | __u32 pbl_addr; | 75 | __u32 pbl_addr; |
| 76 | }; | 76 | }; |
| 77 | |||
| 78 | struct iwch_alloc_pd_resp { | ||
| 79 | __u32 pdid; | ||
| 80 | }; | ||
| 81 | |||
| 77 | #endif /* CXGB3_ABI_USER_H */ | 82 | #endif /* CXGB3_ABI_USER_H */ |
| @@ -41,13 +41,13 @@ · 40 unmodified lines | |||
| 41 | * Make sure that all structs defined in this file remain laid out so | 41 | * Make sure that all structs defined in this file remain laid out so |
| 42 | * that they pack the same way on 32-bit and 64-bit architectures (to | 42 | * that they pack the same way on 32-bit and 64-bit architectures (to |
| 43 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). | 43 | * avoid incompatibility between 32-bit userspace and 64-bit kernels). |
| 44 | * In particular do not use pointer types -- pass pointers in __u64 | 44 | * In particular do not use pointer types -- pass pointers in __aligned_u64 |
| 45 | * instead. | 45 | * instead. |
| 46 | */ | 46 | */ |
| 47 | struct c4iw_create_cq_resp { | 47 | struct c4iw_create_cq_resp { |
| 48 | __u64 key; | 48 | __aligned_u64 key; |
| 49 | __u64 gts_key; | 49 | __aligned_u64 gts_key; |
| 50 | __u64 memsize; | 50 | __aligned_u64 memsize; |
| 51 | __u32 cqid; | 51 | __u32 cqid; |
| 52 | __u32 size; | 52 | __u32 size; |
| 53 | __u32 qid_mask; | 53 | __u32 qid_mask; |
| @@ -59,13 +59,13 @@ enum { · 5 unmodified lines | |||
| 59 | }; | 59 | }; |
| 60 | 60 | ||
| 61 | struct c4iw_create_qp_resp { | 61 | struct c4iw_create_qp_resp { |
| 62 | __u64 ma_sync_key; | 62 | __aligned_u64 ma_sync_key; |
| 63 | __u64 sq_key; | 63 | __aligned_u64 sq_key; |
| 64 | __u64 rq_key; | 64 | __aligned_u64 rq_key; |
| 65 | __u64 sq_db_gts_key; | 65 | __aligned_u64 sq_db_gts_key; |
| 66 | __u64 rq_db_gts_key; | 66 | __aligned_u64 rq_db_gts_key; |
| 67 | __u64 sq_memsize; | 67 | __aligned_u64 sq_memsize; |
| 68 | __u64 rq_memsize; | 68 | __aligned_u64 rq_memsize; |
| 69 | __u32 sqid; | 69 | __u32 sqid; |
| 70 | __u32 rqid; | 70 | __u32 rqid; |
| 71 | __u32 sq_size; | 71 | __u32 sq_size; |
| @@ -75,8 +75,13 @@ struct c4iw_create_qp_resp { · 3 unmodified lines | |||
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | struct c4iw_alloc_ucontext_resp { | 77 | struct c4iw_alloc_ucontext_resp { |
| 78 | __u64 status_page_key; | 78 | __aligned_u64 status_page_key; |
| 79 | __u32 status_page_size; | 79 | __u32 status_page_size; |
| 80 | __u32 reserved; /* explicit padding (optional for i386) */ | 80 | __u32 reserved; /* explicit padding (optional for i386) */ |
| 81 | }; | 81 | }; |
| 82 | |||
| 83 | struct c4iw_alloc_pd_resp { | ||
| 84 | __u32 pdid; | ||
| 85 | }; | ||
| 86 | |||
| 82 | #endif /* CXGB4_ABI_USER_H */ | 87 | #endif /* CXGB4_ABI_USER_H */ |
| @@ -79,7 +79,7 @@ struct hfi1_user_info { · 78 unmodified lines | |||
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | struct hfi1_ctxt_info { | 81 | struct hfi1_ctxt_info { |
| 82 | __u64 runtime_flags; /* chip/drv runtime flags (HFI1_CAP_*) */ | 82 | __aligned_u64 runtime_flags; /* chip/drv runtime flags (HFI1_CAP_*) */ |
| 83 | __u32 rcvegr_size; /* size of each eager buffer */ | 83 | __u32 rcvegr_size; /* size of each eager buffer */ |
| 84 | __u16 num_active; /* number of active units */ | 84 | __u16 num_active; /* number of active units */ |
| 85 | __u16 unit; /* unit (chip) assigned to caller */ | 85 | __u16 unit; /* unit (chip) assigned to caller */ |
| @@ -98,9 +98,9 @@ struct hfi1_ctxt_info { · 12 unmodified lines | |||
| 98 | 98 | ||
| 99 | struct hfi1_tid_info { | 99 | struct hfi1_tid_info { |
| 100 | /* virtual address of first page in transfer */ | 100 | /* virtual address of first page in transfer */ |
| 101 | __u64 vaddr; | 101 | __aligned_u64 vaddr; |
| 102 | /* pointer to tid array. this array is big enough */ | 102 | /* pointer to tid array. this array is big enough */ |
| 103 | __u64 tidlist; | 103 | __aligned_u64 tidlist; |
| 104 | /* number of tids programmed by this request */ | 104 | /* number of tids programmed by this request */ |
| 105 | __u32 tidcnt; | 105 | __u32 tidcnt; |
| 106 | /* length of transfer buffer programmed by this request */ | 106 | /* length of transfer buffer programmed by this request */ |
| @@ -131,23 +131,23 @@ struct hfi1_base_info { · 24 unmodified lines | |||
| 131 | */ | 131 | */ |
| 132 | __u32 bthqp; | 132 | __u32 bthqp; |
| 133 | /* PIO credit return address, */ | 133 | /* PIO credit return address, */ |
| 134 | __u64 sc_credits_addr; | 134 | __aligned_u64 sc_credits_addr; |
| 135 | /* | 135 | /* |
| 136 | * Base address of write-only pio buffers for this process. | 136 | * Base address of write-only pio buffers for this process. |
| 137 | * Each buffer has sendpio_credits*64 bytes. | 137 | * Each buffer has sendpio_credits*64 bytes. |
| 138 | */ | 138 | */ |
| 139 | __u64 pio_bufbase_sop; | 139 | __aligned_u64 pio_bufbase_sop; |
| 140 | /* | 140 | /* |
| 141 | * Base address of write-only pio buffers for this process. | 141 | * Base address of write-only pio buffers for this process. |
| 142 | * Each buffer has sendpio_credits*64 bytes. | 142 | * Each buffer has sendpio_credits*64 bytes. |
| 143 | */ | 143 | */ |
| 144 | __u64 pio_bufbase; | 144 | __aligned_u64 pio_bufbase; |
| 145 | /* address where receive buffer queue is mapped into */ | 145 | /* address where receive buffer queue is mapped into */ |
| 146 | __u64 rcvhdr_bufbase; | 146 | __aligned_u64 rcvhdr_bufbase; |
| 147 | /* base address of Eager receive buffers. */ | 147 | /* base address of Eager receive buffers. */ |
| 148 | __u64 rcvegr_bufbase; | 148 | __aligned_u64 rcvegr_bufbase; |
| 149 | /* base address of SDMA completion ring */ | 149 | /* base address of SDMA completion ring */ |
| 150 | __u64 sdma_comp_bufbase; | 150 | __aligned_u64 sdma_comp_bufbase; |
| 151 | /* | 151 | /* |
| 152 | * User register base for init code, not to be used directly by | 152 | * User register base for init code, not to be used directly by |
| 153 | * protocol or applications. Always maps real chip register space. | 153 | * protocol or applications. Always maps real chip register space. |
| @@ -155,20 +155,20 @@ struct hfi1_base_info { · 1 unmodified line | |||
| 155 | * ur_rcvhdrhead, ur_rcvhdrtail, ur_rcvegrhead, ur_rcvegrtail, | 155 | * ur_rcvhdrhead, ur_rcvhdrtail, ur_rcvegrhead, ur_rcvegrtail, |
| 156 | * ur_rcvtidflow | 156 | * ur_rcvtidflow |
| 157 | */ | 157 | */ |
| 158 | __u64 user_regbase; | 158 | __aligned_u64 user_regbase; |
| 159 | /* notification events */ | 159 | /* notification events */ |
| 160 | __u64 events_bufbase; | 160 | __aligned_u64 events_bufbase; |
| 161 | /* status page */ | 161 | /* status page */ |
| 162 | __u64 status_bufbase; | 162 | __aligned_u64 status_bufbase; |
| 163 | /* rcvhdrtail update */ | 163 | /* rcvhdrtail update */ |
| 164 | __u64 rcvhdrtail_base; | 164 | __aligned_u64 rcvhdrtail_base; |
| 165 | /* | 165 | /* |
| 166 | * shared memory pages for subctxts if ctxt is shared; these cover | 166 | * shared memory pages for subctxts if ctxt is shared; these cover |
| 167 | * all the processes in the group sharing a single context. | 167 | * all the processes in the group sharing a single context. |
| 168 | * all have enough space for the num_subcontexts value on this job. | 168 | * all have enough space for the num_subcontexts value on this job. |
| 169 | */ | 169 | */ |
| 170 | __u64 subctxt_uregbase; | 170 | __aligned_u64 subctxt_uregbase; |
| 171 | __u64 subctxt_rcvegrbuf; | 171 | __aligned_u64 subctxt_rcvegrbuf; |
| 172 | __u64 subctxt_rcvhdrbuf; | 172 | __aligned_u64 subctxt_rcvhdrbuf; |
| 173 | }; | 173 | }; |
| 174 | #endif /* _LINIUX__HFI1_IOCTL_H */ | 174 | #endif /* _LINIUX__HFI1_IOCTL_H */ |
| @@ -177,8 +177,8 @@ struct hfi1_sdma_comp_entry { · 176 unmodified lines | |||
| 177 | * Device status and notifications from driver to user-space. | 177 | * Device status and notifications from driver to user-space. |
| 178 | */ | 178 | */ |
| 179 | struct hfi1_status { | 179 | struct hfi1_status { |
| 180 | __u64 dev; /* device/hw status bits */ | 180 | __aligned_u64 dev; /* device/hw status bits */ |
| 181 | __u64 port; /* port state and status bits */ | 181 | __aligned_u64 port; /* port state and status bits */ |
| 182 | char freezemsg[0]; | 182 | char freezemsg[0]; |
| 183 | }; | 183 | }; |
| 184 | 184 | ||
| @@ -219,7 +219,7 @@ struct sdma_req_info { · 34 unmodified lines | |||
| 219 | * in charge of managing its own ring. | 219 | * in charge of managing its own ring. |
| 220 | */ | 220 | */ |
| 221 | __u16 comp_idx; | 221 | __u16 comp_idx; |
| 222 | } __packed; | 222 | } __attribute__((__packed__)); |
| 223 | 223 | ||
| 224 | /* | 224 | /* |
| 225 | * SW KDETH header. | 225 | * SW KDETH header. |
| @@ -230,7 +230,7 @@ struct hfi1_kdeth_header { · 4 unmodified lines | |||
| 230 | __le16 jkey; | 230 | __le16 jkey; |
| 231 | __le16 hcrc; | 231 | __le16 hcrc; |
| 232 | __le32 swdata[7]; | 232 | __le32 swdata[7]; |
| 233 | } __packed; | 233 | } __attribute__((__packed__)); |
| 234 | 234 | ||
| 235 | /* | 235 | /* |
| 236 | * Structure describing the headers that User space uses. The | 236 | * Structure describing the headers that User space uses. The |
| @@ -241,7 +241,7 @@ struct hfi1_pkt_header { · 4 unmodified lines | |||
| 241 | __be16 lrh[4]; | 241 | __be16 lrh[4]; |
| 242 | __be32 bth[3]; | 242 | __be32 bth[3]; |
| 243 | struct hfi1_kdeth_header kdeth; | 243 | struct hfi1_kdeth_header kdeth; |
| 244 | } __packed; | 244 | } __attribute__((__packed__)); |
| 245 | 245 | ||
| 246 | 246 | ||
| 247 | /* | 247 | /* |
| @@ -37,19 +37,35 @@ · 36 unmodified lines | |||
| 37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
| 38 | 38 | ||
| 39 | struct hns_roce_ib_create_cq { | 39 | struct hns_roce_ib_create_cq { |
| 40 | __u64 buf_addr; | 40 | __aligned_u64 buf_addr; |
| 41 | __aligned_u64 db_addr; | ||
| 42 | }; | ||
| 43 | |||
| 44 | struct hns_roce_ib_create_cq_resp { | ||
| 45 | __aligned_u64 cqn; /* Only 32 bits used, 64 for compat */ | ||
| 46 | __aligned_u64 cap_flags; | ||
| 41 | }; | 47 | }; |
| 42 | 48 | ||
| 43 | struct hns_roce_ib_create_qp { | 49 | struct hns_roce_ib_create_qp { |
| 44 | __u64 buf_addr; | 50 | __aligned_u64 buf_addr; |
| 45 | __u64 db_addr; | 51 | __aligned_u64 db_addr; |
| 46 | __u8 log_sq_bb_count; | 52 | __u8 log_sq_bb_count; |
| 47 | __u8 log_sq_stride; | 53 | __u8 log_sq_stride; |
| 48 | __u8 sq_no_prefetch; | 54 | __u8 sq_no_prefetch; |
| 49 | __u8 reserved[5]; | 55 | __u8 reserved[5]; |
| 50 | }; | 56 | }; |
| 51 | 57 | ||
| 58 | struct hns_roce_ib_create_qp_resp { | ||
| 59 | __aligned_u64 cap_flags; | ||
| 60 | }; | ||
| 61 | |||
| 52 | struct hns_roce_ib_alloc_ucontext_resp { | 62 | struct hns_roce_ib_alloc_ucontext_resp { |
| 53 | __u32 qp_tab_size; | 63 | __u32 qp_tab_size; |
| 64 | __u32 reserved; | ||
| 54 | }; | 65 | }; |
| 66 | |||
| 67 | struct hns_roce_ib_alloc_pd_resp { | ||
| 68 | __u32 pdn; | ||
| 69 | }; | ||
| 70 | |||
| 55 | #endif /* HNS_ABI_USER_H */ | 71 | #endif /* HNS_ABI_USER_H */ |
| @@ -0,0 +1,107 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2006 - 2016 Intel Corporation. All rights reserved. | ||
| 3 | * Copyright (c) 2005 Topspin Communications. All rights reserved. | ||
| 4 | * Copyright (c) 2005 Cisco Systems. All rights reserved. | ||
| 5 | * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. | ||
| 6 | * | ||
| 7 | * This software is available to you under a choice of one of two | ||
| 8 | * licenses. You may choose to be licensed under the terms of the GNU | ||
| 9 | * General Public License (GPL) Version 2, available from the file | ||
| 10 | * COPYING in the main directory of this source tree, or the | ||
| 11 | * OpenIB.org BSD license below: | ||
| 12 | * | ||
| 13 | * Redistribution and use in source and binary forms, with or | ||
| 14 | * without modification, are permitted provided that the following | ||
| 15 | * conditions are met: | ||
| 16 | * | ||
| 17 | * - Redistributions of source code must retain the above | ||
| 18 | * copyright notice, this list of conditions and the following | ||
| 19 | * disclaimer. | ||
| 20 | * | ||
| 21 | * - Redistributions in binary form must reproduce the above | ||
| 22 | * copyright notice, this list of conditions and the following | ||
| 23 | * disclaimer in the documentation and/or other materials | ||
| 24 | * provided with the distribution. | ||
| 25 | * | ||
| 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| 27 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
| 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| 29 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
| 30 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
| 31 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 32 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 33 | * SOFTWARE. | ||
| 34 | * | ||
| 35 | */ | ||
| 36 | |||
| 37 | #ifndef I40IW_ABI_H | ||
| 38 | #define I40IW_ABI_H | ||
| 39 | |||
| 40 | #include <linux/types.h> | ||
| 41 | |||
| 42 | #define I40IW_ABI_VER 5 | ||
| 43 | |||
| 44 | struct i40iw_alloc_ucontext_req { | ||
| 45 | __u32 reserved32; | ||
| 46 | __u8 userspace_ver; | ||
| 47 | __u8 reserved8[3]; | ||
| 48 | }; | ||
| 49 | |||
| 50 | struct i40iw_alloc_ucontext_resp { | ||
| 51 | __u32 max_pds; /* maximum pds allowed for this user process */ | ||
| 52 | __u32 max_qps; /* maximum qps allowed for this user process */ | ||
| 53 | __u32 wq_size; /* size of the WQs (sq+rq) allocated to the mmaped area */ | ||
| 54 | __u8 kernel_ver; | ||
| 55 | __u8 reserved[3]; | ||
| 56 | }; | ||
| 57 | |||
| 58 | struct i40iw_alloc_pd_resp { | ||
| 59 | __u32 pd_id; | ||
| 60 | __u8 reserved[4]; | ||
| 61 | }; | ||
| 62 | |||
| 63 | struct i40iw_create_cq_req { | ||
| 64 | __aligned_u64 user_cq_buffer; | ||
| 65 | __aligned_u64 user_shadow_area; | ||
| 66 | }; | ||
| 67 | |||
| 68 | struct i40iw_create_qp_req { | ||
| 69 | __aligned_u64 user_wqe_buffers; | ||
| 70 | __aligned_u64 user_compl_ctx; | ||
| 71 | |||
| 72 | /* UDA QP PHB */ | ||
| 73 | __aligned_u64 user_sq_phb; /* place for VA of the sq phb buff */ | ||
| 74 | __aligned_u64 user_rq_phb; /* place for VA of the rq phb buff */ | ||
| 75 | }; | ||
| 76 | |||
| 77 | enum i40iw_memreg_type { | ||
| 78 | IW_MEMREG_TYPE_MEM = 0x0000, | ||
| 79 | IW_MEMREG_TYPE_QP = 0x0001, | ||
| 80 | IW_MEMREG_TYPE_CQ = 0x0002, | ||
| 81 | }; | ||
| 82 | |||
| 83 | struct i40iw_mem_reg_req { | ||
| 84 | __u16 reg_type; /* Memory, QP or CQ */ | ||
| 85 | __u16 cq_pages; | ||
| 86 | __u16 rq_pages; | ||
| 87 | __u16 sq_pages; | ||
| 88 | }; | ||
| 89 | |||
| 90 | struct i40iw_create_cq_resp { | ||
| 91 | __u32 cq_id; | ||
| 92 | __u32 cq_size; | ||
| 93 | __u32 mmap_db_index; | ||
| 94 | __u32 reserved; | ||
| 95 | }; | ||
| 96 | |||
| 97 | struct i40iw_create_qp_resp { | ||
| 98 | __u32 qp_id; | ||
| 99 | __u32 actual_sq_size; | ||
| 100 | __u32 actual_rq_size; | ||
| 101 | __u32 i40iw_drv_opt; | ||
| 102 | __u16 push_idx; | ||
| 103 | __u8 lsmm; | ||
| 104 | __u8 rsvd2; | ||
| 105 | }; | ||
| 106 | |||
| 107 | #endif | ||
| @@ -73,8 +73,8 @@ struct ib_ucm_cmd_hdr { · 72 unmodified lines | |||
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | struct ib_ucm_create_id { | 75 | struct ib_ucm_create_id { |
| 76 | __u64 uid; | 76 | __aligned_u64 uid; |
| 77 | __u64 response; | 77 | __aligned_u64 response; |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | struct ib_ucm_create_id_resp { | 80 | struct ib_ucm_create_id_resp { |
| @@ -82,7 +82,7 @@ struct ib_ucm_create_id_resp { · 1 unmodified line | |||
| 82 | }; | 82 | }; |
| 83 | 83 | ||
| 84 | struct ib_ucm_destroy_id { | 84 | struct ib_ucm_destroy_id { |
| 85 | __u64 response; | 85 | __aligned_u64 response; |
| 86 | __u32 id; | 86 | __u32 id; |
| 87 | __u32 reserved; | 87 | __u32 reserved; |
| 88 | }; | 88 | }; |
| @@ -92,7 +92,7 @@ struct ib_ucm_destroy_id_resp { · 3 unmodified lines | |||
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | struct ib_ucm_attr_id { | 94 | struct ib_ucm_attr_id { |
| 95 | __u64 response; | 95 | __aligned_u64 response; |
| 96 | __u32 id; | 96 | __u32 id; |
| 97 | __u32 reserved; | 97 | __u32 reserved; |
| 98 | }; | 98 | }; |
| @@ -105,7 +105,7 @@ struct ib_ucm_attr_id_resp { · 6 unmodified lines | |||
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | struct ib_ucm_init_qp_attr { | 107 | struct ib_ucm_init_qp_attr { |
| 108 | __u64 response; | 108 | __aligned_u64 response; |
| 109 | __u32 id; | 109 | __u32 id; |
| 110 | __u32 qp_state; | 110 | __u32 qp_state; |
| 111 | }; | 111 | }; |
| @@ -123,7 +123,7 @@ struct ib_ucm_notify { · 11 unmodified lines | |||
| 123 | }; | 123 | }; |
| 124 | 124 | ||
| 125 | struct ib_ucm_private_data { | 125 | struct ib_ucm_private_data { |
| 126 | __u64 data; | 126 | __aligned_u64 data; |
| 127 | __u32 id; | 127 | __u32 id; |
| 128 | __u8 len; | 128 | __u8 len; |
| 129 | __u8 reserved[3]; | 129 | __u8 reserved[3]; |
| @@ -135,9 +135,9 @@ struct ib_ucm_req { · 5 unmodified lines | |||
| 135 | __u32 qp_type; | 135 | __u32 qp_type; |
| 136 | __u32 psn; | 136 | __u32 psn; |
| 137 | __be64 sid; | 137 | __be64 sid; |
| 138 | __u64 data; | 138 | __aligned_u64 data; |
| 139 | __u64 primary_path; | 139 | __aligned_u64 primary_path; |
| 140 | __u64 alternate_path; | 140 | __aligned_u64 alternate_path; |
| 141 | __u8 len; | 141 | __u8 len; |
| 142 | __u8 peer_to_peer; | 142 | __u8 peer_to_peer; |
| 143 | __u8 responder_resources; | 143 | __u8 responder_resources; |
| @@ -153,8 +153,8 @@ struct ib_ucm_req { · 9 unmodified lines | |||
| 153 | }; | 153 | }; |
| 154 | 154 | ||
| 155 | struct ib_ucm_rep { | 155 | struct ib_ucm_rep { |
| 156 | __u64 uid; | 156 | __aligned_u64 uid; |
| 157 | __u64 data; | 157 | __aligned_u64 data; |
| 158 | __u32 id; | 158 | __u32 id; |
| 159 | __u32 qpn; | 159 | __u32 qpn; |
| 160 | __u32 psn; | 160 | __u32 psn; |
| @@ -172,15 +172,15 @@ struct ib_ucm_rep { · 11 unmodified lines | |||
| 172 | struct ib_ucm_info { | 172 | struct ib_ucm_info { |
| 173 | __u32 id; | 173 | __u32 id; |
| 174 | __u32 status; | 174 | __u32 status; |
| 175 | __u64 info; | 175 | __aligned_u64 info; |
| 176 | __u64 data; | 176 | __aligned_u64 data; |
| 177 | __u8 info_len; | 177 | __u8 info_len; |
| 178 | __u8 data_len; | 178 | __u8 data_len; |
| 179 | __u8 reserved[6]; | 179 | __u8 reserved[6]; |
| 180 | }; | 180 | }; |
| 181 | 181 | ||
| 182 | struct ib_ucm_mra { | 182 | struct ib_ucm_mra { |
| 183 | __u64 data; | 183 | __aligned_u64 data; |
| 184 | __u32 id; | 184 | __u32 id; |
| 185 | __u8 len; | 185 | __u8 len; |
| 186 | __u8 timeout; | 186 | __u8 timeout; |
| @@ -188,8 +188,8 @@ struct ib_ucm_mra { · 1 unmodified line | |||
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| 190 | struct ib_ucm_lap { | 190 | struct ib_ucm_lap { |
| 191 | __u64 path; | 191 | __aligned_u64 path; |
| 192 | __u64 data; | 192 | __aligned_u64 data; |
| 193 | __u32 id; | 193 | __u32 id; |
| 194 | __u8 len; | 194 | __u8 len; |
| 195 | __u8 reserved[3]; | 195 | __u8 reserved[3]; |
| @@ -199,8 +199,8 @@ struct ib_ucm_sidr_req { · 3 unmodified lines | |||
| 199 | __u32 id; | 199 | __u32 id; |
| 200 | __u32 timeout; | 200 | __u32 timeout; |
| 201 | __be64 sid; | 201 | __be64 sid; |
| 202 | __u64 data; | 202 | __aligned_u64 data; |
| 203 | __u64 path; | 203 | __aligned_u64 path; |
| 204 | __u16 reserved_pkey; | 204 | __u16 reserved_pkey; |
| 205 | __u8 len; | 205 | __u8 len; |
| 206 | __u8 max_cm_retries; | 206 | __u8 max_cm_retries; |
| @@ -212,8 +212,8 @@ struct ib_ucm_sidr_rep { · 5 unmodified lines | |||
| 212 | __u32 qpn; | 212 | __u32 qpn; |
| 213 | __u32 qkey; | 213 | __u32 qkey; |
| 214 | __u32 status; | 214 | __u32 status; |
| 215 | __u64 info; | 215 | __aligned_u64 info; |
| 216 | __u64 data; | 216 | __aligned_u64 data; |
| 217 | __u8 info_len; | 217 | __u8 info_len; |
| 218 | __u8 data_len; | 218 | __u8 data_len; |
| 219 | __u8 reserved[6]; | 219 | __u8 reserved[6]; |
| @@ -222,9 +222,9 @@ struct ib_ucm_sidr_rep { · 2 unmodified lines | |||
| 222 | * event notification ABI structures. | 222 | * event notification ABI structures. |
| 223 | */ | 223 | */ |
| 224 | struct ib_ucm_event_get { | 224 | struct ib_ucm_event_get { |
| 225 | __u64 response; | 225 | __aligned_u64 response; |
| 226 | __u64 data; | 226 | __aligned_u64 data; |
| 227 | __u64 info; | 227 | __aligned_u64 info; |
| 228 | __u8 data_len; | 228 | __u8 data_len; |
| 229 | __u8 info_len; | 229 | __u8 info_len; |
| 230 | __u8 reserved[6]; | 230 | __u8 reserved[6]; |
| @@ -303,7 +303,7 @@ struct ib_ucm_sidr_rep_event_resp { · 72 unmodified lines | |||
| 303 | #define IB_UCM_PRES_ALTERNATE 0x08 | 303 | #define IB_UCM_PRES_ALTERNATE 0x08 |
| 304 | 304 | ||
| 305 | struct ib_ucm_event_resp { | 305 | struct ib_ucm_event_resp { |
| 306 | __u64 uid; | 306 | __aligned_u64 uid; |
| 307 | __u32 id; | 307 | __u32 id; |
| 308 | __u32 event; | 308 | __u32 event; |
| 309 | __u32 present; | 309 | __u32 present; |
| @@ -0,0 +1,134 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2018, 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_CMDS_H | ||
| 34 | #define IB_USER_IOCTL_CMDS_H | ||
| 35 | |||
| 36 | #define UVERBS_ID_NS_MASK 0xF000 | ||
| 37 | #define UVERBS_ID_NS_SHIFT 12 | ||
| 38 | |||
| 39 | #define UVERBS_UDATA_DRIVER_DATA_NS 1 | ||
| 40 | #define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT) | ||
| 41 | |||
| 42 | enum uverbs_default_objects { | ||
| 43 | UVERBS_OBJECT_DEVICE, /* No instances of DEVICE are allowed */ | ||
| 44 | UVERBS_OBJECT_PD, | ||
| 45 | UVERBS_OBJECT_COMP_CHANNEL, | ||
| 46 | UVERBS_OBJECT_CQ, | ||
| 47 | UVERBS_OBJECT_QP, | ||
| 48 | UVERBS_OBJECT_SRQ, | ||
| 49 | UVERBS_OBJECT_AH, | ||
| 50 | UVERBS_OBJECT_MR, | ||
| 51 | UVERBS_OBJECT_MW, | ||
| 52 | UVERBS_OBJECT_FLOW, | ||
| 53 | UVERBS_OBJECT_XRCD, | ||
| 54 | UVERBS_OBJECT_RWQ_IND_TBL, | ||
| 55 | UVERBS_OBJECT_WQ, | ||
| 56 | UVERBS_OBJECT_FLOW_ACTION, | ||
| 57 | UVERBS_OBJECT_DM, | ||
| 58 | }; | ||
| 59 | |||
| 60 | enum { | ||
| 61 | UVERBS_ATTR_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, | ||
| 62 | UVERBS_ATTR_UHW_OUT, | ||
| 63 | }; | ||
| 64 | |||
| 65 | enum uverbs_attrs_create_cq_cmd_attr_ids { | ||
| 66 | UVERBS_ATTR_CREATE_CQ_HANDLE, | ||
| 67 | UVERBS_ATTR_CREATE_CQ_CQE, | ||
| 68 | UVERBS_ATTR_CREATE_CQ_USER_HANDLE, | ||
| 69 | UVERBS_ATTR_CREATE_CQ_COMP_CHANNEL, | ||
| 70 | UVERBS_ATTR_CREATE_CQ_COMP_VECTOR, | ||
| 71 | UVERBS_ATTR_CREATE_CQ_FLAGS, | ||
| 72 | UVERBS_ATTR_CREATE_CQ_RESP_CQE, | ||
| 73 | }; | ||
| 74 | |||
| 75 | enum uverbs_attrs_destroy_cq_cmd_attr_ids { | ||
| 76 | UVERBS_ATTR_DESTROY_CQ_HANDLE, | ||
| 77 | UVERBS_ATTR_DESTROY_CQ_RESP, | ||
| 78 | }; | ||
| 79 | |||
| 80 | enum uverbs_attrs_create_flow_action_esp { | ||
| 81 | UVERBS_ATTR_FLOW_ACTION_ESP_HANDLE, | ||
| 82 | UVERBS_ATTR_FLOW_ACTION_ESP_ATTRS, | ||
| 83 | UVERBS_ATTR_FLOW_ACTION_ESP_ESN, | ||
| 84 | UVERBS_ATTR_FLOW_ACTION_ESP_KEYMAT, | ||
| 85 | UVERBS_ATTR_FLOW_ACTION_ESP_REPLAY, | ||
| 86 | UVERBS_ATTR_FLOW_ACTION_ESP_ENCAP, | ||
| 87 | }; | ||
| 88 | |||
| 89 | enum uverbs_attrs_destroy_flow_action_esp { | ||
| 90 | UVERBS_ATTR_DESTROY_FLOW_ACTION_HANDLE, | ||
| 91 | }; | ||
| 92 | |||
| 93 | enum uverbs_methods_cq { | ||
| 94 | UVERBS_METHOD_CQ_CREATE, | ||
| 95 | UVERBS_METHOD_CQ_DESTROY, | ||
| 96 | }; | ||
| 97 | |||
| 98 | enum uverbs_methods_actions_flow_action_ops { | ||
| 99 | UVERBS_METHOD_FLOW_ACTION_ESP_CREATE, | ||
| 100 | UVERBS_METHOD_FLOW_ACTION_DESTROY, | ||
| 101 | UVERBS_METHOD_FLOW_ACTION_ESP_MODIFY, | ||
| 102 | }; | ||
| 103 | |||
| 104 | enum uverbs_attrs_alloc_dm_cmd_attr_ids { | ||
| 105 | UVERBS_ATTR_ALLOC_DM_HANDLE, | ||
| 106 | UVERBS_ATTR_ALLOC_DM_LENGTH, | ||
| 107 | UVERBS_ATTR_ALLOC_DM_ALIGNMENT, | ||
| 108 | }; | ||
| 109 | |||
| 110 | enum uverbs_attrs_free_dm_cmd_attr_ids { | ||
| 111 | UVERBS_ATTR_FREE_DM_HANDLE, | ||
| 112 | }; | ||
| 113 | |||
| 114 | enum uverbs_methods_dm { | ||
| 115 | UVERBS_METHOD_DM_ALLOC, | ||
| 116 | UVERBS_METHOD_DM_FREE, | ||
| 117 | }; | ||
| 118 | |||
| 119 | enum uverbs_attrs_reg_dm_mr_cmd_attr_ids { | ||
| 120 | UVERBS_ATTR_REG_DM_MR_HANDLE, | ||
| 121 | UVERBS_ATTR_REG_DM_MR_OFFSET, | ||
| 122 | UVERBS_ATTR_REG_DM_MR_LENGTH, | ||
| 123 | UVERBS_ATTR_REG_DM_MR_PD_HANDLE, | ||
| 124 | UVERBS_ATTR_REG_DM_MR_ACCESS_FLAGS, | ||
| 125 | UVERBS_ATTR_REG_DM_MR_DM_HANDLE, | ||
| 126 | UVERBS_ATTR_REG_DM_MR_RESP_LKEY, | ||
| 127 | UVERBS_ATTR_REG_DM_MR_RESP_RKEY, | ||
| 128 | }; | ||
| 129 | |||
| 130 | enum uverbs_methods_mr { | ||
| 131 | UVERBS_METHOD_DM_MR_REG, | ||
| 132 | }; | ||
| 133 | |||
| 134 | #endif | ||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ | ||
| 1 | /* | 2 | /* |
| 2 | * Copyright (c) 2017, Mellanox Technologies inc. All rights reserved. | 3 | * Copyright (c) 2017-2018, Mellanox Technologies inc. All rights reserved. |
| 3 | * | 4 | * |
| 4 | * This software is available to you under a choice of one of two | 5 | * 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 | * licenses. You may choose to be licensed under the terms of the GNU |
| @@ -33,52 +34,69 @@ · 27 unmodified lines | |||
| 33 | #ifndef IB_USER_IOCTL_VERBS_H | 34 | #ifndef IB_USER_IOCTL_VERBS_H |
| 34 | #define IB_USER_IOCTL_VERBS_H | 35 | #define IB_USER_IOCTL_VERBS_H |
| 35 | 36 | ||
| 36 | #include <rdma/rdma_user_ioctl.h> | 37 | #include <linux/types.h> |
| 37 | 38 | ||
| 38 | #define UVERBS_UDATA_DRIVER_DATA_NS 1 | 39 | #ifndef RDMA_UAPI_PTR |
| 39 | #define UVERBS_UDATA_DRIVER_DATA_FLAG (1UL << UVERBS_ID_NS_SHIFT) | 40 | #define RDMA_UAPI_PTR(_type, _name) __aligned_u64 _name |
| 40 | 41 | #endif | |
| 41 | enum uverbs_default_objects { | 42 | |
| 42 | UVERBS_OBJECT_DEVICE, /* No instances of DEVICE are allowed */ | 43 | enum ib_uverbs_flow_action_esp_keymat { |
| 43 | UVERBS_OBJECT_PD, | 44 | IB_UVERBS_FLOW_ACTION_ESP_KEYMAT_AES_GCM, |
| 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 | }; | 45 | }; |
| 57 | 46 | ||
| 58 | enum { | 47 | enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo { |
| 59 | UVERBS_UHW_IN = UVERBS_UDATA_DRIVER_DATA_FLAG, | 48 | IB_UVERBS_FLOW_ACTION_IV_ALGO_SEQ, |
| 60 | UVERBS_UHW_OUT, | ||
| 61 | }; | 49 | }; |
| 62 | 50 | ||
| 63 | enum uverbs_create_cq_cmd_attr_ids { | 51 | struct ib_uverbs_flow_action_esp_keymat_aes_gcm { |
| 64 | CREATE_CQ_HANDLE, | 52 | __aligned_u64 iv; |
| 65 | CREATE_CQ_CQE, | 53 | __u32 iv_algo; /* Use enum ib_uverbs_flow_action_esp_keymat_aes_gcm_iv_algo */ |
| 66 | CREATE_CQ_USER_HANDLE, | 54 | |
| 67 | CREATE_CQ_COMP_CHANNEL, | 55 | __u32 salt; |
| 68 | CREATE_CQ_COMP_VECTOR, | 56 | __u32 icv_len; |
| 69 | CREATE_CQ_FLAGS, | 57 | |
| 70 | CREATE_CQ_RESP_CQE, | 58 | __u32 key_len; |
| 59 | __u32 aes_key[256 / 32]; | ||
| 71 | }; | 60 | }; |
| 72 | 61 | ||
| 73 | enum uverbs_destroy_cq_cmd_attr_ids { | 62 | enum ib_uverbs_flow_action_esp_replay { |
| 74 | DESTROY_CQ_HANDLE, | 63 | IB_UVERBS_FLOW_ACTION_ESP_REPLAY_NONE, |
| 75 | DESTROY_CQ_RESP, | 64 | IB_UVERBS_FLOW_ACTION_ESP_REPLAY_BMP, |
| 76 | }; | 65 | }; |
| 77 | 66 | ||
| 78 | enum uverbs_actions_cq_ops { | 67 | struct ib_uverbs_flow_action_esp_replay_bmp { |
| 79 | UVERBS_CQ_CREATE, | 68 | __u32 size; |
| 80 | UVERBS_CQ_DESTROY, | ||
| 81 | }; | 69 | }; |
| 82 | 70 | ||
| 83 | #endif | 71 | enum ib_uverbs_flow_action_esp_flags { |
| 72 | IB_UVERBS_FLOW_ACTION_ESP_FLAGS_INLINE_CRYPTO = 0UL << 0, /* Default */ | ||
| 73 | IB_UVERBS_FLOW_ACTION_ESP_FLAGS_FULL_OFFLOAD = 1UL << 0, | ||
| 74 | |||
| 75 | IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TUNNEL = 0UL << 1, /* Default */ | ||
| 76 | IB_UVERBS_FLOW_ACTION_ESP_FLAGS_TRANSPORT = 1UL << 1, | ||
| 77 | |||
| 78 | IB_UVERBS_FLOW_ACTION_ESP_FLAGS_DECRYPT = 0UL << 2, /* Default */ | ||
| 79 | IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ENCRYPT = 1UL << 2, | ||
| 84 | 80 | ||
| 81 | IB_UVERBS_FLOW_ACTION_ESP_FLAGS_ESN_NEW_WINDOW = 1UL << 3, | ||
| 82 | }; | ||
| 83 | |||
| 84 | struct ib_uverbs_flow_action_esp_encap { | ||
| 85 | /* This struct represents a list of pointers to flow_xxxx_filter that | ||
| 86 | * encapsulates the payload in ESP tunnel mode. | ||
| 87 | */ | ||
| 88 | RDMA_UAPI_PTR(void *, val_ptr); /* pointer to a flow_xxxx_filter */ | ||
| 89 | RDMA_UAPI_PTR(struct ib_uverbs_flow_action_esp_encap *, next_ptr); | ||
| 90 | __u16 len; /* Len of the filter struct val_ptr points to */ | ||
| 91 | __u16 type; /* Use flow_spec_type enum */ | ||
| 92 | }; | ||
| 93 | |||
| 94 | struct ib_uverbs_flow_action_esp { | ||
| 95 | __u32 spi; | ||
| 96 | __u32 seq; | ||
| 97 | __u32 tfc_pad; | ||
| 98 | __u32 flags; | ||
| 99 | __aligned_u64 hard_limit_pkts; | ||
| 100 | }; | ||
| 101 | |||
| 102 | #endif | ||
| @@ -143,7 +143,7 @@ struct ib_user_mad_hdr { · 142 unmodified lines | |||
| 143 | */ | 143 | */ |
| 144 | struct ib_user_mad { | 144 | struct ib_user_mad { |
| 145 | struct ib_user_mad_hdr hdr; | 145 | struct ib_user_mad_hdr hdr; |
| 146 | __u64 data[0]; | 146 | __aligned_u64 data[0]; |
| 147 | }; | 147 | }; |
| 148 | 148 | ||
| 149 | /* | 149 | /* |
| @@ -225,7 +225,7 @@ struct ib_user_mad_reg_req2 { · 75 unmodified lines | |||
| 225 | __u8 mgmt_class_version; | 225 | __u8 mgmt_class_version; |
| 226 | __u16 res; | 226 | __u16 res; |
| 227 | __u32 flags; | 227 | __u32 flags; |
| 228 | __u64 method_mask[2]; | 228 | __aligned_u64 method_mask[2]; |
| 229 | __u32 oui; | 229 | __u32 oui; |
| 230 | __u8 rmpp_version; | 230 | __u8 rmpp_version; |
| 231 | __u8 reserved[3]; | 231 | __u8 reserved[3]; |
| @@ -117,13 +117,13 @@ enum { · 116 unmodified lines | |||
| 117 | */ | 117 | */ |
| 118 | 118 | ||
| 119 | struct ib_uverbs_async_event_desc { | 119 | struct ib_uverbs_async_event_desc { |
| 120 | __u64 element; | 120 | __aligned_u64 element; |
| 121 | __u32 event_type; /* enum ib_event_type */ | 121 | __u32 event_type; /* enum ib_event_type */ |
| 122 | __u32 reserved; | 122 | __u32 reserved; |
| 123 | }; | 123 | }; |
| 124 | 124 | ||
| 125 | struct ib_uverbs_comp_event_desc { | 125 | struct ib_uverbs_comp_event_desc { |
| 126 | __u64 cq_handle; | 126 | __aligned_u64 cq_handle; |
| 127 | }; | 127 | }; |
| 128 | 128 | ||
| 129 | struct ib_uverbs_cq_moderation_caps { | 129 | struct ib_uverbs_cq_moderation_caps { |
| @@ -141,10 +141,7 @@ struct ib_uverbs_cq_moderation_caps { · 11 unmodified lines | |||
| 141 | */ | 141 | */ |
| 142 | 142 | ||
| 143 | #define IB_USER_VERBS_CMD_COMMAND_MASK 0xff | 143 | #define IB_USER_VERBS_CMD_COMMAND_MASK 0xff |
| 144 | #define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u | 144 | #define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u |
| 145 | #define IB_USER_VERBS_CMD_FLAGS_SHIFT 24 | ||
| 146 | |||
| 147 | #define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80 | ||
| 148 | 145 | ||
| 149 | struct ib_uverbs_cmd_hdr { | 146 | struct ib_uverbs_cmd_hdr { |
| 150 | __u32 command; | 147 | __u32 command; |
| @@ -153,15 +150,15 @@ struct ib_uverbs_cmd_hdr { · 2 unmodified lines | |||
| 153 | }; | 150 | }; |
| 154 | 151 | ||
| 155 | struct ib_uverbs_ex_cmd_hdr { | 152 | struct ib_uverbs_ex_cmd_hdr { |
| 156 | __u64 response; | 153 | __aligned_u64 response; |
| 157 | __u16 provider_in_words; | 154 | __u16 provider_in_words; |
| 158 | __u16 provider_out_words; | 155 | __u16 provider_out_words; |
| 159 | __u32 cmd_hdr_reserved; | 156 | __u32 cmd_hdr_reserved; |
| 160 | }; | 157 | }; |
| 161 | 158 | ||
| 162 | struct ib_uverbs_get_context { | 159 | struct ib_uverbs_get_context { |
| 163 | __u64 response; | 160 | __aligned_u64 response; |
| 164 | __u64 driver_data[0]; | 161 | __aligned_u64 driver_data[0]; |
| 165 | }; | 162 | }; |
| 166 | 163 | ||
| 167 | struct ib_uverbs_get_context_resp { | 164 | struct ib_uverbs_get_context_resp { |
| @@ -170,16 +167,16 @@ struct ib_uverbs_get_context_resp { · 2 unmodified lines | |||
| 170 | }; | 167 | }; |
| 171 | 168 | ||
| 172 | struct ib_uverbs_query_device { | 169 | struct ib_uverbs_query_device { |
| 173 | __u64 response; | 170 | __aligned_u64 response; |
| 174 | __u64 driver_data[0]; | 171 | __aligned_u64 driver_data[0]; |
| 175 | }; | 172 | }; |
| 176 | 173 | ||
| 177 | struct ib_uverbs_query_device_resp { | 174 | struct ib_uverbs_query_device_resp { |
| 178 | __u64 fw_ver; | 175 | __aligned_u64 fw_ver; |
| 179 | __be64 node_guid; | 176 | __be64 node_guid; |
| 180 | __be64 sys_image_guid; | 177 | __be64 sys_image_guid; |
| 181 | __u64 max_mr_size; | 178 | __aligned_u64 max_mr_size; |
| 182 | __u64 page_size_cap; | 179 | __aligned_u64 page_size_cap; |
| 183 | __u32 vendor_id; | 180 | __u32 vendor_id; |
| 184 | __u32 vendor_part_id; | 181 | __u32 vendor_part_id; |
| 185 | __u32 hw_ver; | 182 | __u32 hw_ver; |
| @@ -224,7 +221,7 @@ struct ib_uverbs_ex_query_device { · 38 unmodified lines | |||
| 224 | }; | 221 | }; |
| 225 | 222 | ||
| 226 | struct ib_uverbs_odp_caps { | 223 | struct ib_uverbs_odp_caps { |
| 227 | __u64 general_caps; | 224 | __aligned_u64 general_caps; |
| 228 | struct { | 225 | struct { |
| 229 | __u32 rc_odp_caps; | 226 | __u32 rc_odp_caps; |
| 230 | __u32 uc_odp_caps; | 227 | __u32 uc_odp_caps; |
| @@ -263,21 +260,22 @@ struct ib_uverbs_ex_query_device_resp { · 32 unmodified lines | |||
| 263 | __u32 comp_mask; | 260 | __u32 comp_mask; |
| 264 | __u32 response_length; | 261 | __u32 response_length; |
| 265 | struct ib_uverbs_odp_caps odp_caps; | 262 | struct ib_uverbs_odp_caps odp_caps; |
| 266 | __u64 timestamp_mask; | 263 | __aligned_u64 timestamp_mask; |
| 267 | __u64 hca_core_clock; /* in KHZ */ | 264 | __aligned_u64 hca_core_clock; /* in KHZ */ |
| 268 | __u64 device_cap_flags_ex; | 265 | __aligned_u64 device_cap_flags_ex; |
| 269 | struct ib_uverbs_rss_caps rss_caps; | 266 | struct ib_uverbs_rss_caps rss_caps; |
| 270 | __u32 max_wq_type_rq; | 267 | __u32 max_wq_type_rq; |
| 271 | __u32 raw_packet_caps; | 268 | __u32 raw_packet_caps; |
| 272 | struct ib_uverbs_tm_caps tm_caps; | 269 | struct ib_uverbs_tm_caps tm_caps; |
| 273 | struct ib_uverbs_cq_moderation_caps cq_moderation_caps; | 270 | struct ib_uverbs_cq_moderation_caps cq_moderation_caps; |
| 271 | __aligned_u64 max_dm_size; | ||
| 274 | }; | 272 | }; |
| 275 | 273 | ||
| 276 | struct ib_uverbs_query_port { | 274 | struct ib_uverbs_query_port { |
| 277 | __u64 response; | 275 | __aligned_u64 response; |
| 278 | __u8 port_num; | 276 | __u8 port_num; |
| 279 | __u8 reserved[7]; | 277 | __u8 reserved[7]; |
| 280 | __u64 driver_data[0]; | 278 | __aligned_u64 driver_data[0]; |
| 281 | }; | 279 | }; |
| 282 | 280 | ||
| 283 | struct ib_uverbs_query_port_resp { | 281 | struct ib_uverbs_query_port_resp { |
| @@ -305,8 +303,8 @@ struct ib_uverbs_query_port_resp { · 21 unmodified lines | |||
| 305 | }; | 303 | }; |
| 306 | 304 | ||
| 307 | struct ib_uverbs_alloc_pd { | 305 | struct ib_uverbs_alloc_pd { |
| 308 | __u64 response; | 306 | __aligned_u64 response; |
| 309 | __u64 driver_data[0]; | 307 | __aligned_u64 driver_data[0]; |
| 310 | }; | 308 | }; |
| 311 | 309 | ||
| 312 | struct ib_uverbs_alloc_pd_resp { | 310 | struct ib_uverbs_alloc_pd_resp { |
| @@ -318,10 +316,10 @@ struct ib_uverbs_dealloc_pd { · 5 unmodified lines | |||
| 318 | }; | 316 | }; |
| 319 | 317 | ||
| 320 | struct ib_uverbs_open_xrcd { | 318 | struct ib_uverbs_open_xrcd { |
| 321 | __u64 response; | 319 | __aligned_u64 response; |
| 322 | __u32 fd; | 320 | __u32 fd; |
| 323 | __u32 oflags; | 321 | __u32 oflags; |
| 324 | __u64 driver_data[0]; | 322 | __aligned_u64 driver_data[0]; |
| 325 | }; | 323 | }; |
| 326 | 324 | ||
| 327 | struct ib_uverbs_open_xrcd_resp { | 325 | struct ib_uverbs_open_xrcd_resp { |
| @@ -333,13 +331,13 @@ struct ib_uverbs_close_xrcd { · 5 unmodified lines | |||
| 333 | }; | 331 | }; |
| 334 | 332 | ||
| 335 | struct ib_uverbs_reg_mr { | 333 | struct ib_uverbs_reg_mr { |
| 336 | __u64 response; | 334 | __aligned_u64 response; |
| 337 | __u64 start; | 335 | __aligned_u64 start; |
| 338 | __u64 length; | 336 | __aligned_u64 length; |
| 339 | __u64 hca_va; | 337 | __aligned_u64 hca_va; |
| 340 | __u32 pd_handle; | 338 | __u32 pd_handle; |
| 341 | __u32 access_flags; | 339 | __u32 access_flags; |
| 342 | __u64 driver_data[0]; | 340 | __aligned_u64 driver_data[0]; |
| 343 | }; | 341 | }; |
| 344 | 342 | ||
| 345 | struct ib_uverbs_reg_mr_resp { | 343 | struct ib_uverbs_reg_mr_resp { |
| @@ -349,12 +347,12 @@ struct ib_uverbs_reg_mr_resp { · 3 unmodified lines | |||
| 349 | }; | 347 | }; |
| 350 | 348 | ||
| 351 | struct ib_uverbs_rereg_mr { | 349 | struct ib_uverbs_rereg_mr { |
| 352 | __u64 response; | 350 | __aligned_u64 response; |
| 353 | __u32 mr_handle; | 351 | __u32 mr_handle; |
| 354 | __u32 flags; | 352 | __u32 flags; |
| 355 | __u64 start; | 353 | __aligned_u64 start; |
| 356 | __u64 length; | 354 | __aligned_u64 length; |
| 357 | __u64 hca_va; | 355 | __aligned_u64 hca_va; |
| 358 | __u32 pd_handle; | 356 | __u32 pd_handle; |
| 359 | __u32 access_flags; | 357 | __u32 access_flags; |
| 360 | }; | 358 | }; |
| @@ -369,7 +367,7 @@ struct ib_uverbs_dereg_mr { · 8 unmodified lines | |||
| 369 | }; | 367 | }; |
| 370 | 368 | ||
| 371 | struct ib_uverbs_alloc_mw { | 369 | struct ib_uverbs_alloc_mw { |
| 372 | __u64 response; | 370 | __aligned_u64 response; |
| 373 | __u32 pd_handle; | 371 | __u32 pd_handle; |
| 374 | __u8 mw_type; | 372 | __u8 mw_type; |
| 375 | __u8 reserved[3]; | 373 | __u8 reserved[3]; |
| @@ -385,7 +383,7 @@ struct ib_uverbs_dealloc_mw { · 9 unmodified lines | |||
| 385 | }; | 383 | }; |
| 386 | 384 | ||
| 387 | struct ib_uverbs_create_comp_channel { | 385 | struct ib_uverbs_create_comp_channel { |
| 388 | __u64 response; | 386 | __aligned_u64 response; |
| 389 | }; | 387 | }; |
| 390 | 388 | ||
| 391 | struct ib_uverbs_create_comp_channel_resp { | 389 | struct ib_uverbs_create_comp_channel_resp { |
| @@ -393,13 +391,13 @@ struct ib_uverbs_create_comp_channel_resp { · 1 unmodified line | |||
| 393 | }; | 391 | }; |
| 394 | 392 | ||
| 395 | struct ib_uverbs_create_cq { | 393 | struct ib_uverbs_create_cq { |
| 396 | __u64 response; | 394 | __aligned_u64 response; |
| 397 | __u64 user_handle; | 395 | __aligned_u64 user_handle; |
| 398 | __u32 cqe; | 396 | __u32 cqe; |
| 399 | __u32 comp_vector; | 397 | __u32 comp_vector; |
| 400 | __s32 comp_channel; | 398 | __s32 comp_channel; |
| 401 | __u32 reserved; | 399 | __u32 reserved; |
| 402 | __u64 driver_data[0]; | 400 | __aligned_u64 driver_data[0]; |
| 403 | }; | 401 | }; |
| 404 | 402 | ||
| 405 | enum ib_uverbs_ex_create_cq_flags { | 403 | enum ib_uverbs_ex_create_cq_flags { |
| @@ -408,7 +406,7 @@ enum ib_uverbs_ex_create_cq_flags { · 2 unmodified lines | |||
| 408 | }; | 406 | }; |
| 409 | 407 | ||
| 410 | struct ib_uverbs_ex_create_cq { | 408 | struct ib_uverbs_ex_create_cq { |
| 411 | __u64 user_handle; | 409 | __aligned_u64 user_handle; |
| 412 | __u32 cqe; | 410 | __u32 cqe; |
| 413 | __u32 comp_vector; | 411 | __u32 comp_vector; |
| 414 | __s32 comp_channel; | 412 | __s32 comp_channel; |
| @@ -429,26 +427,26 @@ struct ib_uverbs_ex_create_cq_resp { · 14 unmodified lines | |||
| 429 | }; | 427 | }; |
| 430 | 428 | ||
| 431 | struct ib_uverbs_resize_cq { | 429 | struct ib_uverbs_resize_cq { |
| 432 | __u64 response; | 430 | __aligned_u64 response; |
| 433 | __u32 cq_handle; | 431 | __u32 cq_handle; |
| 434 | __u32 cqe; | 432 | __u32 cqe; |
| 435 | __u64 driver_data[0]; | 433 | __aligned_u64 driver_data[0]; |
| 436 | }; | 434 | }; |
| 437 | 435 | ||
| 438 | struct ib_uverbs_resize_cq_resp { | 436 | struct ib_uverbs_resize_cq_resp { |
| 439 | __u32 cqe; | 437 | __u32 cqe; |
| 440 | __u32 reserved; | 438 | __u32 reserved; |
| 441 | __u64 driver_data[0]; | 439 | __aligned_u64 driver_data[0]; |
| 442 | }; | 440 | }; |
| 443 | 441 | ||
| 444 | struct ib_uverbs_poll_cq { | 442 | struct ib_uverbs_poll_cq { |
| 445 | __u64 response; | 443 | __aligned_u64 response; |
| 446 | __u32 cq_handle; | 444 | __u32 cq_handle; |
| 447 | __u32 ne; | 445 | __u32 ne; |
| 448 | }; | 446 | }; |
| 449 | 447 | ||
| 450 | struct ib_uverbs_wc { | 448 | struct ib_uverbs_wc { |
| 451 | __u64 wr_id; | 449 | __aligned_u64 wr_id; |
| 452 | __u32 status; | 450 | __u32 status; |
| 453 | __u32 opcode; | 451 | __u32 opcode; |
| 454 | __u32 vendor_err; | 452 | __u32 vendor_err; |
| @@ -480,7 +478,7 @@ struct ib_uverbs_req_notify_cq { · 25 unmodified lines | |||
| 480 | }; | 478 | }; |
| 481 | 479 | ||
| 482 | struct ib_uverbs_destroy_cq { | 480 | struct ib_uverbs_destroy_cq { |
| 483 | __u64 response; | 481 | __aligned_u64 response; |
| 484 | __u32 cq_handle; | 482 | __u32 cq_handle; |
| 485 | __u32 reserved; | 483 | __u32 reserved; |
| 486 | }; | 484 | }; |
| @@ -549,8 +547,8 @@ struct ib_uverbs_qp_attr { · 62 unmodified lines | |||
| 549 | }; | 547 | }; |
| 550 | 548 | ||
| 551 | struct ib_uverbs_create_qp { | 549 | struct ib_uverbs_create_qp { |
| 552 | __u64 response; | 550 | __aligned_u64 response; |
| 553 | __u64 user_handle; | 551 | __aligned_u64 user_handle; |
| 554 | __u32 pd_handle; | 552 | __u32 pd_handle; |
| 555 | __u32 send_cq_handle; | 553 | __u32 send_cq_handle; |
| 556 | __u32 recv_cq_handle; | 554 | __u32 recv_cq_handle; |
| @@ -564,7 +562,7 @@ struct ib_uverbs_create_qp { · 7 unmodified lines | |||
| 564 | __u8 qp_type; | 562 | __u8 qp_type; |
| 565 | __u8 is_srq; | 563 | __u8 is_srq; |
| 566 | __u8 reserved; | 564 | __u8 reserved; |
| 567 | __u64 driver_data[0]; | 565 | __aligned_u64 driver_data[0]; |
| 568 | }; | 566 | }; |
| 569 | 567 | ||
| 570 | enum ib_uverbs_create_qp_mask { | 568 | enum ib_uverbs_create_qp_mask { |
| @@ -590,7 +588,7 @@ enum { · 19 unmodified lines | |||
| 590 | }; | 588 | }; |
| 591 | 589 | ||
| 592 | struct ib_uverbs_ex_create_qp { | 590 | struct ib_uverbs_ex_create_qp { |
| 593 | __u64 user_handle; | 591 | __aligned_u64 user_handle; |
| 594 | __u32 pd_handle; | 592 | __u32 pd_handle; |
| 595 | __u32 send_cq_handle; | 593 | __u32 send_cq_handle; |
| 596 | __u32 recv_cq_handle; | 594 | __u32 recv_cq_handle; |
| @@ -611,13 +609,13 @@ struct ib_uverbs_ex_create_qp { · 14 unmodified lines | |||
| 611 | }; | 609 | }; |
| 612 | 610 | ||
| 613 | struct ib_uverbs_open_qp { | 611 | struct ib_uverbs_open_qp { |
| 614 | __u64 response; | 612 | __aligned_u64 response; |
| 615 | __u64 user_handle; | 613 | __aligned_u64 user_handle; |
| 616 | __u32 pd_handle; | 614 | __u32 pd_handle; |
| 617 | __u32 qpn; | 615 | __u32 qpn; |
| 618 | __u8 qp_type; | 616 | __u8 qp_type; |
| 619 | __u8 reserved[7]; | 617 | __u8 reserved[7]; |
| 620 | __u64 driver_data[0]; | 618 | __aligned_u64 driver_data[0]; |
| 621 | }; | 619 | }; |
| 622 | 620 | ||
| 623 | /* also used for open response */ | 621 | /* also used for open response */ |
| @@ -658,10 +656,10 @@ struct ib_uverbs_qp_dest { · 34 unmodified lines | |||
| 658 | }; | 656 | }; |
| 659 | 657 | ||
| 660 | struct ib_uverbs_query_qp { | 658 | struct ib_uverbs_query_qp { |
| 661 | __u64 response; | 659 | __aligned_u64 response; |
| 662 | __u32 qp_handle; | 660 | __u32 qp_handle; |
| 663 | __u32 attr_mask; | 661 | __u32 attr_mask; |
| 664 | __u64 driver_data[0]; | 662 | __aligned_u64 driver_data[0]; |
| 665 | }; | 663 | }; |
| 666 | 664 | ||
| 667 | struct ib_uverbs_query_qp_resp { | 665 | struct ib_uverbs_query_qp_resp { |
| @@ -695,7 +693,7 @@ struct ib_uverbs_query_qp_resp { · 27 unmodified lines | |||
| 695 | __u8 alt_timeout; | 693 | __u8 alt_timeout; |
| 696 | __u8 sq_sig_all; | 694 | __u8 sq_sig_all; |
| 697 | __u8 reserved[5]; | 695 | __u8 reserved[5]; |
| 698 | __u64 driver_data[0]; | 696 | __aligned_u64 driver_data[0]; |
| 699 | }; | 697 | }; |
| 700 | 698 | ||
| 701 | struct ib_uverbs_modify_qp { | 699 | struct ib_uverbs_modify_qp { |
| @@ -725,7 +723,7 @@ struct ib_uverbs_modify_qp { · 23 unmodified lines | |||
| 725 | __u8 alt_port_num; | 723 | __u8 alt_port_num; |
| 726 | __u8 alt_timeout; | 724 | __u8 alt_timeout; |
| 727 | __u8 reserved[2]; | 725 | __u8 reserved[2]; |
| 728 | __u64 driver_data[0]; | 726 | __aligned_u64 driver_data[0]; |
| 729 | }; | 727 | }; |
| 730 | 728 | ||
| 731 | struct ib_uverbs_ex_modify_qp { | 729 | struct ib_uverbs_ex_modify_qp { |
| @@ -743,7 +741,7 @@ struct ib_uverbs_ex_modify_qp_resp { · 11 unmodified lines | |||
| 743 | }; | 741 | }; |
| 744 | 742 | ||
| 745 | struct ib_uverbs_destroy_qp { | 743 | struct ib_uverbs_destroy_qp { |
| 746 | __u64 response; | 744 | __aligned_u64 response; |
| 747 | __u32 qp_handle; | 745 | __u32 qp_handle; |
| 748 | __u32 reserved; | 746 | __u32 reserved; |
| 749 | }; | 747 | }; |
| @@ -759,13 +757,13 @@ struct ib_uverbs_destroy_qp_resp { · 9 unmodified lines | |||
| 759 | * document the ABI. | 757 | * document the ABI. |
| 760 | */ | 758 | */ |
| 761 | struct ib_uverbs_sge { | 759 | struct ib_uverbs_sge { |
| 762 | __u64 addr; | 760 | __aligned_u64 addr; |
| 763 | __u32 length; | 761 | __u32 length; |
| 764 | __u32 lkey; | 762 | __u32 lkey; |
| 765 | }; | 763 | }; |
| 766 | 764 | ||
| 767 | struct ib_uverbs_send_wr { | 765 | struct ib_uverbs_send_wr { |
| 768 | __u64 wr_id; | 766 | __aligned_u64 wr_id; |
| 769 | __u32 num_sge; | 767 | __u32 num_sge; |
| 770 | __u32 opcode; | 768 | __u32 opcode; |
| 771 | __u32 send_flags; | 769 | __u32 send_flags; |
| @@ -775,14 +773,14 @@ struct ib_uverbs_send_wr { · 3 unmodified lines | |||
| 775 | } ex; | 773 | } ex; |
| 776 | union { | 774 | union { |
| 777 | struct { | 775 | struct { |
| 778 | __u64 remote_addr; | 776 | __aligned_u64 remote_addr; |
| 779 | __u32 rkey; | 777 | __u32 rkey; |
| 780 | __u32 reserved; | 778 | __u32 reserved; |
| 781 | } rdma; | 779 | } rdma; |
| 782 | struct { | 780 | struct { |
| 783 | __u64 remote_addr; | 781 | __aligned_u64 remote_addr; |
| 784 | __u64 compare_add; | 782 | __aligned_u64 compare_add; |
| 785 | __u64 swap; | 783 | __aligned_u64 swap; |
| 786 | __u32 rkey; | 784 | __u32 rkey; |
| 787 | __u32 reserved; | 785 | __u32 reserved; |
| 788 | } atomic; | 786 | } atomic; |
| @@ -796,7 +794,7 @@ struct ib_uverbs_send_wr { · 7 unmodified lines | |||
| 796 | }; | 794 | }; |
| 797 | 795 | ||
| 798 | struct ib_uverbs_post_send { | 796 | struct ib_uverbs_post_send { |
| 799 | __u64 response; | 797 | __aligned_u64 response; |
| 800 | __u32 qp_handle; | 798 | __u32 qp_handle; |
| 801 | __u32 wr_count; | 799 | __u32 wr_count; |
| 802 | __u32 sge_count; | 800 | __u32 sge_count; |
| @@ -809,13 +807,13 @@ struct ib_uverbs_post_send_resp { · 6 unmodified lines | |||
| 809 | }; | 807 | }; |
| 810 | 808 | ||
| 811 | struct ib_uverbs_recv_wr { | 809 | struct ib_uverbs_recv_wr { |
| 812 | __u64 wr_id; | 810 | __aligned_u64 wr_id; |
| 813 | __u32 num_sge; | 811 | __u32 num_sge; |
| 814 | __u32 reserved; | 812 | __u32 reserved; |
| 815 | }; | 813 | }; |
| 816 | 814 | ||
| 817 | struct ib_uverbs_post_recv { | 815 | struct ib_uverbs_post_recv { |
| 818 | __u64 response; | 816 | __aligned_u64 response; |
| 819 | __u32 qp_handle; | 817 | __u32 qp_handle; |
| 820 | __u32 wr_count; | 818 | __u32 wr_count; |
| 821 | __u32 sge_count; | 819 | __u32 sge_count; |
| @@ -828,7 +826,7 @@ struct ib_uverbs_post_recv_resp { · 6 unmodified lines | |||
| 828 | }; | 826 | }; |
| 829 | 827 | ||
| 830 | struct ib_uverbs_post_srq_recv { | 828 | struct ib_uverbs_post_srq_recv { |
| 831 | __u64 response; | 829 | __aligned_u64 response; |
| 832 | __u32 srq_handle; | 830 | __u32 srq_handle; |
| 833 | __u32 wr_count; | 831 | __u32 wr_count; |
| 834 | __u32 sge_count; | 832 | __u32 sge_count; |
| @@ -841,8 +839,8 @@ struct ib_uverbs_post_srq_recv_resp { · 6 unmodified lines | |||
| 841 | }; | 839 | }; |
| 842 | 840 | ||
| 843 | struct ib_uverbs_create_ah { | 841 | struct ib_uverbs_create_ah { |
| 844 | __u64 response; | 842 | __aligned_u64 response; |
| 845 | __u64 user_handle; | 843 | __aligned_u64 user_handle; |
| 846 | __u32 pd_handle; | 844 | __u32 pd_handle; |
| 847 | __u32 reserved; | 845 | __u32 reserved; |
| 848 | struct ib_uverbs_ah_attr attr; | 846 | struct ib_uverbs_ah_attr attr; |
| @@ -861,7 +859,7 @@ struct ib_uverbs_attach_mcast { · 12 unmodified lines | |||
| 861 | __u32 qp_handle; | 859 | __u32 qp_handle; |
| 862 | __u16 mlid; | 860 | __u16 mlid; |
| 863 | __u16 reserved; | 861 | __u16 reserved; |
| 864 | __u64 driver_data[0]; | 862 | __aligned_u64 driver_data[0]; |
| 865 | }; | 863 | }; |
| 866 | 864 | ||
| 867 | struct ib_uverbs_detach_mcast { | 865 | struct ib_uverbs_detach_mcast { |
| @@ -869,7 +867,7 @@ struct ib_uverbs_detach_mcast { · 1 unmodified line | |||
| 869 | __u32 qp_handle; | 867 | __u32 qp_handle; |
| 870 | __u16 mlid; | 868 | __u16 mlid; |
| 871 | __u16 reserved; | 869 | __u16 reserved; |
| 872 | __u64 driver_data[0]; | 870 | __aligned_u64 driver_data[0]; |
| 873 | }; | 871 | }; |
| 874 | 872 | ||
| 875 | struct ib_uverbs_flow_spec_hdr { | 873 | struct ib_uverbs_flow_spec_hdr { |
| @@ -877,7 +875,7 @@ struct ib_uverbs_flow_spec_hdr { · 1 unmodified line | |||
| 877 | __u16 size; | 875 | __u16 size; |
| 878 | __u16 reserved; | 876 | __u16 reserved; |
| 879 | /* followed by flow_spec */ | 877 | /* followed by flow_spec */ |
| 880 | __u64 flow_spec_data[0]; | 878 | __aligned_u64 flow_spec_data[0]; |
| 881 | }; | 879 | }; |
| 882 | 880 | ||
| 883 | struct ib_uverbs_flow_eth_filter { | 881 | struct ib_uverbs_flow_eth_filter { |
| @@ -987,6 +985,19 @@ struct ib_uverbs_flow_spec_action_drop { · 103 unmodified lines | |||
| 987 | }; | 985 | }; |
| 988 | }; | 986 | }; |
| 989 | 987 | ||
| 988 | struct ib_uverbs_flow_spec_action_handle { | ||
| 989 | union { | ||
| 990 | struct ib_uverbs_flow_spec_hdr hdr; | ||
| 991 | struct { | ||
| 992 | __u32 type; | ||
| 993 | __u16 size; | ||
| 994 | __u16 reserved; | ||
| 995 | }; | ||
| 996 | }; | ||
| 997 | __u32 handle; | ||
| 998 | __u32 reserved1; | ||
| 999 | }; | ||
| 1000 | |||
| 990 | struct ib_uverbs_flow_tunnel_filter { | 1001 | struct ib_uverbs_flow_tunnel_filter { |
| 991 | __be32 tunnel_id; | 1002 | __be32 tunnel_id; |
| 992 | }; | 1003 | }; |
| @@ -1004,6 +1015,24 @@ struct ib_uverbs_flow_spec_tunnel { · 11 unmodified lines | |||
| 1004 | struct ib_uverbs_flow_tunnel_filter mask; | 1015 | struct ib_uverbs_flow_tunnel_filter mask; |
| 1005 | }; | 1016 | }; |
| 1006 | 1017 | ||
| 1018 | struct ib_uverbs_flow_spec_esp_filter { | ||
| 1019 | __u32 spi; | ||
| 1020 | __u32 seq; | ||
| 1021 | }; | ||
| 1022 | |||
| 1023 | struct ib_uverbs_flow_spec_esp { | ||
| 1024 | union { | ||
| 1025 | struct ib_uverbs_flow_spec_hdr hdr; | ||
| 1026 | struct { | ||
| 1027 | __u32 type; | ||
| 1028 | __u16 size; | ||
| 1029 | __u16 reserved; | ||
| 1030 | }; | ||
| 1031 | }; | ||
| 1032 | struct ib_uverbs_flow_spec_esp_filter val; | ||
| 1033 | struct ib_uverbs_flow_spec_esp_filter mask; | ||
| 1034 | }; | ||
| 1035 | |||
| 1007 | struct ib_uverbs_flow_attr { | 1036 | struct ib_uverbs_flow_attr { |
| 1008 | __u32 type; | 1037 | __u32 type; |
| 1009 | __u16 size; | 1038 | __u16 size; |
| @@ -1036,18 +1065,18 @@ struct ib_uverbs_destroy_flow { · 26 unmodified lines | |||
| 1036 | }; | 1065 | }; |
| 1037 | 1066 | ||
| 1038 | struct ib_uverbs_create_srq { | 1067 | struct ib_uverbs_create_srq { |
| 1039 | __u64 response; | 1068 | __aligned_u64 response; |
| 1040 | __u64 user_handle; | 1069 | __aligned_u64 user_handle; |
| 1041 | __u32 pd_handle; | 1070 | __u32 pd_handle; |
| 1042 | __u32 max_wr; | 1071 | __u32 max_wr; |
| 1043 | __u32 max_sge; | 1072 | __u32 max_sge; |
| 1044 | __u32 srq_limit; | 1073 | __u32 srq_limit; |
| 1045 | __u64 driver_data[0]; | 1074 | __aligned_u64 driver_data[0]; |
| 1046 | }; | 1075 | }; |
| 1047 | 1076 | ||
| 1048 | struct ib_uverbs_create_xsrq { | 1077 | struct ib_uverbs_create_xsrq { |
| 1049 | __u64 response; | 1078 | __aligned_u64 response; |
| 1050 | __u64 user_handle; | 1079 | __aligned_u64 user_handle; |
| 1051 | __u32 srq_type; | 1080 | __u32 srq_type; |
| 1052 | __u32 pd_handle; | 1081 | __u32 pd_handle; |
| 1053 | __u32 max_wr; | 1082 | __u32 max_wr; |
| @@ -1056,7 +1085,7 @@ struct ib_uverbs_create_xsrq { · 2 unmodified lines | |||
| 1056 | __u32 max_num_tags; | 1085 | __u32 max_num_tags; |
| 1057 | __u32 xrcd_handle; | 1086 | __u32 xrcd_handle; |
| 1058 | __u32 cq_handle; | 1087 | __u32 cq_handle; |
| 1059 | __u64 driver_data[0]; | 1088 | __aligned_u64 driver_data[0]; |
| 1060 | }; | 1089 | }; |
| 1061 | 1090 | ||
| 1062 | struct ib_uverbs_create_srq_resp { | 1091 | struct ib_uverbs_create_srq_resp { |
| @@ -1071,14 +1100,14 @@ struct ib_uverbs_modify_srq { · 8 unmodified lines | |||
| 1071 | __u32 attr_mask; | 1100 | __u32 attr_mask; |
| 1072 | __u32 max_wr; | 1101 | __u32 max_wr; |
| 1073 | __u32 srq_limit; | 1102 | __u32 srq_limit; |
| 1074 | __u64 driver_data[0]; | 1103 | __aligned_u64 driver_data[0]; |
| 1075 | }; | 1104 | }; |
| 1076 | 1105 | ||
| 1077 | struct ib_uverbs_query_srq { | 1106 | struct ib_uverbs_query_srq { |
| 1078 | __u64 response; | 1107 | __aligned_u64 response; |
| 1079 | __u32 srq_handle; | 1108 | __u32 srq_handle; |
| 1080 | __u32 reserved; | 1109 | __u32 reserved; |
| 1081 | __u64 driver_data[0]; | 1110 | __aligned_u64 driver_data[0]; |
| 1082 | }; | 1111 | }; |
| 1083 | 1112 | ||
| 1084 | struct ib_uverbs_query_srq_resp { | 1113 | struct ib_uverbs_query_srq_resp { |
| @@ -1089,7 +1118,7 @@ struct ib_uverbs_query_srq_resp { · 4 unmodified lines | |||
| 1089 | }; | 1118 | }; |
| 1090 | 1119 | ||
| 1091 | struct ib_uverbs_destroy_srq { | 1120 | struct ib_uverbs_destroy_srq { |
| 1092 | __u64 response; | 1121 | __aligned_u64 response; |
| 1093 | __u32 srq_handle; | 1122 | __u32 srq_handle; |
| 1094 | __u32 reserved; | 1123 | __u32 reserved; |
| 1095 | }; | 1124 | }; |
| @@ -1101,7 +1130,7 @@ struct ib_uverbs_destroy_srq_resp { · 5 unmodified lines | |||
| 1101 | struct ib_uverbs_ex_create_wq { | 1130 | struct ib_uverbs_ex_create_wq { |
| 1102 | __u32 comp_mask; | 1131 | __u32 comp_mask; |
| 1103 | __u32 wq_type; | 1132 | __u32 wq_type; |
| 1104 | __u64 user_handle; | 1133 | __aligned_u64 user_handle; |
| 1105 | __u32 pd_handle; | 1134 | __u32 pd_handle; |
| 1106 | __u32 cq_handle; | 1135 | __u32 cq_handle; |
| 1107 | __u32 max_wr; | 1136 | __u32 max_wr; |
| @@ -59,6 +59,10 @@ struct mlx4_ib_alloc_ucontext_resp_v3 { · 58 unmodified lines | |||
| 59 | __u16 bf_regs_per_page; | 59 | __u16 bf_regs_per_page; |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | enum { | ||
| 63 | MLX4_USER_DEV_CAP_LARGE_CQE = 1L << 0, | ||
| 64 | }; | ||
| 65 | |||
| 62 | struct mlx4_ib_alloc_ucontext_resp { | 66 | struct mlx4_ib_alloc_ucontext_resp { |
| 63 | __u32 dev_caps; | 67 | __u32 dev_caps; |
| 64 | __u32 qp_tab_size; | 68 | __u32 qp_tab_size; |
| @@ -73,8 +77,8 @@ struct mlx4_ib_alloc_pd_resp { · 8 unmodified lines | |||
| 73 | }; | 77 | }; |
| 74 | 78 | ||
| 75 | struct mlx4_ib_create_cq { | 79 | struct mlx4_ib_create_cq { |
| 76 | __u64 buf_addr; | 80 | __aligned_u64 buf_addr; |
| 77 | __u64 db_addr; | 81 | __aligned_u64 db_addr; |
| 78 | }; | 82 | }; |
| 79 | 83 | ||
| 80 | struct mlx4_ib_create_cq_resp { | 84 | struct mlx4_ib_create_cq_resp { |
| @@ -83,12 +87,12 @@ struct mlx4_ib_create_cq_resp { · 2 unmodified lines | |||
| 83 | }; | 87 | }; |
| 84 | 88 | ||
| 85 | struct mlx4_ib_resize_cq { | 89 | struct mlx4_ib_resize_cq { |
| 86 | __u64 buf_addr; | 90 | __aligned_u64 buf_addr; |
| 87 | }; | 91 | }; |
| 88 | 92 | ||
| 89 | struct mlx4_ib_create_srq { | 93 | struct mlx4_ib_create_srq { |
| 90 | __u64 buf_addr; | 94 | __aligned_u64 buf_addr; |
| 91 | __u64 db_addr; | 95 | __aligned_u64 db_addr; |
| 92 | }; | 96 | }; |
| 93 | 97 | ||
| 94 | struct mlx4_ib_create_srq_resp { | 98 | struct mlx4_ib_create_srq_resp { |
| @@ -97,7 +101,7 @@ struct mlx4_ib_create_srq_resp { · 2 unmodified lines | |||
| 97 | }; | 101 | }; |
| 98 | 102 | ||
| 99 | struct mlx4_ib_create_qp_rss { | 103 | struct mlx4_ib_create_qp_rss { |
| 100 | __u64 rx_hash_fields_mask; /* Use enum mlx4_ib_rx_hash_fields */ | 104 | __aligned_u64 rx_hash_fields_mask; /* Use enum mlx4_ib_rx_hash_fields */ |
| 101 | __u8 rx_hash_function; /* Use enum mlx4_ib_rx_hash_function_flags */ | 105 | __u8 rx_hash_function; /* Use enum mlx4_ib_rx_hash_function_flags */ |
| 102 | __u8 reserved[7]; | 106 | __u8 reserved[7]; |
| 103 | __u8 rx_hash_key[40]; | 107 | __u8 rx_hash_key[40]; |
| @@ -106,8 +110,8 @@ struct mlx4_ib_create_qp_rss { · 2 unmodified lines | |||
| 106 | }; | 110 | }; |
| 107 | 111 | ||
| 108 | struct mlx4_ib_create_qp { | 112 | struct mlx4_ib_create_qp { |
| 109 | __u64 buf_addr; | 113 | __aligned_u64 buf_addr; |
| 110 | __u64 db_addr; | 114 | __aligned_u64 db_addr; |
| 111 | __u8 log_sq_bb_count; | 115 | __u8 log_sq_bb_count; |
| 112 | __u8 log_sq_stride; | 116 | __u8 log_sq_stride; |
| 113 | __u8 sq_no_prefetch; | 117 | __u8 sq_no_prefetch; |
| @@ -116,8 +120,8 @@ struct mlx4_ib_create_qp { · 2 unmodified lines | |||
| 116 | }; | 120 | }; |
| 117 | 121 | ||
| 118 | struct mlx4_ib_create_wq { | 122 | struct mlx4_ib_create_wq { |
| 119 | __u64 buf_addr; | 123 | __aligned_u64 buf_addr; |
| 120 | __u64 db_addr; | 124 | __aligned_u64 db_addr; |
| 121 | __u8 log_range_size; | 125 | __u8 log_range_size; |
| 122 | __u8 reserved[3]; | 126 | __u8 reserved[3]; |
| 123 | __u32 comp_mask; | 127 | __u32 comp_mask; |
| @@ -156,4 +160,32 @@ enum mlx4_ib_rx_hash_fields { · 32 unmodified lines | |||
| 156 | MLX4_IB_RX_HASH_INNER = 1ULL << 31, | 160 | MLX4_IB_RX_HASH_INNER = 1ULL << 31, |
| 157 | }; | 161 | }; |
| 158 | 162 | ||
| 163 | struct mlx4_ib_rss_caps { | ||
| 164 | __aligned_u64 rx_hash_fields_mask; /* enum mlx4_ib_rx_hash_fields */ | ||
| 165 | __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */ | ||
| 166 | __u8 reserved[7]; | ||
| 167 | }; | ||
| 168 | |||
| 169 | enum query_device_resp_mask { | ||
| 170 | MLX4_IB_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET = 1UL << 0, | ||
| 171 | }; | ||
| 172 | |||
| 173 | struct mlx4_ib_tso_caps { | ||
| 174 | __u32 max_tso; /* Maximum tso payload size in bytes */ | ||
| 175 | /* Corresponding bit will be set if qp type from | ||
| 176 | * 'enum ib_qp_type' is supported. | ||
| 177 | */ | ||
| 178 | __u32 supported_qpts; | ||
| 179 | }; | ||
| 180 | |||
| 181 | struct mlx4_uverbs_ex_query_device_resp { | ||
| 182 | __u32 comp_mask; | ||
| 183 | __u32 response_length; | ||
| 184 | __aligned_u64 hca_core_clock_offset; | ||
| 185 | __u32 max_inl_recv_sz; | ||
| 186 | __u32 reserved; | ||
| 187 | struct mlx4_ib_rss_caps rss_caps; | ||
| 188 | struct mlx4_ib_tso_caps tso_caps; | ||
| 189 | }; | ||
| 190 | |||
| 159 | #endif /* MLX4_ABI_USER_H */ | 191 | #endif /* MLX4_ABI_USER_H */ |
| @@ -84,7 +84,7 @@ struct mlx5_ib_alloc_ucontext_req_v2 { · 83 unmodified lines | |||
| 84 | __u8 reserved0; | 84 | __u8 reserved0; |
| 85 | __u16 reserved1; | 85 | __u16 reserved1; |
| 86 | __u32 reserved2; | 86 | __u32 reserved2; |
| 87 | __u64 lib_caps; | 87 | __aligned_u64 lib_caps; |
| 88 | }; | 88 | }; |
| 89 | 89 | ||
| 90 | enum mlx5_ib_alloc_ucontext_resp_mask { | 90 | enum mlx5_ib_alloc_ucontext_resp_mask { |
| @@ -107,6 +107,14 @@ enum mlx5_user_inline_mode { · 16 unmodified lines | |||
| 107 | MLX5_USER_INLINE_MODE_TCP_UDP, | 107 | MLX5_USER_INLINE_MODE_TCP_UDP, |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | enum { | ||
| 111 | MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM = 1 << 0, | ||
| 112 | MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_REQ_METADATA = 1 << 1, | ||
| 113 | MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_SPI_STEERING = 1 << 2, | ||
| 114 | MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_FULL_OFFLOAD = 1 << 3, | ||
| 115 | MLX5_USER_ALLOC_UCONTEXT_FLOW_ACTION_FLAGS_ESP_AES_GCM_TX_IV_IS_ESN = 1 << 4, | ||
| 116 | }; | ||
| 117 | |||
| 110 | struct mlx5_ib_alloc_ucontext_resp { | 118 | struct mlx5_ib_alloc_ucontext_resp { |
| 111 | __u32 qp_tab_size; | 119 | __u32 qp_tab_size; |
| 112 | __u32 bf_reg_size; | 120 | __u32 bf_reg_size; |
| @@ -118,14 +126,14 @@ struct mlx5_ib_alloc_ucontext_resp { · 5 unmodified lines | |||
| 118 | __u32 max_recv_wr; | 126 | __u32 max_recv_wr; |
| 119 | __u32 max_srq_recv_wr; | 127 | __u32 max_srq_recv_wr; |
| 120 | __u16 num_ports; | 128 | __u16 num_ports; |
| 121 | __u16 reserved1; | 129 | __u16 flow_action_flags; |
| 122 | __u32 comp_mask; | 130 | __u32 comp_mask; |
| 123 | __u32 response_length; | 131 | __u32 response_length; |
| 124 | __u8 cqe_version; | 132 | __u8 cqe_version; |
| 125 | __u8 cmds_supp_uhw; | 133 | __u8 cmds_supp_uhw; |
| 126 | __u8 eth_min_inline; | 134 | __u8 eth_min_inline; |
| 127 | __u8 clock_info_versions; | 135 | __u8 clock_info_versions; |
| 128 | __u64 hca_core_clock_offset; | 136 | __aligned_u64 hca_core_clock_offset; |
| 129 | __u32 log_uar_size; | 137 | __u32 log_uar_size; |
| 130 | __u32 num_uars_per_page; | 138 | __u32 num_uars_per_page; |
| 131 | __u32 num_dyn_bfregs; | 139 | __u32 num_dyn_bfregs; |
| @@ -147,7 +155,7 @@ struct mlx5_ib_tso_caps { · 15 unmodified lines | |||
| 147 | }; | 155 | }; |
| 148 | 156 | ||
| 149 | struct mlx5_ib_rss_caps { | 157 | struct mlx5_ib_rss_caps { |
| 150 | __u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ | 158 | __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ |
| 151 | __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ | 159 | __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ |
| 152 | __u8 reserved[7]; | 160 | __u8 reserved[7]; |
| 153 | }; | 161 | }; |
| @@ -163,6 +171,10 @@ struct mlx5_ib_cqe_comp_caps { · 9 unmodified lines | |||
| 163 | __u32 supported_format; /* enum mlx5_ib_cqe_comp_res_format */ | 171 | __u32 supported_format; /* enum mlx5_ib_cqe_comp_res_format */ |
| 164 | }; | 172 | }; |
| 165 | 173 | ||
| 174 | enum mlx5_ib_packet_pacing_cap_flags { | ||
| 175 | MLX5_IB_PP_SUPPORT_BURST = 1 << 0, | ||
| 176 | }; | ||
| 177 | |||
| 166 | struct mlx5_packet_pacing_caps { | 178 | struct mlx5_packet_pacing_caps { |
| 167 | __u32 qp_rate_limit_min; | 179 | __u32 qp_rate_limit_min; |
| 168 | __u32 qp_rate_limit_max; /* In kpbs */ | 180 | __u32 qp_rate_limit_max; /* In kpbs */ |
| @@ -172,7 +184,8 @@ struct mlx5_packet_pacing_caps { · 3 unmodified lines | |||
| 172 | * supported_qpts |= 1 << IB_QPT_RAW_PACKET | 184 | * supported_qpts |= 1 << IB_QPT_RAW_PACKET |
| 173 | */ | 185 | */ |
| 174 | __u32 supported_qpts; | 186 | __u32 supported_qpts; |
| 175 | __u32 reserved; | 187 | __u8 cap_flags; /* enum mlx5_ib_packet_pacing_cap_flags */ |
| 188 | __u8 reserved[3]; | ||
| 176 | }; | 189 | }; |
| 177 | 190 | ||
| 178 | enum mlx5_ib_mpw_caps { | 191 | enum mlx5_ib_mpw_caps { |
| @@ -243,8 +256,8 @@ enum mlx5_ib_create_cq_flags { · 64 unmodified lines | |||
| 243 | }; | 256 | }; |
| 244 | 257 | ||
| 245 | struct mlx5_ib_create_cq { | 258 | struct mlx5_ib_create_cq { |
| 246 | __u64 buf_addr; | 259 | __aligned_u64 buf_addr; |
| 247 | __u64 db_addr; | 260 | __aligned_u64 db_addr; |
| 248 | __u32 cqe_size; | 261 | __u32 cqe_size; |
| 249 | __u8 cqe_comp_en; | 262 | __u8 cqe_comp_en; |
| 250 | __u8 cqe_comp_res_format; | 263 | __u8 cqe_comp_res_format; |
| @@ -257,15 +270,15 @@ struct mlx5_ib_create_cq_resp { · 6 unmodified lines | |||
| 257 | }; | 270 | }; |
| 258 | 271 | ||
| 259 | struct mlx5_ib_resize_cq { | 272 | struct mlx5_ib_resize_cq { |
| 260 | __u64 buf_addr; | 273 | __aligned_u64 buf_addr; |
| 261 | __u16 cqe_size; | 274 | __u16 cqe_size; |
| 262 | __u16 reserved0; | 275 | __u16 reserved0; |
| 263 | __u32 reserved1; | 276 | __u32 reserved1; |
| 264 | }; | 277 | }; |
| 265 | 278 | ||
| 266 | struct mlx5_ib_create_srq { | 279 | struct mlx5_ib_create_srq { |
| 267 | __u64 buf_addr; | 280 | __aligned_u64 buf_addr; |
| 268 | __u64 db_addr; | 281 | __aligned_u64 db_addr; |
| 269 | __u32 flags; | 282 | __u32 flags; |
| 270 | __u32 reserved0; /* explicit padding (optional on i386) */ | 283 | __u32 reserved0; /* explicit padding (optional on i386) */ |
| 271 | __u32 uidx; | 284 | __u32 uidx; |
| @@ -278,8 +291,8 @@ struct mlx5_ib_create_srq_resp { · 6 unmodified lines | |||
| 278 | }; | 291 | }; |
| 279 | 292 | ||
| 280 | struct mlx5_ib_create_qp { | 293 | struct mlx5_ib_create_qp { |
| 281 | __u64 buf_addr; | 294 | __aligned_u64 buf_addr; |
| 282 | __u64 db_addr; | 295 | __aligned_u64 db_addr; |
| 283 | __u32 sq_wqe_count; | 296 | __u32 sq_wqe_count; |
| 284 | __u32 rq_wqe_count; | 297 | __u32 rq_wqe_count; |
| 285 | __u32 rq_wqe_shift; | 298 | __u32 rq_wqe_shift; |
| @@ -287,8 +300,8 @@ struct mlx5_ib_create_qp { · 1 unmodified line | |||
| 287 | __u32 uidx; | 300 | __u32 uidx; |
| 288 | __u32 bfreg_index; | 301 | __u32 bfreg_index; |
| 289 | union { | 302 | union { |
| 290 | __u64 sq_buf_addr; | 303 | __aligned_u64 sq_buf_addr; |
| 291 | __u64 access_key; | 304 | __aligned_u64 access_key; |
| 292 | }; | 305 | }; |
| 293 | }; | 306 | }; |
| 294 | 307 | ||
| @@ -314,12 +327,13 @@ enum mlx5_rx_hash_fields { · 19 unmodified lines | |||
| 314 | MLX5_RX_HASH_DST_PORT_TCP = 1 << 5, | 327 | MLX5_RX_HASH_DST_PORT_TCP = 1 << 5, |
| 315 | MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6, | 328 | MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6, |
| 316 | MLX5_RX_HASH_DST_PORT_UDP = 1 << 7, | 329 | MLX5_RX_HASH_DST_PORT_UDP = 1 << 7, |
| 330 | MLX5_RX_HASH_IPSEC_SPI = 1 << 8, | ||
| 317 | /* Save bits for future fields */ | 331 | /* Save bits for future fields */ |
| 318 | MLX5_RX_HASH_INNER = (1UL << 31), | 332 | MLX5_RX_HASH_INNER = (1UL << 31), |
| 319 | }; | 333 | }; |
| 320 | 334 | ||
| 321 | struct mlx5_ib_create_qp_rss { | 335 | struct mlx5_ib_create_qp_rss { |
| 322 | __u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ | 336 | __aligned_u64 rx_hash_fields_mask; /* enum mlx5_rx_hash_fields */ |
| 323 | __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ | 337 | __u8 rx_hash_function; /* enum mlx5_rx_hash_function_flags */ |
| 324 | __u8 rx_key_len; /* valid only for Toeplitz */ | 338 | __u8 rx_key_len; /* valid only for Toeplitz */ |
| 325 | __u8 reserved[6]; | 339 | __u8 reserved[6]; |
| @@ -330,6 +344,7 @@ struct mlx5_ib_create_qp_rss { · 4 unmodified lines | |||
| 330 | 344 | ||
| 331 | struct mlx5_ib_create_qp_resp { | 345 | struct mlx5_ib_create_qp_resp { |
| 332 | __u32 bfreg_index; | 346 | __u32 bfreg_index; |
| 347 | __u32 reserved; | ||
| 333 | }; | 348 | }; |
| 334 | 349 | ||
| 335 | struct mlx5_ib_alloc_mw { | 350 | struct mlx5_ib_alloc_mw { |
| @@ -344,8 +359,8 @@ enum mlx5_ib_create_wq_mask { · 8 unmodified lines | |||
| 344 | }; | 359 | }; |
| 345 | 360 | ||
| 346 | struct mlx5_ib_create_wq { | 361 | struct mlx5_ib_create_wq { |
| 347 | __u64 buf_addr; | 362 | __aligned_u64 buf_addr; |
| 348 | __u64 db_addr; | 363 | __aligned_u64 db_addr; |
| 349 | __u32 rq_wqe_count; | 364 | __u32 rq_wqe_count; |
| 350 | __u32 rq_wqe_shift; | 365 | __u32 rq_wqe_shift; |
| 351 | __u32 user_index; | 366 | __u32 user_index; |
| @@ -362,6 +377,18 @@ struct mlx5_ib_create_ah_resp { · 10 unmodified lines | |||
| 362 | __u8 reserved[6]; | 377 | __u8 reserved[6]; |
| 363 | }; | 378 | }; |
| 364 | 379 | ||
| 380 | struct mlx5_ib_burst_info { | ||
| 381 | __u32 max_burst_sz; | ||
| 382 | __u16 typical_pkt_sz; | ||
| 383 | __u16 reserved; | ||
| 384 | }; | ||
| 385 | |||
| 386 | struct mlx5_ib_modify_qp { | ||
| 387 | __u32 comp_mask; | ||
| 388 | struct mlx5_ib_burst_info burst_info; | ||
| 389 | __u32 reserved; | ||
| 390 | }; | ||
| 391 | |||
| 365 | struct mlx5_ib_modify_qp_resp { | 392 | struct mlx5_ib_modify_qp_resp { |
| 366 | __u32 response_length; | 393 | __u32 response_length; |
| 367 | __u32 dctn; | 394 | __u32 dctn; |
| @@ -385,13 +412,13 @@ struct mlx5_ib_modify_wq { · 17 unmodified lines | |||
| 385 | struct mlx5_ib_clock_info { | 412 | struct mlx5_ib_clock_info { |
| 386 | __u32 sign; | 413 | __u32 sign; |
| 387 | __u32 resv; | 414 | __u32 resv; |
| 388 | __u64 nsec; | 415 | __aligned_u64 nsec; |
| 389 | __u64 cycles; | 416 | __aligned_u64 cycles; |
| 390 | __u64 frac; | 417 | __aligned_u64 frac; |
| 391 | __u32 mult; | 418 | __u32 mult; |
| 392 | __u32 shift; | 419 | __u32 shift; |
| 393 | __u64 mask; | 420 | __aligned_u64 mask; |
| 394 | __u64 overflow_period; | 421 | __aligned_u64 overflow_period; |
| 395 | }; | 422 | }; |
| 396 | 423 | ||
| 397 | enum mlx5_ib_mmap_cmd { | 424 | enum mlx5_ib_mmap_cmd { |
| @@ -403,6 +430,7 @@ enum mlx5_ib_mmap_cmd { · 5 unmodified lines | |||
| 403 | MLX5_IB_MMAP_CORE_CLOCK = 5, | 430 | MLX5_IB_MMAP_CORE_CLOCK = 5, |
| 404 | MLX5_IB_MMAP_ALLOC_WC = 6, | 431 | MLX5_IB_MMAP_ALLOC_WC = 6, |
| 405 | MLX5_IB_MMAP_CLOCK_INFO = 7, | 432 | MLX5_IB_MMAP_CLOCK_INFO = 7, |
| 433 | MLX5_IB_MMAP_DEVICE_MEM = 8, | ||
| 406 | }; | 434 | }; |
| 407 | 435 | ||
| 408 | enum { | 436 | enum { |
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2018, 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 MLX5_USER_IOCTL_CMDS_H | ||
| 34 | #define MLX5_USER_IOCTL_CMDS_H | ||
| 35 | |||
| 36 | #include <rdma/ib_user_ioctl_cmds.h> | ||
| 37 | |||
| 38 | enum mlx5_ib_create_flow_action_attrs { | ||
| 39 | /* This attribute belong to the driver namespace */ | ||
| 40 | MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT), | ||
| 41 | }; | ||
| 42 | |||
| 43 | enum mlx5_ib_alloc_dm_attrs { | ||
| 44 | MLX5_IB_ATTR_ALLOC_DM_RESP_START_OFFSET = (1U << UVERBS_ID_NS_SHIFT), | ||
| 45 | MLX5_IB_ATTR_ALLOC_DM_RESP_PAGE_INDEX, | ||
| 46 | }; | ||
| 47 | |||
| 48 | #endif | ||
| @@ -0,0 +1,43 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2018, 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 MLX5_USER_IOCTL_VERBS_H | ||
| 34 | #define MLX5_USER_IOCTL_VERBS_H | ||
| 35 | |||
| 36 | #include <linux/types.h> | ||
| 37 | |||
| 38 | enum mlx5_ib_uapi_flow_action_flags { | ||
| 39 | MLX5_IB_UAPI_FLOW_ACTION_FLAGS_REQUIRE_METADATA = 1 << 0, | ||
| 40 | }; | ||
| 41 | |||
| 42 | #endif | ||
| 43 | |||
| @@ -74,8 +74,8 @@ struct mthca_reg_mr { · 73 unmodified lines | |||
| 74 | struct mthca_create_cq { | 74 | struct mthca_create_cq { |
| 75 | __u32 lkey; | 75 | __u32 lkey; |
| 76 | __u32 pdn; | 76 | __u32 pdn; |
| 77 | __u64 arm_db_page; | 77 | __aligned_u64 arm_db_page; |
| 78 | __u64 set_db_page; | 78 | __aligned_u64 set_db_page; |
| 79 | __u32 arm_db_index; | 79 | __u32 arm_db_index; |
| 80 | __u32 set_db_index; | 80 | __u32 set_db_index; |
| 81 | }; | 81 | }; |
| @@ -93,7 +93,7 @@ struct mthca_resize_cq { · 11 unmodified lines | |||
| 93 | struct mthca_create_srq { | 93 | struct mthca_create_srq { |
| 94 | __u32 lkey; | 94 | __u32 lkey; |
| 95 | __u32 db_index; | 95 | __u32 db_index; |
| 96 | __u64 db_page; | 96 | __aligned_u64 db_page; |
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | struct mthca_create_srq_resp { | 99 | struct mthca_create_srq_resp { |
| @@ -104,8 +104,8 @@ struct mthca_create_srq_resp { · 4 unmodified lines | |||
| 104 | struct mthca_create_qp { | 104 | struct mthca_create_qp { |
| 105 | __u32 lkey; | 105 | __u32 lkey; |
| 106 | __u32 reserved; | 106 | __u32 reserved; |
| 107 | __u64 sq_db_page; | 107 | __aligned_u64 sq_db_page; |
| 108 | __u64 rq_db_page; | 108 | __aligned_u64 rq_db_page; |
| 109 | __u32 sq_db_index; | 109 | __u32 sq_db_index; |
| 110 | __u32 rq_db_index; | 110 | __u32 rq_db_index; |
| 111 | }; | 111 | }; |
| @@ -72,14 +72,14 @@ struct nes_alloc_pd_resp { · 71 unmodified lines | |||
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | struct nes_create_cq_req { | 74 | struct nes_create_cq_req { |
| 75 | __u64 user_cq_buffer; | 75 | __aligned_u64 user_cq_buffer; |
| 76 | __u32 mcrqf; | 76 | __u32 mcrqf; |
| 77 | __u8 reserved[4]; | 77 | __u8 reserved[4]; |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | struct nes_create_qp_req { | 80 | struct nes_create_qp_req { |
| 81 | __u64 user_wqe_buffers; | 81 | __aligned_u64 user_wqe_buffers; |
| 82 | __u64 user_qp_buffer; | 82 | __aligned_u64 user_qp_buffer; |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | enum iwnes_memreg_type { | 85 | enum iwnes_memreg_type { |
| @@ -55,17 +55,17 @@ struct ocrdma_alloc_ucontext_resp { · 54 unmodified lines | |||
| 55 | __u32 wqe_size; | 55 | __u32 wqe_size; |
| 56 | __u32 max_inline_data; | 56 | __u32 max_inline_data; |
| 57 | __u32 dpp_wqe_size; | 57 | __u32 dpp_wqe_size; |
| 58 | __u64 ah_tbl_page; | 58 | __aligned_u64 ah_tbl_page; |
| 59 | __u32 ah_tbl_len; | 59 | __u32 ah_tbl_len; |
| 60 | __u32 rqe_size; | 60 | __u32 rqe_size; |
| 61 | __u8 fw_ver[32]; | 61 | __u8 fw_ver[32]; |
| 62 | /* for future use/new features in progress */ | 62 | /* for future use/new features in progress */ |
| 63 | __u64 rsvd1; | 63 | __aligned_u64 rsvd1; |
| 64 | __u64 rsvd2; | 64 | __aligned_u64 rsvd2; |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | struct ocrdma_alloc_pd_ureq { | 67 | struct ocrdma_alloc_pd_ureq { |
| 68 | __u64 rsvd1; | 68 | __u32 rsvd[2]; |
| 69 | }; | 69 | }; |
| 70 | 70 | ||
| 71 | struct ocrdma_alloc_pd_uresp { | 71 | struct ocrdma_alloc_pd_uresp { |
| @@ -73,7 +73,7 @@ struct ocrdma_alloc_pd_uresp { · 1 unmodified line | |||
| 73 | __u32 dpp_enabled; | 73 | __u32 dpp_enabled; |
| 74 | __u32 dpp_page_addr_hi; | 74 | __u32 dpp_page_addr_hi; |
| 75 | __u32 dpp_page_addr_lo; | 75 | __u32 dpp_page_addr_lo; |
| 76 | __u64 rsvd1; | 76 | __u32 rsvd[2]; |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | struct ocrdma_create_cq_ureq { | 79 | struct ocrdma_create_cq_ureq { |
| @@ -87,13 +87,13 @@ struct ocrdma_create_cq_uresp { · 7 unmodified lines | |||
| 87 | __u32 page_size; | 87 | __u32 page_size; |
| 88 | __u32 num_pages; | 88 | __u32 num_pages; |
| 89 | __u32 max_hw_cqe; | 89 | __u32 max_hw_cqe; |
| 90 | __u64 page_addr[MAX_CQ_PAGES]; | 90 | __aligned_u64 page_addr[MAX_CQ_PAGES]; |
| 91 | __u64 db_page_addr; | 91 | __aligned_u64 db_page_addr; |
| 92 | __u32 db_page_size; | 92 | __u32 db_page_size; |
| 93 | __u32 phase_change; | 93 | __u32 phase_change; |
| 94 | /* for future use/new features in progress */ | 94 | /* for future use/new features in progress */ |
| 95 | __u64 rsvd1; | 95 | __aligned_u64 rsvd1; |
| 96 | __u64 rsvd2; | 96 | __aligned_u64 rsvd2; |
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | #define MAX_QP_PAGES 8 | 99 | #define MAX_QP_PAGES 8 |
| @@ -115,9 +115,9 @@ struct ocrdma_create_qp_uresp { · 15 unmodified lines | |||
| 115 | __u32 rq_page_size; | 115 | __u32 rq_page_size; |
| 116 | __u32 num_sq_pages; | 116 | __u32 num_sq_pages; |
| 117 | __u32 num_rq_pages; | 117 | __u32 num_rq_pages; |
| 118 | __u64 sq_page_addr[MAX_QP_PAGES]; | 118 | __aligned_u64 sq_page_addr[MAX_QP_PAGES]; |
| 119 | __u64 rq_page_addr[MAX_QP_PAGES]; | 119 | __aligned_u64 rq_page_addr[MAX_QP_PAGES]; |
| 120 | __u64 db_page_addr; | 120 | __aligned_u64 db_page_addr; |
| 121 | __u32 db_page_size; | 121 | __u32 db_page_size; |
| 122 | __u32 dpp_credit; | 122 | __u32 dpp_credit; |
| 123 | __u32 dpp_offset; | 123 | __u32 dpp_offset; |
| @@ -126,8 +126,8 @@ struct ocrdma_create_qp_uresp { · 2 unmodified lines | |||
| 126 | __u32 db_sq_offset; | 126 | __u32 db_sq_offset; |
| 127 | __u32 db_rq_offset; | 127 | __u32 db_rq_offset; |
| 128 | __u32 db_shift; | 128 | __u32 db_shift; |
| 129 | __u64 rsvd[11]; | 129 | __aligned_u64 rsvd[11]; |
| 130 | } __packed; | 130 | }; |
| 131 | 131 | ||
| 132 | struct ocrdma_create_srq_uresp { | 132 | struct ocrdma_create_srq_uresp { |
| 133 | __u16 rq_dbid; | 133 | __u16 rq_dbid; |
| @@ -137,16 +137,16 @@ struct ocrdma_create_srq_uresp { · 3 unmodified lines | |||
| 137 | __u32 rq_page_size; | 137 | __u32 rq_page_size; |
| 138 | __u32 num_rq_pages; | 138 | __u32 num_rq_pages; |
| 139 | 139 | ||
| 140 | __u64 rq_page_addr[MAX_QP_PAGES]; | 140 | __aligned_u64 rq_page_addr[MAX_QP_PAGES]; |
| 141 | __u64 db_page_addr; | 141 | __aligned_u64 db_page_addr; |
| 142 | 142 | ||
| 143 | __u32 db_page_size; | 143 | __u32 db_page_size; |
| 144 | __u32 num_rqe_allocated; | 144 | __u32 num_rqe_allocated; |
| 145 | __u32 db_rq_offset; | 145 | __u32 db_rq_offset; |
| 146 | __u32 db_shift; | 146 | __u32 db_shift; |
| 147 | 147 | ||
| 148 | __u64 rsvd2; | 148 | __aligned_u64 rsvd2; |
| 149 | __u64 rsvd3; | 149 | __aligned_u64 rsvd3; |
| 150 | }; | 150 | }; |
| 151 | 151 | ||
| 152 | #endif /* OCRDMA_ABI_USER_H */ | 152 | #endif /* OCRDMA_ABI_USER_H */ |
| @@ -40,7 +40,7 @@ · 39 unmodified lines | |||
| 40 | /* user kernel communication data structures. */ | 40 | /* user kernel communication data structures. */ |
| 41 | 41 | ||
| 42 | struct qedr_alloc_ucontext_resp { | 42 | struct qedr_alloc_ucontext_resp { |
| 43 | __u64 db_pa; | 43 | __aligned_u64 db_pa; |
| 44 | __u32 db_size; | 44 | __u32 db_size; |
| 45 | 45 | ||
| 46 | __u32 max_send_wr; | 46 | __u32 max_send_wr; |
| @@ -53,24 +53,27 @@ struct qedr_alloc_ucontext_resp { · 6 unmodified lines | |||
| 53 | __u8 dpm_enabled; | 53 | __u8 dpm_enabled; |
| 54 | __u8 wids_enabled; | 54 | __u8 wids_enabled; |
| 55 | __u16 wid_count; | 55 | __u16 wid_count; |
| 56 | __u32 reserved; | ||
| 56 | }; | 57 | }; |
| 57 | 58 | ||
| 58 | struct qedr_alloc_pd_ureq { | 59 | struct qedr_alloc_pd_ureq { |
| 59 | __u64 rsvd1; | 60 | __aligned_u64 rsvd1; |
| 60 | }; | 61 | }; |
| 61 | 62 | ||
| 62 | struct qedr_alloc_pd_uresp { | 63 | struct qedr_alloc_pd_uresp { |
| 63 | __u32 pd_id; | 64 | __u32 pd_id; |
| 65 | __u32 reserved; | ||
| 64 | }; | 66 | }; |
| 65 | 67 | ||
| 66 | struct qedr_create_cq_ureq { | 68 | struct qedr_create_cq_ureq { |
| 67 | __u64 addr; | 69 | __aligned_u64 addr; |
| 68 | __u64 len; | 70 | __aligned_u64 len; |
| 69 | }; | 71 | }; |
| 70 | 72 | ||
| 71 | struct qedr_create_cq_uresp { | 73 | struct qedr_create_cq_uresp { |
| 72 | __u32 db_offset; | 74 | __u32 db_offset; |
| 73 | __u16 icid; | 75 | __u16 icid; |
| 76 | __u16 reserved; | ||
| 74 | }; | 77 | }; |
| 75 | 78 | ||
| 76 | struct qedr_create_qp_ureq { | 79 | struct qedr_create_qp_ureq { |
| @@ -79,17 +82,17 @@ struct qedr_create_qp_ureq { · 2 unmodified lines | |||
| 79 | 82 | ||
| 80 | /* SQ */ | 83 | /* SQ */ |
| 81 | /* user space virtual address of SQ buffer */ | 84 | /* user space virtual address of SQ buffer */ |
| 82 | __u64 sq_addr; | 85 | __aligned_u64 sq_addr; |
| 83 | 86 | ||
| 84 | /* length of SQ buffer */ | 87 | /* length of SQ buffer */ |
| 85 | __u64 sq_len; | 88 | __aligned_u64 sq_len; |
| 86 | 89 | ||
| 87 | /* RQ */ | 90 | /* RQ */ |
| 88 | /* user space virtual address of RQ buffer */ | 91 | /* user space virtual address of RQ buffer */ |
| 89 | __u64 rq_addr; | 92 | __aligned_u64 rq_addr; |
| 90 | 93 | ||
| 91 | /* length of RQ buffer */ | 94 | /* length of RQ buffer */ |
| 92 | __u64 rq_len; | 95 | __aligned_u64 rq_len; |
| 93 | }; | 96 | }; |
| 94 | 97 | ||
| 95 | struct qedr_create_qp_uresp { | 98 | struct qedr_create_qp_uresp { |
| @@ -105,6 +108,7 @@ struct qedr_create_qp_uresp { · 9 unmodified lines | |||
| 105 | __u16 rq_icid; | 108 | __u16 rq_icid; |
| 106 | 109 | ||
| 107 | __u32 rq_db2_offset; | 110 | __u32 rq_db2_offset; |
| 111 | __u32 reserved; | ||
| 108 | }; | 112 | }; |
| 109 | 113 | ||
| 110 | #endif /* __QEDR_USER_H__ */ | 114 | #endif /* __QEDR_USER_H__ */ |
| @@ -238,6 +238,14 @@ enum rdma_nldev_command { · 237 unmodified lines | |||
| 238 | 238 | ||
| 239 | RDMA_NLDEV_CMD_RES_QP_GET, /* can dump */ | 239 | RDMA_NLDEV_CMD_RES_QP_GET, /* can dump */ |
| 240 | 240 | ||
| 241 | RDMA_NLDEV_CMD_RES_CM_ID_GET, /* can dump */ | ||
| 242 | |||
| 243 | RDMA_NLDEV_CMD_RES_CQ_GET, /* can dump */ | ||
| 244 | |||
| 245 | RDMA_NLDEV_CMD_RES_MR_GET, /* can dump */ | ||
| 246 | |||
| 247 | RDMA_NLDEV_CMD_RES_PD_GET, /* can dump */ | ||
| 248 | |||
| 241 | RDMA_NLDEV_NUM_OPS | 249 | RDMA_NLDEV_NUM_OPS |
| 242 | }; | 250 | }; |
| 243 | 251 | ||
| @@ -350,6 +358,49 @@ enum rdma_nldev_attr { · 106 unmodified lines | |||
| 350 | */ | 358 | */ |
| 351 | RDMA_NLDEV_ATTR_RES_KERN_NAME, /* string */ | 359 | RDMA_NLDEV_ATTR_RES_KERN_NAME, /* string */ |
| 352 | 360 | ||
| 361 | RDMA_NLDEV_ATTR_RES_CM_ID, /* nested table */ | ||
| 362 | RDMA_NLDEV_ATTR_RES_CM_ID_ENTRY, /* nested table */ | ||
| 363 | /* | ||
| 364 | * rdma_cm_id port space. | ||
| 365 | */ | ||
| 366 | RDMA_NLDEV_ATTR_RES_PS, /* u32 */ | ||
| 367 | /* | ||
| 368 | * Source and destination socket addresses | ||
| 369 | */ | ||
| 370 | RDMA_NLDEV_ATTR_RES_SRC_ADDR, /* __kernel_sockaddr_storage */ | ||
| 371 | RDMA_NLDEV_ATTR_RES_DST_ADDR, /* __kernel_sockaddr_storage */ | ||
| 372 | |||
| 373 | RDMA_NLDEV_ATTR_RES_CQ, /* nested table */ | ||
| 374 | RDMA_NLDEV_ATTR_RES_CQ_ENTRY, /* nested table */ | ||
| 375 | RDMA_NLDEV_ATTR_RES_CQE, /* u32 */ | ||
| 376 | RDMA_NLDEV_ATTR_RES_USECNT, /* u64 */ | ||
| 377 | RDMA_NLDEV_ATTR_RES_POLL_CTX, /* u8 */ | ||
| 378 | |||
| 379 | RDMA_NLDEV_ATTR_RES_MR, /* nested table */ | ||
| 380 | RDMA_NLDEV_ATTR_RES_MR_ENTRY, /* nested table */ | ||
| 381 | RDMA_NLDEV_ATTR_RES_RKEY, /* u32 */ | ||
| 382 | RDMA_NLDEV_ATTR_RES_LKEY, /* u32 */ | ||
| 383 | RDMA_NLDEV_ATTR_RES_IOVA, /* u64 */ | ||
| 384 | RDMA_NLDEV_ATTR_RES_MRLEN, /* u64 */ | ||
| 385 | |||
| 386 | RDMA_NLDEV_ATTR_RES_PD, /* nested table */ | ||
| 387 | RDMA_NLDEV_ATTR_RES_PD_ENTRY, /* nested table */ | ||
| 388 | RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY, /* u32 */ | ||
| 389 | RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY, /* u32 */ | ||
| 390 | |||
| 391 | /* | ||
| 392 | * Provides logical name and index of netdevice which is | ||
| 393 | * connected to physical port. This information is relevant | ||
| 394 | * for RoCE and iWARP. | ||
| 395 | * | ||
| 396 | * The netdevices which are associated with containers are | ||
| 397 | * supposed to be exported together with GID table once it | ||
| 398 | * will be exposed through the netlink. Because the | ||
| 399 | * associated netdevices are properties of GIDs. | ||
| 400 | */ | ||
| 401 | RDMA_NLDEV_ATTR_NDEV_INDEX, /* u32 */ | ||
| 402 | RDMA_NLDEV_ATTR_NDEV_NAME, /* string */ | ||
| 403 | |||
| 353 | RDMA_NLDEV_ATTR_MAX | 404 | RDMA_NLDEV_ATTR_MAX |
| 354 | }; | 405 | }; |
| 355 | #endif /* _UAPI_RDMA_NETLINK_H */ | 406 | #endif /* _UAPI_RDMA_NETLINK_H */ |
| @@ -70,6 +70,14 @@ enum { · 69 unmodified lines | |||
| 70 | RDMA_USER_CM_CMD_JOIN_MCAST | 70 | RDMA_USER_CM_CMD_JOIN_MCAST |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | /* See IBTA Annex A11, servies ID bytes 4 & 5 */ | ||
| 74 | enum rdma_ucm_port_space { | ||
| 75 | RDMA_PS_IPOIB = 0x0002, | ||
| 76 | RDMA_PS_IB = 0x013F, | ||
| 77 | RDMA_PS_TCP = 0x0106, | ||
| 78 | RDMA_PS_UDP = 0x0111, | ||
| 79 | }; | ||
| 80 | |||
| 73 | /* | 81 | /* |
| 74 | * command ABI structures. | 82 | * command ABI structures. |
| 75 | */ | 83 | */ |
| @@ -80,9 +88,9 @@ struct rdma_ucm_cmd_hdr { · 4 unmodified lines | |||
| 80 | }; | 88 | }; |
| 81 | 89 | ||
| 82 | struct rdma_ucm_create_id { | 90 | struct rdma_ucm_create_id { |
| 83 | __u64 uid; | 91 | __aligned_u64 uid; |
| 84 | __u64 response; | 92 | __aligned_u64 response; |
| 85 | __u16 ps; | 93 | __u16 ps; /* use enum rdma_ucm_port_space */ |
| 86 | __u8 qp_type; | 94 | __u8 qp_type; |
| 87 | __u8 reserved[5]; | 95 | __u8 reserved[5]; |
| 88 | }; | 96 | }; |
| @@ -92,7 +100,7 @@ struct rdma_ucm_create_id_resp { · 3 unmodified lines | |||
| 92 | }; | 100 | }; |
| 93 | 101 | ||
| 94 | struct rdma_ucm_destroy_id { | 102 | struct rdma_ucm_destroy_id { |
| 95 | __u64 response; | 103 | __aligned_u64 response; |
| 96 | __u32 id; | 104 | __u32 id; |
| 97 | __u32 reserved; | 105 | __u32 reserved; |
| 98 | }; | 106 | }; |
| @@ -102,7 +110,7 @@ struct rdma_ucm_destroy_id_resp { · 3 unmodified lines | |||
| 102 | }; | 110 | }; |
| 103 | 111 | ||
| 104 | struct rdma_ucm_bind_ip { | 112 | struct rdma_ucm_bind_ip { |
| 105 | __u64 response; | 113 | __aligned_u64 response; |
| 106 | struct sockaddr_in6 addr; | 114 | struct sockaddr_in6 addr; |
| 107 | __u32 id; | 115 | __u32 id; |
| 108 | }; | 116 | }; |
| @@ -143,13 +151,13 @@ enum { · 34 unmodified lines | |||
| 143 | }; | 151 | }; |
| 144 | 152 | ||
| 145 | struct rdma_ucm_query { | 153 | struct rdma_ucm_query { |
| 146 | __u64 response; | 154 | __aligned_u64 response; |
| 147 | __u32 id; | 155 | __u32 id; |
| 148 | __u32 option; | 156 | __u32 option; |
| 149 | }; | 157 | }; |
| 150 | 158 | ||
| 151 | struct rdma_ucm_query_route_resp { | 159 | struct rdma_ucm_query_route_resp { |
| 152 | __u64 node_guid; | 160 | __aligned_u64 node_guid; |
| 153 | struct ib_user_path_rec ib_route[2]; | 161 | struct ib_user_path_rec ib_route[2]; |
| 154 | struct sockaddr_in6 src_addr; | 162 | struct sockaddr_in6 src_addr; |
| 155 | struct sockaddr_in6 dst_addr; | 163 | struct sockaddr_in6 dst_addr; |
| @@ -159,7 +167,7 @@ struct rdma_ucm_query_route_resp { · 3 unmodified lines | |||
| 159 | }; | 167 | }; |
| 160 | 168 | ||
| 161 | struct rdma_ucm_query_addr_resp { | 169 | struct rdma_ucm_query_addr_resp { |
| 162 | __u64 node_guid; | 170 | __aligned_u64 node_guid; |
| 163 | __u8 port_num; | 171 | __u8 port_num; |
| 164 | __u8 reserved; | 172 | __u8 reserved; |
| 165 | __u16 pkey; | 173 | __u16 pkey; |
| @@ -210,7 +218,7 @@ struct rdma_ucm_listen { · 44 unmodified lines | |||
| 210 | }; | 218 | }; |
| 211 | 219 | ||
| 212 | struct rdma_ucm_accept { | 220 | struct rdma_ucm_accept { |
| 213 | __u64 uid; | 221 | __aligned_u64 uid; |
| 214 | struct rdma_ucm_conn_param conn_param; | 222 | struct rdma_ucm_conn_param conn_param; |
| 215 | __u32 id; | 223 | __u32 id; |
| 216 | __u32 reserved; | 224 | __u32 reserved; |
| @@ -228,7 +236,7 @@ struct rdma_ucm_disconnect { · 11 unmodified lines | |||
| 228 | }; | 236 | }; |
| 229 | 237 | ||
| 230 | struct rdma_ucm_init_qp_attr { | 238 | struct rdma_ucm_init_qp_attr { |
| 231 | __u64 response; | 239 | __aligned_u64 response; |
| 232 | __u32 id; | 240 | __u32 id; |
| 233 | __u32 qp_state; | 241 | __u32 qp_state; |
| 234 | }; | 242 | }; |
| @@ -239,8 +247,8 @@ struct rdma_ucm_notify { · 4 unmodified lines | |||
| 239 | }; | 247 | }; |
| 240 | 248 | ||
| 241 | struct rdma_ucm_join_ip_mcast { | 249 | struct rdma_ucm_join_ip_mcast { |
| 242 | __u64 response; /* rdma_ucm_create_id_resp */ | 250 | __aligned_u64 response; /* rdma_ucm_create_id_resp */ |
| 243 | __u64 uid; | 251 | __aligned_u64 uid; |
| 244 | struct sockaddr_in6 addr; | 252 | struct sockaddr_in6 addr; |
| 245 | __u32 id; | 253 | __u32 id; |
| 246 | }; | 254 | }; |
| @@ -253,8 +261,8 @@ enum { · 6 unmodified lines | |||
| 253 | }; | 261 | }; |
| 254 | 262 | ||
| 255 | struct rdma_ucm_join_mcast { | 263 | struct rdma_ucm_join_mcast { |
| 256 | __u64 response; /* rdma_ucma_create_id_resp */ | 264 | __aligned_u64 response; /* rdma_ucma_create_id_resp */ |
| 257 | __u64 uid; | 265 | __aligned_u64 uid; |
| 258 | __u32 id; | 266 | __u32 id; |
| 259 | __u16 addr_size; | 267 | __u16 addr_size; |
| 260 | __u16 join_flags; | 268 | __u16 join_flags; |
| @@ -262,18 +270,23 @@ struct rdma_ucm_join_mcast { · 1 unmodified line | |||
| 262 | }; | 270 | }; |
| 263 | 271 | ||
| 264 | struct rdma_ucm_get_event { | 272 | struct rdma_ucm_get_event { |
| 265 | __u64 response; | 273 | __aligned_u64 response; |
| 266 | }; | 274 | }; |
| 267 | 275 | ||
| 268 | struct rdma_ucm_event_resp { | 276 | struct rdma_ucm_event_resp { |
| 269 | __u64 uid; | 277 | __aligned_u64 uid; |
| 270 | __u32 id; | 278 | __u32 id; |
| 271 | __u32 event; | 279 | __u32 event; |
| 272 | __u32 status; | 280 | __u32 status; |
| 281 | /* | ||
| 282 | * NOTE: This union is not aligned to 8 bytes so none of the union | ||
| 283 | * members may contain a u64 or anything with higher alignment than 4. | ||
| 284 | */ | ||
| 273 | union { | 285 | union { |
| 274 | struct rdma_ucm_conn_param conn; | 286 | struct rdma_ucm_conn_param conn; |
| 275 | struct rdma_ucm_ud_param ud; | 287 | struct rdma_ucm_ud_param ud; |
| 276 | } param; | 288 | } param; |
| 289 | __u32 reserved; | ||
| 277 | }; | 290 | }; |
| 278 | 291 | ||
| 279 | /* Option levels */ | 292 | /* Option levels */ |
| @@ -291,7 +304,7 @@ enum { · 11 unmodified lines | |||
| 291 | }; | 304 | }; |
| 292 | 305 | ||
| 293 | struct rdma_ucm_set_option { | 306 | struct rdma_ucm_set_option { |
| 294 | __u64 optval; | 307 | __aligned_u64 optval; |
| 295 | __u32 id; | 308 | __u32 id; |
| 296 | __u32 level; | 309 | __u32 level; |
| 297 | __u32 optname; | 310 | __u32 optname; |
| @@ -299,7 +312,7 @@ struct rdma_ucm_set_option { · 1 unmodified line | |||
| 299 | }; | 312 | }; |
| 300 | 313 | ||
| 301 | struct rdma_ucm_migrate_id { | 314 | struct rdma_ucm_migrate_id { |
| 302 | __u64 response; | 315 | __aligned_u64 response; |
| 303 | __u32 id; | 316 | __u32 id; |
| 304 | __u32 fd; | 317 | __u32 fd; |
| 305 | }; | 318 | }; |
| @@ -34,49 +34,13 @@ · 33 unmodified lines | |||
| 34 | #ifndef RDMA_USER_IOCTL_H | 34 | #ifndef RDMA_USER_IOCTL_H |
| 35 | #define RDMA_USER_IOCTL_H | 35 | #define RDMA_USER_IOCTL_H |
| 36 | 36 | ||
| 37 | #include <linux/types.h> | ||
| 38 | #include <linux/ioctl.h> | ||
| 39 | #include <rdma/ib_user_mad.h> | 37 | #include <rdma/ib_user_mad.h> |
| 40 | #include <rdma/hfi/hfi1_ioctl.h> | 38 | #include <rdma/hfi/hfi1_ioctl.h> |
| 39 | #include <rdma/rdma_user_ioctl_cmds.h> | ||
| 41 | 40 | ||
| 42 | /* Documentation/ioctl/ioctl-number.txt */ | ||
| 43 | #define RDMA_IOCTL_MAGIC 0x1b | ||
| 44 | /* Legacy name, for user space application which already use it */ | 41 | /* Legacy name, for user space application which already use it */ |
| 45 | #define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC | 42 | #define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC |
| 46 | 43 | ||
| 47 | #define RDMA_VERBS_IOCTL \ | ||
| 48 | _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr) | ||
| 49 | |||
| 50 | #define UVERBS_ID_NS_MASK 0xF000 | ||
| 51 | #define UVERBS_ID_NS_SHIFT 12 | ||
| 52 | |||
| 53 | enum { | ||
| 54 | /* User input */ | ||
| 55 | UVERBS_ATTR_F_MANDATORY = 1U << 0, | ||
| 56 | /* | ||
| 57 | * Valid output bit should be ignored and considered set in | ||
| 58 | * mandatory fields. This bit is kernel output. | ||
| 59 | */ | ||
| 60 | UVERBS_ATTR_F_VALID_OUTPUT = 1U << 1, | ||
| 61 | }; | ||
| 62 | |||
| 63 | struct ib_uverbs_attr { | ||
| 64 | __u16 attr_id; /* command specific type attribute */ | ||
| 65 | __u16 len; /* only for pointers */ | ||
| 66 | __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */ | ||
| 67 | __u16 reserved; | ||
| 68 | __aligned_u64 data; /* ptr to command, inline data or idr/fd */ | ||
| 69 | }; | ||
| 70 | |||
| 71 | struct ib_uverbs_ioctl_hdr { | ||
| 72 | __u16 length; | ||
| 73 | __u16 object_id; | ||
| 74 | __u16 method_id; | ||
| 75 | __u16 num_attrs; | ||
| 76 | __aligned_u64 reserved; | ||
| 77 | struct ib_uverbs_attr attrs[0]; | ||
| 78 | }; | ||
| 79 | |||
| 80 | /* | 44 | /* |
| 81 | * General blocks assignments | 45 | * General blocks assignments |
| 82 | * It is closed on purpose do not expose it it user space | 46 | * It is closed on purpose do not expose it it user space |
| @@ -0,0 +1,99 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2018, 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 RDMA_USER_IOCTL_CMDS_H | ||
| 34 | #define RDMA_USER_IOCTL_CMDS_H | ||
| 35 | |||
| 36 | #include <linux/types.h> | ||
| 37 | #include <linux/ioctl.h> | ||
| 38 | |||
| 39 | /* Documentation/ioctl/ioctl-number.txt */ | ||
| 40 | #define RDMA_IOCTL_MAGIC 0x1b | ||
| 41 | #define RDMA_VERBS_IOCTL \ | ||
| 42 | _IOWR(RDMA_IOCTL_MAGIC, 1, struct ib_uverbs_ioctl_hdr) | ||
| 43 | |||
| 44 | enum { | ||
| 45 | /* User input */ | ||
| 46 | UVERBS_ATTR_F_MANDATORY = 1U << 0, | ||
| 47 | /* | ||
| 48 | * Valid output bit should be ignored and considered set in | ||
| 49 | * mandatory fields. This bit is kernel output. | ||
| 50 | */ | ||
| 51 | UVERBS_ATTR_F_VALID_OUTPUT = 1U << 1, | ||
| 52 | }; | ||
| 53 | |||
| 54 | struct ib_uverbs_attr { | ||
| 55 | __u16 attr_id; /* command specific type attribute */ | ||
| 56 | __u16 len; /* only for pointers */ | ||
| 57 | __u16 flags; /* combination of UVERBS_ATTR_F_XXXX */ | ||
| 58 | union { | ||
| 59 | struct { | ||
| 60 | __u8 elem_id; | ||
| 61 | __u8 reserved; | ||
| 62 | } enum_data; | ||
| 63 | __u16 reserved; | ||
| 64 | } attr_data; | ||
| 65 | __aligned_u64 data; /* ptr to command, inline data or idr/fd */ | ||
| 66 | }; | ||
| 67 | |||
| 68 | struct ib_uverbs_ioctl_hdr { | ||
| 69 | __u16 length; | ||
| 70 | __u16 object_id; | ||
| 71 | __u16 method_id; | ||
| 72 | __u16 num_attrs; | ||
| 73 | __aligned_u64 reserved1; | ||
| 74 | __u32 driver_id; | ||
| 75 | __u32 reserved2; | ||
| 76 | struct ib_uverbs_attr attrs[0]; | ||
| 77 | }; | ||
| 78 | |||
| 79 | enum rdma_driver_id { | ||
| 80 | RDMA_DRIVER_UNKNOWN, | ||
| 81 | RDMA_DRIVER_MLX5, | ||
| 82 | RDMA_DRIVER_MLX4, | ||
| 83 | RDMA_DRIVER_CXGB3, | ||
| 84 | RDMA_DRIVER_CXGB4, | ||
| 85 | RDMA_DRIVER_MTHCA, | ||
| 86 | RDMA_DRIVER_BNXT_RE, | ||
| 87 | RDMA_DRIVER_OCRDMA, | ||
| 88 | RDMA_DRIVER_NES, | ||
| 89 | RDMA_DRIVER_I40IW, | ||
| 90 | RDMA_DRIVER_VMW_PVRDMA, | ||
| 91 | RDMA_DRIVER_QEDR, | ||
| 92 | RDMA_DRIVER_HNS, | ||
| 93 | RDMA_DRIVER_USNIC, | ||
| 94 | RDMA_DRIVER_RXE, | ||
| 95 | RDMA_DRIVER_HFI1, | ||
| 96 | RDMA_DRIVER_QIB, | ||
| 97 | }; | ||
| 98 | |||
| 99 | #endif | ||
| @@ -35,6 +35,9 @@ · 34 unmodified lines | |||
| 35 | #define RDMA_USER_RXE_H | 35 | #define RDMA_USER_RXE_H |
| 36 | 36 | ||
| 37 | #include <linux/types.h> | 37 | #include <linux/types.h> |
| 38 | #include <linux/socket.h> | ||
| 39 | #include <linux/in.h> | ||
| 40 | #include <linux/in6.h> | ||
| 38 | 41 | ||
| 39 | union rxe_gid { | 42 | union rxe_gid { |
| 40 | __u8 raw[16]; | 43 | __u8 raw[16]; |
| @@ -55,16 +58,17 @@ struct rxe_global_route { · 14 unmodified lines | |||
| 55 | struct rxe_av { | 58 | struct rxe_av { |
| 56 | __u8 port_num; | 59 | __u8 port_num; |
| 57 | __u8 network_type; | 60 | __u8 network_type; |
| 61 | __u16 reserved1; | ||
| 62 | __u32 reserved2; | ||
| 58 | struct rxe_global_route grh; | 63 | struct rxe_global_route grh; |
| 59 | union { | 64 | union { |
| 60 | struct sockaddr _sockaddr; | ||
| 61 | struct sockaddr_in _sockaddr_in; | 65 | struct sockaddr_in _sockaddr_in; |
| 62 | struct sockaddr_in6 _sockaddr_in6; | 66 | struct sockaddr_in6 _sockaddr_in6; |
| 63 | } sgid_addr, dgid_addr; | 67 | } sgid_addr, dgid_addr; |
| 64 | }; | 68 | }; |
| 65 | 69 | ||
| 66 | struct rxe_send_wr { | 70 | struct rxe_send_wr { |
| 67 | __u64 wr_id; | 71 | __aligned_u64 wr_id; |
| 68 | __u32 num_sge; | 72 | __u32 num_sge; |
| 69 | __u32 opcode; | 73 | __u32 opcode; |
| 70 | __u32 send_flags; | 74 | __u32 send_flags; |
| @@ -74,36 +78,42 @@ struct rxe_send_wr { · 3 unmodified lines | |||
| 74 | } ex; | 78 | } ex; |
| 75 | union { | 79 | union { |
| 76 | struct { | 80 | struct { |
| 77 | __u64 remote_addr; | 81 | __aligned_u64 remote_addr; |
| 78 | __u32 rkey; | 82 | __u32 rkey; |
| 83 | __u32 reserved; | ||
| 79 | } rdma; | 84 | } rdma; |
| 80 | struct { | 85 | struct { |
| 81 | __u64 remote_addr; | 86 | __aligned_u64 remote_addr; |
| 82 | __u64 compare_add; | 87 | __aligned_u64 compare_add; |
| 83 | __u64 swap; | 88 | __aligned_u64 swap; |
| 84 | __u32 rkey; | 89 | __u32 rkey; |
| 90 | __u32 reserved; | ||
| 85 | } atomic; | 91 | } atomic; |
| 86 | struct { | 92 | struct { |
| 87 | __u32 remote_qpn; | 93 | __u32 remote_qpn; |
| 88 | __u32 remote_qkey; | 94 | __u32 remote_qkey; |
| 89 | __u16 pkey_index; | 95 | __u16 pkey_index; |
| 90 | } ud; | 96 | } ud; |
| 97 | /* reg is only used by the kernel and is not part of the uapi */ | ||
| 91 | struct { | 98 | struct { |
| 92 | struct ib_mr *mr; | 99 | union { |
| 100 | struct ib_mr *mr; | ||
| 101 | __aligned_u64 reserved; | ||
| 102 | }; | ||
| 93 | __u32 key; | 103 | __u32 key; |
| 94 | int access; | 104 | __u32 access; |
| 95 | } reg; | 105 | } reg; |
| 96 | } wr; | 106 | } wr; |
| 97 | }; | 107 | }; |
| 98 | 108 | ||
| 99 | struct rxe_sge { | 109 | struct rxe_sge { |
| 100 | __u64 addr; | 110 | __aligned_u64 addr; |
| 101 | __u32 length; | 111 | __u32 length; |
| 102 | __u32 lkey; | 112 | __u32 lkey; |
| 103 | }; | 113 | }; |
| 104 | 114 | ||
| 105 | struct mminfo { | 115 | struct mminfo { |
| 106 | __u64 offset; | 116 | __aligned_u64 offset; |
| 107 | __u32 size; | 117 | __u32 size; |
| 108 | __u32 pad; | 118 | __u32 pad; |
| 109 | }; | 119 | }; |
| @@ -114,6 +124,7 @@ struct rxe_dma_info { · 4 unmodified lines | |||
| 114 | __u32 cur_sge; | 124 | __u32 cur_sge; |
| 115 | __u32 num_sge; | 125 | __u32 num_sge; |
| 116 | __u32 sge_offset; | 126 | __u32 sge_offset; |
| 127 | __u32 reserved; | ||
| 117 | union { | 128 | union { |
| 118 | __u8 inline_data[0]; | 129 | __u8 inline_data[0]; |
| 119 | struct rxe_sge sge[0]; | 130 | struct rxe_sge sge[0]; |
| @@ -125,7 +136,7 @@ struct rxe_send_wqe { · 5 unmodified lines | |||
| 125 | struct rxe_av av; | 136 | struct rxe_av av; |
| 126 | __u32 status; | 137 | __u32 status; |
| 127 | __u32 state; | 138 | __u32 state; |
| 128 | __u64 iova; | 139 | __aligned_u64 iova; |
| 129 | __u32 mask; | 140 | __u32 mask; |
| 130 | __u32 first_psn; | 141 | __u32 first_psn; |
| 131 | __u32 last_psn; | 142 | __u32 last_psn; |
| @@ -136,10 +147,33 @@ struct rxe_send_wqe { · 4 unmodified lines | |||
| 136 | }; | 147 | }; |
| 137 | 148 | ||
| 138 | struct rxe_recv_wqe { | 149 | struct rxe_recv_wqe { |
| 139 | __u64 wr_id; | 150 | __aligned_u64 wr_id; |
| 140 | __u32 num_sge; | 151 | __u32 num_sge; |
| 141 | __u32 padding; | 152 | __u32 padding; |
| 142 | struct rxe_dma_info dma; | 153 | struct rxe_dma_info dma; |
| 143 | }; | 154 | }; |
| 144 | 155 | ||
| 156 | struct rxe_create_cq_resp { | ||
| 157 | struct mminfo mi; | ||
| 158 | }; | ||
| 159 | |||
| 160 | struct rxe_resize_cq_resp { | ||
| 161 | struct mminfo mi; | ||
| 162 | }; | ||
| 163 | |||
| 164 | struct rxe_create_qp_resp { | ||
| 165 | struct mminfo rq_mi; | ||
| 166 | struct mminfo sq_mi; | ||
| 167 | }; | ||
| 168 | |||
| 169 | struct rxe_create_srq_resp { | ||
| 170 | struct mminfo mi; | ||
| 171 | __u32 srq_num; | ||
| 172 | __u32 reserved; | ||
| 173 | }; | ||
| 174 | |||
| 175 | struct rxe_modify_srq_cmd { | ||
| 176 | __aligned_u64 mmap_info_addr; | ||
| 177 | }; | ||
| 178 | |||
| 145 | #endif /* RDMA_USER_RXE_H */ | 179 | #endif /* RDMA_USER_RXE_H */ |
| @@ -143,7 +143,7 @@ struct pvrdma_alloc_pd_resp { · 142 unmodified lines | |||
| 143 | }; | 143 | }; |
| 144 | 144 | ||
| 145 | struct pvrdma_create_cq { | 145 | struct pvrdma_create_cq { |
| 146 | __u64 buf_addr; | 146 | __aligned_u64 buf_addr; |
| 147 | __u32 buf_size; | 147 | __u32 buf_size; |
| 148 | __u32 reserved; | 148 | __u32 reserved; |
| 149 | }; | 149 | }; |
| @@ -154,13 +154,13 @@ struct pvrdma_create_cq_resp { · 4 unmodified lines | |||
| 154 | }; | 154 | }; |
| 155 | 155 | ||
| 156 | struct pvrdma_resize_cq { | 156 | struct pvrdma_resize_cq { |
| 157 | __u64 buf_addr; | 157 | __aligned_u64 buf_addr; |
| 158 | __u32 buf_size; | 158 | __u32 buf_size; |
| 159 | __u32 reserved; | 159 | __u32 reserved; |
| 160 | }; | 160 | }; |
| 161 | 161 | ||
| 162 | struct pvrdma_create_srq { | 162 | struct pvrdma_create_srq { |
| 163 | __u64 buf_addr; | 163 | __aligned_u64 buf_addr; |
| 164 | __u32 buf_size; | 164 | __u32 buf_size; |
| 165 | __u32 reserved; | 165 | __u32 reserved; |
| 166 | }; | 166 | }; |
| @@ -171,25 +171,25 @@ struct pvrdma_create_srq_resp { · 4 unmodified lines | |||
| 171 | }; | 171 | }; |
| 172 | 172 | ||
| 173 | struct pvrdma_create_qp { | 173 | struct pvrdma_create_qp { |
| 174 | __u64 rbuf_addr; | 174 | __aligned_u64 rbuf_addr; |
| 175 | __u64 sbuf_addr; | 175 | __aligned_u64 sbuf_addr; |
| 176 | __u32 rbuf_size; | 176 | __u32 rbuf_size; |
| 177 | __u32 sbuf_size; | 177 | __u32 sbuf_size; |
| 178 | __u64 qp_addr; | 178 | __aligned_u64 qp_addr; |
| 179 | }; | 179 | }; |
| 180 | 180 | ||
| 181 | /* PVRDMA masked atomic compare and swap */ | 181 | /* PVRDMA masked atomic compare and swap */ |
| 182 | struct pvrdma_ex_cmp_swap { | 182 | struct pvrdma_ex_cmp_swap { |
| 183 | __u64 swap_val; | 183 | __aligned_u64 swap_val; |
| 184 | __u64 compare_val; | 184 | __aligned_u64 compare_val; |
| 185 | __u64 swap_mask; | 185 | __aligned_u64 swap_mask; |
| 186 | __u64 compare_mask; | 186 | __aligned_u64 compare_mask; |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| 189 | /* PVRDMA masked atomic fetch and add */ | 189 | /* PVRDMA masked atomic fetch and add */ |
| 190 | struct pvrdma_ex_fetch_add { | 190 | struct pvrdma_ex_fetch_add { |
| 191 | __u64 add_val; | 191 | __aligned_u64 add_val; |
| 192 | __u64 field_boundary; | 192 | __aligned_u64 field_boundary; |
| 193 | }; | 193 | }; |
| 194 | 194 | ||
| 195 | /* PVRDMA address vector. */ | 195 | /* PVRDMA address vector. */ |
| @@ -207,14 +207,14 @@ struct pvrdma_av { · 11 unmodified lines | |||
| 207 | 207 | ||
| 208 | /* PVRDMA scatter/gather entry */ | 208 | /* PVRDMA scatter/gather entry */ |
| 209 | struct pvrdma_sge { | 209 | struct pvrdma_sge { |
| 210 | __u64 addr; | 210 | __aligned_u64 addr; |
| 211 | __u32 length; | 211 | __u32 length; |
| 212 | __u32 lkey; | 212 | __u32 lkey; |
| 213 | }; | 213 | }; |
| 214 | 214 | ||
| 215 | /* PVRDMA receive queue work request */ | 215 | /* PVRDMA receive queue work request */ |
| 216 | struct pvrdma_rq_wqe_hdr { | 216 | struct pvrdma_rq_wqe_hdr { |
| 217 | __u64 wr_id; /* wr id */ | 217 | __aligned_u64 wr_id; /* wr id */ |
| 218 | __u32 num_sge; /* size of s/g array */ | 218 | __u32 num_sge; /* size of s/g array */ |
| 219 | __u32 total_len; /* reserved */ | 219 | __u32 total_len; /* reserved */ |
| 220 | }; | 220 | }; |
| @@ -222,7 +222,7 @@ struct pvrdma_rq_wqe_hdr { · 1 unmodified line | |||
| 222 | 222 | ||
| 223 | /* PVRDMA send queue work request */ | 223 | /* PVRDMA send queue work request */ |
| 224 | struct pvrdma_sq_wqe_hdr { | 224 | struct pvrdma_sq_wqe_hdr { |
| 225 | __u64 wr_id; /* wr id */ | 225 | __aligned_u64 wr_id; /* wr id */ |
| 226 | __u32 num_sge; /* size of s/g array */ | 226 | __u32 num_sge; /* size of s/g array */ |
| 227 | __u32 total_len; /* reserved */ | 227 | __u32 total_len; /* reserved */ |
| 228 | __u32 opcode; /* operation type */ | 228 | __u32 opcode; /* operation type */ |
| @@ -234,19 +234,19 @@ struct pvrdma_sq_wqe_hdr { · 5 unmodified lines | |||
| 234 | __u32 reserved; | 234 | __u32 reserved; |
| 235 | union { | 235 | union { |
| 236 | struct { | 236 | struct { |
| 237 | __u64 remote_addr; | 237 | __aligned_u64 remote_addr; |
| 238 | __u32 rkey; | 238 | __u32 rkey; |
| 239 | __u8 reserved[4]; | 239 | __u8 reserved[4]; |
| 240 | } rdma; | 240 | } rdma; |
| 241 | struct { | 241 | struct { |
| 242 | __u64 remote_addr; | 242 | __aligned_u64 remote_addr; |
| 243 | __u64 compare_add; | 243 | __aligned_u64 compare_add; |
| 244 | __u64 swap; | 244 | __aligned_u64 swap; |
| 245 | __u32 rkey; | 245 | __u32 rkey; |
| 246 | __u32 reserved; | 246 | __u32 reserved; |
| 247 | } atomic; | 247 | } atomic; |
| 248 | struct { | 248 | struct { |
| 249 | __u64 remote_addr; | 249 | __aligned_u64 remote_addr; |
| 250 | __u32 log_arg_sz; | 250 | __u32 log_arg_sz; |
| 251 | __u32 rkey; | 251 | __u32 rkey; |
| 252 | union { | 252 | union { |
| @@ -255,13 +255,14 @@ struct pvrdma_sq_wqe_hdr { · 2 unmodified lines | |||
| 255 | } wr_data; | 255 | } wr_data; |
| 256 | } masked_atomics; | 256 | } masked_atomics; |
| 257 | struct { | 257 | struct { |
| 258 | __u64 iova_start; | 258 | __aligned_u64 iova_start; |
| 259 | __u64 pl_pdir_dma; | 259 | __aligned_u64 pl_pdir_dma; |
| 260 | __u32 page_shift; | 260 | __u32 page_shift; |
| 261 | __u32 page_list_len; | 261 | __u32 page_list_len; |
| 262 | __u32 length; | 262 | __u32 length; |
| 263 | __u32 access_flags; | 263 | __u32 access_flags; |
| 264 | __u32 rkey; | 264 | __u32 rkey; |
| 265 | __u32 reserved; | ||
| 265 | } fast_reg; | 266 | } fast_reg; |
| 266 | struct { | 267 | struct { |
| 267 | __u32 remote_qpn; | 268 | __u32 remote_qpn; |
| @@ -274,8 +275,8 @@ struct pvrdma_sq_wqe_hdr { · 6 unmodified lines | |||
| 274 | 275 | ||
| 275 | /* Completion queue element. */ | 276 | /* Completion queue element. */ |
| 276 | struct pvrdma_cqe { | 277 | struct pvrdma_cqe { |
| 277 | __u64 wr_id; | 278 | __aligned_u64 wr_id; |
| 278 | __u64 qp; | 279 | __aligned_u64 qp; |
| 279 | __u32 opcode; | 280 | __u32 opcode; |
| 280 | __u32 status; | 281 | __u32 status; |
| 281 | __u32 byte_len; | 282 | __u32 byte_len; |
| @@ -242,6 +242,7 @@ typedef int __bitwise snd_pcm_format_t; · 241 unmodified lines | |||
| 242 | #define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ | 242 | #define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ |
| 243 | #define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ | 243 | #define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ |
| 244 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE | 244 | #define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE |
| 245 | #define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 | ||
| 245 | 246 | ||
| 246 | #ifdef SNDRV_LITTLE_ENDIAN | 247 | #ifdef SNDRV_LITTLE_ENDIAN |
| 247 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE | 248 | #define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE |