From 44e4ebc4e29c0388e927805b44ce82f2d96cf153 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Wed, 20 Aug 2025 23:03:32 +0200 Subject: [PATCH] source-CU-UP: fill PDCP Status in response upon reception of E1 Bearer Context Modification Request * Check presence of PDCP Status Requested in Bearer Context Modification Request * Fetch PDCP Status from PDCP entity and fill in the Bearer Context Modification Response --- openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c index 99c427cc17..ae081e4376 100644 --- a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c +++ b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c @@ -291,6 +291,18 @@ void e1_bearer_context_modif(const e1ap_bearer_mod_req_t *req) &security_parameters); } + // PDCP Status Information requested + if (to_modif->pdcp_sn_status_requested) { + modified->pdcp_status = malloc_or_fail(sizeof(*modified->pdcp_status)); + nr_pdcp_count_t dl_count = {0}; + nr_pdcp_count_t ul_count = {0}; + nr_pdcp_get_drb_count_values(req->gNB_cu_cp_ue_id, to_modif->id, &ul_count, &dl_count); + modified->pdcp_status->dl_count.hfn = dl_count.hfn; + modified->pdcp_status->dl_count.sn = dl_count.sn; + modified->pdcp_status->ul_count.hfn = ul_count.hfn; + modified->pdcp_status->ul_count.sn = ul_count.sn; + } + if (f1inst < 0) // no F1-U? continue; // nothing to do @@ -300,6 +312,7 @@ void e1_bearer_context_modif(const e1ap_bearer_mod_req_t *req) in_addr_t addr = to_modif->DlUpParamList[k].tl_info.tlAddress; GtpuUpdateTunnelOutgoingAddressAndTeid(f1inst, req->gNB_cu_cp_ue_id, to_modif->id, addr, to_modif->DlUpParamList[k].tl_info.teId); } + } }