Commit 46b49a4
committed
mctpd: implement routing table polling
As discussed on OpenBMC Discord [1], according to the DSP0236 spec,
there is no good way to discover all active endpoints aside from
polling/scanning the entire network.
This adds an initial routing table polling mechanism. For each bridge,
mctpd will send Get Routing Table and add the endpoints to D-Bus.
If some of the endpoints are bridges, mctpd recursively enables
polling for those bridges.
To kick start the process, mctpd will enable polling on its bus owner,
discovered when mctpd receives the Set Endpoint ID message.
mctp.routing_table_polling_interval_ms config can be used to tweak the
delay between pollings. Config files have been updated accordingly, we
want a reasonable delay in the default config file, and a shorter delay
in the test config file for running tests.
Tested: For the following topology:
┌───────┐ ┌───────┐
│ ┼──► EID 9 │
│ │ └───────┘
│ │
│ │
│ EID 8 │
│ │ ┌────────┐ ┌──────┐
│ │ │ ┼──►EID 11│
│ │ │ │ └──────┘
│ ┼──► EID 10 │
│ │ │ │ ┌──────┐
│ │ │ ├──►EID 12│
└───────┘ └────────┘ └──────┘
The result D-Bus object tree should contain:
- /au/com/codeconstruct/mctp1/networks/1/endpoints/8
- /au/com/codeconstruct/mctp1/networks/1/endpoints/9
- /au/com/codeconstruct/mctp1/networks/1/endpoints/10
- /au/com/codeconstruct/mctp1/networks/1/endpoints/11
- /au/com/codeconstruct/mctp1/networks/1/endpoints/12
[1] https://discord.com/channels/775381525260664832/778790638563885086/1282947932093415446
Signed-off-by: Khang D Nguyen <[email protected]>1 parent fc4fba4 commit 46b49a4
File tree
4 files changed
+476
-0
lines changed- conf
- src
- tests
4 files changed
+476
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
| |||
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
244 | 251 | | |
245 | 252 | | |
246 | 253 | | |
| |||
276 | 283 | | |
277 | 284 | | |
278 | 285 | | |
| 286 | + | |
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
| |||
815 | 823 | | |
816 | 824 | | |
817 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
818 | 830 | | |
819 | 831 | | |
820 | 832 | | |
| |||
1909 | 1921 | | |
1910 | 1922 | | |
1911 | 1923 | | |
| 1924 | + | |
| 1925 | + | |
1912 | 1926 | | |
1913 | 1927 | | |
1914 | 1928 | | |
| |||
2291 | 2305 | | |
2292 | 2306 | | |
2293 | 2307 | | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
| 2361 | + | |
| 2362 | + | |
2294 | 2363 | | |
2295 | 2364 | | |
2296 | 2365 | | |
| |||
3347 | 3416 | | |
3348 | 3417 | | |
3349 | 3418 | | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
3350 | 3519 | | |
3351 | 3520 | | |
3352 | 3521 | | |
| |||
4798 | 4967 | | |
4799 | 4968 | | |
4800 | 4969 | | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
| 4977 | + | |
| 4978 | + | |
| 4979 | + | |
4801 | 4980 | | |
4802 | 4981 | | |
4803 | 4982 | | |
| |||
4974 | 5153 | | |
4975 | 5154 | | |
4976 | 5155 | | |
| 5156 | + | |
4977 | 5157 | | |
4978 | 5158 | | |
4979 | 5159 | | |
| |||
0 commit comments