@@ -25,14 +25,18 @@ class du_ue_rlf_notification_adapter final : public du_ue_rlf_handler
2525{
2626public:
2727 du_ue_rlf_notification_adapter (du_ue_index_t ue_index_,
28- std::chrono::milliseconds release_timeout_,
28+ std::chrono::milliseconds t310_,
29+ std::chrono::milliseconds t311_,
2930 unique_timer release_request_timer,
3031 du_ue_manager_repository& du_ue_mng_) :
3132 ue_index (ue_index_),
32- release_timeout (release_timeout_),
33+ t310 (t310_),
34+ t311 (t311_),
3335 rel_timer (std::move(release_request_timer)),
3436 du_ue_mng (du_ue_mng_),
35- logger (srslog::fetch_basic_logger(" DU-MNG" ))
37+ logger (srslog::fetch_basic_logger(" DU-MNG" )),
38+ // The release timeout is short at the start, while the UE cannot yet perform RRC Reestablishment.
39+ release_timeout (t310)
3640 {
3741 }
3842
@@ -60,6 +64,12 @@ class du_ue_rlf_notification_adapter final : public du_ue_rlf_handler
6064 void on_protocol_failure () override { start_rlf_timer (rlf_cause::rlc_protocol_failure); }
6165 void on_max_retx () override { start_rlf_timer (rlf_cause::max_rlc_retxs_reached); }
6266
67+ void on_drb_and_srb2_configured () override
68+ {
69+ // Now that the UE contains a context, we need to account for the t311 in the RLF timer.
70+ release_timeout = t310 + t311;
71+ }
72+
6373private:
6474 void start_rlf_timer (rlf_cause cause)
6575 {
@@ -91,11 +101,18 @@ class du_ue_rlf_notification_adapter final : public du_ue_rlf_handler
91101 bool is_connected_nolock () const { return rel_timer.is_valid (); }
92102
93103 const du_ue_index_t ue_index;
94- const std::chrono::milliseconds release_timeout;
104+ const std::chrono::milliseconds t310;
105+ const std::chrono::milliseconds t311;
95106 unique_timer rel_timer;
96107 du_ue_manager_repository& du_ue_mng;
97108 srslog::basic_logger& logger;
98109
110+ // Note: Between an RLF being detected and the UE being released, the DU manager will wait for enough time to allow
111+ // the UE to perform C-RNTI CE (t310) and/or RRC re-establishment (t311).
112+ // Note: When the UE is initially created, it does not yet have a SRB2+DRB configured, so we do not need to account
113+ // for the t311 in the RLF timer, as the UE won't try to do RRC re-establishment at that stage.
114+ std::chrono::milliseconds release_timeout;
115+
99116 // This class is accessed directly from the MAC, so potential race conditions apply when accessing the \c rel_timer.
100117 std::mutex timer_mutex;
101118};
@@ -181,14 +198,11 @@ du_ue* ue_creation_procedure::create_du_ue_context()
181198 }
182199
183200 // Create the adapter used by the MAC and RLC to notify the DU manager of a Radio Link Failure.
184- const du_cell_config& pcell_cfg = du_params.ran .cells [req.pcell_index ];
185- // Note: Between an RLF being detected and the UE being released, the DU manager will wait for enough time to allow
186- // the UE to perform C-RNTI CE (t310) and RRC re-establishment (t311).
187- std::chrono::milliseconds release_timeout =
188- pcell_cfg.ue_timers_and_constants .t310 + pcell_cfg.ue_timers_and_constants .t311 ;
189- auto rlf_notifier = std::make_unique<du_ue_rlf_notification_adapter>(
201+ const du_cell_config& pcell_cfg = du_params.ran .cells [req.pcell_index ];
202+ auto rlf_notifier = std::make_unique<du_ue_rlf_notification_adapter>(
190203 req.ue_index ,
191- release_timeout,
204+ pcell_cfg.ue_timers_and_constants .t310 ,
205+ pcell_cfg.ue_timers_and_constants .t311 ,
192206 du_params.services .timers .create_unique_timer (du_params.services .du_mng_exec ),
193207 ue_mng);
194208
0 commit comments