From 7188603f2e743363c1fe0b9826d5f5ecc6106f81 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 8 Apr 2021 17:14:41 +0200 Subject: [PATCH] mac_nr: don't push MAC CE LCIDs to RLC when unpacking DL MAC PDU this should fix log warnings then demux was trying to feed MAC CEs to RLC: 10:50:54.845116 [MAC ] [I] [ 1153] Handling subPDU 1/2: rnti=0x0 lcid=61, sdu_len=1 10:50:54.845117 [RLC ] [E] Radio bearer id must be in [0:11] - 61 10:50:54.845118 [RLC ] [W] LCID 61 doesn't exist. Dropping PDU. 10:50:54.845119 [MAC ] [I] [ 1153] Handling subPDU 2/2: rnti=0x0 lcid=63, sdu_len=33 10:50:54.845119 [RLC ] [E] Radio bearer id must be in [0:11] - 63 --- srsue/src/stack/mac_nr/mac_nr.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/srsue/src/stack/mac_nr/mac_nr.cc b/srsue/src/stack/mac_nr/mac_nr.cc index d7bc1f245..7087cbf62 100644 --- a/srsue/src/stack/mac_nr/mac_nr.cc +++ b/srsue/src/stack/mac_nr/mac_nr.cc @@ -360,7 +360,23 @@ void mac_nr::handle_pdu(srsran::unique_byte_buffer_t pdu) subpdu.get_c_rnti(), subpdu.get_lcid(), subpdu.get_sdu_length()); - rlc->write_pdu(subpdu.get_lcid(), subpdu.get_sdu(), subpdu.get_sdu_length()); + + // Handle Timing Advance CE + switch (subpdu.get_lcid()) { + case srsran::mac_sch_subpdu_nr::nr_lcid_sch_t::DRX_CMD: + logger.info("DRX CE not implemented."); + break; + case srsran::mac_sch_subpdu_nr::nr_lcid_sch_t::TA_CMD: + logger.info("Timing Advance CE not implemented."); + break; + case srsran::mac_sch_subpdu_nr::nr_lcid_sch_t::CON_RES_ID: + logger.info("Contention Resolution CE not implemented."); + break; + default: + if (subpdu.is_sdu()) { + rlc->write_pdu(subpdu.get_lcid(), subpdu.get_sdu(), subpdu.get_sdu_length()); + } + } } }