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:
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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_ */
|
||||
|
||||
@@ -40,6 +40,7 @@ typedef void (*ue_context_modification_refuse_func_t)(sctp_assoc_t assoc_id, con
|
||||
typedef void (*ue_context_release_command_func_t)(sctp_assoc_t assoc_id, const f1ap_ue_context_rel_cmd_t *cmd);
|
||||
|
||||
typedef void (*dl_rrc_message_transfer_func_t)(sctp_assoc_t assoc_id, const f1ap_dl_rrc_message_t *dl_rrc);
|
||||
typedef void (*f1_paging_transfer_func_t)(sctp_assoc_t assoc_id, const f1ap_paging_t *paging);
|
||||
|
||||
struct nr_mac_rrc_dl_if_s;
|
||||
void mac_rrc_dl_direct_init(struct nr_mac_rrc_dl_if_s *mac_rrc);
|
||||
|
||||
@@ -94,6 +94,16 @@ static void dl_rrc_message_transfer_direct(sctp_assoc_t assoc_id, const f1ap_dl_
|
||||
dl_rrc_message_transfer(dl_rrc);
|
||||
}
|
||||
|
||||
static void f1_paging_transfer_direct(sctp_assoc_t assoc_id, const f1ap_paging_t *paging)
|
||||
{
|
||||
AssertFatal(assoc_id == -1, "illegal assoc_id %d\n", assoc_id);
|
||||
/** @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. */
|
||||
(void)paging;
|
||||
}
|
||||
|
||||
void mac_rrc_dl_direct_init(nr_mac_rrc_dl_if_t *mac_rrc)
|
||||
{
|
||||
mac_rrc->f1_reset = f1_reset_cu_initiated_direct;
|
||||
@@ -107,4 +117,5 @@ void mac_rrc_dl_direct_init(nr_mac_rrc_dl_if_t *mac_rrc)
|
||||
mac_rrc->ue_context_modification_refuse = ue_context_modification_refuse_direct;
|
||||
mac_rrc->ue_context_release_command = ue_context_release_command_direct;
|
||||
mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_direct;
|
||||
mac_rrc->paging_transfer = f1_paging_transfer_direct;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "intertask_interface.h"
|
||||
#include "mac_rrc_dl.h"
|
||||
#include "nr_rrc_defs.h"
|
||||
#include "lib/f1ap_paging.h"
|
||||
#include "lib/f1ap_rrc_message_transfer.h"
|
||||
#include "lib/f1ap_interface_management.h"
|
||||
#include "lib/f1ap_ue_context.h"
|
||||
@@ -138,6 +139,15 @@ static void dl_rrc_message_transfer_f1ap(sctp_assoc_t assoc_id, const f1ap_dl_rr
|
||||
itti_send_msg_to_task (TASK_CU_F1, 0, message_p);
|
||||
}
|
||||
|
||||
static void paging_f1ap(sctp_assoc_t assoc_id, const f1ap_paging_t *paging)
|
||||
{
|
||||
MessageDef *message_p = itti_alloc_new_message(TASK_RRC_GNB, 0, F1AP_PAGING);
|
||||
message_p->ittiMsgHeader.originInstance = assoc_id;
|
||||
f1ap_paging_t *msg = &F1AP_PAGING(message_p);
|
||||
*msg = cp_f1ap_paging(paging);
|
||||
itti_send_msg_to_task(TASK_CU_F1, 0, message_p);
|
||||
}
|
||||
|
||||
void mac_rrc_dl_f1ap_init(nr_mac_rrc_dl_if_t *mac_rrc)
|
||||
{
|
||||
mac_rrc->f1_reset = f1_reset_cu_initiated_f1ap;
|
||||
@@ -151,4 +161,5 @@ void mac_rrc_dl_f1ap_init(nr_mac_rrc_dl_if_t *mac_rrc)
|
||||
mac_rrc->ue_context_modification_refuse = ue_context_modification_refuse_f1ap;
|
||||
mac_rrc->ue_context_release_command = ue_context_release_command_f1ap;
|
||||
mac_rrc->dl_rrc_message_transfer = dl_rrc_message_transfer_f1ap;
|
||||
mac_rrc->paging_transfer = paging_f1ap;
|
||||
}
|
||||
|
||||
@@ -362,6 +362,7 @@ typedef struct nr_mac_rrc_dl_if_s {
|
||||
ue_context_modification_refuse_func_t ue_context_modification_refuse;
|
||||
ue_context_release_command_func_t ue_context_release_command;
|
||||
dl_rrc_message_transfer_func_t dl_rrc_message_transfer;
|
||||
f1_paging_transfer_func_t paging_transfer;
|
||||
} nr_mac_rrc_dl_if_t;
|
||||
|
||||
typedef struct cucp_cuup_if_s {
|
||||
|
||||
Reference in New Issue
Block a user