@@ -32,7 +32,6 @@ f1u_bearer_impl::f1u_bearer_impl(uint32_t ue_index,
3232{
3333 dl_notif_timer.set (std::chrono::milliseconds (f1u_dl_notif_time_ms),
3434 [this ](timer_id_t tid) { on_expired_dl_notif_timer (); });
35- dl_notif_timer.run ();
3635}
3736
3837void f1u_bearer_impl::handle_pdu (nru_ul_message msg)
@@ -85,11 +84,18 @@ void f1u_bearer_impl::handle_sdu(pdcp_tx_pdu sdu)
8584 // attach discard blocks (if any)
8685 fill_discard_blocks (msg);
8786
87+ // stop backoff timer
88+ dl_notif_timer.stop ();
89+
8890 tx_pdu_notifier.on_new_pdu (std::move (msg));
8991}
9092
9193void f1u_bearer_impl::discard_sdu (uint32_t pdcp_sn)
9294{
95+ // start backoff timer
96+ if (!dl_notif_timer.is_running ()) {
97+ dl_notif_timer.run ();
98+ }
9399 if (discard_blocks.empty ()) {
94100 discard_blocks.push_back (nru_pdcp_sn_discard_block{});
95101 nru_pdcp_sn_discard_block& block = discard_blocks.back ();
@@ -124,8 +130,6 @@ void f1u_bearer_impl::fill_discard_blocks(nru_dl_message& msg)
124130 msg.dl_user_data .discard_blocks = std::move (discard_blocks);
125131 discard_blocks = {};
126132 }
127- // restart UL notification timer
128- dl_notif_timer.run ();
129133}
130134
131135void f1u_bearer_impl::on_expired_dl_notif_timer ()
@@ -137,7 +141,13 @@ void f1u_bearer_impl::on_expired_dl_notif_timer()
137141void f1u_bearer_impl::flush_discard_blocks ()
138142{
139143 nru_dl_message msg = {};
144+
145+ // attach discard blocks (if any)
140146 fill_discard_blocks (msg);
147+
148+ // stop backoff timer
149+ dl_notif_timer.stop ();
150+
141151 if (msg.dl_user_data .discard_blocks .has_value ()) {
142152 logger.log_debug (" Sending discard blocks" );
143153 tx_pdu_notifier.on_new_pdu (std::move (msg));
0 commit comments