You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mctpd: Add timeout overriding using program arguments
Currently, the timeout is hardcoded with the value of 250ms. However,
when developing, we may want to make the timeout longer to make sure we
do not miss any messages due to other reasons.
This commit adds timeout overriding using program arguments. This makes
tweaking the timeout at runtime possible.
Tested:
1. Send a request to a non-existent endpoint. It should timeout in 250ms
by default.
root@mtmitchell:~# time busctl call xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp \
> au.com.CodeConstruct.MCTP SetupEndpoint say mctppcie0 2 0xCA 0xFE
Call failed: MCTP Endpoint did not respond
real 0m0.344s
user 0m0.016s
sys 0m0.000s
2. Change mctpd.service to use longer timeout, 10 seconds for example.
ExecStart=/usr/sbin/mctpd -t 10000000
3. Resend the request. It should timeout in 10 seconds.
root@mtmitchell:~# time busctl call xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp \
> au.com.CodeConstruct.MCTP SetupEndpoint say mctppcie0 2 0xCA 0xFE
Call failed: MCTP Endpoint did not respond
real 0m10.083s
user 0m0.015s
sys 0m0.001s
Signed-off-by: Khang Nguyen <[email protected]>
0 commit comments