Commit 2f9bf92
committed
mctp: Add retry for one-time peer property queries on timeout
The function `query_peer_properties()` is called once during peer initialization
to query basic information after the EID becomes routable.
To improve reliability, this change adds a retry mechanism when the query
fails with `-ETIMEDOUT`. Since these queries are one-time initialization steps,
a single successful attempt is sufficient, and retrying enhances stability
under transient MCTP bus contention or multi-master timing issues.
Testing:
add stress test for peer initialization under multi-master
```
while true; do
echo "Restarting mctpd.service..."
systemctl restart mctpd.service
# Wait a few seconds to allow service to initialize
sleep 20
done
```
After the 30 loops, the script checks mctpd.service journal for expected
retry messages to verify robustness under transient MCTP bus contention.
```
root@bmc:~# journalctl -xeu mctpd.service | grep Retrying
Oct 29 00:35:21 bmc mctpd[31801]: mctpd: Retrying to get endpoint types for peer eid 10 net 1 phys physaddr if 4 hw len 1 0x20 state 1. Attempt 1
Oct 29 00:39:00 bmc mctpd[32065]: mctpd: Retrying to get endpoint types for peer eid 10 net 1 phys physaddr if 4 hw len 1 0x20 state 1. Attempt 1
Oct 29 00:39:01 bmc mctpd[32065]: mctpd: Retrying to get endpoint types for peer eid 10 net 1 phys physaddr if 4 hw len 1 0x20 state 1. Attempt 2
Oct 29 00:45:08 bmc mctpd[32360]: mctpd: Retrying to get endpoint types for peer eid 10 net 1 phys physaddr if 4 hw len 1 0x20 state 1. Attempt 1
```
Signed-off-by: Daniel Hsu <[email protected]>1 parent 7ea8652 commit 2f9bf92
3 files changed
+102
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2927 | 2927 | | |
2928 | 2928 | | |
2929 | 2929 | | |
| 2930 | + | |
2930 | 2931 | | |
2931 | 2932 | | |
2932 | | - | |
2933 | | - | |
2934 | | - | |
2935 | | - | |
2936 | | - | |
2937 | | - | |
2938 | | - | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
2939 | 2957 | | |
2940 | 2958 | | |
2941 | | - | |
2942 | | - | |
2943 | | - | |
2944 | | - | |
2945 | | - | |
2946 | | - | |
| 2959 | + | |
| 2960 | + | |
| 2961 | + | |
| 2962 | + | |
| 2963 | + | |
| 2964 | + | |
| 2965 | + | |
| 2966 | + | |
| 2967 | + | |
| 2968 | + | |
| 2969 | + | |
| 2970 | + | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
2947 | 2983 | | |
2948 | 2984 | | |
2949 | 2985 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
368 | 370 | | |
369 | 371 | | |
370 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
371 | 378 | | |
372 | 379 | | |
373 | 380 | | |
| |||
435 | 442 | | |
436 | 443 | | |
437 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
438 | 448 | | |
439 | 449 | | |
440 | 450 | | |
| |||
1197 | 1207 | | |
1198 | 1208 | | |
1199 | 1209 | | |
| 1210 | + | |
| 1211 | + | |
1200 | 1212 | | |
1201 | 1213 | | |
1202 | 1214 | | |
1203 | 1215 | | |
1204 | 1216 | | |
1205 | 1217 | | |
1206 | 1218 | | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1207 | 1222 | | |
1208 | 1223 | | |
1209 | 1224 | | |
| |||
1253 | 1268 | | |
1254 | 1269 | | |
1255 | 1270 | | |
| 1271 | + | |
1256 | 1272 | | |
1257 | 1273 | | |
1258 | 1274 | | |
1259 | 1275 | | |
| 1276 | + | |
| 1277 | + | |
1260 | 1278 | | |
1261 | 1279 | | |
1262 | 1280 | | |
| |||
1269 | 1287 | | |
1270 | 1288 | | |
1271 | 1289 | | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1272 | 1297 | | |
1273 | 1298 | | |
1274 | 1299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
0 commit comments