Paging (F1AP): wire paging through mac_rrc_dl and use F1AP free/decoding lib on CU/DU

Introduce paging_transfer in the mac_rrc_dl interface so the CU can pass
paging to the DU (F1 or direct). Use the F1AP paging lib on both CU and DU
for decode/free and to avoid leaking the message after send.

- Add f1_paging_transfer_func_t and paging_transfer to nr_mac_rrc_dl_if_s
  (mac_rrc_dl.h, nr_rrc_defs.h).
- F1AP path: paging_f1ap() allocates F1AP_PAGING, copies with cp_f1ap_paging(),
  sends via ITTI to TASK_CU_F1. Direct path: f1_paging_transfer_direct() stub
- CU task: call free_f1ap_paging() after CU_send_Paging() to release the message.
- DU: DU_handle_Paging() uses decode_f1ap_paging()/free_f1ap_paging() from lib,
  returns on decode failure; remove inline ASN.1 IE parsing.
- cleanup outdated header comments in header files
- Left a TODO not in DU code to build PCCH (in F1 and direct paths)
This commit is contained in:
Guido Casati
2026-02-17 12:25:58 +01:00
parent cf7879f038
commit 6022ac8bf1
7 changed files with 42 additions and 64 deletions
+2
View File
@@ -38,6 +38,7 @@
#include "lib/f1ap_interface_management.h"
#include "lib/f1ap_ue_context.h"
#include "f1ap_cu_paging.h"
#include "lib/f1ap_paging.h"
#include "f1ap_cu_task.h"
#include "openair2/RRC/NR/nr_rrc_defs.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
@@ -204,6 +205,7 @@ void *F1AP_CU_task(void *arg) {
case F1AP_PAGING:
CU_send_Paging(assoc_id, &F1AP_PAGING(received_msg));
free_f1ap_paging(&F1AP_PAGING(received_msg));
break;
case F1AP_UE_CONTEXT_MODIFICATION_CONFIRM:
+15 -53
View File
@@ -19,75 +19,37 @@
* contact@openairinterface.org
*/
/*! \file f1ap_du_interface_management.h
* \brief f1ap interface management for DU
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
#include "f1ap_common.h"
#include "f1ap_du_paging.h"
#include "lib/f1ap_paging.h"
#include "conversions.h"
#include "oai_asn1.h"
#include "openair2/RRC/LTE/rrc_proto.h"
/* @brief Handle F1AP Paging message at DU */
int DU_handle_Paging(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu)
{
F1AP_Paging_t *paging;
F1AP_PagingIEs_t *ie;
long tmsi;
uint8_t pagingdrx;
uint8_t *fiveg_tmsi_buf = NULL;
f1ap_paging_t decoded = {0};
DevAssert(pdu);
(void)instance;
(void)assoc_id;
(void)stream;
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_F1AP_F1AP_PDU, pdu);
}
paging = &pdu->choice.initiatingMessage->value.choice.Paging;
// get UEIdentityIndexValue
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_PagingIEs_t, ie, paging,
F1AP_ProtocolIE_ID_id_UEIdentityIndexValue, true);
LOG_D(F1AP, "indexLength10 %d\n", BIT_STRING_to_uint32(&ie->value.choice.UEIdentityIndexValue.choice.indexLength10));
// get PagingIdentity
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_PagingIEs_t, ie, paging,
F1AP_ProtocolIE_ID_id_PagingIdentity, true);
if(ie != NULL){
fiveg_tmsi_buf = ie->value.choice.PagingIdentity.choice.cNUEPagingIdentity->choice.fiveG_S_TMSI.buf;
tmsi = ((long)fiveg_tmsi_buf[0] << 40) +
((long)fiveg_tmsi_buf[1] << 32) +
(fiveg_tmsi_buf[2] << 24) +
(fiveg_tmsi_buf[3] << 16) +
(fiveg_tmsi_buf[4] << 8) +
fiveg_tmsi_buf[5];
LOG_D(F1AP, "tmsi %ld\n", tmsi);
if (!decode_f1ap_paging(&decoded, pdu)) {
LOG_E(F1AP, "Failed to decode F1AP Paging\n");
return -1;
}
// get PagingDRX
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_PagingIEs_t, ie, paging,
F1AP_ProtocolIE_ID_id_PagingDRX, true);
if(ie != NULL) {
pagingdrx = (uint8_t)ie->value.choice.PagingDRX;
}
LOG_D(F1AP, "pagingdrx %u\n", pagingdrx);
// get PagingCell_List
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_PagingIEs_t, ie, paging,
F1AP_ProtocolIE_ID_id_PagingCell_List, true);
AssertFatal(false, "not implemented\n");
/** @todo Build PCCH-Message (Paging) at DU per TS 38.331 §5.3.2; apply
* RRC padding per §8.5; deliver as RLC SDU per §8.2. For each
* cell in Paging Cell List that belongs to this DU, queue for MAC; MAC schedules
* at PF/PO per TS 38.304 §7. */
free_f1ap_paging(&decoded);
return 0;
}
+1 -11
View File
@@ -19,20 +19,10 @@
* contact@openairinterface.org
*/
/*! \file f1ap_du_interface_management.h
* \brief f1ap interface management for DU
* \author EURECOM/NTUST
* \date 2018
* \version 0.1
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr
* \note
* \warning
*/
#ifndef F1AP_DU_PAGING_H_
#define F1AP_DU_PAGING_H_
/* Paging (gNB-CU initiated) */
int DU_handle_Paging(instance_t instance, sctp_assoc_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *pdu);
#endif /* F1AP_DU_PAGING_H_ */