change name of single var that may be corenetwork ue id or RAN rnti
This commit is contained in:
@@ -185,8 +185,7 @@ typedef struct gtpv1u_gnb_create_tunnel_resp_s {
|
|||||||
ue_id_t ue_id;
|
ue_id_t ue_id;
|
||||||
int num_tunnels;
|
int num_tunnels;
|
||||||
teid_t gnb_NGu_teid[NR_GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
|
teid_t gnb_NGu_teid[NR_GTPV1U_MAX_BEARERS_PER_UE]; ///< Tunnel Endpoint Identifier
|
||||||
pdusessionid_t pdusession_id[NR_GTPV1U_MAX_BEARERS_PER_UE];
|
pdusessionid_t pdusession_id[NR_GTPV1U_MAX_BEARERS_PER_UE];
|
||||||
int bearer_id[NR_GTPV1U_MAX_BEARERS_PER_UE];
|
|
||||||
transport_layer_addr_t gnb_addr;
|
transport_layer_addr_t gnb_addr;
|
||||||
} gtpv1u_gnb_create_tunnel_resp_t;
|
} gtpv1u_gnb_create_tunnel_resp_t;
|
||||||
typedef struct gtpv1u_gnb_delete_tunnel_req_s {
|
typedef struct gtpv1u_gnb_delete_tunnel_req_s {
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ typedef struct protocol_ctxt_s {
|
|||||||
module_id_t module_id; /*!< \brief Virtualized module identifier */
|
module_id_t module_id; /*!< \brief Virtualized module identifier */
|
||||||
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
|
eNB_flag_t enb_flag; /*!< \brief Flag to indicate eNB (1) or UE (0) */
|
||||||
instance_t instance; /*!< \brief ITTI or OTG module identifier */
|
instance_t instance; /*!< \brief ITTI or OTG module identifier */
|
||||||
rnti_t rnti;
|
ue_id_t rntiMaybeUEid;
|
||||||
frame_t frame; /*!< \brief LTE frame number.*/
|
frame_t frame; /*!< \brief LTE frame number.*/
|
||||||
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
||||||
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
||||||
@@ -252,36 +252,27 @@ typedef struct protocol_ctxt_s {
|
|||||||
#define PROTOCOL_CTXT_COMPUTE_INSTANCE(CtXt_h) \
|
#define PROTOCOL_CTXT_COMPUTE_INSTANCE(CtXt_h) \
|
||||||
MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag )
|
MODULE_ID_TO_INSTANCE( (CtXt_h)->module_id , (CtXt_h)->instance , (CtXt_h)->enb_flag )
|
||||||
|
|
||||||
|
|
||||||
#define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \
|
#define PROTOCOL_CTXT_SET_BY_MODULE_ID(Ctxt_Pp, mODULE_iD, eNB_fLAG, rNTI, fRAME, sUBfRAME, eNB_iNDEX) \
|
||||||
(Ctxt_Pp)->module_id = mODULE_iD; \
|
(Ctxt_Pp)->module_id = mODULE_iD; \
|
||||||
(Ctxt_Pp)->enb_flag = eNB_fLAG; \
|
(Ctxt_Pp)->enb_flag = eNB_fLAG; \
|
||||||
(Ctxt_Pp)->rnti = rNTI; \
|
(Ctxt_Pp)->rntiMaybeUEid = rNTI; \
|
||||||
(Ctxt_Pp)->frame = fRAME; \
|
(Ctxt_Pp)->frame = fRAME; \
|
||||||
(Ctxt_Pp)->subframe = sUBfRAME; \
|
(Ctxt_Pp)->subframe = sUBfRAME; \
|
||||||
(Ctxt_Pp)->eNB_index = eNB_iNDEX; \
|
(Ctxt_Pp)->eNB_index = eNB_iNDEX; \
|
||||||
PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp)
|
PROTOCOL_CTXT_COMPUTE_INSTANCE(Ctxt_Pp)
|
||||||
|
|
||||||
#define PROTOCOL_CTXT_SET_BY_INSTANCE(Ctxt_Pp, iNSTANCE, eNB_fLAG, rNTI, fRAME, sUBfRAME) \
|
#define PROTOCOL_CTXT_SET_BY_INSTANCE(Ctxt_Pp, iNSTANCE, eNB_fLAG, rNTI, fRAME, sUBfRAME) \
|
||||||
(Ctxt_Pp)->instance = iNSTANCE; \
|
(Ctxt_Pp)->instance = iNSTANCE; \
|
||||||
(Ctxt_Pp)->enb_flag = eNB_fLAG; \
|
(Ctxt_Pp)->enb_flag = eNB_fLAG; \
|
||||||
(Ctxt_Pp)->rnti = rNTI; \
|
(Ctxt_Pp)->rntiMaybeUEid = rNTI; \
|
||||||
(Ctxt_Pp)->frame = fRAME; \
|
(Ctxt_Pp)->frame = fRAME; \
|
||||||
(Ctxt_Pp)->subframe = sUBfRAME; \
|
(Ctxt_Pp)->subframe = sUBfRAME; \
|
||||||
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp)
|
PROTOCOL_CTXT_COMPUTE_MODULE_ID(Ctxt_Pp)
|
||||||
|
|
||||||
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02d][RNTI %" PRIx16 "]"
|
#define PROTOCOL_CTXT_FMT "[FRAME %05u][%s][MOD %02d][RNTI %" PRIx64 "]"
|
||||||
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) \
|
#define PROTOCOL_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||||
(CTXT_Pp)->frame, \
|
|
||||||
((CTXT_Pp)->enb_flag == ENB_FLAG_YES) ? "eNB":" UE", \
|
|
||||||
(CTXT_Pp)->module_id, \
|
|
||||||
(CTXT_Pp)->rnti
|
|
||||||
|
|
||||||
#define PROTOCOL_NR_CTXT_ARGS(CTXT_Pp) \
|
#define PROTOCOL_NR_CTXT_ARGS(CTXT_Pp) (CTXT_Pp)->frame, ((CTXT_Pp)->enb_flag == GNB_FLAG_YES) ? "gNB" : " UE", (CTXT_Pp)->module_id, (CTXT_Pp)->rntiMaybeUEid
|
||||||
(CTXT_Pp)->frame, \
|
|
||||||
((CTXT_Pp)->enb_flag == GNB_FLAG_YES) ? "gNB":" UE", \
|
|
||||||
(CTXT_Pp)->module_id, \
|
|
||||||
(CTXT_Pp)->rnti
|
|
||||||
|
|
||||||
#define CHECK_CTXT_ARGS(CTXT_Pp)
|
#define CHECK_CTXT_ARGS(CTXT_Pp)
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
# include "s1ap_eNB.h"
|
# include "s1ap_eNB.h"
|
||||||
# include "sctp_eNB_task.h"
|
#include "sctp_eNB_task.h"
|
||||||
|
|
||||||
# include "x2ap_eNB.h"
|
# include "x2ap_eNB.h"
|
||||||
# include "x2ap_messages_types.h"
|
# include "x2ap_messages_types.h"
|
||||||
|
|||||||
@@ -294,12 +294,12 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
|||||||
protocol_ctxt_t ctxt={0};
|
protocol_ctxt_t ctxt={0};
|
||||||
ctxt.instance = instance;
|
ctxt.instance = instance;
|
||||||
ctxt.module_id = instance;
|
ctxt.module_id = instance;
|
||||||
ctxt.rnti = f1ap_get_rnti_by_cu_id(CUtype, instance, cu_ue_f1ap_id);
|
ctxt.rntiMaybeUEid = f1ap_get_rnti_by_cu_id(CUtype, instance, cu_ue_f1ap_id);
|
||||||
ctxt.enb_flag = 1;
|
ctxt.enb_flag = 1;
|
||||||
ctxt.eNB_index = 0;
|
ctxt.eNB_index = 0;
|
||||||
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
|
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
|
||||||
memcpy((void *)mb->data,(void *)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
|
memcpy((void *)mb->data,(void *)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
|
||||||
LOG_I(F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %ld (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size);
|
LOG_I(F1AP, "Calling pdcp_data_ind for UE RNTI %lx srb_id %lu with size %ld (DCCH) \n", ctxt.rntiMaybeUEid, srb_id, ie->value.choice.RRCContainer.size);
|
||||||
//LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size);
|
//LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size);
|
||||||
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
|
||||||
// printf("%02x ", mb->data[i]);
|
// printf("%02x ", mb->data[i]);
|
||||||
|
|||||||
@@ -164,13 +164,11 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
|||||||
// decode RRC Container and act on the message type
|
// decode RRC Container and act on the message type
|
||||||
AssertFatal(srb_id<3,"illegal srb_id\n");
|
AssertFatal(srb_id<3,"illegal srb_id\n");
|
||||||
protocol_ctxt_t ctxt;
|
protocol_ctxt_t ctxt;
|
||||||
ctxt.rnti = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id);
|
ctxt.rntiMaybeUEid = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id);
|
||||||
ctxt.instance = instance;
|
ctxt.instance = instance;
|
||||||
ctxt.module_id = instance;
|
ctxt.module_id = instance;
|
||||||
ctxt.enb_flag = 1;
|
ctxt.enb_flag = 1;
|
||||||
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(
|
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.instance], ctxt.rntiMaybeUEid);
|
||||||
RC.rrc[ctxt.instance],
|
|
||||||
ctxt.rnti);
|
|
||||||
|
|
||||||
if (srb_id == 0) {
|
if (srb_id == 0) {
|
||||||
LTE_DL_CCCH_Message_t *dl_ccch_msg=NULL;
|
LTE_DL_CCCH_Message_t *dl_ccch_msg=NULL;
|
||||||
@@ -257,7 +255,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
|||||||
if (radioResourceConfigDedicated->mac_MainConfig)
|
if (radioResourceConfigDedicated->mac_MainConfig)
|
||||||
mac_MainConfig = &radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
|
mac_MainConfig = &radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
|
||||||
rrc_mac_config_req_eNB_t tmp = {0};
|
rrc_mac_config_req_eNB_t tmp = {0};
|
||||||
tmp.rnti = ctxt.rnti;
|
tmp.rnti = ctxt.rntiMaybeUEid;
|
||||||
tmp.physicalConfigDedicated = radioResourceConfigDedicated->physicalConfigDedicated;
|
tmp.physicalConfigDedicated = radioResourceConfigDedicated->physicalConfigDedicated;
|
||||||
tmp.mac_MainConfig = mac_MainConfig;
|
tmp.mac_MainConfig = mac_MainConfig;
|
||||||
tmp.logicalChannelIdentity = 1;
|
tmp.logicalChannelIdentity = 1;
|
||||||
@@ -358,7 +356,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
|||||||
MessageDef *message_p = NULL;
|
MessageDef *message_p = NULL;
|
||||||
/* Send DRX configuration to MAC task to configure timers of local UE context */
|
/* Send DRX configuration to MAC task to configure timers of local UE context */
|
||||||
message_p = itti_alloc_new_message(TASK_DU_F1, 0, RRC_MAC_DRX_CONFIG_REQ);
|
message_p = itti_alloc_new_message(TASK_DU_F1, 0, RRC_MAC_DRX_CONFIG_REQ);
|
||||||
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = ctxt.rnti;
|
RRC_MAC_DRX_CONFIG_REQ(message_p).rnti = ctxt.rntiMaybeUEid;
|
||||||
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
|
RRC_MAC_DRX_CONFIG_REQ(message_p).drx_Configuration = mac_MainConfig->drx_Config;
|
||||||
itti_send_msg_to_task(TASK_MAC_ENB, ctxt.instance, message_p);
|
itti_send_msg_to_task(TASK_MAC_ENB, ctxt.instance, message_p);
|
||||||
LOG_D(F1AP, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
|
LOG_D(F1AP, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
|
||||||
@@ -396,9 +394,9 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
|||||||
if (DRB_configList->list.array[i]) {
|
if (DRB_configList->list.array[i]) {
|
||||||
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
||||||
LOG_I(F1AP,
|
LOG_I(F1AP,
|
||||||
"[DU %ld] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %x, reconfiguring DRB %d/LCID %d\n",
|
"[DU %ld] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %lx, reconfiguring DRB %d/LCID %d\n",
|
||||||
ctxt.instance,
|
ctxt.instance,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
(int)DRB_configList->list.array[i]->drb_Identity,
|
(int)DRB_configList->list.array[i]->drb_Identity,
|
||||||
(int)*DRB_configList->list.array[i]->logicalChannelIdentity);
|
(int)*DRB_configList->list.array[i]->logicalChannelIdentity);
|
||||||
|
|
||||||
|
|||||||
@@ -834,7 +834,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
|||||||
f1ap_ue_context_release_cmd->rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
|
f1ap_ue_context_release_cmd->rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
ctxt.rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
|
ctxt.rntiMaybeUEid = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
|
||||||
ctxt.instance = instance;
|
ctxt.instance = instance;
|
||||||
ctxt.module_id = instance;
|
ctxt.module_id = instance;
|
||||||
ctxt.enb_flag = 1;
|
ctxt.enb_flag = 1;
|
||||||
@@ -850,9 +850,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
|||||||
rnti, f1ap_ue_context_release_cmd->rnti);
|
rnti, f1ap_ue_context_release_cmd->rnti);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
AssertFatal(ctxt.rnti == rnti,
|
AssertFatal(ctxt.rntiMaybeUEid == rnti, "RNTI obtained through DU ID (%x) is different from CU ID (%lx)\n", rnti, ctxt.rntiMaybeUEid);
|
||||||
"RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
|
|
||||||
rnti, ctxt.rnti);
|
|
||||||
}
|
}
|
||||||
int UE_out_of_sync = 0;
|
int UE_out_of_sync = 0;
|
||||||
|
|
||||||
@@ -946,7 +944,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
struct rrc_eNB_ue_context_s *ue_context_p;
|
struct rrc_eNB_ue_context_s *ue_context_p;
|
||||||
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.instance], ctxt.rnti);
|
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.instance], ctxt.rntiMaybeUEid);
|
||||||
|
|
||||||
if (ue_context_p && !UE_out_of_sync) {
|
if (ue_context_p && !UE_out_of_sync) {
|
||||||
// UE exists and is in sync so we start a timer before releasing the
|
// UE exists and is in sync so we start a timer before releasing the
|
||||||
@@ -960,13 +958,12 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
|||||||
else
|
else
|
||||||
rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
|
rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
|
||||||
|
|
||||||
rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt.rnti;
|
rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt.rntiMaybeUEid;
|
||||||
LOG_D(F1AP, "add rrc_release_info RNTI %x\n", ctxt.rnti);
|
LOG_D(F1AP, "add rrc_release_info RNTI %lx\n", ctxt.rntiMaybeUEid);
|
||||||
// TODO: how to provide the correct MUI?
|
// TODO: how to provide the correct MUI?
|
||||||
rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = 0;
|
rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = 0;
|
||||||
rrc_release_info.num_UEs++;
|
rrc_release_info.num_UEs++;
|
||||||
LOG_D(RRC,"Generate DLSCH Release send: index %d rnti %x mui %d flag %d \n",release_num,
|
LOG_D(RRC, "Generate DLSCH Release send: index %d rnti %lx mui %d flag %d \n", release_num, ctxt.rntiMaybeUEid, 0, rrc_release_info.RRC_release_ctrl[release_num].flag);
|
||||||
ctxt.rnti, 0, rrc_release_info.RRC_release_ctrl[release_num].flag);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -982,7 +979,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
|
|||||||
|
|
||||||
// TODO send this once the connection has really been released
|
// TODO send this once the connection has really been released
|
||||||
f1ap_ue_context_release_cplt_t cplt;
|
f1ap_ue_context_release_cplt_t cplt;
|
||||||
cplt.rnti = ctxt.rnti;
|
cplt.rnti = ctxt.rntiMaybeUEid;
|
||||||
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
|
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1248,7 +1245,7 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
|
|||||||
ieRRC->value.choice.RRCContainer.buf, ieRRC->value.choice.RRCContainer.size);
|
ieRRC->value.choice.RRCContainer.buf, ieRRC->value.choice.RRCContainer.size);
|
||||||
protocol_ctxt_t ctxt;
|
protocol_ctxt_t ctxt;
|
||||||
// decode RRC Container and act on the message type
|
// decode RRC Container and act on the message type
|
||||||
ctxt.rnti = f1ap_ue_context_modification_req->rnti;
|
ctxt.rntiMaybeUEid = f1ap_ue_context_modification_req->rnti;
|
||||||
ctxt.instance = instance;
|
ctxt.instance = instance;
|
||||||
ctxt.module_id = instance;
|
ctxt.module_id = instance;
|
||||||
ctxt.enb_flag = 1;
|
ctxt.enb_flag = 1;
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ int dl_rrc_message_rrcSetup(module_id_t module_id, const f1ap_dl_rrc_message_t *
|
|||||||
|
|
||||||
nr_rlc_srb0_recv_sdu(dl_rrc->rnti, dl_rrc->rrc_container, dl_rrc->rrc_container_length);
|
nr_rlc_srb0_recv_sdu(dl_rrc->rnti, dl_rrc->rrc_container, dl_rrc->rrc_container_length);
|
||||||
|
|
||||||
protocol_ctxt_t ctxt = { .module_id = module_id, .rnti = dl_rrc->rnti };
|
protocol_ctxt_t ctxt = {.module_id = module_id, .rntiMaybeUEid = dl_rrc->rnti};
|
||||||
nr_rrc_rlc_config_asn1_req(&ctxt,
|
nr_rrc_rlc_config_asn1_req(&ctxt,
|
||||||
ue_context_p->ue_context.SRB_configList,
|
ue_context_p->ue_context.SRB_configList,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
|
|||||||
size );
|
size );
|
||||||
req->length = size;
|
req->length = size;
|
||||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||||
req->ue_id = ctxt->rnti;
|
req->ue_id = ctxt->rntiMaybeUEid;
|
||||||
req->bearer_id = rb_id+4;
|
req->bearer_id = rb_id+4;
|
||||||
LOG_D(PDCP, "%s() (drb %ld) sending message to gtp size %d\n",
|
LOG_D(PDCP, "%s() (drb %ld) sending message to gtp size %d\n",
|
||||||
__func__, rb_id, size);
|
__func__, rb_id, size);
|
||||||
@@ -267,7 +267,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
|||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
|
|
||||||
if (ctxt_pP->enb_flag != ENB_FLAG_NO)
|
if (ctxt_pP->enb_flag != ENB_FLAG_NO)
|
||||||
T(T_ENB_PDCP_DL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_buffer_sizeP));
|
T(T_ENB_PDCP_DL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rntiMaybeUEid), T_INT(rb_idP), T_INT(sdu_buffer_sizeP));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -283,16 +283,16 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
|||||||
sdu_buffer_sizeP, MAX_IP_PACKET_SIZE);
|
sdu_buffer_sizeP, MAX_IP_PACKET_SIZE);
|
||||||
|
|
||||||
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
|
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
|
||||||
AssertError (rb_idP < NB_RB_MBMS_MAX, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rnti);
|
AssertError(rb_idP < NB_RB_MBMS_MAX, return false, "RB id is too high (%ld/%d) %u %lu!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
} else {
|
} else {
|
||||||
if (srb_flagP) {
|
if (srb_flagP) {
|
||||||
AssertError (rb_idP < 3, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, 3, ctxt_pP->module_id, ctxt_pP->rnti);
|
AssertError(rb_idP < 3, return false, "RB id is too high (%ld/%d) %u %lu!\n", rb_idP, 3, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
} else {
|
} else {
|
||||||
AssertError (rb_idP < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
|
AssertError(rb_idP < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u %lu!\n", rb_idP, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_rc != HASH_TABLE_OK) {
|
if (h_rc != HASH_TABLE_OK) {
|
||||||
@@ -488,8 +488,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
|||||||
"[MSG] PDCP DL %s PDU on rb_id %ld\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
"[MSG] PDCP DL %s PDU on rb_id %ld\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||||
|
|
||||||
if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1)) {
|
if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1)) {
|
||||||
LOG_D(PDCP, "pdcp data req on drb %ld, size %d, rnti %x, node_type %d \n",
|
LOG_D(PDCP, "pdcp data req on drb %ld, size %d, rnti %lx, node_type %d \n", rb_idP, pdcp_pdu_size, ctxt_pP->rntiMaybeUEid, RC.rrc ? RC.rrc[ctxt_pP->module_id]->node_type : -1);
|
||||||
rb_idP, pdcp_pdu_size, ctxt_pP->rnti, RC.rrc ? RC.rrc[ctxt_pP->module_id]->node_type: -1);
|
|
||||||
|
|
||||||
if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||||
LOG_E(PDCP, "Can't be DU, bad node type %d \n", RC.rrc[ctxt_pP->module_id]->node_type);
|
LOG_E(PDCP, "Can't be DU, bad node type %d \n", RC.rrc[ctxt_pP->module_id]->node_type);
|
||||||
@@ -533,7 +532,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
|||||||
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
|
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0;
|
F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
|
F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).rnti = ctxt_pP->rnti;
|
F1AP_DL_RRC_MESSAGE(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).srb_id = rb_idP;
|
F1AP_DL_RRC_MESSAGE (message_p).srb_id = rb_idP;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1;
|
F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0;
|
F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0;
|
||||||
@@ -595,16 +594,9 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
|||||||
* so we return true afterwards
|
* so we return true afterwards
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO)
|
for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; pdcp_uid++) {
|
||||||
pdcp_uid = 0;
|
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rntiMaybeUEid)
|
||||||
else
|
break;
|
||||||
for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; pdcp_uid++)
|
|
||||||
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (pdcp_uid == MAX_MOBILES_PER_ENB) {
|
|
||||||
LOG_W(PDCP, "stats on not recorded rnti: %x\n", ctxt_pP->rnti);
|
|
||||||
pdcp_uid = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, (int)(rb_idP+rb_offset), current_sn);
|
LOG_D(PDCP,"ueid %d lcid %d tx seq num %d\n", pdcp_uid, (int)(rb_idP+rb_offset), current_sn);
|
||||||
@@ -656,25 +648,22 @@ pdcp_data_ind(
|
|||||||
"[MSG] PDCP UL %s PDU on rb_id %ld\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
"[MSG] PDCP UL %s PDU on rb_id %ld\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||||
|
|
||||||
if (MBMS_flagP) {
|
if (MBMS_flagP) {
|
||||||
AssertError (rb_idP < NB_RB_MBMS_MAX, return false,
|
AssertError(rb_idP < NB_RB_MBMS_MAX, return false, "RB id is too high (%ld/%d) %u rnti %lx!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
"RB id is too high (%ld/%d) %u rnti %x!\n",
|
|
||||||
rb_idP,
|
|
||||||
NB_RB_MBMS_MAX,
|
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||||
LOG_D(PDCP, "e-MBMS Data indication notification for PDCP entity from eNB %u to UE %x "
|
LOG_D(PDCP,
|
||||||
|
"e-MBMS Data indication notification for PDCP entity from eNB %u to UE %lx "
|
||||||
"and radio bearer ID %ld rlc sdu size %d ctxt_pP->enb_flag %d\n",
|
"and radio bearer ID %ld rlc sdu size %d ctxt_pP->enb_flag %d\n",
|
||||||
ctxt_pP->module_id,
|
ctxt_pP->module_id,
|
||||||
ctxt_pP->rnti,
|
ctxt_pP->rntiMaybeUEid,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_buffer_sizeP,
|
sdu_buffer_sizeP,
|
||||||
ctxt_pP->enb_flag);
|
ctxt_pP->enb_flag);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP, "Data indication notification for PDCP entity from UE %x to eNB %u "
|
LOG_D(PDCP,
|
||||||
|
"Data indication notification for PDCP entity from UE %lx to eNB %u "
|
||||||
"and radio bearer ID %ld rlc sdu size %d ctxt_pP->enb_flag %d\n",
|
"and radio bearer ID %ld rlc sdu size %d ctxt_pP->enb_flag %d\n",
|
||||||
ctxt_pP->rnti,
|
ctxt_pP->rntiMaybeUEid,
|
||||||
ctxt_pP->module_id,
|
ctxt_pP->module_id,
|
||||||
rb_idP,
|
rb_idP,
|
||||||
sdu_buffer_sizeP,
|
sdu_buffer_sizeP,
|
||||||
@@ -682,17 +671,9 @@ pdcp_data_ind(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rb_id = rb_idP % LTE_maxDRB;
|
rb_id = rb_idP % LTE_maxDRB;
|
||||||
AssertError (rb_id < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u UE %x!\n",
|
AssertError(rb_id < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u UE %lx!\n", rb_id, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
rb_id,
|
AssertError(rb_id > 0, return false, "RB id is too low (%ld/%d) %u UE %lx!\n", rb_id, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
LTE_maxDRB,
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, rb_id, srb_flagP);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
AssertError (rb_id > 0, return false, "RB id is too low (%ld/%d) %u UE %x!\n",
|
|
||||||
rb_id,
|
|
||||||
LTE_maxDRB,
|
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_id, srb_flagP);
|
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_rc != HASH_TABLE_OK) {
|
if (h_rc != HASH_TABLE_OK) {
|
||||||
@@ -1054,22 +1035,17 @@ pdcp_data_ind(
|
|||||||
|
|
||||||
if (LINK_ENB_PDCP_TO_GTPV1U) {
|
if (LINK_ENB_PDCP_TO_GTPV1U) {
|
||||||
if ((true == ctxt_pP->enb_flag) && (false == srb_flagP)) {
|
if ((true == ctxt_pP->enb_flag) && (false == srb_flagP)) {
|
||||||
LOG_D(PDCP, "Sending packet to GTP, Calling GTPV1U_TUNNEL_DATA_REQ ue %x rab %ld len %u\n",
|
LOG_D(PDCP, "Sending packet to GTP, Calling GTPV1U_TUNNEL_DATA_REQ ue %lx rab %ld len %u\n", ctxt_pP->rntiMaybeUEid, rb_id + 4, sdu_buffer_sizeP - payload_offset);
|
||||||
ctxt_pP->rnti,
|
|
||||||
rb_id + 4,
|
|
||||||
sdu_buffer_sizeP - payload_offset );
|
|
||||||
message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, 0, GTPV1U_TUNNEL_DATA_REQ,
|
message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, 0, GTPV1U_TUNNEL_DATA_REQ,
|
||||||
sizeof(gtpv1u_tunnel_data_req_t) +
|
sizeof(gtpv1u_tunnel_data_req_t) +
|
||||||
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX );
|
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX );
|
||||||
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
||||||
gtpv1u_tunnel_data_req_t *req=>PV1U_TUNNEL_DATA_REQ(message_p);
|
gtpv1u_tunnel_data_req_t *req=>PV1U_TUNNEL_DATA_REQ(message_p);
|
||||||
req->buffer = (uint8_t*)(req+1);
|
req->buffer = (uint8_t*)(req+1);
|
||||||
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX,
|
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX, sdu_buffer_pP->data + payload_offset, sdu_buffer_sizeP - payload_offset);
|
||||||
&sdu_buffer_pP->data[payload_offset],
|
|
||||||
sdu_buffer_sizeP - payload_offset);
|
|
||||||
req->length = sdu_buffer_sizeP - payload_offset;
|
req->length = sdu_buffer_sizeP - payload_offset;
|
||||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||||
req->ue_id = ctxt_pP->rnti;
|
req->ue_id = ctxt_pP->rntiMaybeUEid;
|
||||||
req->bearer_id = rb_id + 4;
|
req->bearer_id = rb_id + 4;
|
||||||
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
|
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
|
||||||
packet_forwarded = true;
|
packet_forwarded = true;
|
||||||
@@ -1164,16 +1140,10 @@ pdcp_data_ind(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Update PDCP statistics */
|
/* Update PDCP statistics */
|
||||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO)
|
for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; pdcp_uid++) {
|
||||||
pdcp_uid = 0;
|
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rntiMaybeUEid) {
|
||||||
else
|
break;
|
||||||
for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; pdcp_uid++)
|
}
|
||||||
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (pdcp_uid == MAX_MOBILES_PER_ENB) {
|
|
||||||
LOG_W(PDCP, "stats on not recorded rnti: %x\n", ctxt_pP->rnti);
|
|
||||||
pdcp_uid = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Pdcp_stats_rx[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
|
Pdcp_stats_rx[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
|
||||||
@@ -1534,7 +1504,7 @@ void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP) {
|
|||||||
int i, ue_flag=1; //, ret=-1; to be decied later
|
int i, ue_flag=1; //, ret=-1; to be decied later
|
||||||
|
|
||||||
for (i=0; i < MAX_MOBILES_PER_ENB; i++) {
|
for (i=0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||||
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti) {
|
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rntiMaybeUEid) {
|
||||||
ue_flag=-1;
|
ue_flag=-1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1543,10 +1513,10 @@ void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP) {
|
|||||||
if (ue_flag == 1 ) {
|
if (ue_flag == 1 ) {
|
||||||
for (i=0; i < MAX_MOBILES_PER_ENB ; i++) {
|
for (i=0; i < MAX_MOBILES_PER_ENB ; i++) {
|
||||||
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == 0 ) {
|
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == 0 ) {
|
||||||
pdcp_enb[ctxt_pP->module_id].rnti[i]=ctxt_pP->rnti;
|
pdcp_enb[ctxt_pP->module_id].rnti[i] = ctxt_pP->rntiMaybeUEid;
|
||||||
pdcp_enb[ctxt_pP->module_id].uid[i]=i;
|
pdcp_enb[ctxt_pP->module_id].uid[i]=i;
|
||||||
pdcp_enb[ctxt_pP->module_id].num_ues++;
|
pdcp_enb[ctxt_pP->module_id].num_ues++;
|
||||||
LOG_I(PDCP,"add new uid is %d %x\n", i, ctxt_pP->rnti);
|
LOG_I(PDCP, "add new uid is %d %lx\n", i, ctxt_pP->rntiMaybeUEid);
|
||||||
pdcp_init_stats_UE(ctxt_pP->module_id, i);
|
pdcp_init_stats_UE(ctxt_pP->module_id, i);
|
||||||
// ret=1;
|
// ret=1;
|
||||||
break;
|
break;
|
||||||
@@ -1569,19 +1539,19 @@ bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
|
|||||||
// check and remove SRBs first
|
// check and remove SRBs first
|
||||||
|
|
||||||
for(int i = 0; i<MAX_MOBILES_PER_ENB; i++) {
|
for(int i = 0; i<MAX_MOBILES_PER_ENB; i++) {
|
||||||
if(pdcp_eNB_UE_instance_to_rnti[i] == ctxt_pP->rnti) {
|
if (pdcp_eNB_UE_instance_to_rnti[i] == ctxt_pP->rntiMaybeUEid) {
|
||||||
pdcp_eNB_UE_instance_to_rnti[i] = NOT_A_RNTI;
|
pdcp_eNB_UE_instance_to_rnti[i] = NOT_A_RNTI;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (srb_id=1; srb_id<3; srb_id++) {
|
for (srb_id=1; srb_id<3; srb_id++) {
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, srb_id, SRB_FLAG_YES);
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, srb_id, SRB_FLAG_YES);
|
||||||
h_rc = hashtable_remove(pdcp_coll_p, key);
|
h_rc = hashtable_remove(pdcp_coll_p, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (drb_id=0; drb_id<LTE_maxDRB; drb_id++) {
|
for (drb_id=0; drb_id<LTE_maxDRB; drb_id++) {
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||||
h_rc = hashtable_remove(pdcp_coll_p, key);
|
h_rc = hashtable_remove(pdcp_coll_p, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1589,7 +1559,7 @@ bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
|
|||||||
|
|
||||||
// remove ue for pdcp enb inst
|
// remove ue for pdcp enb inst
|
||||||
for (i=0; i < MAX_MOBILES_PER_ENB; i++) {
|
for (i=0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||||
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti ) {
|
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rntiMaybeUEid) {
|
||||||
LOG_I(PDCP, "remove uid is %d/%d %x\n", i,
|
LOG_I(PDCP, "remove uid is %d/%d %x\n", i,
|
||||||
pdcp_enb[ctxt_pP->module_id].uid[i],
|
pdcp_enb[ctxt_pP->module_id].uid[i],
|
||||||
pdcp_enb[ctxt_pP->module_id].rnti[i]);
|
pdcp_enb[ctxt_pP->module_id].rnti[i]);
|
||||||
@@ -1655,7 +1625,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
srb_toaddmod_p = srb2add_list_pP->list.array[cnt];
|
srb_toaddmod_p = srb2add_list_pP->list.array[cnt];
|
||||||
rlc_type = RLC_MODE_AM;
|
rlc_type = RLC_MODE_AM;
|
||||||
lc_id = srb_id;
|
lc_id = srb_id;
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, srb_id, SRB_FLAG_YES);
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, srb_id, SRB_FLAG_YES);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
@@ -1734,7 +1704,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DevParam(srb_toaddmod_p->rlc_Config->present, ctxt_pP->module_id, ctxt_pP->rnti);
|
DevParam(srb_toaddmod_p->rlc_Config->present, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1761,8 +1731,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
DevCheck4(drb_id < LTE_maxDRB, drb_id, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
|
DevCheck4(drb_id < LTE_maxDRB, drb_id, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
@@ -1777,7 +1747,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
|
|
||||||
// save the first configured DRB-ID as the default DRB-ID
|
// save the first configured DRB-ID as the default DRB-ID
|
||||||
if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) {
|
if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) {
|
||||||
key_defaultDRB = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag);
|
key_defaultDRB = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag);
|
||||||
h_defaultDRB_rc = hashtable_insert(pdcp_coll_p, key_defaultDRB, pdcp_p);
|
h_defaultDRB_rc = hashtable_insert(pdcp_coll_p, key_defaultDRB, pdcp_p);
|
||||||
} else {
|
} else {
|
||||||
h_defaultDRB_rc = HASH_TABLE_OK; // do not trigger any error handling if this is not a default DRB
|
h_defaultDRB_rc = HASH_TABLE_OK; // do not trigger any error handling if this is not a default DRB
|
||||||
@@ -1883,7 +1853,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
for (cnt=0; cnt<drb2release_list_pP->list.count; cnt++) {
|
for (cnt=0; cnt<drb2release_list_pP->list.count; cnt++) {
|
||||||
pdrb_id_p = drb2release_list_pP->list.array[cnt];
|
pdrb_id_p = drb2release_list_pP->list.array[cnt];
|
||||||
drb_id = *pdrb_id_p;
|
drb_id = *pdrb_id_p;
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_rc != HASH_TABLE_OK) {
|
if (h_rc != HASH_TABLE_OK) {
|
||||||
@@ -1915,7 +1885,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
|
|
||||||
if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) {
|
if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) {
|
||||||
// default DRB being removed. nevertheless this shouldn't happen as removing default DRB is not allowed in standard
|
// default DRB being removed. nevertheless this shouldn't happen as removing default DRB is not allowed in standard
|
||||||
key_defaultDRB = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag);
|
key_defaultDRB = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag);
|
||||||
h_defaultDRB_rc = hashtable_get(pdcp_coll_p, key_defaultDRB, (void **)&pdcp_p);
|
h_defaultDRB_rc = hashtable_get(pdcp_coll_p, key_defaultDRB, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_defaultDRB_rc == HASH_TABLE_OK) {
|
if (h_defaultDRB_rc == HASH_TABLE_OK) {
|
||||||
@@ -2021,8 +1991,8 @@ pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
pdcp_pP->is_ue = false;
|
pdcp_pP->is_ue = false;
|
||||||
pdcp_add_UE(ctxt_pP);
|
pdcp_add_UE(ctxt_pP);
|
||||||
|
|
||||||
//pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
|
// pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rntiMaybeUEid;
|
||||||
// pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
|
// pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rntiMaybeUEid;
|
||||||
if( srb_flagP == SRB_FLAG_NO ) {
|
if( srb_flagP == SRB_FLAG_NO ) {
|
||||||
for(int i = 0; i<MAX_MOBILES_PER_ENB; i++) {
|
for(int i = 0; i<MAX_MOBILES_PER_ENB; i++) {
|
||||||
if(pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] == NOT_A_RNTI) {
|
if(pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] == NOT_A_RNTI) {
|
||||||
@@ -2032,14 +2002,14 @@ pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
||||||
}
|
}
|
||||||
|
|
||||||
pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
|
pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rntiMaybeUEid;
|
||||||
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
||||||
}
|
}
|
||||||
|
|
||||||
//pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
//pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
|
||||||
} else {
|
} else {
|
||||||
pdcp_pP->is_ue = true;
|
pdcp_pP->is_ue = true;
|
||||||
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
|
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rntiMaybeUEid;
|
||||||
}
|
}
|
||||||
|
|
||||||
pdcp_pP->is_srb = srb_flagP == SRB_FLAG_YES;
|
pdcp_pP->is_srb = srb_flagP == SRB_FLAG_YES;
|
||||||
@@ -2187,7 +2157,7 @@ pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rnti);
|
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2234,7 +2204,7 @@ void rrc_pdcp_config_req (
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
pdcp_t *pdcp_p = NULL;
|
pdcp_t *pdcp_p = NULL;
|
||||||
hash_key_t key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
hash_key_t key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, rb_idP, srb_flagP);
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
@@ -2249,7 +2219,7 @@ void rrc_pdcp_config_req (
|
|||||||
|
|
||||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||||
pdcp_p->is_ue = true;
|
pdcp_p->is_ue = true;
|
||||||
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
|
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rntiMaybeUEid;
|
||||||
} else {
|
} else {
|
||||||
pdcp_p->is_ue = false;
|
pdcp_p->is_ue = false;
|
||||||
}
|
}
|
||||||
@@ -2306,7 +2276,7 @@ void rrc_pdcp_config_req (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rnti);
|
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2325,7 +2295,7 @@ void rrc_pdcp_config_req (
|
|||||||
|
|
||||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||||
pdcp_p->is_ue = true;
|
pdcp_p->is_ue = true;
|
||||||
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
|
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rntiMaybeUEid;
|
||||||
} else {
|
} else {
|
||||||
pdcp_p->is_ue = false;
|
pdcp_p->is_ue = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,29 +249,34 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (UE_NAS_USE_TUN) {
|
if (UE_NAS_USE_TUN) {
|
||||||
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
} else { // => ENB_NAS_USE_TUN
|
} else { // => ENB_NAS_USE_TUN
|
||||||
/* Get the IP from a packet */
|
/* Get the IP from a packet */
|
||||||
struct ip *ip_pack = (struct ip *) nl_rx_buf;
|
struct ip *ip_pack = (struct ip *) nl_rx_buf;
|
||||||
/* Use last octet of destination IP to get index of UE */
|
/* Use last octet of destination IP to get index of UE */
|
||||||
int ue_indx = ((ip_pack->ip_dst.s_addr >> 24) - 2) % MAX_MOBILES_PER_ENB;
|
int ue_indx = ((ip_pack->ip_dst.s_addr >> 24) - 2) % MAX_MOBILES_PER_ENB;
|
||||||
ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[ue_indx];
|
ctxt.rntiMaybeUEid = pdcp_eNB_UE_instance_to_rnti[ue_indx];
|
||||||
ctxt.enb_flag=ENB_FLAG_YES;
|
ctxt.enb_flag=ENB_FLAG_YES;
|
||||||
ctxt.module_id=0;
|
ctxt.module_id=0;
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%lx, enb_flag=%d)\n", ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %ld: Received socket with length %d on Rab %ld \n",
|
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %ld: Received socket with length %d on Rab %ld \n",
|
||||||
ctxt.frame, ctxt.instance, len, rab_id);
|
ctxt.frame, ctxt.instance, len, rab_id);
|
||||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
|
LOG_D(PDCP,
|
||||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04lx][RB %ld]\n",
|
||||||
ctxt.rnti, rab_id);
|
ctxt.frame,
|
||||||
|
ctxt.instance,
|
||||||
|
rab_id,
|
||||||
|
len,
|
||||||
|
ctxt.module_id,
|
||||||
|
ctxt.rntiMaybeUEid,
|
||||||
|
rab_id);
|
||||||
|
|
||||||
#if defined ENABLE_PDCP_PAYLOAD_DEBUG
|
#if defined ENABLE_PDCP_PAYLOAD_DEBUG
|
||||||
LOG_I(PHY, "TUN interface output received from PDCP: \n");
|
LOG_I(PHY, "TUN interface output received from PDCP: \n");
|
||||||
@@ -288,9 +293,15 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP,
|
LOG_D(PDCP,
|
||||||
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] TUN NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04lx][RB %ld] TUN NON INSTANCIATED INSTANCE key 0x%" PRIx64 ", DROPPED\n",
|
||||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
ctxt.frame,
|
||||||
ctxt.rnti, rab_id, key);
|
ctxt.instance,
|
||||||
|
rab_id,
|
||||||
|
len,
|
||||||
|
ctxt.module_id,
|
||||||
|
ctxt.rntiMaybeUEid,
|
||||||
|
rab_id,
|
||||||
|
key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,8 +331,8 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p
|
|||||||
if (len<=0) continue;
|
if (len<=0) continue;
|
||||||
|
|
||||||
if (UE_NAS_USE_TUN) {
|
if (UE_NAS_USE_TUN) {
|
||||||
//key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
// key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
//h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
// h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
} else { // => ENB_NAS_USE_TUN
|
} else { // => ENB_NAS_USE_TUN
|
||||||
//ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[0];
|
//ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[0];
|
||||||
// ctxt.enb_flag=ENB_FLAG_YES;
|
// ctxt.enb_flag=ENB_FLAG_YES;
|
||||||
@@ -331,15 +342,20 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p
|
|||||||
// LOG_W(PDCP,"h_rc %d %d\n",h_rc,rab_id);
|
// LOG_W(PDCP,"h_rc %d %d\n",h_rc,rab_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%lx, enb_flag=%d)\n", ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %ld: Received socket with length %d on Rab %ld \n",
|
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %ld: Received socket with length %d on Rab %ld \n",
|
||||||
ctxt.frame, ctxt.instance, len, rab_id);
|
ctxt.frame, ctxt.instance, len, rab_id);
|
||||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
|
LOG_D(PDCP,
|
||||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04lx][RB %ld]\n",
|
||||||
ctxt.rnti, rab_id);
|
ctxt.frame,
|
||||||
|
ctxt.instance,
|
||||||
|
rab_id,
|
||||||
|
len,
|
||||||
|
ctxt.module_id,
|
||||||
|
ctxt.rntiMaybeUEid,
|
||||||
|
rab_id);
|
||||||
pdcp_data_req(
|
pdcp_data_req(
|
||||||
&ctxt,
|
&ctxt,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
@@ -360,22 +376,28 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p
|
|||||||
// );
|
// );
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP,
|
LOG_D(PDCP,
|
||||||
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04x][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %04lx][RB %ld] NON INSTANCIATED INSTANCE key 0x%" PRIx64 ", DROPPED\n",
|
||||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
ctxt.frame,
|
||||||
ctxt.rnti, rab_id, key);
|
ctxt.instance,
|
||||||
//if (!UE_NAS_USE_TUN) {
|
rab_id,
|
||||||
// pdcp_data_req(
|
len,
|
||||||
// &ctxt,
|
ctxt.module_id,
|
||||||
// SRB_FLAG_NO,
|
ctxt.rntiMaybeUEid,
|
||||||
// DEFAULT_RAB_ID,
|
rab_id,
|
||||||
// RLC_MUI_UNDEFINED,
|
key);
|
||||||
// RLC_SDU_CONFIRM_NO,
|
// if (!UE_NAS_USE_TUN) {
|
||||||
// len,
|
// pdcp_data_req(
|
||||||
// (unsigned char *)nl_rx_buf,
|
// &ctxt,
|
||||||
// PDCP_TRANSMISSION_MODE_TRANSPARENT
|
// SRB_FLAG_NO,
|
||||||
// , NULL, NULL
|
// DEFAULT_RAB_ID,
|
||||||
// );
|
// RLC_MUI_UNDEFINED,
|
||||||
//}
|
// RLC_SDU_CONFIRM_NO,
|
||||||
|
// len,
|
||||||
|
// (unsigned char *)nl_rx_buf,
|
||||||
|
// PDCP_TRANSMISSION_MODE_TRANSPARENT
|
||||||
|
// , NULL, NULL
|
||||||
|
// );
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
} while (len > 0);
|
} while (len > 0);
|
||||||
|
|
||||||
@@ -440,28 +462,30 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
|||||||
if (ctxt.enb_flag) {
|
if (ctxt.enb_flag) {
|
||||||
ctxt.module_id = 0;
|
ctxt.module_id = 0;
|
||||||
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
||||||
ctxt.rnti = pdcp_eNB_UE_instance_to_rnti[pdcp_read_header_g.rb_id / LTE_maxDRB];
|
ctxt.rntiMaybeUEid = pdcp_eNB_UE_instance_to_rnti[pdcp_read_header_g.rb_id / LTE_maxDRB];
|
||||||
|
|
||||||
if (rab_id != 0) {
|
if (rab_id != 0) {
|
||||||
rab_id = rab_id % LTE_maxDRB;
|
rab_id = rab_id % LTE_maxDRB;
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %zu) on Rab %ld for rnti: %d \n",
|
LOG_D(PDCP,
|
||||||
|
"[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %zu) on Rab %ld for rnti: %ld \n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
len,
|
len,
|
||||||
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
nas_nlh_rx->nlmsg_len - sizeof(struct nlmsghdr),
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
ctxt.rnti);
|
ctxt.rntiMaybeUEid);
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u]UE %u][RB %ld]\n",
|
LOG_D(PDCP,
|
||||||
|
"[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u]UE %lu][RB %ld]\n",
|
||||||
ctxt_cpy.frame,
|
ctxt_cpy.frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
rab_id);
|
rab_id);
|
||||||
pdcp_data_req(&ctxt,
|
pdcp_data_req(&ctxt,
|
||||||
SRB_FLAG_NO,
|
SRB_FLAG_NO,
|
||||||
@@ -474,13 +498,14 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
|||||||
,NULL, NULL
|
,NULL, NULL
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %ld] NON INSTANCIATED INSTANCE, DROPPED\n",
|
LOG_D(PDCP,
|
||||||
|
"[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %lu][RB %ld] NON INSTANCIATED INSTANCE, DROPPED\n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
rab_id);
|
rab_id);
|
||||||
}
|
}
|
||||||
} else { // rb_id =0, thus interpreated as broadcast and transported as multiple unicast
|
} else { // rb_id =0, thus interpreated as broadcast and transported as multiple unicast
|
||||||
@@ -500,24 +525,20 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
|||||||
}
|
}
|
||||||
|
|
||||||
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
rab_id = pdcp_read_header_g.rb_id % LTE_maxDRB;
|
||||||
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
ctxt.rntiMaybeUEid = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
||||||
|
|
||||||
if (rab_id != 0) {
|
if (rab_id != 0) {
|
||||||
if (rab_id == UE_IP_DEFAULT_RAB_ID) {
|
if (rab_id == UE_IP_DEFAULT_RAB_ID) {
|
||||||
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%lx, enb_flag=%d)\n", ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
LOG_D(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
|
||||||
} else {
|
} else {
|
||||||
rab_id = rab_id % LTE_maxDRB;
|
rab_id = rab_id % LTE_maxDRB;
|
||||||
LOG_D(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%ld, SRB_FLAG=%d)\n",
|
LOG_D(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%lx, enb_flag=%d, rab_id=%ld, SRB_FLAG=%d)\n", ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
LOG_D(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
@@ -528,13 +549,14 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
|||||||
len,
|
len,
|
||||||
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
||||||
pdcp_read_header_g.rb_id);
|
pdcp_read_header_g.rb_id);
|
||||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB %ld]\n",
|
LOG_D(PDCP,
|
||||||
|
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %lu][RB %ld]\n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
rab_id);
|
rab_id);
|
||||||
pdcp_data_req(
|
pdcp_data_req(
|
||||||
&ctxt,
|
&ctxt,
|
||||||
@@ -550,25 +572,26 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
|||||||
);
|
);
|
||||||
} else { /* else of h_rc == HASH_TABLE_OK */
|
} else { /* else of h_rc == HASH_TABLE_OK */
|
||||||
LOG_D(PDCP,
|
LOG_D(PDCP,
|
||||||
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %lu][RB %ld] NON INSTANCIATED INSTANCE key 0x%" PRIx64 ", DROPPED\n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
rab_id,
|
rab_id,
|
||||||
key);
|
key);
|
||||||
} /* h_rc != HASH_TABLE_OK */
|
} /* h_rc != HASH_TABLE_OK */
|
||||||
} else {/* else of rab_id != 0 */
|
} else {/* else of rab_id != 0 */
|
||||||
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB DEFAULT_RAB_ID %u]\n",
|
LOG_D(PDCP,
|
||||||
|
"[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %lu][RB DEFAULT_RAB_ID %u]\n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pdcp_read_header_g.inst,
|
pdcp_read_header_g.inst,
|
||||||
pdcp_read_header_g.rb_id,
|
pdcp_read_header_g.rb_id,
|
||||||
pdcp_read_header_g.data_size,
|
pdcp_read_header_g.data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
DEFAULT_RAB_ID);
|
DEFAULT_RAB_ID);
|
||||||
pdcp_data_req (
|
pdcp_data_req (
|
||||||
&ctxt,
|
&ctxt,
|
||||||
@@ -669,31 +692,27 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
|||||||
if (ctxt_cpy.enb_flag) {
|
if (ctxt_cpy.enb_flag) {
|
||||||
ctxt.module_id = 0;
|
ctxt.module_id = 0;
|
||||||
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
||||||
ctxt.rnti = pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index];
|
ctxt.rntiMaybeUEid = pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index];
|
||||||
} else {
|
} else {
|
||||||
ctxt.module_id = 0;
|
ctxt.module_id = 0;
|
||||||
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
rab_id = pc5s_header->rb_id % LTE_maxDRB;
|
||||||
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
ctxt.rntiMaybeUEid = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
||||||
}
|
}
|
||||||
|
|
||||||
//UE
|
//UE
|
||||||
if (!ctxt.enb_flag) {
|
if (!ctxt.enb_flag) {
|
||||||
if (rab_id != 0) {
|
if (rab_id != 0) {
|
||||||
if (rab_id == UE_IP_DEFAULT_RAB_ID) {
|
if (rab_id == UE_IP_DEFAULT_RAB_ID) {
|
||||||
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%lx, enb_flag=%d)\n", ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag);
|
||||||
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
LOG_D(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
|
||||||
} else {
|
} else {
|
||||||
rab_id = rab_id % LTE_maxDRB;
|
rab_id = rab_id % LTE_maxDRB;
|
||||||
LOG_I(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%ld, SRB_FLAG=%d)\n",
|
LOG_I(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%lx, enb_flag=%d, rab_id=%ld, SRB_FLAG=%d)\n", ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
|
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
LOG_I(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
LOG_I(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
@@ -703,18 +722,19 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
|||||||
pc5s_header->inst,
|
pc5s_header->inst,
|
||||||
bytes_received,
|
bytes_received,
|
||||||
pc5s_header->rb_id);
|
pc5s_header->rb_id);
|
||||||
LOG_I(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB %ld]\n",
|
LOG_I(PDCP,
|
||||||
|
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %lu][RB %ld]\n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pc5s_header->inst,
|
pc5s_header->inst,
|
||||||
pc5s_header->rb_id,
|
pc5s_header->rb_id,
|
||||||
pc5s_header->data_size,
|
pc5s_header->data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
rab_id);
|
rab_id);
|
||||||
/* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
|
/* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
|
||||||
* Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
|
* Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
|
||||||
* gcc, from v9, now warns about it. fix these warnings by using local variables
|
* gcc, from v9, now warns about it. fix these warnings by using local variables
|
||||||
*/
|
*/
|
||||||
uint32_t sourceL2Id = pc5s_header->sourceL2Id;
|
uint32_t sourceL2Id = pc5s_header->sourceL2Id;
|
||||||
uint32_t destinationL2Id = pc5s_header->destinationL2Id;
|
uint32_t destinationL2Id = pc5s_header->destinationL2Id;
|
||||||
pdcp_data_req(
|
pdcp_data_req(
|
||||||
@@ -733,25 +753,26 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
|||||||
pc5s_header->destinationL2Id=destinationL2Id;
|
pc5s_header->destinationL2Id=destinationL2Id;
|
||||||
} else { /* else of h_rc == HASH_TABLE_OK */
|
} else { /* else of h_rc == HASH_TABLE_OK */
|
||||||
LOG_D(PDCP,
|
LOG_D(PDCP,
|
||||||
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %ld] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
"[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %lu][RB %ld] NON INSTANCIATED INSTANCE key 0x%" PRIx64 ", DROPPED\n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pc5s_header->inst,
|
pc5s_header->inst,
|
||||||
pc5s_header->rb_id,
|
pc5s_header->rb_id,
|
||||||
pc5s_header->data_size,
|
pc5s_header->data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
rab_id,
|
rab_id,
|
||||||
key);
|
key);
|
||||||
}
|
}
|
||||||
} else { /* else of if (rab_id == 0) */
|
} else { /* else of if (rab_id == 0) */
|
||||||
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
|
||||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %u][RB DEFAULT_RAB_ID %u]\n",
|
LOG_D(PDCP,
|
||||||
|
"[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %lu][RB DEFAULT_RAB_ID %u]\n",
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
pc5s_header->inst,
|
pc5s_header->inst,
|
||||||
pc5s_header->rb_id,
|
pc5s_header->rb_id,
|
||||||
pc5s_header->data_size,
|
pc5s_header->data_size,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
DEFAULT_RAB_ID);
|
DEFAULT_RAB_ID);
|
||||||
/* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
|
/* pointers to pc5s_header fields possibly not aligned because pc5s_header points to a packed structure
|
||||||
* Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
|
* Using these possibly unaligned pointers in a function call may trigger alignment errors at run time and
|
||||||
|
|||||||
@@ -20,11 +20,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "openair2/COMMON/platform_types.h"
|
||||||
|
|
||||||
#ifndef _NR_PDCP_H_
|
#ifndef _NR_PDCP_H_
|
||||||
#define _NR_PDCP_H_
|
#define _NR_PDCP_H_
|
||||||
|
|
||||||
void nr_pdcp_layer_init_ue(void);
|
void nr_pdcp_layer_init_ue(void);
|
||||||
void nr_DRB_preconfiguration(uint16_t crnti);
|
void nr_DRB_preconfiguration(ue_id_t crntiMaybeUEid);
|
||||||
|
|
||||||
#endif /* _NR_PDCP_H_ */
|
#endif /* _NR_PDCP_H_ */
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "openair2/COMMON/platform_types.h"
|
||||||
|
|
||||||
#include "nr_pdcp_sdu.h"
|
#include "nr_pdcp_sdu.h"
|
||||||
#include "openair2/RRC/NR/rrc_gNB_radio_bearers.h"
|
#include "openair2/RRC/NR/rrc_gNB_radio_bearers.h"
|
||||||
@@ -184,6 +185,6 @@ nr_pdcp_entity_t *new_nr_pdcp_entity(
|
|||||||
unsigned char *ciphering_key,
|
unsigned char *ciphering_key,
|
||||||
unsigned char *integrity_key);
|
unsigned char *integrity_key);
|
||||||
|
|
||||||
void nr_DRB_preconfiguration(uint16_t crnti);
|
void nr_DRB_preconfiguration(ue_id_t crntiMaybeUEid);
|
||||||
|
|
||||||
#endif /* _NR_PDCP_ENTITY_H_ */
|
#endif /* _NR_PDCP_ENTITY_H_ */
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ static void do_pdcp_data_ind(
|
|||||||
{
|
{
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
nr_pdcp_entity_t *rb;
|
nr_pdcp_entity_t *rb;
|
||||||
int rnti = ctxt_pP->rnti;
|
ue_id_t rntiMaybeUEid = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
if (ctxt_pP->module_id != 0 ||
|
if (ctxt_pP->module_id != 0 ||
|
||||||
//ctxt_pP->enb_flag != 1 ||
|
//ctxt_pP->enb_flag != 1 ||
|
||||||
@@ -254,11 +254,10 @@ static void do_pdcp_data_ind(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ctxt_pP->enb_flag)
|
if (ctxt_pP->enb_flag)
|
||||||
T(T_ENB_PDCP_UL, T_INT(ctxt_pP->module_id), T_INT(rnti),
|
T(T_ENB_PDCP_UL, T_INT(ctxt_pP->module_id), T_INT(rntiMaybeUEid), T_INT(rb_id), T_INT(sdu_buffer_size));
|
||||||
T_INT(rb_id), T_INT(sdu_buffer_size));
|
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rntiMaybeUEid);
|
||||||
|
|
||||||
if (srb_flagP == 1) {
|
if (srb_flagP == 1) {
|
||||||
if (rb_id < 1 || rb_id > 2)
|
if (rb_id < 1 || rb_id > 2)
|
||||||
@@ -407,8 +406,7 @@ static void *enb_tun_read_thread(void *_)
|
|||||||
char rx_buf[NL_MAX_PAYLOAD];
|
char rx_buf[NL_MAX_PAYLOAD];
|
||||||
int len;
|
int len;
|
||||||
protocol_ctxt_t ctxt;
|
protocol_ctxt_t ctxt;
|
||||||
ue_id_t ue_id;
|
ue_id_t rntiMaybeUEid;
|
||||||
int has_ue;
|
|
||||||
|
|
||||||
int rb_id = 1;
|
int rb_id = 1;
|
||||||
pthread_setname_np( pthread_self(),"enb_tun_read");
|
pthread_setname_np( pthread_self(),"enb_tun_read");
|
||||||
@@ -423,7 +421,7 @@ static void *enb_tun_read_thread(void *_)
|
|||||||
LOG_D(PDCP, "%s(): nas_sock_fd read returns len %d\n", __func__, len);
|
LOG_D(PDCP, "%s(): nas_sock_fd read returns len %d\n", __func__, len);
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
has_ue = nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager, &ue_id);
|
const bool has_ue = nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager, &rntiMaybeUEid);
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
|
|
||||||
if (!has_ue) continue;
|
if (!has_ue) continue;
|
||||||
@@ -435,15 +433,13 @@ static void *enb_tun_read_thread(void *_)
|
|||||||
ctxt.subframe = 0;
|
ctxt.subframe = 0;
|
||||||
ctxt.eNB_index = 0;
|
ctxt.eNB_index = 0;
|
||||||
ctxt.brOption = 0;
|
ctxt.brOption = 0;
|
||||||
ctxt.rnti = (rnti_t) ue_id;
|
ctxt.rntiMaybeUEid = rntiMaybeUEid;
|
||||||
|
|
||||||
uint8_t qfi = 7;
|
uint8_t qfi = 7;
|
||||||
bool rqi = 0;
|
bool rqi = 0;
|
||||||
int pdusession_id = 10;
|
int pdusession_id = 10;
|
||||||
|
|
||||||
sdap_data_req(&ctxt, ue_id, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED,
|
sdap_data_req(&ctxt, rntiMaybeUEid, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, len, (unsigned char *)rx_buf, PDCP_TRANSMISSION_MODE_DATA, NULL, NULL, qfi, rqi, pdusession_id);
|
||||||
RLC_SDU_CONFIRM_NO, len, (unsigned char *)rx_buf,
|
|
||||||
PDCP_TRANSMISSION_MODE_DATA, NULL, NULL, qfi, rqi, pdusession_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -455,7 +451,7 @@ static void *ue_tun_read_thread(void *_)
|
|||||||
char rx_buf[NL_MAX_PAYLOAD];
|
char rx_buf[NL_MAX_PAYLOAD];
|
||||||
int len;
|
int len;
|
||||||
protocol_ctxt_t ctxt;
|
protocol_ctxt_t ctxt;
|
||||||
ue_id_t ue_id;
|
ue_id_t rntiMaybeUEid;
|
||||||
int has_ue;
|
int has_ue;
|
||||||
|
|
||||||
int rb_id = 1;
|
int rb_id = 1;
|
||||||
@@ -470,7 +466,7 @@ static void *ue_tun_read_thread(void *_)
|
|||||||
LOG_D(PDCP, "%s(): nas_sock_fd read returns len %d\n", __func__, len);
|
LOG_D(PDCP, "%s(): nas_sock_fd read returns len %d\n", __func__, len);
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
has_ue = nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager, &ue_id);
|
has_ue = nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager, &rntiMaybeUEid);
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
|
|
||||||
if (!has_ue) continue;
|
if (!has_ue) continue;
|
||||||
@@ -482,15 +478,13 @@ static void *ue_tun_read_thread(void *_)
|
|||||||
ctxt.subframe = 0;
|
ctxt.subframe = 0;
|
||||||
ctxt.eNB_index = 0;
|
ctxt.eNB_index = 0;
|
||||||
ctxt.brOption = 0;
|
ctxt.brOption = 0;
|
||||||
ctxt.rnti = ue_id;
|
ctxt.rntiMaybeUEid = rntiMaybeUEid;
|
||||||
|
|
||||||
bool dc = SDAP_HDR_UL_DATA_PDU;
|
bool dc = SDAP_HDR_UL_DATA_PDU;
|
||||||
extern uint8_t nas_qfi;
|
extern uint8_t nas_qfi;
|
||||||
extern uint8_t nas_pduid;
|
extern uint8_t nas_pduid;
|
||||||
|
|
||||||
sdap_data_req(&ctxt, ue_id, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED,
|
sdap_data_req(&ctxt, rntiMaybeUEid, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, len, (unsigned char *)rx_buf, PDCP_TRANSMISSION_MODE_DATA, NULL, NULL, nas_qfi, dc, nas_pduid);
|
||||||
RLC_SDU_CONFIRM_NO, len, (unsigned char *)rx_buf,
|
|
||||||
PDCP_TRANSMISSION_MODE_DATA, NULL, NULL, nas_qfi, dc, nas_pduid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -621,15 +615,8 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (IS_SOFTMODEM_NOS1 || UE_NAS_USE_TUN) {
|
if (IS_SOFTMODEM_NOS1 || UE_NAS_USE_TUN) {
|
||||||
LOG_D(PDCP, "IP packet received with size %d, to be sent to SDAP interface, UE rnti: %d\n", size, (int)ue->ue_id);
|
LOG_D(PDCP, "IP packet received with size %d, to be sent to SDAP interface, UE ID/RNTI: %ld\n", size, ue->rntiMaybeUEid);
|
||||||
sdap_data_ind(entity->rb_id,
|
sdap_data_ind(entity->rb_id, entity->is_gnb, entity->has_sdap, entity->has_sdapULheader, entity->pdusession_id, ue->rntiMaybeUEid, buf, size);
|
||||||
entity->is_gnb,
|
|
||||||
entity->has_sdap,
|
|
||||||
entity->has_sdapULheader,
|
|
||||||
entity->pdusession_id,
|
|
||||||
ue->ue_id,
|
|
||||||
buf,
|
|
||||||
size);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
for (i = 0; i < MAX_DRBS_PER_UE; i++) {
|
for (i = 0; i < MAX_DRBS_PER_UE; i++) {
|
||||||
@@ -639,21 +626,13 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_E(PDCP, "%s:%d:%s: fatal, no RB found for ue %d\n",
|
LOG_E(PDCP, "%s:%d:%s: fatal, no RB found for UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, ue->rntiMaybeUEid);
|
||||||
__FILE__, __LINE__, __FUNCTION__, (int)ue->ue_id);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
rb_found:
|
rb_found:
|
||||||
{
|
{
|
||||||
LOG_D(PDCP, "%s() (drb %d) sending message to SDAP size %d\n", __func__, rb_id, size);
|
LOG_D(PDCP, "%s() (drb %d) sending message to SDAP size %d\n", __func__, rb_id, size);
|
||||||
sdap_data_ind(rb_id,
|
sdap_data_ind(rb_id, ue->drb[rb_id - 1]->is_gnb, ue->drb[rb_id - 1]->has_sdap, ue->drb[rb_id - 1]->has_sdapULheader, ue->drb[rb_id - 1]->pdusession_id, ue->rntiMaybeUEid, buf, size);
|
||||||
ue->drb[rb_id-1]->is_gnb,
|
|
||||||
ue->drb[rb_id-1]->has_sdap,
|
|
||||||
ue->drb[rb_id-1]->has_sdapULheader,
|
|
||||||
ue->drb[rb_id-1]->pdusession_id,
|
|
||||||
ue->ue_id,
|
|
||||||
buf,
|
|
||||||
size);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -674,8 +653,7 @@ static void deliver_pdu_drb(void *_ue, nr_pdcp_entity_t *entity,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_E(PDCP, "%s:%d:%s: fatal, no RB found for ue %d\n",
|
LOG_E(PDCP, "%s:%d:%s: fatal, no RB found for UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, ue->rntiMaybeUEid);
|
||||||
__FILE__, __LINE__, __FUNCTION__, (int)ue->ue_id);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
rb_found:
|
rb_found:
|
||||||
@@ -687,7 +665,7 @@ rb_found:
|
|||||||
ctxt.eNB_index = 0;
|
ctxt.eNB_index = 0;
|
||||||
ctxt.brOption = 0;
|
ctxt.brOption = 0;
|
||||||
|
|
||||||
ctxt.rnti = ue->ue_id;
|
ctxt.rntiMaybeUEid = ue->rntiMaybeUEid;
|
||||||
if (RC.nrrrc != NULL && NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
if (RC.nrrrc != NULL && NODE_IS_CU(RC.nrrrc[0]->node_type)) {
|
||||||
MessageDef *message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, 0,
|
MessageDef *message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, 0,
|
||||||
GTPV1U_TUNNEL_DATA_REQ,
|
GTPV1U_TUNNEL_DATA_REQ,
|
||||||
@@ -702,7 +680,7 @@ rb_found:
|
|||||||
req->buffer = gtpu_buffer_p;
|
req->buffer = gtpu_buffer_p;
|
||||||
req->length = size;
|
req->length = size;
|
||||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||||
req->ue_id = ue->ue_id;
|
req->ue_id = ue->rntiMaybeUEid;
|
||||||
req->bearer_id = rb_id;
|
req->bearer_id = rb_id;
|
||||||
LOG_I(PDCP, "%s() (drb %d) sending message to gtp size %d\n",
|
LOG_I(PDCP, "%s() (drb %d) sending message to gtp size %d\n",
|
||||||
__func__, rb_id, size);
|
__func__, rb_id, size);
|
||||||
@@ -733,8 +711,7 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_E(PDCP, "%s:%d:%s: fatal, no SRB found for ue %d\n",
|
LOG_E(PDCP, "%s:%d:%s: fatal, no SRB found for UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, ue->rntiMaybeUEid);
|
||||||
__FILE__, __LINE__, __FUNCTION__, (int)ue->ue_id);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
srb_found:
|
srb_found:
|
||||||
@@ -742,7 +719,7 @@ srb_found:
|
|||||||
MessageDef *message_p = itti_alloc_new_message(TASK_PDCP_GNB, 0, F1AP_UL_RRC_MESSAGE);
|
MessageDef *message_p = itti_alloc_new_message(TASK_PDCP_GNB, 0, F1AP_UL_RRC_MESSAGE);
|
||||||
AssertFatal(message_p != NULL, "OUT OF MEMORY\n");
|
AssertFatal(message_p != NULL, "OUT OF MEMORY\n");
|
||||||
f1ap_ul_rrc_message_t *ul_rrc = &F1AP_UL_RRC_MESSAGE(message_p);
|
f1ap_ul_rrc_message_t *ul_rrc = &F1AP_UL_RRC_MESSAGE(message_p);
|
||||||
ul_rrc->rnti = ue->ue_id;
|
ul_rrc->rnti = ue->rntiMaybeUEid;
|
||||||
ul_rrc->srb_id = srb_id;
|
ul_rrc->srb_id = srb_id;
|
||||||
ul_rrc->rrc_container = malloc(size);
|
ul_rrc->rrc_container = malloc(size);
|
||||||
AssertFatal(ul_rrc->rrc_container != NULL, "OUT OF MEMORY\n");
|
AssertFatal(ul_rrc->rrc_container != NULL, "OUT OF MEMORY\n");
|
||||||
@@ -758,7 +735,7 @@ srb_found:
|
|||||||
NR_RRC_DCCH_DATA_IND(message_p).dcch_index = srb_id;
|
NR_RRC_DCCH_DATA_IND(message_p).dcch_index = srb_id;
|
||||||
NR_RRC_DCCH_DATA_IND(message_p).sdu_p = rrc_buffer_p;
|
NR_RRC_DCCH_DATA_IND(message_p).sdu_p = rrc_buffer_p;
|
||||||
NR_RRC_DCCH_DATA_IND(message_p).sdu_size = size;
|
NR_RRC_DCCH_DATA_IND(message_p).sdu_size = size;
|
||||||
NR_RRC_DCCH_DATA_IND(message_p).rnti = ue->ue_id;
|
NR_RRC_DCCH_DATA_IND(message_p).rnti = ue->rntiMaybeUEid;
|
||||||
itti_send_msg_to_task(TASK_RRC_NRUE, 0, message_p);
|
itti_send_msg_to_task(TASK_RRC_NRUE, 0, message_p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -779,8 +756,7 @@ static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_E(PDCP, "%s:%d:%s: fatal, no SRB found for ue %d\n",
|
LOG_E(PDCP, "%s:%d:%s: fatal, no SRB found for UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, ue->rntiMaybeUEid);
|
||||||
__FILE__, __LINE__, __FUNCTION__, (int)ue->ue_id);
|
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
srb_found:
|
srb_found:
|
||||||
@@ -798,7 +774,7 @@ srb_found:
|
|||||||
ctxt.eNB_index = 0;
|
ctxt.eNB_index = 0;
|
||||||
ctxt.brOption = 0;
|
ctxt.brOption = 0;
|
||||||
|
|
||||||
ctxt.rnti = ue->ue_id;
|
ctxt.rntiMaybeUEid = ue->rntiMaybeUEid;
|
||||||
|
|
||||||
memblock = get_free_mem_block(size, __FUNCTION__);
|
memblock = get_free_mem_block(size, __FUNCTION__);
|
||||||
memcpy(memblock->data, buf, size);
|
memcpy(memblock->data, buf, size);
|
||||||
@@ -813,7 +789,7 @@ srb_found:
|
|||||||
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
|
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0;
|
F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
|
F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).rnti = ue->ue_id;
|
F1AP_DL_RRC_MESSAGE(message_p).rnti = ue->rntiMaybeUEid;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).srb_id = srb_id;
|
F1AP_DL_RRC_MESSAGE (message_p).srb_id = srb_id;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1;
|
F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1;
|
||||||
F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0;
|
F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0;
|
||||||
@@ -826,16 +802,7 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
|
|||||||
{
|
{
|
||||||
MessageDef *msg_p;
|
MessageDef *msg_p;
|
||||||
int result;
|
int result;
|
||||||
protocol_ctxt_t ctxt={.module_id=0,
|
protocol_ctxt_t ctxt = {.module_id = 0, .enb_flag = 1, .instance = 0, .rntiMaybeUEid = 0, .frame = -1, .subframe = -1, .eNB_index = 0, .brOption = false};
|
||||||
.enb_flag=1,
|
|
||||||
.instance=0,
|
|
||||||
.rnti=0,
|
|
||||||
.frame=-1,
|
|
||||||
.subframe=-1,
|
|
||||||
.eNB_index=0,
|
|
||||||
.brOption=false
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
itti_poll_msg(ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, &msg_p);
|
itti_poll_msg(ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, &msg_p);
|
||||||
@@ -875,11 +842,7 @@ void pdcp_run(const protocol_ctxt_t *const ctxt_pP)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void add_srb(int is_gnb, int rnti, struct NR_SRB_ToAddMod *s,
|
static void add_srb(int is_gnb, ue_id_t rntiMaybeUEid, struct NR_SRB_ToAddMod *s, int ciphering_algorithm, int integrity_algorithm, unsigned char *ciphering_key, unsigned char *integrity_key)
|
||||||
int ciphering_algorithm,
|
|
||||||
int integrity_algorithm,
|
|
||||||
unsigned char *ciphering_key,
|
|
||||||
unsigned char *integrity_key)
|
|
||||||
{
|
{
|
||||||
nr_pdcp_entity_t *pdcp_srb;
|
nr_pdcp_entity_t *pdcp_srb;
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
@@ -891,10 +854,9 @@ static void add_srb(int is_gnb, int rnti, struct NR_SRB_ToAddMod *s,
|
|||||||
else t_Reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
|
else t_Reordering = decode_t_reordering(*s->pdcp_Config->t_Reordering);
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rntiMaybeUEid);
|
||||||
if (ue->srb[srb_id-1] != NULL) {
|
if (ue->srb[srb_id-1] != NULL) {
|
||||||
LOG_D(PDCP, "%s:%d:%s: warning SRB %d already exist for ue %d, do nothing\n",
|
LOG_D(PDCP, "%s:%d:%s: warning SRB %d already exist for UE ID/RNTI %ld, do nothing\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rntiMaybeUEid);
|
||||||
__FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
|
|
||||||
} else {
|
} else {
|
||||||
pdcp_srb = new_nr_pdcp_entity(NR_PDCP_SRB, is_gnb, srb_id,
|
pdcp_srb = new_nr_pdcp_entity(NR_PDCP_SRB, is_gnb, srb_id,
|
||||||
0, 0, 0, 0, // sdap parameters
|
0, 0, 0, 0, // sdap parameters
|
||||||
@@ -906,16 +868,12 @@ static void add_srb(int is_gnb, int rnti, struct NR_SRB_ToAddMod *s,
|
|||||||
integrity_key);
|
integrity_key);
|
||||||
nr_pdcp_ue_add_srb_pdcp_entity(ue, srb_id, pdcp_srb);
|
nr_pdcp_ue_add_srb_pdcp_entity(ue, srb_id, pdcp_srb);
|
||||||
|
|
||||||
LOG_D(PDCP, "%s:%d:%s: added srb %d to ue rnti %x\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rnti);
|
LOG_D(PDCP, "%s:%d:%s: added srb %d to UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, srb_id, rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
|
void add_drb_am(int is_gnb, ue_id_t rntiMaybeUEid, struct NR_DRB_ToAddMod *s, int ciphering_algorithm, int integrity_algorithm, unsigned char *ciphering_key, unsigned char *integrity_key)
|
||||||
int ciphering_algorithm,
|
|
||||||
int integrity_algorithm,
|
|
||||||
unsigned char *ciphering_key,
|
|
||||||
unsigned char *integrity_key)
|
|
||||||
{
|
{
|
||||||
nr_pdcp_entity_t *pdcp_drb;
|
nr_pdcp_entity_t *pdcp_drb;
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
@@ -983,10 +941,9 @@ void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
|
|||||||
|
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rntiMaybeUEid);
|
||||||
if (ue->drb[drb_id-1] != NULL) {
|
if (ue->drb[drb_id-1] != NULL) {
|
||||||
LOG_W(PDCP, "%s:%d:%s: warning DRB %d already exist for ue %d, do nothing\n",
|
LOG_W(PDCP, "%s:%d:%s: warning DRB %d already exist for UE ID/RNTI %ld, do nothing\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rntiMaybeUEid);
|
||||||
__FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
|
|
||||||
} else {
|
} else {
|
||||||
pdcp_drb = new_nr_pdcp_entity(NR_PDCP_DRB_AM, is_gnb, drb_id,pdusession_id,has_sdap,
|
pdcp_drb = new_nr_pdcp_entity(NR_PDCP_DRB_AM, is_gnb, drb_id,pdusession_id,has_sdap,
|
||||||
has_sdapULheader,has_sdapDLheader,
|
has_sdapULheader,has_sdapDLheader,
|
||||||
@@ -998,21 +955,16 @@ void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
|
|||||||
has_integrity ? integrity_key : NULL);
|
has_integrity ? integrity_key : NULL);
|
||||||
nr_pdcp_ue_add_drb_pdcp_entity(ue, drb_id, pdcp_drb);
|
nr_pdcp_ue_add_drb_pdcp_entity(ue, drb_id, pdcp_drb);
|
||||||
|
|
||||||
LOG_D(PDCP, "%s:%d:%s: added drb %d to ue rnti %x\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rnti);
|
LOG_D(PDCP, "%s:%d:%s: added drb %d to UE ID/RNTI %ld\n", __FILE__, __LINE__, __FUNCTION__, drb_id, rntiMaybeUEid);
|
||||||
|
|
||||||
new_nr_sdap_entity(is_gnb,
|
new_nr_sdap_entity(is_gnb, has_sdap, rntiMaybeUEid, pdusession_id, is_sdap_DefaultDRB, drb_id, mappedQFIs2Add, mappedQFIs2AddCount);
|
||||||
has_sdap,
|
|
||||||
rnti,
|
|
||||||
pdusession_id,
|
|
||||||
is_sdap_DefaultDRB,
|
|
||||||
drb_id,
|
|
||||||
mappedQFIs2Add,
|
|
||||||
mappedQFIs2AddCount);
|
|
||||||
}
|
}
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void add_drb(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
|
static void add_drb(int is_gnb,
|
||||||
|
ue_id_t rntiMaybeUEid,
|
||||||
|
struct NR_DRB_ToAddMod *s,
|
||||||
NR_RLC_Config_t *rlc_Config,
|
NR_RLC_Config_t *rlc_Config,
|
||||||
int ciphering_algorithm,
|
int ciphering_algorithm,
|
||||||
int integrity_algorithm,
|
int integrity_algorithm,
|
||||||
@@ -1021,33 +973,26 @@ static void add_drb(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
|
|||||||
{
|
{
|
||||||
switch (rlc_Config->present) {
|
switch (rlc_Config->present) {
|
||||||
case NR_RLC_Config_PR_am:
|
case NR_RLC_Config_PR_am:
|
||||||
add_drb_am(is_gnb, rnti, s, ciphering_algorithm, integrity_algorithm,
|
add_drb_am(is_gnb, rntiMaybeUEid, s, ciphering_algorithm, integrity_algorithm, ciphering_key, integrity_key);
|
||||||
ciphering_key, integrity_key);
|
|
||||||
break;
|
break;
|
||||||
case NR_RLC_Config_PR_um_Bi_Directional:
|
case NR_RLC_Config_PR_um_Bi_Directional:
|
||||||
//add_drb_um(rnti, s);
|
// add_drb_um(rntiMaybeUEid, s);
|
||||||
/* hack */
|
/* hack */
|
||||||
add_drb_am(is_gnb, rnti, s, ciphering_algorithm, integrity_algorithm,
|
add_drb_am(is_gnb, rntiMaybeUEid, s, ciphering_algorithm, integrity_algorithm, ciphering_key, integrity_key);
|
||||||
ciphering_key, integrity_key);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG_E(PDCP, "%s:%d:%s: fatal: unhandled DRB type\n",
|
LOG_E(PDCP, "%s:%d:%s: fatal: unhandled DRB type\n",
|
||||||
__FILE__, __LINE__, __FUNCTION__);
|
__FILE__, __LINE__, __FUNCTION__);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
LOG_I(PDCP, "%s:%s:%d: added DRB for UE RNTI %x\n", __FILE__, __FUNCTION__, __LINE__, rnti);
|
LOG_I(PDCP, "%s:%s:%d: added DRB for UE ID/RNTI %ld\n", __FILE__, __FUNCTION__, __LINE__, rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_pdcp_add_srbs(eNB_flag_t enb_flag, rnti_t rnti,
|
void nr_pdcp_add_srbs(eNB_flag_t enb_flag, ue_id_t rntiMaybeUEid, NR_SRB_ToAddModList_t *const srb2add_list, const uint8_t security_modeP, uint8_t *const kRRCenc, uint8_t *const kRRCint)
|
||||||
NR_SRB_ToAddModList_t *const srb2add_list,
|
{
|
||||||
const uint8_t security_modeP,
|
|
||||||
uint8_t *const kRRCenc,
|
|
||||||
uint8_t *const kRRCint) {
|
|
||||||
if (srb2add_list != NULL) {
|
if (srb2add_list != NULL) {
|
||||||
for (int i = 0; i < srb2add_list->list.count; i++) {
|
for (int i = 0; i < srb2add_list->list.count; i++) {
|
||||||
add_srb(enb_flag,rnti, srb2add_list->list.array[i],
|
add_srb(enb_flag, rntiMaybeUEid, srb2add_list->list.array[i], security_modeP & 0x0f, (security_modeP >> 4) & 0x0f, kRRCenc, kRRCint);
|
||||||
security_modeP & 0x0f, (security_modeP >> 4) & 0x0f,
|
|
||||||
kRRCenc, kRRCint);
|
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
LOG_W(PDCP, "nr_pdcp_add_srbs() with void list\n");
|
LOG_W(PDCP, "nr_pdcp_add_srbs() with void list\n");
|
||||||
@@ -1057,19 +1002,17 @@ void nr_pdcp_add_srbs(eNB_flag_t enb_flag, rnti_t rnti,
|
|||||||
free(kRRCint);
|
free(kRRCint);
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_pdcp_add_drbs(eNB_flag_t enb_flag, rnti_t rnti,
|
void nr_pdcp_add_drbs(eNB_flag_t enb_flag,
|
||||||
NR_DRB_ToAddModList_t *const drb2add_list,
|
ue_id_t rntiMaybeUEid,
|
||||||
const uint8_t security_modeP,
|
NR_DRB_ToAddModList_t *const drb2add_list,
|
||||||
uint8_t *const kUPenc,
|
const uint8_t security_modeP,
|
||||||
uint8_t *const kUPint,
|
uint8_t *const kUPenc,
|
||||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list) {
|
uint8_t *const kUPint,
|
||||||
|
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
|
||||||
|
{
|
||||||
if (drb2add_list != NULL) {
|
if (drb2add_list != NULL) {
|
||||||
for (int i = 0; i < drb2add_list->list.count; i++) {
|
for (int i = 0; i < drb2add_list->list.count; i++) {
|
||||||
add_drb(enb_flag, rnti, drb2add_list->list.array[i],
|
add_drb(enb_flag, rntiMaybeUEid, drb2add_list->list.array[i], rlc_bearer2add_list->list.array[i]->rlc_Config, security_modeP & 0x0f, (security_modeP >> 4) & 0x0f, kUPenc, kUPint);
|
||||||
rlc_bearer2add_list->list.array[i]->rlc_Config,
|
|
||||||
security_modeP & 0x0f, (security_modeP >> 4) & 0x0f,
|
|
||||||
kUPenc, kUPint);
|
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
LOG_W(PDCP, "nr_pdcp_add_drbs() with void list\n");
|
LOG_W(PDCP, "nr_pdcp_add_drbs() with void list\n");
|
||||||
@@ -1094,7 +1037,7 @@ bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_DRB_preconfiguration(uint16_t crnti)
|
void nr_DRB_preconfiguration(ue_id_t crntiMaybeUEid)
|
||||||
{
|
{
|
||||||
|
|
||||||
NR_RadioBearerConfig_t *rbconfig = NULL;
|
NR_RadioBearerConfig_t *rbconfig = NULL;
|
||||||
@@ -1158,18 +1101,13 @@ void nr_DRB_preconfiguration(uint16_t crnti)
|
|||||||
ASN_SEQUENCE_ADD(&Rlc_Bearer_ToAdd_list->list, RLC_BearerConfig);
|
ASN_SEQUENCE_ADD(&Rlc_Bearer_ToAdd_list->list, RLC_BearerConfig);
|
||||||
|
|
||||||
if (ENB_NAS_USE_TUN){
|
if (ENB_NAS_USE_TUN){
|
||||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_YES, crnti, 0, 0, 0);
|
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_YES, crntiMaybeUEid, 0, 0, 0);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, crnti, 0, 0,0);
|
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, ENB_FLAG_NO, crntiMaybeUEid, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
nr_pdcp_add_drbs(ctxt.enb_flag, ctxt.rnti,
|
nr_pdcp_add_drbs(ctxt.enb_flag, ctxt.rntiMaybeUEid, rbconfig->drb_ToAddModList, 0, NULL, NULL, Rlc_Bearer_ToAdd_list);
|
||||||
rbconfig->drb_ToAddModList ,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
Rlc_Bearer_ToAdd_list);
|
|
||||||
|
|
||||||
nr_rrc_rlc_config_asn1_req (&ctxt,
|
nr_rrc_rlc_config_asn1_req (&ctxt,
|
||||||
(NR_SRB_ToAddModList_t *) NULL,
|
(NR_SRB_ToAddModList_t *) NULL,
|
||||||
@@ -1178,8 +1116,7 @@ void nr_DRB_preconfiguration(uint16_t crnti)
|
|||||||
(LTE_PMCH_InfoList_r9_t *) NULL,
|
(LTE_PMCH_InfoList_r9_t *) NULL,
|
||||||
Rlc_Bearer_ToAdd_list);
|
Rlc_Bearer_ToAdd_list);
|
||||||
|
|
||||||
LOG_D(PDCP, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti);
|
LOG_D(PDCP, "%s:%d: done RRC PDCP/RLC ASN1 request for UE ID/RNTI %ld\n", __FUNCTION__, __LINE__, ctxt.rntiMaybeUEid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t get_pdcp_optmask(void)
|
uint64_t get_pdcp_optmask(void)
|
||||||
@@ -1189,10 +1126,10 @@ uint64_t get_pdcp_optmask(void)
|
|||||||
|
|
||||||
bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
|
bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
|
||||||
{
|
{
|
||||||
int rnti = ctxt_pP->rnti;
|
ue_id_t rntiMaybeUEid = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
nr_pdcp_manager_remove_ue(nr_pdcp_ue_manager, rnti);
|
nr_pdcp_manager_remove_ue(nr_pdcp_ue_manager, rntiMaybeUEid);
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@@ -1210,13 +1147,13 @@ void pdcp_config_set_security(
|
|||||||
{
|
{
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
nr_pdcp_entity_t *rb;
|
nr_pdcp_entity_t *rb;
|
||||||
int rnti = ctxt_pP->rnti;
|
ue_id_t ue_id = ctxt_pP->rntiMaybeUEid;
|
||||||
int integrity_algorithm;
|
int integrity_algorithm;
|
||||||
int ciphering_algorithm;
|
int ciphering_algorithm;
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
|
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
||||||
|
|
||||||
/* TODO: proper handling of DRBs, for the moment only SRBs are handled */
|
/* TODO: proper handling of DRBs, for the moment only SRBs are handled */
|
||||||
|
|
||||||
@@ -1224,8 +1161,7 @@ void pdcp_config_set_security(
|
|||||||
rb = ue->srb[rb_id - 1];
|
rb = ue->srb[rb_id - 1];
|
||||||
|
|
||||||
if (rb == NULL) {
|
if (rb == NULL) {
|
||||||
LOG_E(PDCP, "%s:%d:%s: no SRB found (rnti %d, rb_id %ld)\n",
|
LOG_E(PDCP, "%s:%d:%s: no SRB found (ue_id %ld, rb_id %ld)\n", __FILE__, __LINE__, __FUNCTION__, ue_id, rb_id);
|
||||||
__FILE__, __LINE__, __FUNCTION__, rnti, rb_id);
|
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1253,7 +1189,7 @@ static bool pdcp_data_req_srb(protocol_ctxt_t *ctxt_pP,
|
|||||||
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
|
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
nr_pdcp_entity_t *rb;
|
nr_pdcp_entity_t *rb;
|
||||||
int rnti = ctxt_pP->rnti;
|
ue_id_t ue_id = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
if (ctxt_pP->module_id != 0 ||
|
if (ctxt_pP->module_id != 0 ||
|
||||||
//ctxt_pP->enb_flag != 1 ||
|
//ctxt_pP->enb_flag != 1 ||
|
||||||
@@ -1267,7 +1203,7 @@ static bool pdcp_data_req_srb(protocol_ctxt_t *ctxt_pP,
|
|||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
|
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
||||||
|
|
||||||
if (rb_id < 1 || rb_id > 2)
|
if (rb_id < 1 || rb_id > 2)
|
||||||
rb = NULL;
|
rb = NULL;
|
||||||
@@ -1275,8 +1211,7 @@ static bool pdcp_data_req_srb(protocol_ctxt_t *ctxt_pP,
|
|||||||
rb = ue->srb[rb_id - 1];
|
rb = ue->srb[rb_id - 1];
|
||||||
|
|
||||||
if (rb == NULL) {
|
if (rb == NULL) {
|
||||||
LOG_E(PDCP, "%s:%d:%s: no SRB found (rnti %d, rb_id %ld)\n",
|
LOG_E(PDCP, "%s:%d:%s: no SRB found (ue_id %ld, rb_id %ld)\n", __FILE__, __LINE__, __FUNCTION__, ue_id, rb_id);
|
||||||
__FILE__, __LINE__, __FUNCTION__, rnti, rb_id);
|
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1299,7 +1234,7 @@ static bool pdcp_data_req_drb(protocol_ctxt_t *ctxt_pP,
|
|||||||
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
|
LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
nr_pdcp_entity_t *rb;
|
nr_pdcp_entity_t *rb;
|
||||||
int rnti = ctxt_pP->rnti;
|
ue_id_t ue_id = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
if (ctxt_pP->module_id != 0 ||
|
if (ctxt_pP->module_id != 0 ||
|
||||||
//ctxt_pP->enb_flag != 1 ||
|
//ctxt_pP->enb_flag != 1 ||
|
||||||
@@ -1313,7 +1248,7 @@ static bool pdcp_data_req_drb(protocol_ctxt_t *ctxt_pP,
|
|||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
|
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
||||||
|
|
||||||
if (rb_id < 1 || rb_id > MAX_DRBS_PER_UE)
|
if (rb_id < 1 || rb_id > MAX_DRBS_PER_UE)
|
||||||
rb = NULL;
|
rb = NULL;
|
||||||
@@ -1321,8 +1256,7 @@ static bool pdcp_data_req_drb(protocol_ctxt_t *ctxt_pP,
|
|||||||
rb = ue->drb[rb_id - 1];
|
rb = ue->drb[rb_id - 1];
|
||||||
|
|
||||||
if (rb == NULL) {
|
if (rb == NULL) {
|
||||||
LOG_E(PDCP, "%s:%d:%s: no DRB found (rnti %d, rb_id %ld)\n",
|
LOG_E(PDCP, "%s:%d:%s: no DRB found (ue_id %ld, rb_id %ld)\n", __FILE__, __LINE__, __FUNCTION__, ue_id, rb_id);
|
||||||
__FILE__, __LINE__, __FUNCTION__, rnti, rb_id);
|
|
||||||
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1414,18 +1348,14 @@ nr_pdcp_ue_manager_t *nr_pdcp_sdap_get_ue_manager() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* returns false in case of error, true if everything ok */
|
/* returns false in case of error, true if everything ok */
|
||||||
const bool nr_pdcp_get_statistics(
|
const bool nr_pdcp_get_statistics(ue_id_t ue_id, int srb_flag, int rb_id, nr_pdcp_statistics_t *out)
|
||||||
int rnti,
|
|
||||||
int srb_flag,
|
|
||||||
int rb_id,
|
|
||||||
nr_pdcp_statistics_t *out)
|
|
||||||
{
|
{
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
nr_pdcp_entity_t *rb;
|
nr_pdcp_entity_t *rb;
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
nr_pdcp_manager_lock(nr_pdcp_ue_manager);
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
||||||
|
|
||||||
if (srb_flag == 1) {
|
if (srb_flag == 1) {
|
||||||
if (rb_id < 1 || rb_id > 2)
|
if (rb_id < 1 || rb_id > 2)
|
||||||
|
|||||||
@@ -76,17 +76,17 @@ void nr_pdcp_manager_unlock(nr_pdcp_ue_manager_t *_m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* must be called with lock acquired */
|
/* must be called with lock acquired */
|
||||||
nr_pdcp_ue_t *nr_pdcp_manager_get_ue(nr_pdcp_ue_manager_t *_m, ue_id_t ue_id)
|
nr_pdcp_ue_t *nr_pdcp_manager_get_ue(nr_pdcp_ue_manager_t *_m, ue_id_t rntiMaybeUEid)
|
||||||
{
|
{
|
||||||
/* TODO: optimze */
|
/* TODO: optimze */
|
||||||
nr_pdcp_ue_manager_internal_t *m = _m;
|
nr_pdcp_ue_manager_internal_t *m = _m;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < m->ue_count; i++)
|
for (i = 0; i < m->ue_count; i++)
|
||||||
if (m->ue_list[i]->ue_id == ue_id)
|
if (m->ue_list[i]->rntiMaybeUEid == rntiMaybeUEid)
|
||||||
return m->ue_list[i];
|
return m->ue_list[i];
|
||||||
|
|
||||||
LOG_D(PDCP, "%s:%d:%s: new UE 0x%"PRIx64"\n", __FILE__, __LINE__, __FUNCTION__, ue_id);
|
LOG_D(PDCP, "%s:%d:%s: new UE ID/RNTI 0x%" PRIx64 "\n", __FILE__, __LINE__, __FUNCTION__, rntiMaybeUEid);
|
||||||
|
|
||||||
m->ue_count++;
|
m->ue_count++;
|
||||||
m->ue_list = realloc(m->ue_list, sizeof(nr_pdcp_ue_t *) * m->ue_count);
|
m->ue_list = realloc(m->ue_list, sizeof(nr_pdcp_ue_t *) * m->ue_count);
|
||||||
@@ -100,13 +100,13 @@ nr_pdcp_ue_t *nr_pdcp_manager_get_ue(nr_pdcp_ue_manager_t *_m, ue_id_t ue_id)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
m->ue_list[m->ue_count-1]->ue_id = ue_id;
|
m->ue_list[m->ue_count - 1]->rntiMaybeUEid = rntiMaybeUEid;
|
||||||
|
|
||||||
return m->ue_list[m->ue_count-1];
|
return m->ue_list[m->ue_count-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* must be called with lock acquired */
|
/* must be called with lock acquired */
|
||||||
void nr_pdcp_manager_remove_ue(nr_pdcp_ue_manager_t *_m, ue_id_t ue_id)
|
void nr_pdcp_manager_remove_ue(nr_pdcp_ue_manager_t *_m, ue_id_t rntiMaybeUEid)
|
||||||
{
|
{
|
||||||
nr_pdcp_ue_manager_internal_t *m = _m;
|
nr_pdcp_ue_manager_internal_t *m = _m;
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
@@ -114,13 +114,11 @@ void nr_pdcp_manager_remove_ue(nr_pdcp_ue_manager_t *_m, ue_id_t ue_id)
|
|||||||
int j;
|
int j;
|
||||||
|
|
||||||
for (i = 0; i < m->ue_count; i++)
|
for (i = 0; i < m->ue_count; i++)
|
||||||
if (m->ue_list[i]->ue_id == ue_id)
|
if (m->ue_list[i]->rntiMaybeUEid == rntiMaybeUEid)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (i == m->ue_count) {
|
if (i == m->ue_count) {
|
||||||
LOG_D(PDCP, "%s:%d:%s: warning: ue 0x%"PRIx64" not found\n",
|
LOG_D(PDCP, "%s:%d:%s: warning: UE ID/RNTI 0x%" PRIx64 " not found\n", __FILE__, __LINE__, __FUNCTION__, rntiMaybeUEid);
|
||||||
__FILE__, __LINE__, __FUNCTION__,
|
|
||||||
ue_id);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,11 +202,11 @@ int nr_pdcp_manager_get_ue_count(nr_pdcp_ue_manager_t *_m)
|
|||||||
return m->ue_count;
|
return m->ue_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager_t *_m, ue_id_t *ret)
|
bool nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager_t *_m, ue_id_t *ret)
|
||||||
{
|
{
|
||||||
nr_pdcp_ue_manager_internal_t *m = _m;
|
nr_pdcp_ue_manager_internal_t *m = _m;
|
||||||
if (m->ue_count == 0)
|
if (m->ue_count == 0)
|
||||||
return 0;
|
return false;
|
||||||
*ret = m->ue_list[0]->ue_id;
|
*ret = m->ue_list[0]->rntiMaybeUEid;
|
||||||
return 1;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
typedef void nr_pdcp_ue_manager_t;
|
typedef void nr_pdcp_ue_manager_t;
|
||||||
|
|
||||||
typedef struct nr_pdcp_ue_t {
|
typedef struct nr_pdcp_ue_t {
|
||||||
ue_id_t ue_id;
|
ue_id_t rntiMaybeUEid;
|
||||||
nr_pdcp_entity_t *srb[3];
|
nr_pdcp_entity_t *srb[3];
|
||||||
nr_pdcp_entity_t *drb[MAX_DRBS_PER_UE];
|
nr_pdcp_entity_t *drb[MAX_DRBS_PER_UE];
|
||||||
} nr_pdcp_ue_t;
|
} nr_pdcp_ue_t;
|
||||||
@@ -45,8 +45,8 @@ int nr_pdcp_manager_get_enb_flag(nr_pdcp_ue_manager_t *m);
|
|||||||
void nr_pdcp_manager_lock(nr_pdcp_ue_manager_t *m);
|
void nr_pdcp_manager_lock(nr_pdcp_ue_manager_t *m);
|
||||||
void nr_pdcp_manager_unlock(nr_pdcp_ue_manager_t *m);
|
void nr_pdcp_manager_unlock(nr_pdcp_ue_manager_t *m);
|
||||||
|
|
||||||
nr_pdcp_ue_t *nr_pdcp_manager_get_ue(nr_pdcp_ue_manager_t *m, ue_id_t ue_id);
|
nr_pdcp_ue_t *nr_pdcp_manager_get_ue(nr_pdcp_ue_manager_t *m, ue_id_t rntiMaybeUEid);
|
||||||
void nr_pdcp_manager_remove_ue(nr_pdcp_ue_manager_t *m, ue_id_t ue_id);
|
void nr_pdcp_manager_remove_ue(nr_pdcp_ue_manager_t *m, ue_id_t rntiMaybeUEid);
|
||||||
|
|
||||||
nr_pdcp_ue_t **nr_pdcp_manager_get_ue_list(nr_pdcp_ue_manager_t *_m);
|
nr_pdcp_ue_t **nr_pdcp_manager_get_ue_list(nr_pdcp_ue_manager_t *_m);
|
||||||
int nr_pdcp_manager_get_ue_count(nr_pdcp_ue_manager_t *_m);
|
int nr_pdcp_manager_get_ue_count(nr_pdcp_ue_manager_t *_m);
|
||||||
@@ -65,6 +65,6 @@ void nr_pdcp_ue_add_drb_pdcp_entity(nr_pdcp_ue_t *ue, int drb_id,
|
|||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
||||||
/* returns 0 if no UE, 1 otherwise */
|
/* returns 0 if no UE, 1 otherwise */
|
||||||
int nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager_t *m, ue_id_t *ret);
|
bool nr_pdcp_get_first_ue_id(nr_pdcp_ue_manager_t *m, ue_id_t *ret);
|
||||||
|
|
||||||
#endif /* _NR_PDCP_UE_MANAGER_H_ */
|
#endif /* _NR_PDCP_UE_MANAGER_H_ */
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
|||||||
const uint32_t *const destinationL2Id
|
const uint32_t *const destinationL2Id
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int rnti = ctxt_pP->rnti;
|
int rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
nr_rlc_ue_t *ue;
|
nr_rlc_ue_t *ue;
|
||||||
nr_rlc_entity_t *rb;
|
nr_rlc_entity_t *rb;
|
||||||
|
|
||||||
@@ -370,8 +370,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
|||||||
MBMS_flagP);
|
MBMS_flagP);
|
||||||
|
|
||||||
if (ctxt_pP->enb_flag)
|
if (ctxt_pP->enb_flag)
|
||||||
T(T_ENB_RLC_DL, T_INT(ctxt_pP->module_id),
|
T(T_ENB_RLC_DL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rntiMaybeUEid), T_INT(rb_idP), T_INT(sdu_sizeP));
|
||||||
T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP));
|
|
||||||
|
|
||||||
nr_rlc_manager_lock(nr_rlc_ue_manager);
|
nr_rlc_manager_lock(nr_rlc_ue_manager);
|
||||||
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
|
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rnti);
|
||||||
@@ -506,7 +505,7 @@ rb_found:
|
|||||||
|
|
||||||
/* used fields? */
|
/* used fields? */
|
||||||
ctx.module_id = 0;
|
ctx.module_id = 0;
|
||||||
ctx.rnti = ue->rnti;
|
ctx.rntiMaybeUEid = ue->rnti;
|
||||||
|
|
||||||
is_enb = nr_rlc_manager_get_enb_flag(nr_rlc_ue_manager);
|
is_enb = nr_rlc_manager_get_enb_flag(nr_rlc_ue_manager);
|
||||||
ctx.enb_flag = is_enb;
|
ctx.enb_flag = is_enb;
|
||||||
@@ -961,7 +960,7 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
|
|||||||
const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
|
const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
|
||||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
|
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
|
||||||
{
|
{
|
||||||
int rnti = ctxt_pP->rnti;
|
int rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
@@ -1109,8 +1108,8 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
nr_rlc_manager_lock(nr_rlc_ue_manager);
|
nr_rlc_manager_lock(nr_rlc_ue_manager);
|
||||||
LOG_D(RLC, "%s:%d:%s: remove rb %ld (is_srb %d) for UE RNTI %x\n", __FILE__, __LINE__, __FUNCTION__, rb_idP, srb_flagP, ctxt_pP->rnti);
|
LOG_D(RLC, "%s:%d:%s: remove rb %ld (is_srb %d) for UE RNTI %lx\n", __FILE__, __LINE__, __FUNCTION__, rb_idP, srb_flagP, ctxt_pP->rntiMaybeUEid);
|
||||||
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, ctxt_pP->rnti);
|
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, ctxt_pP->rntiMaybeUEid);
|
||||||
if (srb_flagP) {
|
if (srb_flagP) {
|
||||||
if (ue->srb[rb_idP-1] != NULL) {
|
if (ue->srb[rb_idP-1] != NULL) {
|
||||||
ue->srb[rb_idP-1]->delete(ue->srb[rb_idP-1]);
|
ue->srb[rb_idP-1]->delete(ue->srb[rb_idP-1]);
|
||||||
@@ -1133,7 +1132,7 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
if (ue->drb[i] != NULL)
|
if (ue->drb[i] != NULL)
|
||||||
break;
|
break;
|
||||||
if (i == MAX_DRBS_PER_UE)
|
if (i == MAX_DRBS_PER_UE)
|
||||||
nr_rlc_manager_remove_ue(nr_rlc_ue_manager, ctxt_pP->rnti);
|
nr_rlc_manager_remove_ue(nr_rlc_ue_manager, ctxt_pP->rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
nr_rlc_manager_unlock(nr_rlc_ue_manager);
|
nr_rlc_manager_unlock(nr_rlc_ue_manager);
|
||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
@@ -1154,7 +1153,7 @@ void nr_rlc_remove_ue(int rnti)
|
|||||||
|
|
||||||
rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x)
|
rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x)
|
||||||
{
|
{
|
||||||
nr_rlc_remove_ue(x->rnti);
|
nr_rlc_remove_ue(x->rntiMaybeUEid);
|
||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
|||||||
const uint32_t *const destinationL2Id
|
const uint32_t *const destinationL2Id
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int rnti = ctxt_pP->rnti;
|
int rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
rlc_ue_t *ue;
|
rlc_ue_t *ue;
|
||||||
rlc_entity_t *rb;
|
rlc_entity_t *rb;
|
||||||
|
|
||||||
@@ -290,8 +290,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
|||||||
MBMS_flagP);
|
MBMS_flagP);
|
||||||
|
|
||||||
if (ctxt_pP->enb_flag)
|
if (ctxt_pP->enb_flag)
|
||||||
T(T_ENB_RLC_DL, T_INT(ctxt_pP->module_id),
|
T(T_ENB_RLC_DL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rntiMaybeUEid), T_INT(rb_idP), T_INT(sdu_sizeP));
|
||||||
T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP));
|
|
||||||
|
|
||||||
rlc_manager_lock(rlc_ue_manager);
|
rlc_manager_lock(rlc_ue_manager);
|
||||||
ue = rlc_manager_get_ue(rlc_ue_manager, rnti);
|
ue = rlc_manager_get_ue(rlc_ue_manager, rnti);
|
||||||
@@ -404,7 +403,7 @@ rb_found:
|
|||||||
|
|
||||||
/* used fields? */
|
/* used fields? */
|
||||||
ctx.module_id = ue->module_id;
|
ctx.module_id = ue->module_id;
|
||||||
ctx.rnti = ue->rnti;
|
ctx.rntiMaybeUEid = ue->rnti;
|
||||||
|
|
||||||
is_enb = rlc_manager_get_enb_flag(rlc_ue_manager);
|
is_enb = rlc_manager_get_enb_flag(rlc_ue_manager);
|
||||||
ctx.enb_flag = is_enb;
|
ctx.enb_flag = is_enb;
|
||||||
@@ -834,7 +833,7 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP
|
|||||||
const uint32_t destinationL2Id
|
const uint32_t destinationL2Id
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int rnti = ctxt_pP->rnti;
|
int rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
int module_id = ctxt_pP->module_id;
|
int module_id = ctxt_pP->module_id;
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
@@ -979,8 +978,8 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
rlc_manager_lock(rlc_ue_manager);
|
rlc_manager_lock(rlc_ue_manager);
|
||||||
LOG_D(RLC, "%s:%d:%s: remove rb %d (is_srb %d) for UE %d\n", __FILE__, __LINE__, __FUNCTION__, (int)rb_idP, srb_flagP, ctxt_pP->rnti);
|
LOG_D(RLC, "%s:%d:%s: remove rb %d (is_srb %d) for UE %ld\n", __FILE__, __LINE__, __FUNCTION__, (int)rb_idP, srb_flagP, ctxt_pP->rntiMaybeUEid);
|
||||||
ue = rlc_manager_get_ue(rlc_ue_manager, ctxt_pP->rnti);
|
ue = rlc_manager_get_ue(rlc_ue_manager, ctxt_pP->rntiMaybeUEid);
|
||||||
if (srb_flagP) {
|
if (srb_flagP) {
|
||||||
if (ue->srb[rb_idP-1] != NULL) {
|
if (ue->srb[rb_idP-1] != NULL) {
|
||||||
ue->srb[rb_idP-1]->delete(ue->srb[rb_idP-1]);
|
ue->srb[rb_idP-1]->delete(ue->srb[rb_idP-1]);
|
||||||
@@ -1003,7 +1002,7 @@ rlc_op_status_t rrc_rlc_config_req (
|
|||||||
if (ue->drb[i] != NULL)
|
if (ue->drb[i] != NULL)
|
||||||
break;
|
break;
|
||||||
if (i == 5)
|
if (i == 5)
|
||||||
rlc_manager_remove_ue(rlc_ue_manager, ctxt_pP->rnti);
|
rlc_manager_remove_ue(rlc_ue_manager, ctxt_pP->rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
rlc_manager_unlock(rlc_ue_manager);
|
rlc_manager_unlock(rlc_ue_manager);
|
||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
@@ -1016,9 +1015,9 @@ void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t r
|
|||||||
|
|
||||||
rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x)
|
rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x)
|
||||||
{
|
{
|
||||||
LOG_D(RLC, "%s:%d:%s: remove UE %d\n", __FILE__, __LINE__, __FUNCTION__, x->rnti);
|
LOG_D(RLC, "%s:%d:%s: remove UE %ld\n", __FILE__, __LINE__, __FUNCTION__, x->rntiMaybeUEid);
|
||||||
rlc_manager_lock(rlc_ue_manager);
|
rlc_manager_lock(rlc_ue_manager);
|
||||||
rlc_manager_remove_ue(rlc_ue_manager, x->rnti);
|
rlc_manager_remove_ue(rlc_ue_manager, x->rntiMaybeUEid);
|
||||||
rlc_manager_unlock(rlc_ue_manager);
|
rlc_manager_unlock(rlc_ue_manager);
|
||||||
|
|
||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
# include "s1ap_eNB.h"
|
# include "s1ap_eNB.h"
|
||||||
# include "sctp_eNB_task.h"
|
#include "sctp_eNB_task.h"
|
||||||
|
|
||||||
# include "x2ap_eNB.h"
|
# include "x2ap_eNB.h"
|
||||||
# include "x2ap_messages_types.h"
|
# include "x2ap_messages_types.h"
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ rrc_data_req(
|
|||||||
//memcpy (RRC_DCCH_DATA_REQ (message_p).sdu_p, buffer_pP, sdu_sizeP);
|
//memcpy (RRC_DCCH_DATA_REQ (message_p).sdu_p, buffer_pP, sdu_sizeP);
|
||||||
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
||||||
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
||||||
RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti;
|
RRC_DCCH_DATA_REQ(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
itti_send_msg_to_task (
|
itti_send_msg_to_task (
|
||||||
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
|
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
|
||||||
@@ -113,13 +113,7 @@ rrc_data_ind(
|
|||||||
LOG_I(RRC, "[UE %x] Frame %d: received a DCCH %ld message on SRB %ld with Size %d from eNB %d\n",
|
LOG_I(RRC, "[UE %x] Frame %d: received a DCCH %ld message on SRB %ld with Size %d from eNB %d\n",
|
||||||
ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id,sdu_sizeP, ctxt_pP->eNB_index);
|
ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id,sdu_sizeP, ctxt_pP->eNB_index);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RRC, "[eNB %d] Frame %d: received a DCCH %ld message on SRB %ld with Size %d from UE %x\n",
|
LOG_D(RRC, "[eNB %d] Frame %d: received a DCCH %ld message on SRB %ld with Size %d from UE %lx\n", ctxt_pP->module_id, ctxt_pP->frame, DCCH_index, Srb_id, sdu_sizeP, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->frame,
|
|
||||||
DCCH_index,
|
|
||||||
Srb_id,
|
|
||||||
sdu_sizeP,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -133,7 +127,7 @@ rrc_data_ind(
|
|||||||
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
|
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
|
||||||
RRC_DCCH_DATA_IND (message_p).sdu_size = sdu_sizeP;
|
RRC_DCCH_DATA_IND (message_p).sdu_size = sdu_sizeP;
|
||||||
RRC_DCCH_DATA_IND (message_p).sdu_p = message_buffer;
|
RRC_DCCH_DATA_IND (message_p).sdu_p = message_buffer;
|
||||||
RRC_DCCH_DATA_IND (message_p).rnti = ctxt_pP->rnti;
|
RRC_DCCH_DATA_IND(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RRC_DCCH_DATA_IND (message_p).module_id = ctxt_pP->module_id;
|
RRC_DCCH_DATA_IND (message_p).module_id = ctxt_pP->module_id;
|
||||||
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
itti_send_msg_to_task (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, ctxt_pP->instance, message_p);
|
itti_send_msg_to_task (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, ctxt_pP->instance, message_p);
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ rrc_data_req_ue(
|
|||||||
RRC_DCCH_DATA_REQ (message_p).sdu_p = message_buffer;
|
RRC_DCCH_DATA_REQ (message_p).sdu_p = message_buffer;
|
||||||
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
||||||
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
||||||
RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti;
|
RRC_DCCH_DATA_REQ(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
itti_send_msg_to_task (
|
itti_send_msg_to_task (
|
||||||
TASK_PDCP_UE,
|
TASK_PDCP_UE,
|
||||||
@@ -326,7 +326,7 @@ rrc_data_ind_ue(
|
|||||||
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
|
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
|
||||||
RRC_DCCH_DATA_IND (message_p).sdu_size = sdu_sizeP;
|
RRC_DCCH_DATA_IND (message_p).sdu_size = sdu_sizeP;
|
||||||
RRC_DCCH_DATA_IND (message_p).sdu_p = message_buffer;
|
RRC_DCCH_DATA_IND (message_p).sdu_p = message_buffer;
|
||||||
RRC_DCCH_DATA_IND (message_p).rnti = ctxt_pP->rnti;
|
RRC_DCCH_DATA_IND(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RRC_DCCH_DATA_IND (message_p).module_id = ctxt_pP->module_id;
|
RRC_DCCH_DATA_IND (message_p).module_id = ctxt_pP->module_id;
|
||||||
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
itti_send_msg_to_task (TASK_RRC_UE, ctxt_pP->instance, message_p);
|
itti_send_msg_to_task (TASK_RRC_UE, ctxt_pP->instance, message_p);
|
||||||
|
|||||||
@@ -3211,16 +3211,10 @@ uint8_t do_SecurityModeCommand(
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC, "[eNB %d] securityModeCommand for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
enc_rval.encoded,
|
|
||||||
(enc_rval.encoded+7)/8);
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(RRC,"[eNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n",
|
LOG_E(RRC, "[eNB %d] ASN1 : securityModeCommand encoding failed for UE %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3334,16 +3328,10 @@ uint8_t do_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC, "[eNB %d] UECapabilityRequest for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
enc_rval.encoded,
|
|
||||||
(enc_rval.encoded+7)/8);
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(RRC,"[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %x\n",
|
LOG_E(RRC, "[eNB %d] ASN1 : UECapabilityRequest encoding failed for UE %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3455,16 +3443,10 @@ uint8_t do_NR_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(RRC,"[eNB %d] NR UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC, "[eNB %d] NR UECapabilityRequest for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
enc_rval.encoded,
|
|
||||||
(enc_rval.encoded+7)/8);
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(RRC,"[eNB %d] ASN1 : NR UECapabilityRequest encoding failed for UE %x\n",
|
LOG_E(RRC, "[eNB %d] ASN1 : NR UECapabilityRequest encoding failed for UE %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -758,16 +758,10 @@ uint8_t do_SecurityModeCommand_NB_IoT(
|
|||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(RRC,"[NB-IoT %d] securityModeCommand-NB for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC, "[NB-IoT %d] securityModeCommand-NB for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
enc_rval.encoded,
|
|
||||||
(enc_rval.encoded+7)/8);
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(RRC,"[NB-IoT %d] ASN1 : securityModeCommand-NB encoding failed for UE %x\n",
|
LOG_E(RRC, "[NB-IoT %d] ASN1 : securityModeCommand-NB encoding failed for UE %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -811,17 +805,10 @@ uint8_t do_UECapabilityEnquiry_NB_IoT(
|
|||||||
enc_rval.failed_type->name, enc_rval.encoded);
|
enc_rval.failed_type->name, enc_rval.encoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(RRC,"[NB-IoT %d] UECapabilityEnquiry-NB for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(RRC, "[NB-IoT %d] UECapabilityEnquiry-NB for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
enc_rval.encoded,
|
|
||||||
(enc_rval.encoded+7)/8);
|
|
||||||
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(RRC,"[NB-IoT %d] ASN1 : UECapabilityEnquiry-NB encoding failed for UE %x\n",
|
LOG_E(RRC, "[NB-IoT %d] ASN1 : UECapabilityEnquiry-NB encoding failed for UE %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete(
|
|||||||
LOG_D(RLC,
|
LOG_D(RLC,
|
||||||
"[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionSetupComplete to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n",
|
"[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionSetupComplete to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n",
|
||||||
ctxt_pP->frame, ctxt_pP->module_id+NB_eNB_INST, size, eNB_index, rrc_mui, ctxt_pP->module_id+NB_eNB_INST, DCCH);
|
ctxt_pP->frame, ctxt_pP->module_id+NB_eNB_INST, size, eNB_index, rrc_mui, ctxt_pP->module_id+NB_eNB_INST, DCCH);
|
||||||
ctxt_pP_local.rnti = ctxt_pP->rnti;
|
ctxt_pP_local.rntiMaybeUEid = ctxt_pP->rntiMaybeUEid;
|
||||||
rrc_data_req_ue (
|
rrc_data_req_ue (
|
||||||
ctxt_pP,
|
ctxt_pP,
|
||||||
DCCH,
|
DCCH,
|
||||||
@@ -648,11 +648,7 @@ int rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const SRB_INFO *co
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
|
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
|
||||||
LOG_A(RRC,
|
LOG_A(RRC, "[UE%d][RAPROC] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup RNTI %lx\n", ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->rntiMaybeUEid);
|
||||||
"[UE%d][RAPROC] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup RNTI %x\n",
|
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->frame,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
// Get configuration
|
// Get configuration
|
||||||
// Release T300 timer
|
// Release T300 timer
|
||||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].T300_active = 0;
|
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].T300_active = 0;
|
||||||
@@ -662,7 +658,7 @@ int rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const SRB_INFO *co
|
|||||||
&dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup.criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated);
|
&dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup.criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated);
|
||||||
rrc_set_state (ctxt_pP->module_id, RRC_STATE_CONNECTED);
|
rrc_set_state (ctxt_pP->module_id, RRC_STATE_CONNECTED);
|
||||||
rrc_set_sub_state (ctxt_pP->module_id, RRC_SUB_STATE_CONNECTED);
|
rrc_set_sub_state (ctxt_pP->module_id, RRC_SUB_STATE_CONNECTED);
|
||||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].rnti = ctxt_pP->rnti;
|
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
rrc_ue_generate_RRCConnectionSetupComplete(
|
rrc_ue_generate_RRCConnectionSetupComplete(
|
||||||
ctxt_pP,
|
ctxt_pP,
|
||||||
eNB_index,
|
eNB_index,
|
||||||
@@ -1546,8 +1542,7 @@ rrc_ue_process_securityModeCommand(
|
|||||||
pdcp_t *pdcp_p = NULL;
|
pdcp_t *pdcp_p = NULL;
|
||||||
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
|
||||||
hashtable_rc_t h_rc;
|
hashtable_rc_t h_rc;
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti,
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES);
|
||||||
ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES);
|
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **) &pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **) &pdcp_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
@@ -2047,7 +2042,7 @@ rrc_ue_process_rrcConnectionReconfiguration(
|
|||||||
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, 0, RRC_RAL_CONNECTION_REESTABLISHMENT_IND);
|
message_ral_p = itti_alloc_new_message (TASK_RRC_UE, 0, RRC_RAL_CONNECTION_REESTABLISHMENT_IND);
|
||||||
memset(&connection_reestablishment_ind, 0, sizeof(rrc_ral_connection_reestablishment_ind_t));
|
memset(&connection_reestablishment_ind, 0, sizeof(rrc_ral_connection_reestablishment_ind_t));
|
||||||
// TO DO ral_si_ind.plmn_id = 0;
|
// TO DO ral_si_ind.plmn_id = 0;
|
||||||
connection_reestablishment_ind.ue_id = ctxt_pP->rnti;
|
connection_reestablishment_ind.ue_id = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
if (rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList != NULL) {
|
if (rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.radioResourceConfigDedicated->drb_ToAddModList != NULL) {
|
||||||
connection_reestablishment_ind.num_drb =
|
connection_reestablishment_ind.num_drb =
|
||||||
|
|||||||
+104
-159
@@ -703,9 +703,7 @@ rrc_eNB_get_next_free_ue_context(
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||||
ue_context_p = rrc_eNB_get_ue_context(
|
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
RC.rrc[ctxt_pP->module_id],
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
if (ue_context_p == NULL) {
|
if (ue_context_p == NULL) {
|
||||||
ue_context_p = rrc_eNB_allocate_new_UE_context(RC.rrc[ctxt_pP->module_id]);
|
ue_context_p = rrc_eNB_allocate_new_UE_context(RC.rrc[ctxt_pP->module_id]);
|
||||||
@@ -717,8 +715,8 @@ rrc_eNB_get_next_free_ue_context(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ue_context_p->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else
|
ue_context_p->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else
|
||||||
ue_context_p->ue_context.rnti = ctxt_pP->rnti; // yes duplicate, 1 may be removed
|
ue_context_p->ue_context.rnti = ctxt_pP->rntiMaybeUEid; // yes duplicate, 1 may be removed
|
||||||
ue_context_p->ue_context.random_ue_identity = ue_identityP;
|
ue_context_p->ue_context.random_ue_identity = ue_identityP;
|
||||||
RB_INSERT(rrc_ue_tree_s, &RC.rrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
RB_INSERT(rrc_ue_tree_s, &RC.rrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
||||||
LOG_D(RRC,
|
LOG_D(RRC,
|
||||||
@@ -1104,11 +1102,7 @@ rrc_eNB_process_RRCConnectionSetupComplete(
|
|||||||
ue_context_pP->ue_context.Srb1.Active = 1;
|
ue_context_pP->ue_context.Srb1.Active = 1;
|
||||||
ue_context_pP->ue_context.StatusRrc = RRC_CONNECTED;
|
ue_context_pP->ue_context.StatusRrc = RRC_CONNECTED;
|
||||||
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED
|
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity timer when UE goes into RRC_CONNECTED
|
||||||
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE,
|
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->module_id),
|
|
||||||
T_INT(ctxt_pP->frame),
|
|
||||||
T_INT(ctxt_pP->subframe),
|
|
||||||
T_INT(ctxt_pP->rnti));
|
|
||||||
|
|
||||||
if (EPC_MODE_ENABLED == 1) {
|
if (EPC_MODE_ENABLED == 1) {
|
||||||
// Forward message to S1AP layer
|
// Forward message to S1AP layer
|
||||||
@@ -1129,8 +1123,7 @@ rrc_eNB_generate_SecurityModeCommand(
|
|||||||
{
|
{
|
||||||
uint8_t buffer[100]={0};
|
uint8_t buffer[100]={0};
|
||||||
uint8_t size;
|
uint8_t size;
|
||||||
T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
size = do_SecurityModeCommand(
|
size = do_SecurityModeCommand(
|
||||||
ctxt_pP,
|
ctxt_pP,
|
||||||
buffer,
|
buffer,
|
||||||
@@ -1172,8 +1165,7 @@ rrc_eNB_generate_UECapabilityEnquiry(
|
|||||||
{
|
{
|
||||||
uint8_t buffer[100];
|
uint8_t buffer[100];
|
||||||
uint8_t size;
|
uint8_t size;
|
||||||
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
int16_t eutra_band = RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0];
|
int16_t eutra_band = RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0];
|
||||||
uint32_t nr_band = RC.rrc[ctxt_pP->module_id]->nr_gnb_freq_band[0][0];
|
uint32_t nr_band = RC.rrc[ctxt_pP->module_id]->nr_gnb_freq_band[0][0];
|
||||||
size = do_UECapabilityEnquiry(
|
size = do_UECapabilityEnquiry(
|
||||||
@@ -1213,8 +1205,7 @@ rrc_eNB_generate_NR_UECapabilityEnquiry(
|
|||||||
{
|
{
|
||||||
uint8_t buffer[100];
|
uint8_t buffer[100];
|
||||||
uint8_t size;
|
uint8_t size;
|
||||||
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
int16_t eutra_band = RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0];
|
int16_t eutra_band = RC.rrc[ctxt_pP->module_id]->configuration.eutra_band[0];
|
||||||
uint32_t nr_band = RC.rrc[ctxt_pP->module_id]->nr_gnb_freq_band[0][0];
|
uint32_t nr_band = RC.rrc[ctxt_pP->module_id]->nr_gnb_freq_band[0][0];
|
||||||
size = do_NR_UECapabilityEnquiry(
|
size = do_NR_UECapabilityEnquiry(
|
||||||
@@ -1253,8 +1244,7 @@ rrc_eNB_generate_RRCConnectionReject(
|
|||||||
)
|
)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
T(T_ENB_RRC_CONNECTION_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
||||||
ue_p->Srb0.Tx_buffer.payload_size =
|
ue_p->Srb0.Tx_buffer.payload_size =
|
||||||
do_RRCConnectionReject(ctxt_pP->module_id,
|
do_RRCConnectionReject(ctxt_pP->module_id,
|
||||||
@@ -1287,7 +1277,7 @@ rrc_eNB_generate_RRCConnectionReestablishment(
|
|||||||
rrc_eNB_carrier_data_t *carrier = NULL;
|
rrc_eNB_carrier_data_t *carrier = NULL;
|
||||||
eNB_RRC_UE_t *ue_context = NULL;
|
eNB_RRC_UE_t *ue_context = NULL;
|
||||||
module_id_t module_id = ctxt_pP->module_id;
|
module_id_t module_id = ctxt_pP->module_id;
|
||||||
uint16_t rnti = ctxt_pP->rnti;
|
uint16_t rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT,
|
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT,
|
||||||
T_INT(module_id),
|
T_INT(module_id),
|
||||||
T_INT(ctxt_pP->frame),
|
T_INT(ctxt_pP->frame),
|
||||||
@@ -1374,8 +1364,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
LOG_I(RRC,
|
LOG_I(RRC,
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, processing LTE_RRCConnectionReestablishmentComplete from UE (SRB1 Active)\n",
|
PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, processing LTE_RRCConnectionReestablishmentComplete from UE (SRB1 Active)\n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
LTE_DRB_ToAddModList_t *DRB_configList = ue_context_pP->ue_context.DRB_configList;
|
LTE_DRB_ToAddModList_t *DRB_configList = ue_context_pP->ue_context.DRB_configList;
|
||||||
LTE_SRB_ToAddModList_t *SRB_configList = ue_context_pP->ue_context.SRB_configList;
|
LTE_SRB_ToAddModList_t *SRB_configList = ue_context_pP->ue_context.SRB_configList;
|
||||||
LTE_SRB_ToAddModList_t **SRB_configList2 = NULL;
|
LTE_SRB_ToAddModList_t **SRB_configList2 = NULL;
|
||||||
@@ -1481,7 +1470,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void **)&rrc_ue_s1ap_ids_p);
|
h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void **)&rrc_ue_s1ap_ids_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1489,7 +1478,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_s1ap_ids_p);
|
h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_s1ap_ids_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1508,7 +1497,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
create_tunnel_req.rnti = ctxt_pP->rnti; // warning put zero above
|
create_tunnel_req.rnti = ctxt_pP->rntiMaybeUEid; // warning put zero above
|
||||||
create_tunnel_req.num_tunnels = j;
|
create_tunnel_req.num_tunnels = j;
|
||||||
ret = gtpv1u_update_s1u_tunnel(
|
ret = gtpv1u_update_s1u_tunnel(
|
||||||
ctxt_pP->instance,
|
ctxt_pP->instance,
|
||||||
@@ -1542,14 +1531,14 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
ue_context_pP->ue_context.ul_failure_timer = 20000; // set ul_failure to 20000 for triggering rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ
|
ue_context_pP->ue_context.ul_failure_timer = 20000; // set ul_failure to 20000 for triggering rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ
|
||||||
rrc_eNB_free_UE(ctxt_pP->module_id,ue_context_pP);
|
rrc_eNB_free_UE(ctxt_pP->module_id,ue_context_pP);
|
||||||
ue_context_pP->ue_context.ul_failure_timer = 0;
|
ue_context_pP->ue_context.ul_failure_timer = 0;
|
||||||
put_UE_in_freelist(ctxt_pP->module_id, ctxt_pP->rnti, 0);
|
put_UE_in_freelist(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} /* EPC_MODE_ENABLED */
|
} /* EPC_MODE_ENABLED */
|
||||||
|
|
||||||
/* Update RNTI in ue_context */
|
/* Update RNTI in ue_context */
|
||||||
ue_context_pP->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else
|
ue_context_pP->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else
|
||||||
ue_context_pP->ue_context.rnti = ctxt_pP->rnti;
|
ue_context_pP->ue_context.rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
if (EPC_MODE_ENABLED) {
|
if (EPC_MODE_ENABLED) {
|
||||||
uint8_t send_security_mode_command = false;
|
uint8_t send_security_mode_command = false;
|
||||||
@@ -1945,20 +1934,17 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||||
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
if(UE_id != -1) {
|
if(UE_id != -1) {
|
||||||
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
|
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
|
||||||
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20;
|
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20;
|
||||||
} else {
|
} else {
|
||||||
LOG_E(RRC,
|
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT " Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %lx\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid);
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT" Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %x\n",
|
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
||||||
ue_p->Srb0.Tx_buffer.payload_size =
|
ue_p->Srb0.Tx_buffer.payload_size =
|
||||||
do_RRCConnectionReestablishmentReject(ctxt_pP->module_id,
|
do_RRCConnectionReestablishmentReject(ctxt_pP->module_id,
|
||||||
@@ -1988,7 +1974,7 @@ void rrc_generate_SgNBReleaseRequest(
|
|||||||
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).target_physCellId = ;
|
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).target_physCellId = ;
|
||||||
LOG_I(RRC,
|
LOG_I(RRC,
|
||||||
"[eNB %d] frame %d UE rnti %x transmitting sgnb release request to sgnb \n",
|
"[eNB %d] frame %d UE rnti %x transmitting sgnb release request to sgnb \n",
|
||||||
ctxt_pP->module_id,ctxt_pP->frame,ctxt_pP->rnti);
|
ctxt_pP->module_id,ctxt_pP->frame,ctxt_pP->rntiMaybeUEid);
|
||||||
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
|
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2008,8 +1994,7 @@ rrc_eNB_generate_RRCConnectionRelease(
|
|||||||
uint8_t buffer[RRC_BUF_SIZE]={0};
|
uint8_t buffer[RRC_BUF_SIZE]={0};
|
||||||
uint16_t size = 0;
|
uint16_t size = 0;
|
||||||
int release_num;
|
int release_num;
|
||||||
T(T_ENB_RRC_CONNECTION_RELEASE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_RELEASE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
if(ue_context_pP != NULL) {
|
if(ue_context_pP != NULL) {
|
||||||
@@ -2044,14 +2029,10 @@ rrc_eNB_generate_RRCConnectionRelease(
|
|||||||
rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
|
rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt_pP->rnti;
|
rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = rrc_eNB_mui;
|
rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = rrc_eNB_mui;
|
||||||
rrc_release_info.num_UEs++;
|
rrc_release_info.num_UEs++;
|
||||||
LOG_D(RRC, "Generate DLSCH Release send: index %d rnti %x mui %d flag %d \n",
|
LOG_D(RRC, "Generate DLSCH Release send: index %d rnti %lx mui %d flag %d \n", release_num, ctxt_pP->rntiMaybeUEid, rrc_eNB_mui, rrc_release_info.RRC_release_ctrl[release_num].flag);
|
||||||
release_num,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
rrc_eNB_mui,
|
|
||||||
rrc_release_info.RRC_release_ctrl[release_num].flag);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2066,7 +2047,7 @@ rrc_eNB_generate_RRCConnectionRelease(
|
|||||||
|
|
||||||
if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = buffer;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = buffer;
|
||||||
@@ -2730,11 +2711,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
|
|||||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||||
uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
|
uint8_t cc_id = ue_context_pP->ue_context.primaryCC_id;
|
||||||
LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
|
LTE_UE_EUTRA_Capability_t *UEcap = ue_context_pP->ue_context.UE_Capability;
|
||||||
T(T_ENB_RRC_CONNECTION_RECONFIGURATION,
|
T(T_ENB_RRC_CONNECTION_RECONFIGURATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->module_id),
|
|
||||||
T_INT(ctxt_pP->frame),
|
|
||||||
T_INT(ctxt_pP->subframe),
|
|
||||||
T_INT(ctxt_pP->rnti));
|
|
||||||
/* Configure SRB2 */
|
/* Configure SRB2 */
|
||||||
SRB_configList2 = &(ue_context_pP->ue_context.SRB_configList2[xid]);
|
SRB_configList2 = &(ue_context_pP->ue_context.SRB_configList2[xid]);
|
||||||
|
|
||||||
@@ -3589,8 +3566,7 @@ rrc_eNB_process_MeasurementReport(
|
|||||||
uint8_t KeNB_star[32] = { 0 };
|
uint8_t KeNB_star[32] = { 0 };
|
||||||
char enc_buf[ASN_MAX_ENCODE_SIZE] = {0};
|
char enc_buf[ASN_MAX_ENCODE_SIZE] = {0};
|
||||||
int enc_size = 0;
|
int enc_size = 0;
|
||||||
T(T_ENB_RRC_MEASUREMENT_REPORT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_MEASUREMENT_REPORT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
|
|
||||||
if (measResults2 == NULL )
|
if (measResults2 == NULL )
|
||||||
return;
|
return;
|
||||||
@@ -3639,10 +3615,20 @@ rrc_eNB_process_MeasurementReport(
|
|||||||
|
|
||||||
ue_context_pP->ue_context.measResults->measResultPCell.rsrpResult=measResults2->measResultPCell.rsrpResult;
|
ue_context_pP->ue_context.measResults->measResultPCell.rsrpResult=measResults2->measResultPCell.rsrpResult;
|
||||||
ue_context_pP->ue_context.measResults->measResultPCell.rsrqResult=measResults2->measResultPCell.rsrqResult;
|
ue_context_pP->ue_context.measResults->measResultPCell.rsrqResult=measResults2->measResultPCell.rsrqResult;
|
||||||
LOG_D(RRC, "[eNB %d]Frame %d: UE %x (Measurement Id %d): RSRP of Source %ld\n", ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->rnti, (int)measResults2->measId,
|
LOG_D(RRC,
|
||||||
ue_context_pP->ue_context.measResults->measResultPCell.rsrpResult-140);
|
"[eNB %d]Frame %d: UE %lx (Measurement Id %d): RSRP of Source %ld\n",
|
||||||
LOG_D(RRC, "[eNB %d]Frame %d: UE %x (Measurement Id %d): RSRQ of Source %ld\n", ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->rnti, (int)measResults2->measId,
|
ctxt_pP->module_id,
|
||||||
ue_context_pP->ue_context.measResults->measResultPCell.rsrqResult/2 - 20);
|
ctxt_pP->frame,
|
||||||
|
ctxt_pP->rntiMaybeUEid,
|
||||||
|
(int)measResults2->measId,
|
||||||
|
ue_context_pP->ue_context.measResults->measResultPCell.rsrpResult - 140);
|
||||||
|
LOG_D(RRC,
|
||||||
|
"[eNB %d]Frame %d: UE %lx (Measurement Id %d): RSRQ of Source %ld\n",
|
||||||
|
ctxt_pP->module_id,
|
||||||
|
ctxt_pP->frame,
|
||||||
|
ctxt_pP->rntiMaybeUEid,
|
||||||
|
(int)measResults2->measId,
|
||||||
|
ue_context_pP->ue_context.measResults->measResultPCell.rsrqResult / 2 - 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: improve NR triggering */
|
/* TODO: improve NR triggering */
|
||||||
@@ -3664,7 +3650,7 @@ rrc_eNB_process_MeasurementReport(
|
|||||||
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_ADDITION_REQ);
|
msg = itti_alloc_new_message(TASK_RRC_ENB, 0, X2AP_ENDC_SGNB_ADDITION_REQ);
|
||||||
memset(&(X2AP_ENDC_SGNB_ADDITION_REQ(msg)), 0, sizeof(x2ap_ENDC_sgnb_addition_req_t));
|
memset(&(X2AP_ENDC_SGNB_ADDITION_REQ(msg)), 0, sizeof(x2ap_ENDC_sgnb_addition_req_t));
|
||||||
|
|
||||||
X2AP_ENDC_SGNB_ADDITION_REQ(msg).rnti = ctxt_pP->rnti;
|
X2AP_ENDC_SGNB_ADDITION_REQ(msg).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
X2AP_ENDC_SGNB_ADDITION_REQ(msg).security_capabilities.encryption_algorithms = ue_context_pP->ue_context.nr_security.ciphering_algorithms;
|
X2AP_ENDC_SGNB_ADDITION_REQ(msg).security_capabilities.encryption_algorithms = ue_context_pP->ue_context.nr_security.ciphering_algorithms;
|
||||||
X2AP_ENDC_SGNB_ADDITION_REQ(msg).security_capabilities.integrity_algorithms = ue_context_pP->ue_context.nr_security.integrity_algorithms;
|
X2AP_ENDC_SGNB_ADDITION_REQ(msg).security_capabilities.integrity_algorithms = ue_context_pP->ue_context.nr_security.integrity_algorithms;
|
||||||
@@ -3692,9 +3678,7 @@ rrc_eNB_process_MeasurementReport(
|
|||||||
sizeof(transport_layer_addr_t));
|
sizeof(transport_layer_addr_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_A(RRC,
|
LOG_A(RRC, "[eNB %d] frame %d subframe %d: UE rnti %lx switching to NSA mode\n", ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->subframe, ctxt_pP->rntiMaybeUEid);
|
||||||
"[eNB %d] frame %d subframe %d: UE rnti %x switching to NSA mode\n",
|
|
||||||
ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->subframe, ctxt_pP->rnti);
|
|
||||||
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
|
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3808,7 +3792,7 @@ rrc_eNB_process_MeasurementReport(
|
|||||||
ue_context_pP,
|
ue_context_pP,
|
||||||
X2AP_HANDOVER_REQ(msg).rrc_buffer,
|
X2AP_HANDOVER_REQ(msg).rrc_buffer,
|
||||||
&X2AP_HANDOVER_REQ(msg).rrc_buffer_size);
|
&X2AP_HANDOVER_REQ(msg).rrc_buffer_size);
|
||||||
X2AP_HANDOVER_REQ(msg).rnti = ctxt_pP->rnti;
|
X2AP_HANDOVER_REQ(msg).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
X2AP_HANDOVER_REQ(msg).target_physCellId = measResults2->measResultNeighCells->choice.
|
X2AP_HANDOVER_REQ(msg).target_physCellId = measResults2->measResultNeighCells->choice.
|
||||||
measResultListEUTRA.list.array[ncell_index]->physCellId;
|
measResultListEUTRA.list.array[ncell_index]->physCellId;
|
||||||
X2AP_HANDOVER_REQ(msg).ue_gummei.mcc = ue_context_pP->ue_context.ue_gummei.mcc;
|
X2AP_HANDOVER_REQ(msg).ue_gummei.mcc = ue_context_pP->ue_context.ue_gummei.mcc;
|
||||||
@@ -3845,8 +3829,7 @@ rrc_eNB_process_MeasurementReport(
|
|||||||
ctxt_pP->module_id, ctxt_pP->frame);
|
ctxt_pP->module_id, ctxt_pP->frame);
|
||||||
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
|
itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(ctxt_pP->module_id), msg);
|
||||||
} else {
|
} else {
|
||||||
LOG_D(RRC, "[eNB %d] Frame %d: Ignoring MeasReport from UE %x as Handover is in progress... \n", ctxt_pP->module_id, ctxt_pP->frame,
|
LOG_D(RRC, "[eNB %d] Frame %d: Ignoring MeasReport from UE %lx as Handover is in progress... \n", ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->rnti);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4093,16 +4076,12 @@ check_handovers(
|
|||||||
{
|
{
|
||||||
struct rrc_eNB_ue_context_s *ue_context_p;
|
struct rrc_eNB_ue_context_s *ue_context_p;
|
||||||
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) {
|
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) {
|
||||||
ctxt_pP->rnti = ue_context_p->ue_id_rnti;
|
ctxt_pP->rntiMaybeUEid = ue_context_p->ue_id_rnti;
|
||||||
|
|
||||||
if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info != NULL) {
|
if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION && ue_context_p->ue_context.handover_info != NULL) {
|
||||||
/* in the source, UE in HO_PREPARE mode */
|
/* in the source, UE in HO_PREPARE mode */
|
||||||
if (ue_context_p->ue_context.handover_info->state == HO_PREPARE) {
|
if (ue_context_p->ue_context.handover_info->state == HO_PREPARE) {
|
||||||
LOG_D(RRC,
|
LOG_D(RRC, "[eNB %d] Frame %d: Incoming handover detected for new UE_id %lx) \n", ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->rntiMaybeUEid);
|
||||||
"[eNB %d] Frame %d: Incoming handover detected for new UE_id %x) \n",
|
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->frame,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
// source eNB generates rrcconnectionreconfiguration to prepare the HO
|
// source eNB generates rrcconnectionreconfiguration to prepare the HO
|
||||||
LOG_I(RRC,
|
LOG_I(RRC,
|
||||||
"[eNB %d] Frame %d : Logical Channel UL-DCCH, processing RRCHandoverPreparationInformation, sending RRCConnectionReconfiguration to UE %d \n",
|
"[eNB %d] Frame %d : Logical Channel UL-DCCH, processing RRCHandoverPreparationInformation, sending RRCConnectionReconfiguration to UE %d \n",
|
||||||
@@ -4351,8 +4330,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
|||||||
LTE_C_RNTI_t *cba_RNTI = NULL;
|
LTE_C_RNTI_t *cba_RNTI = NULL;
|
||||||
int measurements_enabled;
|
int measurements_enabled;
|
||||||
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
uint8_t xid = rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id); //Transaction_id,
|
||||||
T(T_ENB_RRC_CONNECTION_RECONFIGURATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_RECONFIGURATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
rv[0] = (ue_context_pP->ue_context.rnti >> 8) & 255;
|
rv[0] = (ue_context_pP->ue_context.rnti >> 8) & 255;
|
||||||
rv[1] = ue_context_pP->ue_context.rnti & 255;
|
rv[1] = ue_context_pP->ue_context.rnti & 255;
|
||||||
LOG_I(RRC, "target UE rnti = %x (decimal: %d)\n", ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti);
|
LOG_I(RRC, "target UE rnti = %x (decimal: %d)\n", ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti);
|
||||||
@@ -5357,7 +5335,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a new user (called during the HO procedure)
|
// Add a new user (called during the HO procedure)
|
||||||
LOG_I(RRC, "rrc_eNB_target_add_ue_handover module_id %d rnti %d\n", ctxt_pP->module_id, ctxt_pP->rnti);
|
LOG_I(RRC, "rrc_eNB_target_add_ue_handover module_id %d rnti %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
// Configure MAC for the target
|
// Configure MAC for the target
|
||||||
rrc_mac_config_req_eNB_t tmp = {0};
|
rrc_mac_config_req_eNB_t tmp = {0};
|
||||||
tmp.CC_id = ue_context_p->ue_context.primaryCC_id;
|
tmp.CC_id = ue_context_p->ue_context.primaryCC_id;
|
||||||
@@ -5416,11 +5394,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* End of CDRX processing */
|
/* End of CDRX processing */
|
||||||
T(T_ENB_RRC_CONNECTION_RECONFIGURATION_COMPLETE,
|
T(T_ENB_RRC_CONNECTION_RECONFIGURATION_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->module_id),
|
|
||||||
T_INT(ctxt_pP->frame),
|
|
||||||
T_INT(ctxt_pP->subframe),
|
|
||||||
T_INT(ctxt_pP->rnti));
|
|
||||||
|
|
||||||
/* Derive the keys from kenb */
|
/* Derive the keys from kenb */
|
||||||
if (DRB_configList != NULL) {
|
if (DRB_configList != NULL) {
|
||||||
@@ -5489,10 +5463,11 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
|||||||
for (int i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8)
|
for (int i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8)
|
||||||
if (DRB_configList->list.array[i]) {
|
if (DRB_configList->list.array[i]) {
|
||||||
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
||||||
LOG_I(RRC, "[eNB %d] Frame %d : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete from UE rnti %x, reconfiguring DRB %d/LCID %d\n",
|
LOG_I(RRC,
|
||||||
|
"[eNB %d] Frame %d : Logical Channel UL-DCCH, Received LTE_RRCConnectionReconfigurationComplete from UE rnti %lx, reconfiguring DRB %d/LCID %d\n",
|
||||||
ctxt_pP->module_id,
|
ctxt_pP->module_id,
|
||||||
ctxt_pP->frame,
|
ctxt_pP->frame,
|
||||||
ctxt_pP->rnti,
|
ctxt_pP->rntiMaybeUEid,
|
||||||
(int)DRB_configList->list.array[i]->drb_Identity,
|
(int)DRB_configList->list.array[i]->drb_Identity,
|
||||||
(int)*DRB_configList->list.array[i]->logicalChannelIdentity);
|
(int)*DRB_configList->list.array[i]->logicalChannelIdentity);
|
||||||
/* For pre-ci tests */
|
/* For pre-ci tests */
|
||||||
@@ -5620,11 +5595,7 @@ rrc_eNB_generate_RRCConnectionSetup(
|
|||||||
LTE_SRB_ToAddModList_t **SRB_configList;
|
LTE_SRB_ToAddModList_t **SRB_configList;
|
||||||
LTE_SRB_ToAddMod_t *SRB1_config;
|
LTE_SRB_ToAddMod_t *SRB1_config;
|
||||||
MessageDef *message_p;
|
MessageDef *message_p;
|
||||||
T(T_ENB_RRC_CONNECTION_SETUP,
|
T(T_ENB_RRC_CONNECTION_SETUP, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->module_id),
|
|
||||||
T_INT(ctxt_pP->frame),
|
|
||||||
T_INT(ctxt_pP->subframe),
|
|
||||||
T_INT(ctxt_pP->rnti));
|
|
||||||
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
|
||||||
SRB_configList = &ue_p->SRB_configList;
|
SRB_configList = &ue_p->SRB_configList;
|
||||||
|
|
||||||
@@ -5869,7 +5840,7 @@ char openair_rrc_eNB_configuration(
|
|||||||
static
|
static
|
||||||
void rrc_eNB_generate_RRCConnectionReestablishmentReject_unknown_UE(protocol_ctxt_t *const ctxt_pP,
|
void rrc_eNB_generate_RRCConnectionReestablishmentReject_unknown_UE(protocol_ctxt_t *const ctxt_pP,
|
||||||
const int CC_id) {
|
const int CC_id) {
|
||||||
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, ctxt_pP->rnti);
|
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, ctxt_pP->rntiMaybeUEid);
|
||||||
rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP,
|
rrc_eNB_generate_RRCConnectionReestablishmentReject(ctxt_pP,
|
||||||
ue_context_p,
|
ue_context_p,
|
||||||
CC_id);
|
CC_id);
|
||||||
@@ -5895,8 +5866,7 @@ rrc_eNB_decode_ccch(
|
|||||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||||
uint64_t random_value = 0;
|
uint64_t random_value = 0;
|
||||||
int stmsi_received = 0;
|
int stmsi_received = 0;
|
||||||
T(T_ENB_RRC_UL_CCCH_DATA_IN, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UL_CCCH_DATA_IN, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
//memset(ul_ccch_msg,0,sizeof(UL_CCCH_Message_t));
|
//memset(ul_ccch_msg,0,sizeof(UL_CCCH_Message_t));
|
||||||
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Decoding UL CCCH %x.%x.%x.%x.%x.%x (%p)\n",
|
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Decoding UL CCCH %x.%x.%x.%x.%x.%x (%p)\n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||||
@@ -5935,8 +5905,7 @@ rrc_eNB_decode_ccch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentRequest:
|
case LTE_UL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentRequest:
|
||||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(buffer), buffer_length,
|
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(buffer), buffer_length,
|
||||||
"[MSG] RRC Connection Reestablishment Request\n");
|
"[MSG] RRC Connection Reestablishment Request\n");
|
||||||
LOG_D(RRC,
|
LOG_D(RRC,
|
||||||
@@ -6099,7 +6068,7 @@ rrc_eNB_decode_ccch(
|
|||||||
// insert C-RNTI to map
|
// insert C-RNTI to map
|
||||||
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||||
if (reestablish_rnti_map[i][0] == 0) {
|
if (reestablish_rnti_map[i][0] == 0) {
|
||||||
reestablish_rnti_map[i][0] = ctxt_pP->rnti;
|
reestablish_rnti_map[i][0] = ctxt_pP->rntiMaybeUEid;
|
||||||
reestablish_rnti_map[i][1] = c_rnti;
|
reestablish_rnti_map[i][1] = c_rnti;
|
||||||
LOG_D(RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
LOG_D(RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
||||||
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
||||||
@@ -6162,17 +6131,14 @@ rrc_eNB_decode_ccch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_CCCH_MessageType__c1_PR_rrcConnectionRequest:
|
case LTE_UL_CCCH_MessageType__c1_PR_rrcConnectionRequest:
|
||||||
T(T_ENB_RRC_CONNECTION_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,
|
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,
|
||||||
buffer_length,
|
buffer_length,
|
||||||
"[MSG] RRC Connection Request\n");
|
"[MSG] RRC Connection Request\n");
|
||||||
LOG_D(RRC,
|
LOG_D(RRC,
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT"MAC_eNB --- MAC_DATA_IND (rrcConnectionRequest on SRB0) --> RRC_eNB\n",
|
PROTOCOL_RRC_CTXT_UE_FMT"MAC_eNB --- MAC_DATA_IND (rrcConnectionRequest on SRB0) --> RRC_eNB\n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||||
ue_context_p = rrc_eNB_get_ue_context(
|
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
RC.rrc[ctxt_pP->module_id],
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
if (ue_context_p != NULL) {
|
if (ue_context_p != NULL) {
|
||||||
// erase content
|
// erase content
|
||||||
@@ -6195,8 +6161,11 @@ rrc_eNB_decode_ccch(
|
|||||||
* the current one must be removed from MAC/PHY (zombie UE)
|
* the current one must be removed from MAC/PHY (zombie UE)
|
||||||
*/
|
*/
|
||||||
if ((ue_context_p = rrc_eNB_ue_context_random_exist(ctxt_pP, random_value))) {
|
if ((ue_context_p = rrc_eNB_ue_context_random_exist(ctxt_pP, random_value))) {
|
||||||
LOG_W(RRC, "new UE rnti %x (coming with random value) is already there as UE %x, removing %x from MAC/PHY\n",
|
LOG_W(RRC,
|
||||||
ctxt_pP->rnti, ue_context_p->ue_context.rnti, ue_context_p->ue_context.rnti);
|
"new UE rnti %lx (coming with random value) is already there as UE %x, removing %x from MAC/PHY\n",
|
||||||
|
ctxt_pP->rntiMaybeUEid,
|
||||||
|
ue_context_p->ue_context.rnti,
|
||||||
|
ue_context_p->ue_context.rnti);
|
||||||
ue_context_p->ue_context.ul_failure_timer = 20000;
|
ue_context_p->ue_context.ul_failure_timer = 20000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6215,14 +6184,14 @@ rrc_eNB_decode_ccch(
|
|||||||
random_value = (((uint64_t)mme_code) << 32) | m_tmsi;
|
random_value = (((uint64_t)mme_code) << 32) | m_tmsi;
|
||||||
|
|
||||||
if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) {
|
if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) {
|
||||||
LOG_I(RRC," S-TMSI exists, ue_context_p %p, old rnti %x => %x\n",ue_context_p,ue_context_p->ue_context.rnti,ctxt_pP->rnti);
|
LOG_I(RRC, " S-TMSI exists, ue_context_p %p, old rnti %x => %lx\n", ue_context_p, ue_context_p->ue_context.rnti, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||||
LOG_I(PHY, "remove RNTI %04x\n", ue_context_p->ue_context.rnti);
|
LOG_I(PHY, "remove RNTI %04x\n", ue_context_p->ue_context.rnti);
|
||||||
rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti);
|
rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti);
|
||||||
} else {
|
} else {
|
||||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = NULL;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = NULL;
|
||||||
@@ -6235,8 +6204,8 @@ rrc_eNB_decode_ccch(
|
|||||||
/* for that, remove the context from the RB tree */
|
/* for that, remove the context from the RB tree */
|
||||||
RB_REMOVE(rrc_ue_tree_s, &RC.rrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
RB_REMOVE(rrc_ue_tree_s, &RC.rrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
||||||
/* and insert again, after changing rnti everywhere it has to be changed */
|
/* and insert again, after changing rnti everywhere it has to be changed */
|
||||||
ue_context_p->ue_id_rnti = ctxt_pP->rnti;
|
ue_context_p->ue_id_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
ue_context_p->ue_context.rnti = ctxt_pP->rnti;
|
ue_context_p->ue_context.rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RB_INSERT(rrc_ue_tree_s, &RC.rrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
RB_INSERT(rrc_ue_tree_s, &RC.rrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
||||||
/* reset timers */
|
/* reset timers */
|
||||||
ue_context_p->ue_context.ul_failure_timer = 0;
|
ue_context_p->ue_context.ul_failure_timer = 0;
|
||||||
@@ -6267,9 +6236,7 @@ rrc_eNB_decode_ccch(
|
|||||||
LOG_E(RRC,
|
LOG_E(RRC,
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionRequest without random UE identity or S-TMSI not supported, let's reject the UE\n",
|
PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionRequest without random UE identity or S-TMSI not supported, let's reject the UE\n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||||
rrc_eNB_generate_RRCConnectionReject(ctxt_pP,
|
rrc_eNB_generate_RRCConnectionReject(ctxt_pP, rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid), CC_id);
|
||||||
rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], ctxt_pP->rnti),
|
|
||||||
CC_id);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6305,10 +6272,10 @@ rrc_eNB_decode_ccch(
|
|||||||
random_value);
|
random_value);
|
||||||
|
|
||||||
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type))
|
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type))
|
||||||
rrc_mac_remove_ue(ctxt_pP->module_id,ctxt_pP->rnti);
|
rrc_mac_remove_ue(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
else if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
else if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
|
||||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = NULL;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = NULL;
|
||||||
@@ -6638,8 +6605,7 @@ rrc_eNB_decode_dcch(
|
|||||||
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
|
||||||
uint8_t xid;
|
uint8_t xid;
|
||||||
int dedicated_DRB=0;
|
int dedicated_DRB=0;
|
||||||
T(T_ENB_RRC_UL_DCCH_DATA_IN, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UL_DCCH_DATA_IN, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
|
|
||||||
if ((Srb_id != 1) && (Srb_id != 2)) {
|
if ((Srb_id != 1) && (Srb_id != 2)) {
|
||||||
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Received message on SRB%ld, should not have ...\n",
|
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Received message on SRB%ld, should not have ...\n",
|
||||||
@@ -6676,9 +6642,7 @@ rrc_eNB_decode_dcch(
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ue_context_p = rrc_eNB_get_ue_context(
|
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
RC.rrc[ctxt_pP->module_id],
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
if (ul_dcch_msg->message.present == LTE_UL_DCCH_MessageType_PR_c1) {
|
if (ul_dcch_msg->message.present == LTE_UL_DCCH_MessageType_PR_c1) {
|
||||||
switch (ul_dcch_msg->message.choice.c1.present) {
|
switch (ul_dcch_msg->message.choice.c1.present) {
|
||||||
@@ -6692,7 +6656,7 @@ rrc_eNB_decode_dcch(
|
|||||||
|
|
||||||
// to avoid segmentation fault
|
// to avoid segmentation fault
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(RRC, "Processing measurementReport UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(RRC, "Processing measurementReport UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6713,7 +6677,7 @@ rrc_eNB_decode_dcch(
|
|||||||
|
|
||||||
// to avoid segmentation fault
|
// to avoid segmentation fault
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(RRC, "Processing LTE_RRCConnectionReconfigurationComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(RRC, "Processing LTE_RRCConnectionReconfigurationComplete UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6739,12 +6703,10 @@ rrc_eNB_decode_dcch(
|
|||||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
|
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||||
//clear
|
//clear
|
||||||
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
if(UE_id == -1) {
|
if(UE_id == -1) {
|
||||||
LOG_E(RRC,
|
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT " RRCConnectionReconfigurationComplete without rnti %lx, fault\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid);
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReconfigurationComplete without rnti %x, fault\n",
|
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6759,12 +6721,10 @@ rrc_eNB_decode_dcch(
|
|||||||
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
|
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
|
||||||
}
|
}
|
||||||
} else if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION) {
|
} else if (ue_context_p->ue_context.StatusRrc == RRC_HO_EXECUTION) {
|
||||||
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
if(UE_id == -1) {
|
if(UE_id == -1) {
|
||||||
LOG_E(RRC,
|
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT " RRCConnectionReconfigurationComplete without rnti %lx, fault\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid);
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReconfigurationComplete without rnti %x, fault\n",
|
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6917,8 +6877,7 @@ rrc_eNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete:
|
case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete:
|
||||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||||
"[MSG] RRC Connection Reestablishment Complete\n");
|
"[MSG] RRC Connection Reestablishment Complete\n");
|
||||||
LOG_I(RRC,
|
LOG_I(RRC,
|
||||||
@@ -6932,7 +6891,7 @@ rrc_eNB_decode_dcch(
|
|||||||
|
|
||||||
// select C-RNTI from map
|
// select C-RNTI from map
|
||||||
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||||
if (reestablish_rnti_map[i][0] == ctxt_pP->rnti) {
|
if (reestablish_rnti_map[i][0] == ctxt_pP->rntiMaybeUEid) {
|
||||||
reestablish_rnti = reestablish_rnti_map[i][1];
|
reestablish_rnti = reestablish_rnti_map[i][1];
|
||||||
ue_context_p = rrc_eNB_get_ue_context(
|
ue_context_p = rrc_eNB_get_ue_context(
|
||||||
RC.rrc[ctxt_pP->module_id],
|
RC.rrc[ctxt_pP->module_id],
|
||||||
@@ -6954,12 +6913,10 @@ rrc_eNB_decode_dcch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
//clear
|
//clear
|
||||||
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
if(UE_id == -1) {
|
if(UE_id == -1) {
|
||||||
LOG_E(RRC,
|
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT " LTE_RRCConnectionReestablishmentComplete without UE_id(MAC) rnti %lx, fault\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid);
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT" LTE_RRCConnectionReestablishmentComplete without UE_id(MAC) rnti %x, fault\n",
|
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6984,7 +6941,7 @@ rrc_eNB_decode_dcch(
|
|||||||
|
|
||||||
// to avoid segmentation fault
|
// to avoid segmentation fault
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(RRC, "Processing LTE_RRCConnectionSetupComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(RRC, "Processing LTE_RRCConnectionSetupComplete UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7017,12 +6974,11 @@ rrc_eNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_securityModeComplete:
|
case LTE_UL_DCCH_MessageType__c1_PR_securityModeComplete:
|
||||||
T(T_ENB_RRC_SECURITY_MODE_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_SECURITY_MODE_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
|
|
||||||
// to avoid segmentation fault
|
// to avoid segmentation fault
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(RRC, "Processing securityModeComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(RRC, "Processing securityModeComplete UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7052,8 +7008,7 @@ rrc_eNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_securityModeFailure:
|
case LTE_UL_DCCH_MessageType__c1_PR_securityModeFailure:
|
||||||
T(T_ENB_RRC_SECURITY_MODE_FAILURE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_SECURITY_MODE_FAILURE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||||
"[MSG] RRC Security Mode Failure\n");
|
"[MSG] RRC Security Mode Failure\n");
|
||||||
LOG_W(RRC,
|
LOG_W(RRC,
|
||||||
@@ -7074,12 +7029,11 @@ rrc_eNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
|
case LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
|
||||||
T(T_ENB_RRC_UE_CAPABILITY_INFORMATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UE_CAPABILITY_INFORMATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
|
|
||||||
// to avoid segmentation fault
|
// to avoid segmentation fault
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(RRC, "Processing ueCapabilityInformation UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(RRC, "Processing ueCapabilityInformation UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7100,13 +7054,13 @@ rrc_eNB_decode_dcch(
|
|||||||
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)ul_dcch_msg);
|
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_A(RRC, "got UE capabilities for UE %x\n", ctxt_pP->rnti);
|
LOG_A(RRC, "got UE capabilities for UE %lx\n", ctxt_pP->rntiMaybeUEid);
|
||||||
int eutra_index = -1;
|
int eutra_index = -1;
|
||||||
|
|
||||||
for (i = 0; i < ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.count; i++) {
|
for (i = 0; i < ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.count; i++) {
|
||||||
if (ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.array[i]->rat_Type ==
|
if (ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.array[i]->rat_Type ==
|
||||||
LTE_RAT_Type_nr) {
|
LTE_RAT_Type_nr) {
|
||||||
LOG_A(RRC, "got nrUE capabilities for UE %x\n", ctxt_pP->rnti);
|
LOG_A(RRC, "got nrUE capabilities for UE %lx\n", ctxt_pP->rntiMaybeUEid);
|
||||||
if(ue_context_p->ue_context.UE_Capability_nr) {
|
if(ue_context_p->ue_context.UE_Capability_nr) {
|
||||||
ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr);
|
ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr);
|
||||||
ue_context_p->ue_context.UE_Capability_nr = 0;
|
ue_context_p->ue_context.UE_Capability_nr = 0;
|
||||||
@@ -7181,7 +7135,7 @@ rrc_eNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (ue_context_p->ue_context.UE_Capability) {
|
if (ue_context_p->ue_context.UE_Capability) {
|
||||||
LOG_I(RRC, "freeing old UE capabilities for UE %x\n", ctxt_pP->rnti);
|
LOG_I(RRC, "freeing old UE capabilities for UE %lx\n", ctxt_pP->rntiMaybeUEid);
|
||||||
ASN_STRUCT_FREE(asn_DEF_LTE_UE_EUTRA_Capability,
|
ASN_STRUCT_FREE(asn_DEF_LTE_UE_EUTRA_Capability,
|
||||||
ue_context_p->ue_context.UE_Capability);
|
ue_context_p->ue_context.UE_Capability);
|
||||||
ue_context_p->ue_context.UE_Capability = 0;
|
ue_context_p->ue_context.UE_Capability = 0;
|
||||||
@@ -7245,17 +7199,15 @@ rrc_eNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_ulHandoverPreparationTransfer:
|
case LTE_UL_DCCH_MessageType__c1_PR_ulHandoverPreparationTransfer:
|
||||||
T(T_ENB_RRC_UL_HANDOVER_PREPARATION_TRANSFER, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UL_HANDOVER_PREPARATION_TRANSFER, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
|
case LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
|
||||||
T(T_ENB_RRC_UL_INFORMATION_TRANSFER, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UL_INFORMATION_TRANSFER, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
|
|
||||||
// to avoid segmentation fault
|
// to avoid segmentation fault
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(RRC, "Processing ulInformationTransfer UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(RRC, "Processing ulInformationTransfer UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7272,39 +7224,32 @@ rrc_eNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_counterCheckResponse:
|
case LTE_UL_DCCH_MessageType__c1_PR_counterCheckResponse:
|
||||||
T(T_ENB_RRC_COUNTER_CHECK_RESPONSE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_COUNTER_CHECK_RESPONSE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9:
|
case LTE_UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9:
|
||||||
T(T_ENB_RRC_UE_INFORMATION_RESPONSE_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UE_INFORMATION_RESPONSE_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_proximityIndication_r9:
|
case LTE_UL_DCCH_MessageType__c1_PR_proximityIndication_r9:
|
||||||
T(T_ENB_RRC_PROXIMITY_INDICATION_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_PROXIMITY_INDICATION_R9, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10:
|
case LTE_UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10:
|
||||||
T(T_ENB_RRC_RECONFIGURATION_COMPLETE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_RECONFIGURATION_COMPLETE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10:
|
case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10:
|
||||||
T(T_ENB_RRC_MBMS_COUNTING_RESPONSE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_MBMS_COUNTING_RESPONSE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
LOG_E(RRC, "THINH [LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10]\n");
|
LOG_E(RRC, "THINH [LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10]\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10:
|
case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10:
|
||||||
T(T_ENB_RRC_INTER_FREQ_RSTD_MEASUREMENT_INDICATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_INTER_FREQ_RSTD_MEASUREMENT_INDICATION, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
T(T_ENB_RRC_UNKNOW_MESSAGE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UNKNOW_MESSAGE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Unknown message %s:%u\n",
|
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Unknown message %s:%u\n",
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||||
__FILE__, __LINE__);
|
__FILE__, __LINE__);
|
||||||
@@ -7703,7 +7648,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
|||||||
fd=fopen("RRC_stats.log","w+");
|
fd=fopen("RRC_stats.log","w+");
|
||||||
|
|
||||||
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) {
|
RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(RC.rrc[ctxt_pP->module_id]->rrc_ue_head)) {
|
||||||
ctxt_pP->rnti = ue_context_p->ue_id_rnti;
|
ctxt_pP->rntiMaybeUEid = ue_context_p->ue_id_rnti;
|
||||||
|
|
||||||
if ((ctxt_pP->frame&127) == 0 && ctxt_pP->subframe ==0) {
|
if ((ctxt_pP->frame&127) == 0 && ctxt_pP->subframe ==0) {
|
||||||
if (fd) {
|
if (fd) {
|
||||||
@@ -8775,7 +8720,7 @@ LTE_SL_CommConfig_r12_t rrc_eNB_get_sidelink_commTXPool( const protocol_ctxt_t *
|
|||||||
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.size = 2;
|
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.size = 2;
|
||||||
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.buf = CALLOC(1,2);
|
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.buf = CALLOC(1,2);
|
||||||
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.buf[0] = 0x00;
|
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.buf[0] = 0x00;
|
||||||
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.buf[1] = 0x01;//ctxt_pP->rnti;//rnti
|
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.buf[1] = 0x01; // ctxt_pP->rntiMaybeUEid;//rnti
|
||||||
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.bits_unused = 0;
|
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.sl_RNTI_r12.bits_unused = 0;
|
||||||
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.mcs_r12 = CALLOC(1,sizeof(*sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.mcs_r12));
|
sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.mcs_r12 = CALLOC(1,sizeof(*sl_CommConfig->commTxResources_r12->choice.setup.choice.scheduled_r12.mcs_r12));
|
||||||
//*sl_CommConfig_test->commTxResources_r12->choice.setup.choice.scheduled_r12.mcs_r12 = 12; //Msc
|
//*sl_CommConfig_test->commTxResources_r12->choice.setup.choice.scheduled_r12.mcs_r12 = 12; //Msc
|
||||||
|
|||||||
@@ -58,9 +58,7 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
|||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||||
create_tunnel_resp_pP->num_tunnels);
|
create_tunnel_resp_pP->num_tunnels);
|
||||||
rnti = create_tunnel_resp_pP->rnti;
|
rnti = create_tunnel_resp_pP->rnti;
|
||||||
ue_context_p = rrc_eNB_get_ue_context(
|
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
RC.rrc[ctxt_pP->module_id],
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
|
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
|
||||||
ue_context_p->ue_context.enb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i];
|
ue_context_p->ue_context.enb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i];
|
||||||
@@ -99,7 +97,7 @@ bool gtpv_data_req(const protocol_ctxt_t* const ctxt_pP,
|
|||||||
LOG_I(GTPU,"gtpv_data_req sdu_sizeP == 0");
|
LOG_I(GTPU,"gtpv_data_req sdu_sizeP == 0");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LOG_D(GTPU,"gtpv_data_req ue rnti %x sdu_sizeP %d rb id %ld", ctxt_pP->rnti, sdu_sizeP, rb_idP);
|
LOG_D(GTPU, "gtpv_data_req ue rnti %lx sdu_sizeP %d rb id %ld", ctxt_pP->rntiMaybeUEid, sdu_sizeP, rb_idP);
|
||||||
MessageDef *message_p;
|
MessageDef *message_p;
|
||||||
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
|
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
|
||||||
uint8_t *message_buffer;
|
uint8_t *message_buffer;
|
||||||
@@ -122,7 +120,7 @@ bool gtpv_data_req(const protocol_ctxt_t* const ctxt_pP,
|
|||||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).sdu_p = message_buffer;
|
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).sdu_p = message_buffer;
|
||||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).mode = modeP;
|
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).mode = modeP;
|
||||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).module_id = ctxt_pP->module_id;
|
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).module_id = ctxt_pP->module_id;
|
||||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).rnti = ctxt_pP->rnti;
|
GTPV1U_ENB_DATA_FORWARDING_IND(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
GTPV1U_ENB_DATA_FORWARDING_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
|
|
||||||
itti_send_msg_to_task (TASK_DATA_FORWARDING, ctxt_pP->instance, message_p);
|
itti_send_msg_to_task (TASK_DATA_FORWARDING, ctxt_pP->instance, message_p);
|
||||||
@@ -145,7 +143,7 @@ bool gtpv_data_req(const protocol_ctxt_t* const ctxt_pP,
|
|||||||
GTPV1U_ENB_END_MARKER_IND (message_p).sdu_p = message_buffer;
|
GTPV1U_ENB_END_MARKER_IND (message_p).sdu_p = message_buffer;
|
||||||
GTPV1U_ENB_END_MARKER_IND (message_p).mode = modeP;
|
GTPV1U_ENB_END_MARKER_IND (message_p).mode = modeP;
|
||||||
GTPV1U_ENB_END_MARKER_IND (message_p).module_id = ctxt_pP->module_id;
|
GTPV1U_ENB_END_MARKER_IND (message_p).module_id = ctxt_pP->module_id;
|
||||||
GTPV1U_ENB_END_MARKER_IND (message_p).rnti = ctxt_pP->rnti;
|
GTPV1U_ENB_END_MARKER_IND(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
GTPV1U_ENB_END_MARKER_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
GTPV1U_ENB_END_MARKER_IND (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
|
|
||||||
itti_send_msg_to_task (TASK_END_MARKER, ctxt_pP->instance, message_p);
|
itti_send_msg_to_task (TASK_END_MARKER, ctxt_pP->instance, message_p);
|
||||||
@@ -172,7 +170,7 @@ bool gtpv_data_req_new(protocol_ctxt_t *ctxt,
|
|||||||
else
|
else
|
||||||
task=TASK_DATA_FORWARDING;
|
task=TASK_DATA_FORWARDING;
|
||||||
|
|
||||||
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt->module_id], ctxt->rnti);
|
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt->module_id], ctxt->rntiMaybeUEid);
|
||||||
if(ue_context_p == NULL || ue_context_p->ue_context.handover_info == NULL ||
|
if(ue_context_p == NULL || ue_context_p->ue_context.handover_info == NULL ||
|
||||||
ue_context_p->ue_context.StatusRrc != RRC_HO_EXECUTION) {
|
ue_context_p->ue_context.StatusRrc != RRC_HO_EXECUTION) {
|
||||||
LOG_E(RRC,"incoming GTP-U for X2 in non HO context\n");
|
LOG_E(RRC,"incoming GTP-U for X2 in non HO context\n");
|
||||||
@@ -191,7 +189,7 @@ bool gtpv_data_req_new(protocol_ctxt_t *ctxt,
|
|||||||
GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP);
|
GTPV1U_ENB_END_MARKER_REQ(msg).buffer = itti_malloc(TASK_GTPV1_U, TASK_GTPV1_U, GTPU_HEADER_OVERHEAD_MAX + sdu_buffer_sizeP);
|
||||||
memcpy(>PV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], sdu_buffer_pP, sdu_buffer_sizeP);
|
memcpy(>PV1U_ENB_END_MARKER_REQ(msg).buffer[GTPU_HEADER_OVERHEAD_MAX], sdu_buffer_pP, sdu_buffer_sizeP);
|
||||||
GTPV1U_ENB_END_MARKER_REQ(msg).length = sdu_buffer_sizeP;
|
GTPV1U_ENB_END_MARKER_REQ(msg).length = sdu_buffer_sizeP;
|
||||||
GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt->rnti;
|
GTPV1U_ENB_END_MARKER_REQ(msg).rnti = ctxt->rntiMaybeUEid;
|
||||||
GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = rb_idP;
|
GTPV1U_ENB_END_MARKER_REQ(msg).rab_id = rb_idP;
|
||||||
GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
|
GTPV1U_ENB_END_MARKER_REQ(msg).offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||||
LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt->frame,ctxt->subframe);
|
LOG_I(GTPU, "Send End Marker to GTPV1-U at frame %d and subframe %d \n", ctxt->frame,ctxt->subframe);
|
||||||
@@ -210,7 +208,7 @@ bool gtpv_data_req_new(protocol_ctxt_t *ctxt,
|
|||||||
ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
|
ue_context_p->ue_context.handover_info->state = HO_END_MARKER;
|
||||||
gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
|
gtpv1u_enb_delete_tunnel_req_t delete_tunnel_req;
|
||||||
memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
|
memset(&delete_tunnel_req, 0, sizeof(delete_tunnel_req));
|
||||||
delete_tunnel_req.rnti = ctxt->rnti;
|
delete_tunnel_req.rnti = ctxt->rntiMaybeUEid;
|
||||||
gtpv1u_delete_x2u_tunnel(ctxt->module_id, &delete_tunnel_req);
|
gtpv1u_delete_x2u_tunnel(ctxt->module_id, &delete_tunnel_req);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ rrc_pdcp_config_security(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES);
|
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES);
|
||||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
@@ -691,7 +691,7 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ(
|
|||||||
rrc_ue_s1ap_ids_p = malloc(sizeof(*rrc_ue_s1ap_ids_p));
|
rrc_ue_s1ap_ids_p = malloc(sizeof(*rrc_ue_s1ap_ids_p));
|
||||||
rrc_ue_s1ap_ids_p->ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
rrc_ue_s1ap_ids_p->ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
||||||
rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID;
|
rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID;
|
||||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
h_rc = hashtable_insert(RC.rrc[ctxt_pP->module_id]->initial_id2_s1ap_ids,
|
h_rc = hashtable_insert(RC.rrc[ctxt_pP->module_id]->initial_id2_s1ap_ids,
|
||||||
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
||||||
rrc_ue_s1ap_ids_p);
|
rrc_ue_s1ap_ids_p);
|
||||||
@@ -1901,7 +1901,7 @@ int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
|
|||||||
rrc_ue_s1ap_ids_p = malloc(sizeof(*rrc_ue_s1ap_ids_p));
|
rrc_ue_s1ap_ids_p = malloc(sizeof(*rrc_ue_s1ap_ids_p));
|
||||||
rrc_ue_s1ap_ids_p->ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
rrc_ue_s1ap_ids_p->ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
||||||
rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID;
|
rrc_ue_s1ap_ids_p->eNB_ue_s1ap_id = UE_INITIAL_ID_INVALID;
|
||||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
h_rc = hashtable_insert(RC.rrc[ctxt_pP->module_id]->initial_id2_s1ap_ids,
|
h_rc = hashtable_insert(RC.rrc[ctxt_pP->module_id]->initial_id2_s1ap_ids,
|
||||||
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
||||||
rrc_ue_s1ap_ids_p);
|
rrc_ue_s1ap_ids_p);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ nr_rrc_data_req(
|
|||||||
//memcpy (NR_RRC_DCCH_DATA_REQ (message_p).sdu_p, buffer_pP, sdu_sizeP);
|
//memcpy (NR_RRC_DCCH_DATA_REQ (message_p).sdu_p, buffer_pP, sdu_sizeP);
|
||||||
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
||||||
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
||||||
RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti;
|
RRC_DCCH_DATA_REQ(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
itti_send_msg_to_task (
|
itti_send_msg_to_task (
|
||||||
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
|
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
|
||||||
|
|||||||
@@ -1311,16 +1311,10 @@ uint8_t do_NR_SecurityModeCommand(
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(NR_RRC,"[gNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(NR_RRC, "[gNB %d] securityModeCommand for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
enc_rval.encoded,
|
|
||||||
(enc_rval.encoded+7)/8);
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(NR_RRC,"[gNB %d] ASN1 : securityModeCommand encoding failed for UE %x\n",
|
LOG_E(NR_RRC, "[gNB %d] ASN1 : securityModeCommand encoding failed for UE %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1406,16 +1400,10 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(NR_RRC,"[gNB %d] NR UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
|
LOG_D(NR_RRC, "[gNB %d] NR UECapabilityRequest for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti,
|
|
||||||
enc_rval.encoded,
|
|
||||||
(enc_rval.encoded+7)/8);
|
|
||||||
|
|
||||||
if (enc_rval.encoded==-1) {
|
if (enc_rval.encoded==-1) {
|
||||||
LOG_E(NR_RRC,"[gNB %d] ASN1 : NR UECapabilityRequest encoding failed for UE %x\n",
|
LOG_E(NR_RRC, "[gNB %d] ASN1 : NR UECapabilityRequest encoding failed for UE %lx\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -210,17 +210,13 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt
|
|||||||
const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
|
const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
|
||||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
|
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
|
||||||
|
|
||||||
|
void nr_pdcp_add_srbs(eNB_flag_t enb_flag, ue_id_t rntiMaybeUEid, NR_SRB_ToAddModList_t *const srb2add_list, const uint8_t security_modeP, uint8_t *const kRRCenc, uint8_t *const kUPint);
|
||||||
|
|
||||||
void nr_pdcp_add_srbs(eNB_flag_t enb_flag, rnti_t rnti,
|
void nr_pdcp_add_drbs(eNB_flag_t enb_flag,
|
||||||
NR_SRB_ToAddModList_t *const srb2add_list,
|
ue_id_t rntiMaybeUEid,
|
||||||
const uint8_t security_modeP,
|
NR_DRB_ToAddModList_t *const drb2add_list,
|
||||||
uint8_t *const kRRCenc,
|
const uint8_t security_modeP,
|
||||||
uint8_t *const kUPint);
|
uint8_t *const kUPenc,
|
||||||
|
uint8_t *const kUPint,
|
||||||
void nr_pdcp_add_drbs(eNB_flag_t enb_flag, rnti_t rnti,
|
|
||||||
NR_DRB_ToAddModList_t *const drb2add_list,
|
|
||||||
const uint8_t security_modeP,
|
|
||||||
uint8_t *const kUPenc,
|
|
||||||
uint8_t *const kUPint,
|
|
||||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
|
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+93
-155
@@ -312,8 +312,6 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void
|
void
|
||||||
rrc_gNB_generate_RRCSetup(
|
rrc_gNB_generate_RRCSetup(
|
||||||
@@ -324,7 +322,7 @@ rrc_gNB_generate_RRCSetup(
|
|||||||
NR_ServingCellConfigCommon_t *scc)
|
NR_ServingCellConfigCommon_t *scc)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
LOG_I(NR_RRC, "rrc_gNB_generate_RRCSetup for RNTI %04x\n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "rrc_gNB_generate_RRCSetup for RNTI %04lx\n", ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
// T(T_GNB_RRC_SETUP,
|
// T(T_GNB_RRC_SETUP,
|
||||||
// T_INT(ctxt_pP->module_id),
|
// T_INT(ctxt_pP->module_id),
|
||||||
@@ -358,12 +356,7 @@ rrc_gNB_generate_RRCSetup(
|
|||||||
ue_context_pP->ue_context.ue_release_timer_thres = 1000;
|
ue_context_pP->ue_context.ue_release_timer_thres = 1000;
|
||||||
|
|
||||||
/* TODO: this should go through the E1 interface */
|
/* TODO: this should go through the E1 interface */
|
||||||
nr_pdcp_add_srbs(ctxt_pP->enb_flag,
|
nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, ue_context_pP->ue_context.SRB_configList, 0, NULL, NULL);
|
||||||
ctxt_pP->rnti,
|
|
||||||
ue_context_pP->ue_context.SRB_configList,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
f1ap_dl_rrc_message_t dl_rrc = {
|
f1ap_dl_rrc_message_t dl_rrc = {
|
||||||
.old_gNB_DU_ue_id = 0xFFFFFF,
|
.old_gNB_DU_ue_id = 0xFFFFFF,
|
||||||
@@ -1313,17 +1306,12 @@ rrc_gNB_process_RRCReconfigurationComplete(
|
|||||||
|
|
||||||
LOG_D(NR_RRC,"Configuring PDCP DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti);
|
LOG_D(NR_RRC,"Configuring PDCP DRBs/SRBs for UE %x\n",ue_context_pP->ue_context.rnti);
|
||||||
|
|
||||||
nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rnti,
|
nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, SRB_configList, (ue_context_pP->ue_context.integrity_algorithm << 4) | ue_context_pP->ue_context.ciphering_algorithm, kRRCenc, kRRCint);
|
||||||
SRB_configList,
|
|
||||||
(ue_context_pP->ue_context.integrity_algorithm << 4)
|
|
||||||
| ue_context_pP->ue_context.ciphering_algorithm,
|
|
||||||
kRRCenc,
|
|
||||||
kRRCint);
|
|
||||||
|
|
||||||
nr_pdcp_add_drbs(ctxt_pP->enb_flag, ctxt_pP->rnti,
|
nr_pdcp_add_drbs(ctxt_pP->enb_flag,
|
||||||
|
ctxt_pP->rntiMaybeUEid,
|
||||||
DRB_configList,
|
DRB_configList,
|
||||||
(ue_context_pP->ue_context.integrity_algorithm << 4)
|
(ue_context_pP->ue_context.integrity_algorithm << 4) | ue_context_pP->ue_context.ciphering_algorithm,
|
||||||
| ue_context_pP->ue_context.ciphering_algorithm,
|
|
||||||
kUPenc,
|
kUPenc,
|
||||||
kUPint,
|
kUPint,
|
||||||
get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL);
|
get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL);
|
||||||
@@ -1370,12 +1358,13 @@ rrc_gNB_process_RRCReconfigurationComplete(
|
|||||||
for (int i = 0; i < DRB_configList->list.count; i++) {
|
for (int i = 0; i < DRB_configList->list.count; i++) {
|
||||||
if (DRB_configList->list.array[i]) {
|
if (DRB_configList->list.array[i]) {
|
||||||
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
||||||
LOG_A(NR_RRC, "[gNB %d] Frame %d : Logical Channel UL-DCCH, Received NR_RRCReconfigurationComplete from UE rnti %x, reconfiguring DRB %d\n",
|
LOG_A(NR_RRC,
|
||||||
ctxt_pP->module_id,
|
"[gNB %d] Frame %d : Logical Channel UL-DCCH, Received NR_RRCReconfigurationComplete from UE rnti %lx, reconfiguring DRB %d\n",
|
||||||
ctxt_pP->frame,
|
ctxt_pP->module_id,
|
||||||
ctxt_pP->rnti,
|
ctxt_pP->frame,
|
||||||
(int)DRB_configList->list.array[i]->drb_Identity);
|
ctxt_pP->rntiMaybeUEid,
|
||||||
//(int)*DRB_configList->list.array[i]->pdcp_Config->moreThanOneRLC->primaryPath.logicalChannel);
|
(int)DRB_configList->list.array[i]->drb_Identity);
|
||||||
|
//(int)*DRB_configList->list.array[i]->pdcp_Config->moreThanOneRLC->primaryPath.logicalChannel);
|
||||||
|
|
||||||
if (ue_context_pP->ue_context.DRB_active[drb_id] == 0) {
|
if (ue_context_pP->ue_context.DRB_active[drb_id] == 0) {
|
||||||
ue_context_pP->ue_context.DRB_active[drb_id] = 1;
|
ue_context_pP->ue_context.DRB_active[drb_id] = 1;
|
||||||
@@ -1619,7 +1608,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
h_rc = hashtable_get(rrc_instance_p->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_id, (void **)&rrc_ue_ngap_ids_p);
|
h_rc = hashtable_get(rrc_instance_p->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_id, (void **)&rrc_ue_ngap_ids_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rnti;
|
rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1627,7 +1616,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
h_rc = hashtable_get(rrc_instance_p->initial_id2_ngap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_ngap_ids_p);
|
h_rc = hashtable_get(rrc_instance_p->initial_id2_ngap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_ngap_ids_p);
|
||||||
|
|
||||||
if (h_rc == HASH_TABLE_OK) {
|
if (h_rc == HASH_TABLE_OK) {
|
||||||
rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rnti;
|
rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1649,7 +1638,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
create_tunnel_req.ue_id = ctxt_pP->rnti; // warning put zero above
|
create_tunnel_req.ue_id = ctxt_pP->rntiMaybeUEid; // warning put zero above
|
||||||
create_tunnel_req.num_tunnels = j;
|
create_tunnel_req.num_tunnels = j;
|
||||||
ret = gtpv1u_update_ngu_tunnel(
|
ret = gtpv1u_update_ngu_tunnel(
|
||||||
ctxt_pP->instance,
|
ctxt_pP->instance,
|
||||||
@@ -1687,8 +1676,8 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Update RNTI in ue_context */
|
/* Update RNTI in ue_context */
|
||||||
ue_context_pP->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else
|
ue_context_pP->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else
|
||||||
ue_context_pP->ue_context.rnti = ctxt_pP->rnti;
|
ue_context_pP->ue_context.rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
if (get_softmodem_params()->sa) {
|
if (get_softmodem_params()->sa) {
|
||||||
uint8_t send_security_mode_command = false;
|
uint8_t send_security_mode_command = false;
|
||||||
@@ -1861,7 +1850,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
NR_RRCReestablishmentRequest_IEs_t rrcReestablishmentRequest;
|
NR_RRCReestablishmentRequest_IEs_t rrcReestablishmentRequest;
|
||||||
uint64_t random_value = 0;
|
uint64_t random_value = 0;
|
||||||
|
|
||||||
LOG_I(NR_RRC, "Decoding CCCH: RNTI %04x, inst %ld, payload_size %d\n", ctxt_pP->rnti, ctxt_pP->instance, buffer_length);
|
LOG_I(NR_RRC, "Decoding CCCH: RNTI %04lx, inst %ld, payload_size %d\n", ctxt_pP->rntiMaybeUEid, ctxt_pP->instance, buffer_length);
|
||||||
dec_rval = uper_decode(NULL, &asn_DEF_NR_UL_CCCH_Message, (void **) &ul_ccch_msg, buffer, buffer_length, 0, 0);
|
dec_rval = uper_decode(NULL, &asn_DEF_NR_UL_CCCH_Message, (void **) &ul_ccch_msg, buffer, buffer_length, 0, 0);
|
||||||
|
|
||||||
if (dec_rval.code != RC_OK || dec_rval.consumed == 0) {
|
if (dec_rval.code != RC_OK || dec_rval.consumed == 0) {
|
||||||
@@ -1881,8 +1870,8 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest:
|
case NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest:
|
||||||
LOG_D(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %x)\n", ctxt_pP->rnti);
|
LOG_D(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %lx)\n", ctxt_pP->rntiMaybeUEid);
|
||||||
ue_context_p = rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti);
|
ue_context_p = rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid);
|
||||||
if (ue_context_p != NULL) {
|
if (ue_context_p != NULL) {
|
||||||
rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_p);
|
rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_p);
|
||||||
} else {
|
} else {
|
||||||
@@ -1903,8 +1892,11 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
* the current one must be removed from MAC/PHY (zombie UE)
|
* the current one must be removed from MAC/PHY (zombie UE)
|
||||||
*/
|
*/
|
||||||
if ((ue_context_p = rrc_gNB_ue_context_random_exist(RC.nrrrc[ctxt_pP->module_id], random_value))) {
|
if ((ue_context_p = rrc_gNB_ue_context_random_exist(RC.nrrrc[ctxt_pP->module_id], random_value))) {
|
||||||
LOG_W(NR_RRC, "new UE rnti %x (coming with random value) is already there as UE %x, removing %x from MAC/PHY\n",
|
LOG_W(NR_RRC,
|
||||||
ctxt_pP->rnti, ue_context_p->ue_context.rnti, ue_context_p->ue_context.rnti);
|
"new UE rnti %lx (coming with random value) is already there as UE %x, removing %x from MAC/PHY\n",
|
||||||
|
ctxt_pP->rntiMaybeUEid,
|
||||||
|
ue_context_p->ue_context.rnti,
|
||||||
|
ue_context_p->ue_context.rnti);
|
||||||
ue_context_p->ue_context.ul_failure_timer = 20000;
|
ue_context_p->ue_context.ul_failure_timer = 20000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1926,7 +1918,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
// rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.size);
|
// rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.size);
|
||||||
|
|
||||||
if ((ue_context_p = rrc_gNB_ue_context_5g_s_tmsi_exist(RC.nrrrc[ctxt_pP->module_id], s_tmsi_part1))) {
|
if ((ue_context_p = rrc_gNB_ue_context_5g_s_tmsi_exist(RC.nrrrc[ctxt_pP->module_id], s_tmsi_part1))) {
|
||||||
LOG_I(NR_RRC, " 5G-S-TMSI-Part1 exists, ue_context_p %p, old rnti %x => %x\n",ue_context_p, ue_context_p->ue_context.rnti, ctxt_pP->rnti);
|
LOG_I(NR_RRC, " 5G-S-TMSI-Part1 exists, ue_context_p %p, old rnti %x => %lx\n", ue_context_p, ue_context_p->ue_context.rnti, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
// TODO: MAC structures should not be accessed directly from the RRC! An implementation using the F1 interface should be developed.
|
// TODO: MAC structures should not be accessed directly from the RRC! An implementation using the F1 interface should be developed.
|
||||||
gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!!
|
gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!!
|
||||||
@@ -1936,8 +1928,8 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
/* for that, remove the context from the RB tree */
|
/* for that, remove the context from the RB tree */
|
||||||
RB_REMOVE(rrc_nr_ue_tree_s, &RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
RB_REMOVE(rrc_nr_ue_tree_s, &RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
||||||
/* and insert again, after changing rnti everywhere it has to be changed */
|
/* and insert again, after changing rnti everywhere it has to be changed */
|
||||||
ue_context_p->ue_id_rnti = ctxt_pP->rnti;
|
ue_context_p->ue_id_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
ue_context_p->ue_context.rnti = ctxt_pP->rnti;
|
ue_context_p->ue_context.rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p);
|
||||||
/* reset timers */
|
/* reset timers */
|
||||||
ue_context_p->ue_context.ul_failure_timer = 0;
|
ue_context_p->ue_context.ul_failure_timer = 0;
|
||||||
@@ -1970,18 +1962,14 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
LOG_E(NR_RRC,
|
LOG_E(NR_RRC,
|
||||||
PROTOCOL_NR_RRC_CTXT_UE_FMT" RRCSetupRequest without random UE identity or S-TMSI not supported, let's reject the UE\n",
|
PROTOCOL_NR_RRC_CTXT_UE_FMT" RRCSetupRequest without random UE identity or S-TMSI not supported, let's reject the UE\n",
|
||||||
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP));
|
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||||
rrc_gNB_generate_RRCReject(ctxt_pP,
|
rrc_gNB_generate_RRCReject(ctxt_pP, rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid));
|
||||||
rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ue_context_p->ue_context.establishment_cause = rrcSetupRequest->establishmentCause;
|
ue_context_p->ue_context.establishment_cause = rrcSetupRequest->establishmentCause;
|
||||||
|
|
||||||
rrc_gNB_generate_RRCSetup(ctxt_pP,
|
rrc_gNB_generate_RRCSetup(
|
||||||
rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rnti),
|
ctxt_pP, rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid), du_to_cu_rrc_container, du_to_cu_rrc_container_len, gnb_rrc_inst->carrier.servingcellconfigcommon);
|
||||||
du_to_cu_rrc_container,
|
|
||||||
du_to_cu_rrc_container_len,
|
|
||||||
gnb_rrc_inst->carrier.servingcellconfigcommon);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2130,7 +2118,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
// insert C-RNTI to map
|
// insert C-RNTI to map
|
||||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||||
if (reestablish_rnti_map[i][0] == 0) {
|
if (reestablish_rnti_map[i][0] == 0) {
|
||||||
reestablish_rnti_map[i][0] = ctxt_pP->rnti;
|
reestablish_rnti_map[i][0] = ctxt_pP->rntiMaybeUEid;
|
||||||
reestablish_rnti_map[i][1] = c_rnti;
|
reestablish_rnti_map[i][1] = c_rnti;
|
||||||
LOG_D(NR_RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
LOG_D(NR_RRC, "reestablish_rnti_map[%d] [0] %x, [1] %x\n",
|
||||||
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
i, reestablish_rnti_map[i][0], reestablish_rnti_map[i][1]);
|
||||||
@@ -2168,9 +2156,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
|
|||||||
|
|
||||||
rrc_gNB_generate_RRCReestablishment(ctxt_pP, ue_context_p, 0);
|
rrc_gNB_generate_RRCReestablishment(ctxt_pP, ue_context_p, 0);
|
||||||
|
|
||||||
LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT"CALLING RLC CONFIG SRB1 (rbid %d)\n",
|
LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT "CALLING RLC CONFIG SRB1 (rbid %d)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), Idx);
|
||||||
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
|
|
||||||
Idx);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2291,8 +2277,7 @@ rrc_gNB_decode_dcch(
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id],
|
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
if (ul_dcch_msg->message.present == NR_UL_DCCH_MessageType_PR_c1) {
|
if (ul_dcch_msg->message.present == NR_UL_DCCH_MessageType_PR_c1) {
|
||||||
switch (ul_dcch_msg->message.choice.c1->present) {
|
switch (ul_dcch_msg->message.choice.c1->present) {
|
||||||
@@ -2303,9 +2288,9 @@ rrc_gNB_decode_dcch(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete:
|
case NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete:
|
||||||
LOG_I(NR_RRC, "Receive RRC Reconfiguration Complete message UE %x\n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "Receive RRC Reconfiguration Complete message UE %lx\n", ctxt_pP->rntiMaybeUEid);
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_E(NR_RRC, "Processing NR_RRCReconfigurationComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_E(NR_RRC, "Processing NR_RRCReconfigurationComplete UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2375,7 +2360,7 @@ rrc_gNB_decode_dcch(
|
|||||||
|
|
||||||
case NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete:
|
case NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete:
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(NR_RRC, "Processing NR_RRCSetupComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "Processing NR_RRCSetupComplete UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2460,8 +2445,8 @@ rrc_gNB_decode_dcch(
|
|||||||
case NR_UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
|
case NR_UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
|
||||||
LOG_I(NR_RRC,"Recived RRC GNB UL Information Transfer \n");
|
LOG_I(NR_RRC,"Recived RRC GNB UL Information Transfer \n");
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(NR_RRC, "Processing ulInformationTransfer UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "Processing ulInformationTransfer UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(NR_RRC,"[MSG] RRC UL Information Transfer \n");
|
LOG_D(NR_RRC,"[MSG] RRC UL Information Transfer \n");
|
||||||
@@ -2478,8 +2463,8 @@ rrc_gNB_decode_dcch(
|
|||||||
case NR_UL_DCCH_MessageType__c1_PR_securityModeComplete:
|
case NR_UL_DCCH_MessageType__c1_PR_securityModeComplete:
|
||||||
// to avoid segmentation fault
|
// to avoid segmentation fault
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(NR_RRC, "Processing securityModeComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "Processing securityModeComplete UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_I(NR_RRC,
|
LOG_I(NR_RRC,
|
||||||
@@ -2522,7 +2507,7 @@ rrc_gNB_decode_dcch(
|
|||||||
|
|
||||||
case NR_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
|
case NR_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
|
||||||
if(!ue_context_p) {
|
if(!ue_context_p) {
|
||||||
LOG_I(NR_RRC, "Processing ueCapabilityInformation UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "Processing ueCapabilityInformation UE %lx, ue_context_p is NULL\n", ctxt_pP->rntiMaybeUEid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2541,7 +2526,7 @@ rrc_gNB_decode_dcch(
|
|||||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||||
xer_fprint(stdout, &asn_DEF_NR_UL_DCCH_Message, (void *)ul_dcch_msg);
|
xer_fprint(stdout, &asn_DEF_NR_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||||
}
|
}
|
||||||
LOG_I(NR_RRC, "got UE capabilities for UE %x\n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "got UE capabilities for UE %lx\n", ctxt_pP->rntiMaybeUEid);
|
||||||
int eutra_index = -1;
|
int eutra_index = -1;
|
||||||
|
|
||||||
if( ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.present ==
|
if( ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.present ==
|
||||||
@@ -2707,7 +2692,7 @@ rrc_gNB_decode_dcch(
|
|||||||
|
|
||||||
// select C-RNTI from map
|
// select C-RNTI from map
|
||||||
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||||
if (reestablish_rnti_map[i][0] == ctxt_pP->rnti) {
|
if (reestablish_rnti_map[i][0] == ctxt_pP->rntiMaybeUEid) {
|
||||||
reestablish_rnti = reestablish_rnti_map[i][1];
|
reestablish_rnti = reestablish_rnti_map[i][1];
|
||||||
ue_context_p = rrc_gNB_get_ue_context(
|
ue_context_p = rrc_gNB_get_ue_context(
|
||||||
RC.nrrrc[ctxt_pP->module_id],
|
RC.nrrrc[ctxt_pP->module_id],
|
||||||
@@ -2731,12 +2716,10 @@ rrc_gNB_decode_dcch(
|
|||||||
#if(0)
|
#if(0)
|
||||||
/* TODO : It may be needed if gNB goes into full stack working. */
|
/* TODO : It may be needed if gNB goes into full stack working. */
|
||||||
//clear
|
//clear
|
||||||
int UE_id = find_nr_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
int UE_id = find_nr_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
if(UE_id == -1) {
|
if(UE_id == -1) {
|
||||||
LOG_E(NR_RRC,
|
LOG_E(NR_RRC, PROTOCOL_RRC_CTXT_UE_FMT " NR_RRCConnectionReestablishmentComplete without UE_id(MAC) rnti %lx, fault\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid);
|
||||||
PROTOCOL_RRC_CTXT_UE_FMT" NR_RRCConnectionReestablishmentComplete without UE_id(MAC) rnti %x, fault\n",
|
|
||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2908,16 +2891,9 @@ void rrc_gNB_process_dc_overall_timeout(const module_id_t gnb_mod_idP, x2ap_ENDC
|
|||||||
|
|
||||||
static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_t instance) {
|
static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_t instance) {
|
||||||
NRDuDlReq_t * req=&NRDuDlReq(msg_p);
|
NRDuDlReq_t * req=&NRDuDlReq(msg_p);
|
||||||
protocol_ctxt_t ctxt = {
|
protocol_ctxt_t ctxt = {.rntiMaybeUEid = req->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance};
|
||||||
.rnti = req->rnti,
|
|
||||||
.module_id = instance,
|
|
||||||
.instance = instance,
|
|
||||||
.enb_flag = 1,
|
|
||||||
.eNB_index = instance
|
|
||||||
};
|
|
||||||
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
||||||
struct rrc_gNB_ue_context_s *ue_context_p =
|
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid);
|
||||||
rrc_gNB_get_ue_context(rrc, ctxt.rnti);
|
|
||||||
|
|
||||||
if (req->srb_id == 0) {
|
if (req->srb_id == 0) {
|
||||||
AssertFatal(0 == 1, "should pass through dl_rrc_message()\n");
|
AssertFatal(0 == 1, "should pass through dl_rrc_message()\n");
|
||||||
@@ -2986,23 +2962,23 @@ static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_
|
|||||||
for (i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8)
|
for (i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8)
|
||||||
if (DRB_configList->list.array[i]) {
|
if (DRB_configList->list.array[i]) {
|
||||||
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
|
||||||
LOG_I(F1AP,
|
LOG_I(F1AP,
|
||||||
"[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %x, reconfiguring DRB %d\n",
|
"[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %lx, reconfiguring DRB %d\n",
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
(int)DRB_configList->list.array[i]->drb_Identity);
|
(int)DRB_configList->list.array[i]->drb_Identity);
|
||||||
|
|
||||||
// (int)*DRB_configList->list.array[i]->logicalChannelIdentity);
|
// (int)*DRB_configList->list.array[i]->logicalChannelIdentity);
|
||||||
|
|
||||||
if (ue_context_p->ue_context.DRB_active[drb_id] == 0) {
|
if (ue_context_p->ue_context.DRB_active[drb_id] == 0) {
|
||||||
ue_context_p->ue_context.DRB_active[drb_id] = 1;
|
ue_context_p->ue_context.DRB_active[drb_id] = 1;
|
||||||
// logicalChannelIdentity
|
// logicalChannelIdentity
|
||||||
// rrc_mac_config_req_eNB
|
// rrc_mac_config_req_eNB
|
||||||
}
|
}
|
||||||
} else { // remove LCHAN from MAC/PHY
|
} else { // remove LCHAN from MAC/PHY
|
||||||
AssertFatal(1==0,"Can't handle this yet in DU\n");
|
AssertFatal(1==0,"Can't handle this yet in DU\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3105,17 +3081,10 @@ return 0;
|
|||||||
static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
||||||
|
|
||||||
f1ap_ue_context_setup_t * req=&F1AP_UE_CONTEXT_SETUP_REQ(msg_p);
|
f1ap_ue_context_setup_t * req=&F1AP_UE_CONTEXT_SETUP_REQ(msg_p);
|
||||||
protocol_ctxt_t ctxt = {
|
protocol_ctxt_t ctxt = {.rntiMaybeUEid = req->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance};
|
||||||
.rnti = req->rnti,
|
|
||||||
.module_id = instance,
|
|
||||||
.instance = instance,
|
|
||||||
.enb_flag = 1,
|
|
||||||
.eNB_index = instance
|
|
||||||
};
|
|
||||||
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
||||||
gNB_MAC_INST *mac = RC.nrmac[ctxt.module_id];
|
gNB_MAC_INST *mac = RC.nrmac[ctxt.module_id];
|
||||||
struct rrc_gNB_ue_context_s *ue_context_p =
|
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid);
|
||||||
rrc_gNB_get_ue_context(rrc, ctxt.rnti);
|
|
||||||
MessageDef *message_p;
|
MessageDef *message_p;
|
||||||
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_SETUP_RESP);
|
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_SETUP_RESP);
|
||||||
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(message_p);
|
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(message_p);
|
||||||
@@ -3287,7 +3256,7 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
|
|||||||
|
|
||||||
/* Fill the UE context setup response ITTI message to send to F1AP */
|
/* Fill the UE context setup response ITTI message to send to F1AP */
|
||||||
resp->gNB_CU_ue_id = req->gNB_CU_ue_id;
|
resp->gNB_CU_ue_id = req->gNB_CU_ue_id;
|
||||||
resp->rnti = ctxt.rnti;
|
resp->rnti = ctxt.rntiMaybeUEid;
|
||||||
if(DRB_configList){
|
if(DRB_configList){
|
||||||
if(DRB_configList->list.count > 0){
|
if(DRB_configList->list.count > 0){
|
||||||
resp->drbs_to_be_setup = calloc(1,DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
|
resp->drbs_to_be_setup = calloc(1,DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
|
||||||
@@ -3341,17 +3310,10 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha
|
|||||||
static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
||||||
|
|
||||||
f1ap_ue_context_setup_t * req=&F1AP_UE_CONTEXT_MODIFICATION_REQ(msg_p);
|
f1ap_ue_context_setup_t * req=&F1AP_UE_CONTEXT_MODIFICATION_REQ(msg_p);
|
||||||
protocol_ctxt_t ctxt = {
|
protocol_ctxt_t ctxt = {.rntiMaybeUEid = req->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance};
|
||||||
.rnti = req->rnti,
|
|
||||||
.module_id = instance,
|
|
||||||
.instance = instance,
|
|
||||||
.enb_flag = 1,
|
|
||||||
.eNB_index = instance
|
|
||||||
};
|
|
||||||
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
||||||
gNB_MAC_INST *mac = RC.nrmac[ctxt.module_id];
|
gNB_MAC_INST *mac = RC.nrmac[ctxt.module_id];
|
||||||
struct rrc_gNB_ue_context_s *ue_context_p =
|
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid);
|
||||||
rrc_gNB_get_ue_context(rrc, ctxt.rnti);
|
|
||||||
MessageDef *message_p;
|
MessageDef *message_p;
|
||||||
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_RESP);
|
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_RESP);
|
||||||
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_MODIFICATION_RESP(message_p);
|
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_MODIFICATION_RESP(message_p);
|
||||||
@@ -3449,7 +3411,7 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co
|
|||||||
|
|
||||||
/* Fill the UE context setup response ITTI message to send to F1AP */
|
/* Fill the UE context setup response ITTI message to send to F1AP */
|
||||||
resp->gNB_CU_ue_id = req->gNB_CU_ue_id;
|
resp->gNB_CU_ue_id = req->gNB_CU_ue_id;
|
||||||
resp->rnti = ctxt.rnti;
|
resp->rnti = ctxt.rntiMaybeUEid;
|
||||||
if(DRB_configList){
|
if(DRB_configList){
|
||||||
if(DRB_configList->list.count > 0){
|
if(DRB_configList->list.count > 0){
|
||||||
resp->drbs_to_be_setup = calloc(1,DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
|
resp->drbs_to_be_setup = calloc(1,DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t));
|
||||||
@@ -3498,15 +3460,9 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co
|
|||||||
static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
||||||
|
|
||||||
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(msg_p);
|
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(msg_p);
|
||||||
protocol_ctxt_t ctxt = {
|
protocol_ctxt_t ctxt = {.rntiMaybeUEid = resp->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance};
|
||||||
.rnti = resp->rnti,
|
|
||||||
.module_id = instance,
|
|
||||||
.instance = instance,
|
|
||||||
.enb_flag = 1,
|
|
||||||
.eNB_index = instance
|
|
||||||
};
|
|
||||||
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
||||||
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rnti);
|
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid);
|
||||||
NR_CellGroupConfig_t *cellGroupConfig = NULL;
|
NR_CellGroupConfig_t *cellGroupConfig = NULL;
|
||||||
|
|
||||||
asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
|
asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
|
||||||
@@ -3559,15 +3515,9 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch
|
|||||||
static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, const char *msg_name, instance_t instance){
|
||||||
|
|
||||||
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(msg_p);
|
f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(msg_p);
|
||||||
protocol_ctxt_t ctxt = {
|
protocol_ctxt_t ctxt = {.rntiMaybeUEid = resp->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance};
|
||||||
.rnti = resp->rnti,
|
|
||||||
.module_id = instance,
|
|
||||||
.instance = instance,
|
|
||||||
.enb_flag = 1,
|
|
||||||
.eNB_index = instance
|
|
||||||
};
|
|
||||||
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id];
|
||||||
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rnti);
|
struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid);
|
||||||
NR_CellGroupConfig_t *cellGroupConfig = NULL;
|
NR_CellGroupConfig_t *cellGroupConfig = NULL;
|
||||||
|
|
||||||
if(resp->du_to_cu_rrc_information->cellGroupConfig!=NULL){
|
if(resp->du_to_cu_rrc_information->cellGroupConfig!=NULL){
|
||||||
@@ -3777,7 +3727,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
|||||||
MessageDef *msg;
|
MessageDef *msg;
|
||||||
rrc_gNB_ue_context_t *ue_context_p = NULL;
|
rrc_gNB_ue_context_t *ue_context_p = NULL;
|
||||||
RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head)) {
|
RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head)) {
|
||||||
ctxt_pP->rnti = ue_context_p->ue_id_rnti;
|
ctxt_pP->rntiMaybeUEid = ue_context_p->ue_id_rnti;
|
||||||
gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!!
|
gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!!
|
||||||
|
|
||||||
if (ue_context_p->ue_context.ul_failure_timer > 0) {
|
if (ue_context_p->ue_context.ul_failure_timer > 0) {
|
||||||
@@ -3798,16 +3748,15 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
|||||||
// Remove here the MAC and RRC context when RRC is not connected or gNB is not connected to CN5G
|
// Remove here the MAC and RRC context when RRC is not connected or gNB is not connected to CN5G
|
||||||
if(ue_context_p->ue_context.StatusRrc < NR_RRC_CONNECTED || ue_context_p->ue_context.gNB_ue_ngap_id == 0) {
|
if(ue_context_p->ue_context.StatusRrc < NR_RRC_CONNECTED || ue_context_p->ue_context.gNB_ue_ngap_id == 0) {
|
||||||
if(!NODE_IS_CU(RC.nrrrc[ctxt_pP->instance]->node_type)){
|
if(!NODE_IS_CU(RC.nrrrc[ctxt_pP->instance]->node_type)){
|
||||||
// TODO: MAC structures should not be accessed directly from the RRC! An implementation using the F1 interface should be developed.
|
mac_remove_nr_ue(nrmac, ctxt_pP->rntiMaybeUEid);
|
||||||
mac_remove_nr_ue(nrmac, ctxt_pP->rnti);
|
|
||||||
rrc_rlc_remove_ue(ctxt_pP);
|
rrc_rlc_remove_ue(ctxt_pP);
|
||||||
pdcp_remove_UE(ctxt_pP);
|
pdcp_remove_UE(ctxt_pP);
|
||||||
|
|
||||||
/* remove RRC UE Context */
|
/* remove RRC UE Context */
|
||||||
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rnti);
|
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
if (ue_context_p) {
|
if (ue_context_p) {
|
||||||
rrc_gNB_remove_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], ue_context_p);
|
rrc_gNB_remove_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], ue_context_p);
|
||||||
LOG_I(NR_RRC, "remove UE %x \n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "remove UE %lx \n", ctxt_pP->rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// In case of CU trigger UE context release command towards the DU
|
// In case of CU trigger UE context release command towards the DU
|
||||||
@@ -3815,7 +3764,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
|||||||
MessageDef *message_p;
|
MessageDef *message_p;
|
||||||
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||||
f1ap_ue_context_release_cmd_t *rel_cmd=&F1AP_UE_CONTEXT_RELEASE_CMD (message_p);
|
f1ap_ue_context_release_cmd_t *rel_cmd=&F1AP_UE_CONTEXT_RELEASE_CMD (message_p);
|
||||||
rel_cmd->rnti = ctxt_pP->rnti;
|
rel_cmd->rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
rel_cmd->cause = F1AP_CAUSE_RADIO_NETWORK;
|
rel_cmd->cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||||
rel_cmd->cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
rel_cmd->cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||||
itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, message_p);
|
itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, message_p);
|
||||||
@@ -3833,18 +3782,16 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
|
|||||||
LOG_I(NR_RRC, "Removing UE %x instance after UE_CONTEXT_RELEASE_Complete (ue_release_timer_rrc timeout)\n",
|
LOG_I(NR_RRC, "Removing UE %x instance after UE_CONTEXT_RELEASE_Complete (ue_release_timer_rrc timeout)\n",
|
||||||
ue_context_p->ue_context.rnti);
|
ue_context_p->ue_context.rnti);
|
||||||
ue_context_p->ue_context.ue_release_timer_rrc = 0;
|
ue_context_p->ue_context.ue_release_timer_rrc = 0;
|
||||||
|
mac_remove_nr_ue(nrmac, ctxt_pP->rntiMaybeUEid);
|
||||||
// TODO: MAC structures should not be accessed directly from the RRC! An implementation using the F1 interface should be developed.
|
|
||||||
mac_remove_nr_ue(nrmac, ctxt_pP->rnti);
|
|
||||||
rrc_rlc_remove_ue(ctxt_pP);
|
rrc_rlc_remove_ue(ctxt_pP);
|
||||||
pdcp_remove_UE(ctxt_pP);
|
pdcp_remove_UE(ctxt_pP);
|
||||||
newGtpuDeleteAllTunnels(ctxt_pP->instance, ctxt_pP->rnti);
|
newGtpuDeleteAllTunnels(ctxt_pP->instance, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
/* remove RRC UE Context */
|
/* remove RRC UE Context */
|
||||||
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rnti);
|
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
if (ue_context_p) {
|
if (ue_context_p) {
|
||||||
rrc_gNB_remove_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], ue_context_p);
|
rrc_gNB_remove_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], ue_context_p);
|
||||||
LOG_I(NR_RRC, "remove UE %x \n", ctxt_pP->rnti);
|
LOG_I(NR_RRC, "remove UE %lx \n", ctxt_pP->rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
|
|
||||||
break; // break RB_FOREACH
|
break; // break RB_FOREACH
|
||||||
@@ -3928,15 +3875,7 @@ void *rrc_gnb_task(void *args_p) {
|
|||||||
int result;
|
int result;
|
||||||
//SRB_INFO *srb_info_p;
|
//SRB_INFO *srb_info_p;
|
||||||
//int CC_id;
|
//int CC_id;
|
||||||
protocol_ctxt_t ctxt={.module_id=0,
|
protocol_ctxt_t ctxt = {.module_id = 0, .enb_flag = 1, .instance = 0, .rntiMaybeUEid = 0, .frame = -1, .subframe = -1, .eNB_index = 0, .brOption = false};
|
||||||
.enb_flag=1,
|
|
||||||
.instance=0,
|
|
||||||
.rnti=0,
|
|
||||||
.frame=-1,
|
|
||||||
.subframe=-1,
|
|
||||||
.eNB_index=0,
|
|
||||||
.brOption=false
|
|
||||||
};
|
|
||||||
|
|
||||||
/* timer to write stats to file */
|
/* timer to write stats to file */
|
||||||
long stats_timer_id = 1;
|
long stats_timer_id = 1;
|
||||||
@@ -3985,12 +3924,13 @@ void *rrc_gnb_task(void *args_p) {
|
|||||||
F1AP_UL_RRC_MESSAGE(msg_p).rnti,
|
F1AP_UL_RRC_MESSAGE(msg_p).rnti,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
LOG_D(NR_RRC,"Decoding DCCH %d: ue %04x, inst %ld, ctxt %p, size %d\n",
|
LOG_D(NR_RRC,
|
||||||
F1AP_UL_RRC_MESSAGE(msg_p).srb_id,
|
"Decoding DCCH %d: ue %04lx, inst %ld, ctxt %p, size %d\n",
|
||||||
ctxt.rnti,
|
F1AP_UL_RRC_MESSAGE(msg_p).srb_id,
|
||||||
instance,
|
ctxt.rntiMaybeUEid,
|
||||||
&ctxt,
|
instance,
|
||||||
F1AP_UL_RRC_MESSAGE(msg_p).rrc_container_length);
|
&ctxt,
|
||||||
|
F1AP_UL_RRC_MESSAGE(msg_p).rrc_container_length);
|
||||||
rrc_gNB_decode_dcch(&ctxt,
|
rrc_gNB_decode_dcch(&ctxt,
|
||||||
F1AP_UL_RRC_MESSAGE(msg_p).srb_id,
|
F1AP_UL_RRC_MESSAGE(msg_p).srb_id,
|
||||||
F1AP_UL_RRC_MESSAGE(msg_p).rrc_container,
|
F1AP_UL_RRC_MESSAGE(msg_p).rrc_container,
|
||||||
@@ -4106,8 +4046,7 @@ rrc_gNB_generate_SecurityModeCommand(
|
|||||||
uint8_t buffer[100];
|
uint8_t buffer[100];
|
||||||
uint8_t size;
|
uint8_t size;
|
||||||
|
|
||||||
T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
NR_IntegrityProtAlgorithm_t integrity_algorithm = (NR_IntegrityProtAlgorithm_t)ue_context_pP->ue_context.integrity_algorithm;
|
NR_IntegrityProtAlgorithm_t integrity_algorithm = (NR_IntegrityProtAlgorithm_t)ue_context_pP->ue_context.integrity_algorithm;
|
||||||
size = do_NR_SecurityModeCommand(
|
size = do_NR_SecurityModeCommand(
|
||||||
ctxt_pP,
|
ctxt_pP,
|
||||||
@@ -4174,8 +4113,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
|
|||||||
uint8_t buffer[100];
|
uint8_t buffer[100];
|
||||||
uint8_t size;
|
uint8_t size;
|
||||||
|
|
||||||
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
|
||||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
|
||||||
size = do_NR_SA_UECapabilityEnquiry(
|
size = do_NR_SA_UECapabilityEnquiry(
|
||||||
ctxt_pP,
|
ctxt_pP,
|
||||||
buffer,
|
buffer,
|
||||||
@@ -4261,7 +4199,7 @@ rrc_gNB_generate_RRCRelease(
|
|||||||
uint8_t *message_buffer = itti_malloc (TASK_RRC_GNB, TASK_CU_F1, size);
|
uint8_t *message_buffer = itti_malloc (TASK_RRC_GNB, TASK_CU_F1, size);
|
||||||
memcpy (message_buffer, buffer, size);
|
memcpy (message_buffer, buffer, size);
|
||||||
MessageDef *m = itti_alloc_new_message(TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
MessageDef *m = itti_alloc_new_message(TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rnti;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
|
||||||
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = message_buffer;
|
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = message_buffer;
|
||||||
|
|||||||
@@ -58,9 +58,7 @@ rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
|||||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||||
create_tunnel_resp_pP->num_tunnels);
|
create_tunnel_resp_pP->num_tunnels);
|
||||||
rnti = create_tunnel_resp_pP->rnti;
|
rnti = create_tunnel_resp_pP->rnti;
|
||||||
ue_context_p = rrc_gNB_get_ue_context(
|
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
RC.nrrrc[ctxt_pP->module_id],
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
|
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
|
||||||
ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i];
|
ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i];
|
||||||
@@ -98,9 +96,7 @@ nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(
|
|||||||
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
|
PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||||
create_tunnel_resp_pP->num_tunnels);
|
create_tunnel_resp_pP->num_tunnels);
|
||||||
rnti = create_tunnel_resp_pP->ue_id;
|
rnti = create_tunnel_resp_pP->ue_id;
|
||||||
ue_context_p = rrc_gNB_get_ue_context(
|
ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid);
|
||||||
RC.nrrrc[ctxt_pP->module_id],
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
|
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
|
||||||
ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->gnb_NGu_teid[i];
|
ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->gnb_NGu_teid[i];
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ(
|
|||||||
rrc_ue_ngap_ids_p = malloc(sizeof(rrc_ue_ngap_ids_t));
|
rrc_ue_ngap_ids_p = malloc(sizeof(rrc_ue_ngap_ids_t));
|
||||||
rrc_ue_ngap_ids_p->ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
rrc_ue_ngap_ids_p->ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
||||||
rrc_ue_ngap_ids_p->gNB_ue_ngap_id = UE_INITIAL_ID_INVALID;
|
rrc_ue_ngap_ids_p->gNB_ue_ngap_id = UE_INITIAL_ID_INVALID;
|
||||||
rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rnti;
|
rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
|
|
||||||
h_rc = hashtable_insert(RC.nrrrc[ctxt_pP->module_id]->initial_id2_ngap_ids,
|
h_rc = hashtable_insert(RC.nrrrc[ctxt_pP->module_id]->initial_id2_ngap_ids,
|
||||||
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
(hash_key_t)ue_context_pP->ue_context.ue_initial_id,
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ rrc_gNB_get_next_free_ue_context(
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
|
struct rrc_gNB_ue_context_s *ue_context_p = NULL;
|
||||||
ue_context_p = rrc_gNB_get_ue_context(rrc_instance_pP, ctxt_pP->rnti);
|
ue_context_p = rrc_gNB_get_ue_context(rrc_instance_pP, ctxt_pP->rntiMaybeUEid);
|
||||||
|
|
||||||
if (ue_context_p == NULL) {
|
if (ue_context_p == NULL) {
|
||||||
ue_context_p = rrc_gNB_allocate_new_UE_context(rrc_instance_pP);
|
ue_context_p = rrc_gNB_allocate_new_UE_context(rrc_instance_pP);
|
||||||
@@ -222,8 +222,8 @@ rrc_gNB_get_next_free_ue_context(
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ue_context_p->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else
|
ue_context_p->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else
|
||||||
ue_context_p->ue_context.rnti = ctxt_pP->rnti; // yes duplicate, 1 may be removed
|
ue_context_p->ue_context.rnti = ctxt_pP->rntiMaybeUEid; // yes duplicate, 1 may be removed
|
||||||
ue_context_p->ue_context.random_ue_identity = ue_identityP;
|
ue_context_p->ue_context.random_ue_identity = ue_identityP;
|
||||||
RB_INSERT(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_p);
|
RB_INSERT(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_p);
|
||||||
LOG_D(NR_RRC,
|
LOG_D(NR_RRC,
|
||||||
|
|||||||
@@ -375,16 +375,17 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
|||||||
|
|
||||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0, rrc->module_id);
|
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0, rrc->module_id);
|
||||||
LOG_W(RRC,
|
LOG_W(RRC,
|
||||||
"Calling RRC PDCP/RLC ASN1 request functions for protocol context %p with module_id %d, rnti %x, frame %d, subframe %d eNB_index %d \n",
|
"Calling RRC PDCP/RLC ASN1 request functions for protocol context %p with module_id %d, rnti %lx, frame %d, subframe %d eNB_index %d \n",
|
||||||
&ctxt,
|
&ctxt,
|
||||||
ctxt.module_id,
|
ctxt.module_id,
|
||||||
ctxt.rnti,
|
ctxt.rntiMaybeUEid,
|
||||||
ctxt.frame,
|
ctxt.frame,
|
||||||
ctxt.subframe,
|
ctxt.subframe,
|
||||||
ctxt.eNB_index);
|
ctxt.eNB_index);
|
||||||
|
|
||||||
nr_pdcp_add_drbs(ctxt.enb_flag, ctxt.rnti,
|
nr_pdcp_add_drbs(ctxt.enb_flag,
|
||||||
ue_context_p->ue_context.rb_config->drb_ToAddModList ,
|
ctxt.rntiMaybeUEid,
|
||||||
|
ue_context_p->ue_context.rb_config->drb_ToAddModList,
|
||||||
(ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm,
|
(ue_context_p->ue_context.integrity_algorithm << 4) | ue_context_p->ue_context.ciphering_algorithm,
|
||||||
kUPenc,
|
kUPenc,
|
||||||
kUPint,
|
kUPint,
|
||||||
@@ -394,10 +395,10 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
|||||||
get_softmodem_params()->sa ? ue_context_p->ue_context.rb_config->srb_ToAddModList : NULL,
|
get_softmodem_params()->sa ? ue_context_p->ue_context.rb_config->srb_ToAddModList : NULL,
|
||||||
ue_context_p->ue_context.rb_config->drb_ToAddModList,
|
ue_context_p->ue_context.rb_config->drb_ToAddModList,
|
||||||
ue_context_p->ue_context.rb_config->drb_ToReleaseList,
|
ue_context_p->ue_context.rb_config->drb_ToReleaseList,
|
||||||
(LTE_PMCH_InfoList_r9_t *) NULL,
|
(LTE_PMCH_InfoList_r9_t *)NULL,
|
||||||
ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList);
|
ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList);
|
||||||
|
|
||||||
LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %x\n", __FUNCTION__, __LINE__, ctxt.rnti);
|
LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %lx\n", __FUNCTION__, __LINE__, ctxt.rntiMaybeUEid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti) {
|
void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti) {
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ rrc_data_req_nr_ue(
|
|||||||
RRC_DCCH_DATA_REQ (message_p).sdu_p = message_buffer;
|
RRC_DCCH_DATA_REQ (message_p).sdu_p = message_buffer;
|
||||||
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
RRC_DCCH_DATA_REQ (message_p).mode = modeP;
|
||||||
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
|
||||||
RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti;
|
RRC_DCCH_DATA_REQ(message_p).rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
|
||||||
itti_send_msg_to_task (
|
itti_send_msg_to_task (
|
||||||
TASK_PDCP_UE,
|
TASK_PDCP_UE,
|
||||||
|
|||||||
+19
-38
@@ -1403,33 +1403,20 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NR_DL_CCCH_MessageType__c1_PR_rrcSetup:
|
case NR_DL_CCCH_MessageType__c1_PR_rrcSetup:
|
||||||
LOG_I(NR_RRC,
|
LOG_I(NR_RRC, "[UE%d][RAPROC] Frame %d : Logical Channel DL-CCCH (SRB0), Received NR_RRCSetup RNTI %lx\n", ctxt_pP->module_id, ctxt_pP->frame, ctxt_pP->rntiMaybeUEid);
|
||||||
"[UE%d][RAPROC] Frame %d : Logical Channel DL-CCCH (SRB0), Received NR_RRCSetup RNTI %x\n",
|
|
||||||
ctxt_pP->module_id,
|
|
||||||
ctxt_pP->frame,
|
|
||||||
ctxt_pP->rnti);
|
|
||||||
|
|
||||||
// Get configuration
|
// Get configuration
|
||||||
// Release T300 timer
|
// Release T300 timer
|
||||||
NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].T300_active = 0;
|
NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].T300_active = 0;
|
||||||
|
|
||||||
nr_rrc_ue_process_masterCellGroup(
|
nr_rrc_ue_process_masterCellGroup(ctxt_pP, gNB_index, &dl_ccch_msg->message.choice.c1->choice.rrcSetup->criticalExtensions.choice.rrcSetup->masterCellGroup);
|
||||||
ctxt_pP,
|
nr_rrc_ue_process_RadioBearerConfig(ctxt_pP, gNB_index, &dl_ccch_msg->message.choice.c1->choice.rrcSetup->criticalExtensions.choice.rrcSetup->radioBearerConfig);
|
||||||
gNB_index,
|
nr_rrc_set_state(ctxt_pP->module_id, RRC_STATE_CONNECTED_NR);
|
||||||
&dl_ccch_msg->message.choice.c1->choice.rrcSetup->criticalExtensions.choice.rrcSetup->masterCellGroup);
|
nr_rrc_set_sub_state(ctxt_pP->module_id, RRC_SUB_STATE_CONNECTED_NR);
|
||||||
nr_rrc_ue_process_RadioBearerConfig(ctxt_pP,
|
NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].rnti = ctxt_pP->rntiMaybeUEid;
|
||||||
gNB_index,
|
rrc_ue_generate_RRCSetupComplete(ctxt_pP, gNB_index, dl_ccch_msg->message.choice.c1->choice.rrcSetup->rrc_TransactionIdentifier, NR_UE_rrc_inst[ctxt_pP->module_id].selected_plmn_identity);
|
||||||
&dl_ccch_msg->message.choice.c1->choice.rrcSetup->criticalExtensions.choice.rrcSetup->radioBearerConfig);
|
rval = 0;
|
||||||
nr_rrc_set_state (ctxt_pP->module_id, RRC_STATE_CONNECTED_NR);
|
break;
|
||||||
nr_rrc_set_sub_state (ctxt_pP->module_id, RRC_SUB_STATE_CONNECTED_NR);
|
|
||||||
NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].rnti = ctxt_pP->rnti;
|
|
||||||
rrc_ue_generate_RRCSetupComplete(
|
|
||||||
ctxt_pP,
|
|
||||||
gNB_index,
|
|
||||||
dl_ccch_msg->message.choice.c1->choice.rrcSetup->rrc_TransactionIdentifier,
|
|
||||||
NR_UE_rrc_inst[ctxt_pP->module_id].selected_plmn_identity);
|
|
||||||
rval = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(NR_RRC, "[UE%d] Frame %d : Unknown message\n",
|
LOG_E(NR_RRC, "[UE%d] Frame %d : Unknown message\n",
|
||||||
@@ -1970,10 +1957,10 @@ nr_rrc_ue_establish_srb2(
|
|||||||
NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kRRCint);
|
NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kRRCint);
|
||||||
|
|
||||||
// Refresh SRBs
|
// Refresh SRBs
|
||||||
nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rnti,
|
nr_pdcp_add_srbs(ctxt_pP->enb_flag,
|
||||||
|
ctxt_pP->rntiMaybeUEid,
|
||||||
radioBearerConfig->srb_ToAddModList,
|
radioBearerConfig->srb_ToAddModList,
|
||||||
NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm |
|
NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm | (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4),
|
||||||
(NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4),
|
|
||||||
kRRCenc,
|
kRRCenc,
|
||||||
kRRCint);
|
kRRCint);
|
||||||
// Refresh SRBs
|
// Refresh SRBs
|
||||||
@@ -2068,21 +2055,15 @@ nr_rrc_ue_establish_srb2(
|
|||||||
NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kUPint);
|
NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kUPint);
|
||||||
|
|
||||||
// Refresh DRBs
|
// Refresh DRBs
|
||||||
nr_pdcp_add_drbs(ctxt_pP->enb_flag, ctxt_pP->rnti,
|
nr_pdcp_add_drbs(ctxt_pP->enb_flag,
|
||||||
|
ctxt_pP->rntiMaybeUEid,
|
||||||
radioBearerConfig->drb_ToAddModList,
|
radioBearerConfig->drb_ToAddModList,
|
||||||
NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm
|
NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm | (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4),
|
||||||
| (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4),
|
|
||||||
kUPenc,
|
kUPenc,
|
||||||
kUPint,
|
kUPint,
|
||||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToAddModList);
|
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToAddModList);
|
||||||
// Refresh DRBs
|
// Refresh DRBs
|
||||||
nr_rrc_rlc_config_asn1_req(ctxt_pP,
|
nr_rrc_rlc_config_asn1_req(ctxt_pP, NULL, radioBearerConfig->drb_ToAddModList, NULL, NULL, NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToAddModList);
|
||||||
NULL,
|
|
||||||
radioBearerConfig->drb_ToAddModList,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToAddModList
|
|
||||||
);
|
|
||||||
} // drb_ToAddModList //
|
} // drb_ToAddModList //
|
||||||
|
|
||||||
if (radioBearerConfig->drb_ToReleaseList != NULL) {
|
if (radioBearerConfig->drb_ToReleaseList != NULL) {
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ void sdap_data_ind(rb_id_t pdcp_entity,
|
|||||||
nr_sdap_entity_t *sdap_entity;
|
nr_sdap_entity_t *sdap_entity;
|
||||||
sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id);
|
sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id);
|
||||||
|
|
||||||
if(sdap_entity == NULL) {
|
if (sdap_entity == NULL) {
|
||||||
LOG_E(SDAP, "%s:%d:%s: Entity not found for ue rnti: %lu and pdusession id: %d\n", __FILE__, __LINE__, __FUNCTION__, ue_id, pdusession_id);
|
LOG_E(SDAP, "%s:%d:%s: Entity not found for ue rnti/ue_id: %lx and pdusession id: %d\n", __FILE__, __LINE__, __FUNCTION__, ue_id, pdusession_id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,11 +37,12 @@ static nr_sdap_entity_info sdap_info;
|
|||||||
|
|
||||||
nr_pdcp_ue_manager_t *nr_pdcp_sdap_get_ue_manager(void);
|
nr_pdcp_ue_manager_t *nr_pdcp_sdap_get_ue_manager(void);
|
||||||
|
|
||||||
void nr_pdcp_submit_sdap_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu){
|
void nr_pdcp_submit_sdap_ctrl_pdu(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu)
|
||||||
|
{
|
||||||
nr_pdcp_ue_t *ue;
|
nr_pdcp_ue_t *ue;
|
||||||
nr_pdcp_ue_manager_t *nr_pdcp_ue_manager;
|
nr_pdcp_ue_manager_t *nr_pdcp_ue_manager;
|
||||||
nr_pdcp_ue_manager = nr_pdcp_sdap_get_ue_manager();
|
nr_pdcp_ue_manager = nr_pdcp_sdap_get_ue_manager();
|
||||||
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, rnti);
|
ue = nr_pdcp_manager_get_ue(nr_pdcp_ue_manager, ue_id);
|
||||||
ue->drb[sdap_ctrl_pdu_drb-1]->recv_sdu(ue->drb[sdap_ctrl_pdu_drb-1], (char*)&ctrl_pdu, SDAP_HDR_LENGTH, RLC_MUI_UNDEFINED);
|
ue->drb[sdap_ctrl_pdu_drb-1]->recv_sdu(ue->drb[sdap_ctrl_pdu_drb-1], (char*)&ctrl_pdu, SDAP_HDR_LENGTH, RLC_MUI_UNDEFINED);
|
||||||
LOG_D(SDAP, "Control PDU - Submitting Control PDU to DRB ID: %ld\n", sdap_ctrl_pdu_drb);
|
LOG_D(SDAP, "Control PDU - Submitting Control PDU to DRB ID: %ld\n", sdap_ctrl_pdu_drb);
|
||||||
LOG_D(SDAP, "QFI: %u\n R: %u\n D/C: %u\n", ctrl_pdu.QFI, ctrl_pdu.R, ctrl_pdu.DC);
|
LOG_D(SDAP, "QFI: %u\n R: %u\n D/C: %u\n", ctrl_pdu.QFI, ctrl_pdu.R, ctrl_pdu.DC);
|
||||||
@@ -365,19 +366,15 @@ rb_id_t nr_sdap_map_ctrl_pdu(nr_sdap_entity_t *entity, rb_id_t pdcp_entity, int
|
|||||||
return drb_of_endmarker;
|
return drb_of_endmarker;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_sdap_submit_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu){
|
void nr_sdap_submit_ctrl_pdu(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu)
|
||||||
|
{
|
||||||
if(sdap_ctrl_pdu_drb){
|
if(sdap_ctrl_pdu_drb){
|
||||||
nr_pdcp_submit_sdap_ctrl_pdu(rnti, sdap_ctrl_pdu_drb, ctrl_pdu);
|
nr_pdcp_submit_sdap_ctrl_pdu(ue_id, sdap_ctrl_pdu_drb, ctrl_pdu);
|
||||||
LOG_D(SDAP, "Sent Control PDU to PDCP Layer.\n");
|
LOG_D(SDAP, "Sent Control PDU to PDCP Layer.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity,
|
void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity, rb_id_t pdcp_entity, ue_id_t ue_id, NR_QFI_t *mapped_qfi_2_add, uint8_t mappedQFIs2AddCount, uint8_t drb_identity)
|
||||||
rb_id_t pdcp_entity,
|
|
||||||
uint16_t rnti,
|
|
||||||
NR_QFI_t *mapped_qfi_2_add,
|
|
||||||
uint8_t mappedQFIs2AddCount,
|
|
||||||
uint8_t drb_identity)
|
|
||||||
{
|
{
|
||||||
LOG_D(SDAP, "RRC Configuring SDAP Entity\n");
|
LOG_D(SDAP, "RRC Configuring SDAP Entity\n");
|
||||||
uint8_t qfi = 0;
|
uint8_t qfi = 0;
|
||||||
@@ -388,33 +385,26 @@ void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity,
|
|||||||
if(existing_sdap_entity->default_drb && existing_sdap_entity->qfi2drb_table[qfi].drb_id == SDAP_NO_MAPPING_RULE){
|
if(existing_sdap_entity->default_drb && existing_sdap_entity->qfi2drb_table[qfi].drb_id == SDAP_NO_MAPPING_RULE){
|
||||||
nr_sdap_ul_hdr_t sdap_ctrl_pdu = existing_sdap_entity->sdap_construct_ctrl_pdu(qfi);
|
nr_sdap_ul_hdr_t sdap_ctrl_pdu = existing_sdap_entity->sdap_construct_ctrl_pdu(qfi);
|
||||||
rb_id_t sdap_ctrl_pdu_drb = existing_sdap_entity->sdap_map_ctrl_pdu(existing_sdap_entity, pdcp_entity, SDAP_CTRL_PDU_MAP_DEF_DRB, qfi);
|
rb_id_t sdap_ctrl_pdu_drb = existing_sdap_entity->sdap_map_ctrl_pdu(existing_sdap_entity, pdcp_entity, SDAP_CTRL_PDU_MAP_DEF_DRB, qfi);
|
||||||
existing_sdap_entity->sdap_submit_ctrl_pdu(rnti, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
existing_sdap_entity->sdap_submit_ctrl_pdu(ue_id, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
||||||
}
|
}
|
||||||
if(existing_sdap_entity->qfi2drb_table[qfi].drb_id != drb_identity && existing_sdap_entity->qfi2drb_table[qfi].hasSdap){
|
if(existing_sdap_entity->qfi2drb_table[qfi].drb_id != drb_identity && existing_sdap_entity->qfi2drb_table[qfi].hasSdap){
|
||||||
nr_sdap_ul_hdr_t sdap_ctrl_pdu = existing_sdap_entity->sdap_construct_ctrl_pdu(qfi);
|
nr_sdap_ul_hdr_t sdap_ctrl_pdu = existing_sdap_entity->sdap_construct_ctrl_pdu(qfi);
|
||||||
rb_id_t sdap_ctrl_pdu_drb = existing_sdap_entity->sdap_map_ctrl_pdu(existing_sdap_entity, pdcp_entity, SDAP_CTRL_PDU_MAP_RULE_DRB, qfi);
|
rb_id_t sdap_ctrl_pdu_drb = existing_sdap_entity->sdap_map_ctrl_pdu(existing_sdap_entity, pdcp_entity, SDAP_CTRL_PDU_MAP_RULE_DRB, qfi);
|
||||||
existing_sdap_entity->sdap_submit_ctrl_pdu(rnti, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
existing_sdap_entity->sdap_submit_ctrl_pdu(ue_id, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
||||||
}
|
}
|
||||||
LOG_D(SDAP, "Storing the configured QoS flow to DRB mapping rule\n");
|
LOG_D(SDAP, "Storing the configured QoS flow to DRB mapping rule\n");
|
||||||
existing_sdap_entity->qfi2drb_map_update(existing_sdap_entity, qfi, drb_identity, hasSdap);
|
existing_sdap_entity->qfi2drb_map_update(existing_sdap_entity, qfi, drb_identity, hasSdap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb,
|
nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb, int has_sdap, ue_id_t ue_id, int pdusession_id, bool is_defaultDRB, uint8_t drb_identity, NR_QFI_t *mapped_qfi_2_add, uint8_t mappedQFIs2AddCount)
|
||||||
int has_sdap,
|
|
||||||
uint16_t rnti,
|
|
||||||
int pdusession_id,
|
|
||||||
bool is_defaultDRB,
|
|
||||||
uint8_t drb_identity,
|
|
||||||
NR_QFI_t *mapped_qfi_2_add,
|
|
||||||
uint8_t mappedQFIs2AddCount)
|
|
||||||
{
|
{
|
||||||
if(nr_sdap_get_entity(rnti, pdusession_id)) {
|
if (nr_sdap_get_entity(ue_id, pdusession_id)) {
|
||||||
LOG_E(SDAP, "SDAP Entity for UE already exists with RNTI: %u and PDU SESSION ID: %d\n", rnti, pdusession_id);
|
LOG_E(SDAP, "SDAP Entity for UE already exists with RNTI/UE ID: %lu and PDU SESSION ID: %d\n", ue_id, pdusession_id);
|
||||||
nr_sdap_entity_t *existing_sdap_entity = nr_sdap_get_entity(rnti, pdusession_id);
|
nr_sdap_entity_t *existing_sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id);
|
||||||
rb_id_t pdcp_entity = existing_sdap_entity->default_drb;
|
rb_id_t pdcp_entity = existing_sdap_entity->default_drb;
|
||||||
if(!is_gnb)
|
if(!is_gnb)
|
||||||
nr_sdap_ue_qfi2drb_config(existing_sdap_entity, pdcp_entity, rnti, mapped_qfi_2_add, mappedQFIs2AddCount, drb_identity);
|
nr_sdap_ue_qfi2drb_config(existing_sdap_entity, pdcp_entity, ue_id, mapped_qfi_2_add, mappedQFIs2AddCount, drb_identity);
|
||||||
return existing_sdap_entity;
|
return existing_sdap_entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,7 +416,7 @@ nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb,
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
sdap_entity->rnti = rnti;
|
sdap_entity->ue_id = ue_id;
|
||||||
sdap_entity->pdusession_id = pdusession_id;
|
sdap_entity->pdusession_id = pdusession_id;
|
||||||
|
|
||||||
sdap_entity->tx_entity = nr_sdap_tx_entity;
|
sdap_entity->tx_entity = nr_sdap_tx_entity;
|
||||||
@@ -458,38 +448,39 @@ nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb,
|
|||||||
return sdap_entity;
|
return sdap_entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
nr_sdap_entity_t *nr_sdap_get_entity(uint16_t rnti, int pdusession_id) {
|
nr_sdap_entity_t *nr_sdap_get_entity(ue_id_t ue_id, int pdusession_id)
|
||||||
|
{
|
||||||
nr_sdap_entity_t *sdap_entity;
|
nr_sdap_entity_t *sdap_entity;
|
||||||
sdap_entity = sdap_info.sdap_entity_llist;
|
sdap_entity = sdap_info.sdap_entity_llist;
|
||||||
|
|
||||||
if(sdap_entity == NULL)
|
if(sdap_entity == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
while(( sdap_entity->rnti != rnti || sdap_entity->pdusession_id != pdusession_id ) && sdap_entity->next_entity != NULL) {
|
while ((sdap_entity->ue_id != ue_id || sdap_entity->pdusession_id != pdusession_id) && sdap_entity->next_entity != NULL) {
|
||||||
sdap_entity = sdap_entity->next_entity;
|
sdap_entity = sdap_entity->next_entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sdap_entity->rnti == rnti && sdap_entity->pdusession_id == pdusession_id)
|
if (sdap_entity->ue_id == ue_id && sdap_entity->pdusession_id == pdusession_id)
|
||||||
return sdap_entity;
|
return sdap_entity;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void delete_nr_sdap_entity(ue_id_t ue_id)
|
||||||
void delete_nr_sdap_entity(uint16_t rnti) {
|
{
|
||||||
nr_sdap_entity_t *entityPtr, *entityPrev = NULL;
|
nr_sdap_entity_t *entityPtr, *entityPrev = NULL;
|
||||||
entityPtr = sdap_info.sdap_entity_llist;
|
entityPtr = sdap_info.sdap_entity_llist;
|
||||||
|
|
||||||
if(entityPtr->rnti == rnti) {
|
if (entityPtr->ue_id == ue_id) {
|
||||||
sdap_info.sdap_entity_llist = sdap_info.sdap_entity_llist->next_entity;
|
sdap_info.sdap_entity_llist = sdap_info.sdap_entity_llist->next_entity;
|
||||||
free(entityPtr);
|
free(entityPtr);
|
||||||
} else {
|
} else {
|
||||||
while(entityPtr->rnti != rnti && entityPtr->next_entity != NULL) {
|
while (entityPtr->ue_id != ue_id && entityPtr->next_entity != NULL) {
|
||||||
entityPrev = entityPtr;
|
entityPrev = entityPtr;
|
||||||
entityPtr = entityPtr->next_entity;
|
entityPtr = entityPtr->next_entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(entityPtr->rnti != rnti) {
|
if (entityPtr->ue_id != ue_id) {
|
||||||
entityPrev->next_entity = entityPtr->next_entity;
|
entityPrev->next_entity = entityPtr->next_entity;
|
||||||
free(entityPtr);
|
free(entityPtr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ typedef struct qfi2drb_s {
|
|||||||
bool hasSdap;
|
bool hasSdap;
|
||||||
} qfi2drb_t;
|
} qfi2drb_t;
|
||||||
|
|
||||||
void nr_pdcp_submit_sdap_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
|
void nr_pdcp_submit_sdap_ctrl_pdu(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
|
||||||
|
|
||||||
typedef struct nr_sdap_entity_s {
|
typedef struct nr_sdap_entity_s {
|
||||||
uint16_t rnti;
|
ue_id_t ue_id;
|
||||||
rb_id_t default_drb;
|
rb_id_t default_drb;
|
||||||
int pdusession_id;
|
int pdusession_id;
|
||||||
qfi2drb_t qfi2drb_table[SDAP_MAX_QFI];
|
qfi2drb_t qfi2drb_table[SDAP_MAX_QFI];
|
||||||
@@ -82,8 +82,7 @@ typedef struct nr_sdap_entity_s {
|
|||||||
|
|
||||||
nr_sdap_ul_hdr_t (*sdap_construct_ctrl_pdu)(uint8_t qfi);
|
nr_sdap_ul_hdr_t (*sdap_construct_ctrl_pdu)(uint8_t qfi);
|
||||||
rb_id_t (*sdap_map_ctrl_pdu)(struct nr_sdap_entity_s *entity, rb_id_t pdcp_entity, int map_type, uint8_t dl_qfi);
|
rb_id_t (*sdap_map_ctrl_pdu)(struct nr_sdap_entity_s *entity, rb_id_t pdcp_entity, int map_type, uint8_t dl_qfi);
|
||||||
void (*sdap_submit_ctrl_pdu)(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
|
void (*sdap_submit_ctrl_pdu)(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
|
||||||
|
|
||||||
|
|
||||||
bool (*tx_entity)(struct nr_sdap_entity_s *entity,
|
bool (*tx_entity)(struct nr_sdap_entity_s *entity,
|
||||||
protocol_ctxt_t *ctxt_p,
|
protocol_ctxt_t *ctxt_p,
|
||||||
@@ -148,36 +147,24 @@ rb_id_t nr_sdap_map_ctrl_pdu(nr_sdap_entity_t *entity, rb_id_t pdcp_entity, int
|
|||||||
* TS 37.324 5.3 QoS flow to DRB Mapping
|
* TS 37.324 5.3 QoS flow to DRB Mapping
|
||||||
* Submit the end-marker control PDU to the lower layer.
|
* Submit the end-marker control PDU to the lower layer.
|
||||||
*/
|
*/
|
||||||
void nr_sdap_submit_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
|
void nr_sdap_submit_ctrl_pdu(ue_id_t ue_id, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TS 37.324 5.3 QoS flow to DRB Mapping
|
* TS 37.324 5.3 QoS flow to DRB Mapping
|
||||||
* 5.3.1 Configuration Procedures
|
* 5.3.1 Configuration Procedures
|
||||||
*/
|
*/
|
||||||
void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity,
|
void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity, rb_id_t pdcp_entity, ue_id_t ue_id, NR_QFI_t *mapped_qfi_2_add, uint8_t mappedQFIs2AddCount, uint8_t drb_identity);
|
||||||
rb_id_t pdcp_entity,
|
|
||||||
uint16_t rnti,
|
|
||||||
NR_QFI_t *mapped_qfi_2_add,
|
|
||||||
uint8_t mappedQFIs2AddCount,
|
|
||||||
uint8_t drb_identity);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TS 37.324 4.4 5.1.1 SDAP entity establishment
|
* TS 37.324 4.4 5.1.1 SDAP entity establishment
|
||||||
* Establish an SDAP entity.
|
* Establish an SDAP entity.
|
||||||
*/
|
*/
|
||||||
nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb,
|
nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb, int has_sdap, ue_id_t ue_id, int pdusession_id, bool is_defaultDRB, uint8_t default_DRB, NR_QFI_t *mapped_qfi_2_add, uint8_t mappedQFIs2AddCount);
|
||||||
int has_sdap,
|
|
||||||
uint16_t rnti,
|
|
||||||
int pdusession_id,
|
|
||||||
bool is_defaultDRB,
|
|
||||||
uint8_t default_DRB,
|
|
||||||
NR_QFI_t *mapped_qfi_2_add,
|
|
||||||
uint8_t mappedQFIs2AddCount);
|
|
||||||
|
|
||||||
/* Entity Handling Related Functions */
|
/* Entity Handling Related Functions */
|
||||||
nr_sdap_entity_t *nr_sdap_get_entity(uint16_t rnti, int pdusession_id);
|
nr_sdap_entity_t *nr_sdap_get_entity(ue_id_t ue_id, int pdusession_id);
|
||||||
|
|
||||||
/* Entity Handling Related Functions */
|
/* Entity Handling Related Functions */
|
||||||
void delete_nr_sdap_entity(uint16_t rnti);
|
void delete_nr_sdap_entity(ue_id_t ue_id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
# include "intertask_interface.h"
|
# include "intertask_interface.h"
|
||||||
# include "s1ap_eNB.h"
|
# include "s1ap_eNB.h"
|
||||||
# include "sctp_eNB_task.h"
|
#include "sctp_eNB_task.h"
|
||||||
|
|
||||||
# include "x2ap_eNB.h"
|
# include "x2ap_eNB.h"
|
||||||
# include "x2ap_messages_types.h"
|
# include "x2ap_messages_types.h"
|
||||||
|
|||||||
@@ -921,7 +921,7 @@ static int Gtpv1uHandleEndMarker(int h,
|
|||||||
ctxt.module_id = 0;
|
ctxt.module_id = 0;
|
||||||
ctxt.enb_flag = 1;
|
ctxt.enb_flag = 1;
|
||||||
ctxt.instance = inst->addr.originInstance;
|
ctxt.instance = inst->addr.originInstance;
|
||||||
ctxt.rnti = tunnel->second.ue_id;
|
ctxt.rntiMaybeUEid = tunnel->second.ue_id;
|
||||||
ctxt.frame = 0;
|
ctxt.frame = 0;
|
||||||
ctxt.subframe = 0;
|
ctxt.subframe = 0;
|
||||||
ctxt.eNB_index = 0;
|
ctxt.eNB_index = 0;
|
||||||
@@ -1054,7 +1054,7 @@ static int Gtpv1uHandleGpdu(int h,
|
|||||||
ctxt.module_id = 0;
|
ctxt.module_id = 0;
|
||||||
ctxt.enb_flag = 1;
|
ctxt.enb_flag = 1;
|
||||||
ctxt.instance = inst->addr.originInstance;
|
ctxt.instance = inst->addr.originInstance;
|
||||||
ctxt.rnti = tunnel->second.ue_id;
|
ctxt.rntiMaybeUEid = tunnel->second.ue_id;
|
||||||
ctxt.frame = 0;
|
ctxt.frame = 0;
|
||||||
ctxt.subframe = 0;
|
ctxt.subframe = 0;
|
||||||
ctxt.eNB_index = 0;
|
ctxt.eNB_index = 0;
|
||||||
@@ -1104,7 +1104,7 @@ static int Gtpv1uHandleGpdu(int h,
|
|||||||
|
|
||||||
if(NR_PDCP_PDU_SN > 0 && NR_PDCP_PDU_SN %5 ==0){
|
if(NR_PDCP_PDU_SN > 0 && NR_PDCP_PDU_SN %5 ==0){
|
||||||
LOG_D (GTPU, "Create and send DL DATA Delivery status for the previously received PDU, NR_PDCP_PDU_SN: %u \n", NR_PDCP_PDU_SN);
|
LOG_D (GTPU, "Create and send DL DATA Delivery status for the previously received PDU, NR_PDCP_PDU_SN: %u \n", NR_PDCP_PDU_SN);
|
||||||
int rlc_tx_buffer_space = nr_rlc_get_available_tx_space(ctxt.rnti, rb_id + 3);
|
int rlc_tx_buffer_space = nr_rlc_get_available_tx_space(ctxt.rntiMaybeUEid, rb_id + 3);
|
||||||
LOG_D(GTPU, "Available buffer size in RLC for Tx: %d \n", rlc_tx_buffer_space);
|
LOG_D(GTPU, "Available buffer size in RLC for Tx: %d \n", rlc_tx_buffer_space);
|
||||||
/*Total size of DDD_status PDU = 1 octet to report extension header length
|
/*Total size of DDD_status PDU = 1 octet to report extension header length
|
||||||
* size of mandatory part + 3 octets for highest transmitted/delivered PDCP SN
|
* size of mandatory part + 3 octets for highest transmitted/delivered PDCP SN
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ int main ( int argc, char **argv )
|
|||||||
protocol_ctxt_t ctxt;
|
protocol_ctxt_t ctxt;
|
||||||
ctxt.module_id = 0 ;
|
ctxt.module_id = 0 ;
|
||||||
ctxt.instance = 0;
|
ctxt.instance = 0;
|
||||||
ctxt.rnti = 0;
|
ctxt.rntiMaybeUEid = 0;
|
||||||
ctxt.enb_flag = 1;
|
ctxt.enb_flag = 1;
|
||||||
ctxt.frame = 0;
|
ctxt.frame = 0;
|
||||||
ctxt.subframe = 0;
|
ctxt.subframe = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user