From b7c767147e3ffb5d035927a64de6bedaf41bb9c0 Mon Sep 17 00:00:00 2001 From: Melissa Elkadi Date: Fri, 18 Feb 2022 09:48:38 -0800 Subject: [PATCH] Hacks with comments are added in this commit. These allow the NRUE to reach roughtly 15-25 Mbps with ~20%-34% packetloss without crashing. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 6 +++++- openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 15c0c23feb..88d7342b5d 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1309,9 +1309,13 @@ int nr_acknack_scheduling(int mod_id, /* we need to find a new PUCCH occasion */ /*(Re)Inizialization of timing information*/ + /* TODO: This is something of a hack. The last condition in the + if statement below was added. OAI is looking into this and is + expected to provide a solution. Without the hack, the gNB will + incorrectly schedule more than 2 ACK/nACKs in a single SFN/Slot. */ if ((pucch->frame == 0 && pucch->ul_slot == 0) || ((pucch->frame*n_slots_frame + pucch->ul_slot) < - (frame*n_slots_frame + slot))) { + (frame*n_slots_frame + slot)) && (frame!=1023)) { AssertFatal(pucch->sr_flag + pucch->dai_c == 0, "expected no SR/AckNack for UE %d in %4d.%2d, but has %d/%d for %4d.%2d\n", UE_id, frame, slot, pucch->sr_flag, pucch->dai_c, pucch->frame, pucch->ul_slot); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c index 62aa101a50..d241e43a0f 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c @@ -51,7 +51,12 @@ static void nr_pdcp_entity_recv_pdu(nr_pdcp_entity_t *entity, if (entity->type != NR_PDCP_SRB && !(buffer[0] & 0x80)) { LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); - exit(1); + /* TODO: This is something of a hack. The most significant bit + in buffer[0] should be 1 if the packet is a data packet. We are + processing malformed data packets if the most significant bit + is 0. Rather than exit(1), this hack allows us to continue for now. + We need to investigate why this hack is neccessary. */ + buffer[0] |= 128; } if (entity->sn_size == 12) {