Commit b472805
authored
[Mellanox][Smartswitch] Mapping script for pci rshim and dpu data (#20923)
- Why I did it
Introduce dpumap.sh script, Which provides the following mappings:
dpu2pcie - This subcommand provides mapping from dpu to pcie, If dpu name is provided then pcie is returned
dpu2rshim - This subcommand provides mapping from dpu to rshim, If dpu name is provided then pcie is returned
rshim2dpu - This subcommand provides mapping from rshim to dpu, If rshim is provided then dpu name is returned
rshim2pcie - This subcommand provides mapping from rshim to pcie, If rshim is provided then pcie is returned
pcie2dpu - This subcommand provides mapping from pcie to dpu, If pcie is provided then dpu name is returned
pcie2rshim - This subcommand provides mapping from pcie to rshim, If pcie is provided then rshim is returned
The command also accept multiple inputs which returns the output
- How I did it
Created dpumap.sh script and updated rshim.sh - which uses rshim to pcie mapping, updated dpuctl.sh which uses dpu to pcie mapping, updated sonic-bfb-installer.sh to acacept dpu inputs
- How to verify it
The example outputs are provided below:
admin@r-bobcat-03:~$ dpumap.sh dpu2pcie dpu1,dpu2,dpu3
0000:07:00.0
0000:01:00.0
0000:02:00.0
admin@r-bobcat-03:~$ dpumap.sh dpu2rshim dpu1
rshim1
admin@r-bobcat-03:~$ dpumap.sh pcie2rshim 0000:01:00.0
rshim2
admin@r-bobcat-03:~$ dpumap.sh rshim2dpu rshim2,rshim3
dpu2
dpu3
admin@r-bobcat-03:~$ dpumap.sh rshim2pcie rshim2
0000:01:00.0
admin@r-bobcat-03:~$ dpumap.sh dpu2rshim dpu2
rshim21 parent d6ae19f commit b472805
File tree
4 files changed
+151
-34
lines changed- files/build_templates
- platform/mellanox
- rshim/files
- smartswitch
4 files changed
+151
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1143 | 1143 | | |
1144 | 1144 | | |
1145 | 1145 | | |
| 1146 | + | |
| 1147 | + | |
1146 | 1148 | | |
1147 | 1149 | | |
1148 | 1150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 28 | + | |
| 29 | + | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | 33 | | |
39 | | - | |
| 34 | + | |
40 | 35 | | |
41 | 36 | | |
42 | 37 | | |
43 | 38 | | |
44 | | - | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
| |||
37 | 32 | | |
38 | 33 | | |
39 | 34 | | |
40 | | - | |
| 35 | + | |
41 | 36 | | |
| 37 | + | |
| 38 | + | |
42 | 39 | | |
43 | 40 | | |
44 | | - | |
| 41 | + | |
45 | 42 | | |
46 | | - | |
| 43 | + | |
47 | 44 | | |
48 | | - | |
| 45 | + | |
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
| |||
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
75 | | - | |
76 | | - | |
77 | 72 | | |
78 | 73 | | |
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
82 | | - | |
83 | 77 | | |
84 | 78 | | |
85 | 79 | | |
| |||
120 | 114 | | |
121 | 115 | | |
122 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
123 | 142 | | |
124 | 143 | | |
125 | 144 | | |
| |||
144 | 163 | | |
145 | 164 | | |
146 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
147 | 170 | | |
148 | 171 | | |
149 | 172 | | |
| |||
170 | 193 | | |
171 | 194 | | |
172 | 195 | | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
178 | 211 | | |
179 | 212 | | |
180 | 213 | | |
181 | 214 | | |
182 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
183 | 219 | | |
184 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
185 | 223 | | |
186 | 224 | | |
187 | 225 | | |
| |||
211 | 249 | | |
212 | 250 | | |
213 | 251 | | |
214 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
215 | 255 | | |
216 | 256 | | |
217 | 257 | | |
| |||
238 | 278 | | |
239 | 279 | | |
240 | 280 | | |
| 281 | + | |
0 commit comments