Commit 18ab1b5
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 8b019a3 commit 18ab1b5
1 file changed
+47
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2835 | 2835 | | |
2836 | 2836 | | |
2837 | 2837 | | |
| 2838 | + | |
2838 | 2839 | | |
2839 | 2840 | | |
2840 | | - | |
2841 | | - | |
2842 | | - | |
2843 | | - | |
2844 | | - | |
2845 | | - | |
2846 | | - | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
2847 | 2864 | | |
2848 | 2865 | | |
2849 | | - | |
2850 | | - | |
2851 | | - | |
2852 | | - | |
2853 | | - | |
2854 | | - | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
2855 | 2889 | | |
2856 | 2890 | | |
2857 | 2891 | | |
| |||
0 commit comments