-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update GetAckTimeout to use the backoff algorithm #23307
Update GetAckTimeout to use the backoff algorithm #23307
Conversation
Hmm. What are the parameters involved there? I assume the connect is an async process, so it sends the ack, but the exchange timeout is being hit? What "time it will take the server" are we providing as input to that connect call? It must be at least 30 seconds, since this is during commissioning, right? So 30s + active MRP bits (34s) is not enough in this case? Maybe we should be using a higher timeout for ConnectNetwork in AutoCommissioner? |
68c6f86
to
566ddb5
Compare
PR #23307: Size comparison from 0c2f7c6 to 566ddb5 Increases (24 builds for bl602, bl702, cc13x2_26x2, k32w, linux, mbed, nrfconnect, qpg, telink)
Decreases (8 builds for cc13x2_26x2, linux)
Full report (24 builds for bl602, bl702, cc13x2_26x2, k32w, linux, mbed, nrfconnect, qpg, telink)
|
566ddb5
to
9db295b
Compare
Based on the logs I assume the Ack is received:
What "time it will take the server" are we providing as input to that connect call? It must be at least 30 seconds, since this is during commissioning, right? So 30s + active MRP bits (34s) is not enough in this case? Maybe we should be using a higher timeout for ConnectNetwork in AutoCommissioner? The python test suite is not using the connectedhomeip/src/controller/python/test/test_scripts/network_commissioning.py Line 201 in c577b23
Connect Network command.
It ends up calling: https://github.com/project-chip/connectedhomeip/blob/b9d32ecefd004adb7cc4c70a5f4a567dca199da0/src/controller/python/chip/clusters/command.cpp which in turns call |
PR #23307: Size comparison from 0c2f7c6 to 9db295b Increases (36 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Decreases (8 builds for cc13x2_26x2, linux)
Full report (36 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Well, that would be the bug, the. It's violating the spec, if it allows less than 30s on the server for any commissioning-related command. @mrjerryjohns @tcarmelveilleux @yunhanw-google could you please take a look at the python bits there? |
@vivien-apple Does just adding |
Yes, I have tried already to add |
7e58087
to
3b1cde1
Compare
PR #23307: Size comparison from 0c2f7c6 to 3b1cde1 Increases (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Decreases (7 builds for cc13x2_26x2, esp32)
Full report (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
src/controller/python/test/test_scripts/network_commissioning.py
Outdated
Show resolved
Hide resolved
…fig such that an accurate maximum retransmission time could be calculated from the external world
… and use GetRetransmissionTimeout to be more accurate
…py ScanNetwork and ConnectNetwork tests with an explicit interactionTimeoutMs instead of relying on GetAckTimeout behavior
3b1cde1
to
d6fdc1c
Compare
PR #23307: Size comparison from 0c2f7c6 to d6fdc1c Increases (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Decreases (7 builds for cc13x2_26x2, esp32)
Full report (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
* [MRP] Expose GetRetransmissionTimeout from ReliableMessageProtocolConfig such that an accurate maximum retransmission time could be calculated from the external world * [MRP] Update GetAckTimeout to take into account the PeerActive status and use GetRetransmissionTimeout to be more accurate * Update src/controller/python/test/test_scripts/network_commissioning.py ScanNetwork and ConnectNetwork tests with an explicit interactionTimeoutMs instead of relying on GetAckTimeout behavior
* [MRP] Expose GetRetransmissionTimeout from ReliableMessageProtocolConfig such that an accurate maximum retransmission time could be calculated from the external world * [MRP] Update GetAckTimeout to take into account the PeerActive status and use GetRetransmissionTimeout to be more accurate * Update src/controller/python/test/test_scripts/network_commissioning.py ScanNetwork and ConnectNetwork tests with an explicit interactionTimeoutMs instead of relying on GetAckTimeout behavior
Problem
SecureSession::GetAckTimeout
andUnauthenticatedSessionTable::GetAckTimeout
always use the idle specified by MRP without taking into account thePeerActiveMode
.Also, the current formula calculation:
GetRemoteMRPConfig().mIdleRetransTimeout * (CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS + 1);
represent a static time and not a time that changes such as represented bymrpBackoffTime
.If someone uses
GetAckTimeout
to configure the exchange response timeout, it may end up into ending the exchange before all MRP retransmissions is done.