Default MRP_RETRY_INTERVAL_SENDER_BOOST to 0 ms (#27555)
diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index 5c0989c..8a9e88d 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp
@@ -261,9 +261,7 @@ } #endif -#ifdef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST mrpBackoffTime += CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; -#endif return mrpBackoffTime; }
diff --git a/src/messaging/ReliableMessageProtocolConfig.h b/src/messaging/ReliableMessageProtocolConfig.h index 859dcb4..a77483f 100644 --- a/src/messaging/ReliableMessageProtocolConfig.h +++ b/src/messaging/ReliableMessageProtocolConfig.h
@@ -162,8 +162,10 @@ #ifndef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST #if CHIP_ENABLE_OPENTHREAD && !CHIP_DEVICE_LAYER_TARGET_LINUX #define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST (500_ms) +#else +#define CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST (0_ms) #endif -#endif // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST && !CHIP_DEVICE_LAYER_TARGET_LINUX +#endif // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST /** * @brief
diff --git a/src/messaging/tests/TestAbortExchangesForFabric.cpp b/src/messaging/tests/TestAbortExchangesForFabric.cpp index ef9ff8c..33b2dfc 100644 --- a/src/messaging/tests/TestAbortExchangesForFabric.cpp +++ b/src/messaging/tests/TestAbortExchangesForFabric.cpp
@@ -206,11 +206,10 @@ // trigger a MRP failure due to timing out waiting for an ACK. // auto waitTimeout = System::Clock::Milliseconds32(1000); -#ifdef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST // Account for the retry delay booster, so that we do not timeout our IO processing before the // retransmission failure is triggered. waitTimeout += CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS * CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; -#endif + ctx.GetIOContext().DriveIOUntil(waitTimeout, [&]() { return false; }); } else
diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 0db2449..101367e 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp
@@ -58,17 +58,13 @@ const char PAYLOAD[] = "Hello!"; -#ifdef CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST -// When the CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST is set, the stack -// operates under the assumption of a high latency network (like Thread), -// so it adds extra delays to avoid spurious retransmits. +// The CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST can be set to non-zero value +// to boost the retransmission timeout for a high latency network like Thread to +// avoid spurious retransmits. // // This adds extra I/O time to account for this. See the documentation for // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST for more details. constexpr auto retryBoosterTimeout = CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS * CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; -#else -constexpr auto retryBoosterTimeout = System::Clock::Milliseconds32(0); -#endif class MockAppDelegate : public UnsolicitedMessageHandler, public ExchangeDelegate {
diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index 66a6a74..c9a3d6a 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp
@@ -279,7 +279,8 @@ while (delegate.mMessageDropped) { - chip::test_utils::SleepMillis(100); + // Wait some time so the dropped message will be retransmitted when we drain the IO. + chip::test_utils::SleepMillis((100_ms + CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST).count()); delegate.mMessageDropped = false; ReliableMessageMgr::Timeout(&ctx.GetSystemLayer(), ctx.GetExchangeManager().GetReliableMessageMgr()); ctx.DrainAndServiceIO();