From 337d424d4f9e10b4a4cce4b8038082779a49c522 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 26 May 2026 20:13:42 -0700 Subject: [PATCH] [mlr] stop fast polls upon receiving response (#13149) When a sleepy end device (where `Mle::IsRxOnWhenIdle()` returns false) sends an MLR request, it initiates fast data polls via `DataPollSender::SendFastPolls()` to quickly receive the response. This commit updates `Manager::HandleResponse()` to call `DataPollSender::StopFastPolls()` when the MLR response is processed by a sleepy end device. This ensures that the device does not unnecessarily continue fast polling. --- src/core/thread/mlr_manager.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/core/thread/mlr_manager.cpp b/src/core/thread/mlr_manager.cpp index d850887a0..72c9a28d8 100644 --- a/src/core/thread/mlr_manager.cpp +++ b/src/core/thread/mlr_manager.cpp @@ -419,9 +419,13 @@ void Manager::SendNextRequest(void) EnterState(kStateRegistering); - // Generally Thread 1.2 Router would send MLR.req on behalf for MA (scope >=4) subscribed by its MTD child. - // When Thread 1.2 MTD attaches to Thread 1.1 parent, 1.2 MTD should send MLR.req to PBBR itself. - // In this case, Thread 1.2 sleepy end device relies on fast data poll to fetch the response timely. + // Generally, a Thread 1.2 Router sends MLR.req on behalf of its + // MTD children for multicast addresses. However, when a Thread + // 1.2 MTD child attaches to a Thread 1.1 parent, the MTD child + // must send the MLR.req to the PBBR itself. In this scenario, a + // Thread 1.2 Sleepy End Device relies on fast data polls to + // receive the response in a timely manner. + if (!Get().IsRxOnWhenIdle()) { Get().SendFastPolls(); @@ -551,6 +555,11 @@ void Manager::ProcessResponse(Coap::Msg *aMsg, Error aResult) AddressArray registeredAddresses; OwnedPtr requestMsg; + if (!Get().IsRxOnWhenIdle()) + { + Get().StopFastPolls(); + } + //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Parse the response message