Commit 17ade53
RDMA/mlx5: Check enabled UCAPs when creating ucontext
Verify that the enabled UCAPs are supported by the device before
creating the ucontext.
If supported, create the ucontext with the associated capabilities.
Store the privileged ucontext UID on creation and remove it when
destroying the privileged ucontext. This allows the command interface
to recognize privileged commands through its UID.
Signed-off-by: Chiara Meiohas <cmeiohas@nvidia.com>
Link: https://patch.msgid.link/8b180583a207cb30deb7a2967934079749cdcc44.1741261611.git.leon@kernel.org
Reviewed-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>1 parent fe9d782 commit 17ade53
3 files changed
Lines changed: 58 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
126 | 147 | | |
127 | 148 | | |
128 | 149 | | |
| |||
146 | 167 | | |
147 | 168 | | |
148 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
149 | 176 | | |
150 | 177 | | |
151 | 178 | | |
| |||
2575 | 2602 | | |
2576 | 2603 | | |
2577 | 2604 | | |
2578 | | - | |
| 2605 | + | |
2579 | 2606 | | |
2580 | 2607 | | |
2581 | 2608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1935 | 1935 | | |
1936 | 1936 | | |
1937 | 1937 | | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
1938 | 1944 | | |
1939 | 1945 | | |
1940 | 1946 | | |
| |||
1977 | 1983 | | |
1978 | 1984 | | |
1979 | 1985 | | |
1980 | | - | |
| 1986 | + | |
1981 | 1987 | | |
1982 | 1988 | | |
1983 | 1989 | | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
1984 | 1997 | | |
1985 | 1998 | | |
1986 | 1999 | | |
| |||
1995 | 2008 | | |
1996 | 2009 | | |
1997 | 2010 | | |
1998 | | - | |
| 2011 | + | |
1999 | 2012 | | |
2000 | 2013 | | |
2001 | 2014 | | |
2002 | 2015 | | |
2003 | 2016 | | |
2004 | 2017 | | |
2005 | 2018 | | |
2006 | | - | |
| 2019 | + | |
2007 | 2020 | | |
2008 | 2021 | | |
2009 | 2022 | | |
| |||
2067 | 2080 | | |
2068 | 2081 | | |
2069 | 2082 | | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2070 | 2088 | | |
2071 | 2089 | | |
2072 | 2090 | | |
| |||
2111 | 2129 | | |
2112 | 2130 | | |
2113 | 2131 | | |
2114 | | - | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
2115 | 2136 | | |
| 2137 | + | |
2116 | 2138 | | |
2117 | 2139 | | |
2118 | 2140 | | |
| |||
0 commit comments