change name of single var that may be corenetwork ue id or RAN rnti
This commit is contained in:
@@ -220,7 +220,7 @@ rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
|
||||
size );
|
||||
req->length = size;
|
||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||
req->ue_id = ctxt->rnti;
|
||||
req->ue_id = ctxt->rntiMaybeUEid;
|
||||
req->bearer_id = rb_id+4;
|
||||
LOG_D(PDCP, "%s() (drb %ld) sending message to gtp size %d\n",
|
||||
__func__, rb_id, size);
|
||||
@@ -267,7 +267,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
#if T_TRACER
|
||||
|
||||
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
|
||||
|
||||
@@ -283,16 +283,16 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
|
||||
sdu_buffer_sizeP, MAX_IP_PACKET_SIZE);
|
||||
|
||||
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 {
|
||||
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 {
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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",
|
||||
rb_idP, pdcp_pdu_size, ctxt_pP->rnti, RC.rrc ? RC.rrc[ctxt_pP->module_id]->node_type: -1);
|
||||
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);
|
||||
|
||||
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);
|
||||
@@ -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_DU_ue_id = 0;
|
||||
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).execute_duplication = 1;
|
||||
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
|
||||
*/
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO)
|
||||
pdcp_uid = 0;
|
||||
else
|
||||
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;
|
||||
for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; pdcp_uid++) {
|
||||
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rntiMaybeUEid)
|
||||
break;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if (MBMS_flagP) {
|
||||
AssertError (rb_idP < NB_RB_MBMS_MAX, return false,
|
||||
"RB id is too high (%ld/%d) %u rnti %x!\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 rnti %lx!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||
|
||||
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",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->rnti,
|
||||
ctxt_pP->rntiMaybeUEid,
|
||||
rb_idP,
|
||||
sdu_buffer_sizeP,
|
||||
ctxt_pP->enb_flag);
|
||||
} 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",
|
||||
ctxt_pP->rnti,
|
||||
ctxt_pP->rntiMaybeUEid,
|
||||
ctxt_pP->module_id,
|
||||
rb_idP,
|
||||
sdu_buffer_sizeP,
|
||||
@@ -682,17 +671,9 @@ pdcp_data_ind(
|
||||
}
|
||||
} else {
|
||||
rb_id = rb_idP % LTE_maxDRB;
|
||||
AssertError (rb_id < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u UE %x!\n",
|
||||
rb_id,
|
||||
LTE_maxDRB,
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, ctxt_pP->enb_flag, rb_id, srb_flagP);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||
|
||||
if (h_rc != HASH_TABLE_OK) {
|
||||
@@ -1054,22 +1035,17 @@ pdcp_data_ind(
|
||||
|
||||
if (LINK_ENB_PDCP_TO_GTPV1U) {
|
||||
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",
|
||||
ctxt_pP->rnti,
|
||||
rb_id + 4,
|
||||
sdu_buffer_sizeP - payload_offset );
|
||||
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);
|
||||
message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, 0, GTPV1U_TUNNEL_DATA_REQ,
|
||||
sizeof(gtpv1u_tunnel_data_req_t) +
|
||||
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX );
|
||||
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
||||
gtpv1u_tunnel_data_req_t *req=>PV1U_TUNNEL_DATA_REQ(message_p);
|
||||
req->buffer = (uint8_t*)(req+1);
|
||||
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX,
|
||||
&sdu_buffer_pP->data[payload_offset],
|
||||
sdu_buffer_sizeP - payload_offset);
|
||||
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX, sdu_buffer_pP->data + payload_offset, sdu_buffer_sizeP - payload_offset);
|
||||
req->length = sdu_buffer_sizeP - payload_offset;
|
||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||
req->ue_id = ctxt_pP->rnti;
|
||||
req->ue_id = ctxt_pP->rntiMaybeUEid;
|
||||
req->bearer_id = rb_id + 4;
|
||||
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
|
||||
packet_forwarded = true;
|
||||
@@ -1164,16 +1140,10 @@ pdcp_data_ind(
|
||||
}
|
||||
|
||||
/* Update PDCP statistics */
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO)
|
||||
pdcp_uid = 0;
|
||||
else
|
||||
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;
|
||||
for (pdcp_uid = 0; pdcp_uid < MAX_MOBILES_PER_ENB; pdcp_uid++) {
|
||||
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rntiMaybeUEid) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
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;
|
||||
break;
|
||||
}
|
||||
@@ -1543,10 +1513,10 @@ void pdcp_add_UE(const protocol_ctxt_t *const ctxt_pP) {
|
||||
if (ue_flag == 1 ) {
|
||||
for (i=0; i < MAX_MOBILES_PER_ENB ; i++) {
|
||||
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].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);
|
||||
// ret=1;
|
||||
break;
|
||||
@@ -1569,19 +1539,19 @@ bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
|
||||
// check and remove SRBs first
|
||||
|
||||
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;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1589,7 +1559,7 @@ bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
|
||||
|
||||
// remove ue for pdcp enb inst
|
||||
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,
|
||||
pdcp_enb[ctxt_pP->module_id].uid[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];
|
||||
rlc_type = RLC_MODE_AM;
|
||||
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);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
@@ -1734,7 +1704,7 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
break;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1761,8 +1731,8 @@ rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
continue;
|
||||
}
|
||||
|
||||
DevCheck4(drb_id < LTE_maxDRB, drb_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, drb_id, SRB_FLAG_NO);
|
||||
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->rntiMaybeUEid, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void **)&pdcp_p);
|
||||
|
||||
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
|
||||
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);
|
||||
} else {
|
||||
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++) {
|
||||
pdrb_id_p = drb2release_list_pP->list.array[cnt];
|
||||
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);
|
||||
|
||||
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)) {
|
||||
// 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);
|
||||
|
||||
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_add_UE(ctxt_pP);
|
||||
|
||||
//pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
|
||||
// pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = 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->rntiMaybeUEid;
|
||||
if( srb_flagP == SRB_FLAG_NO ) {
|
||||
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) {
|
||||
@@ -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[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;
|
||||
} else {
|
||||
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;
|
||||
@@ -2187,7 +2157,7 @@ pdcp_config_req_asn1(const protocol_ctxt_t *const ctxt_pP,
|
||||
break;
|
||||
|
||||
default:
|
||||
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2234,7 +2204,7 @@ void rrc_pdcp_config_req (
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
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;
|
||||
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) {
|
||||
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 {
|
||||
pdcp_p->is_ue = false;
|
||||
}
|
||||
@@ -2306,7 +2276,7 @@ void rrc_pdcp_config_req (
|
||||
break;
|
||||
|
||||
default:
|
||||
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
DevParam(actionP, ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -2325,7 +2295,7 @@ void rrc_pdcp_config_req (
|
||||
|
||||
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
|
||||
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 {
|
||||
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) {
|
||||
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);
|
||||
} else { // => ENB_NAS_USE_TUN
|
||||
/* Get the IP from a packet */
|
||||
struct ip *ip_pack = (struct ip *) nl_rx_buf;
|
||||
/* 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;
|
||||
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.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);
|
||||
}
|
||||
|
||||
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
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);
|
||||
|
||||
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",
|
||||
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",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id);
|
||||
LOG_D(PDCP,
|
||||
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04lx][RB %ld]\n",
|
||||
ctxt.frame,
|
||||
ctxt.instance,
|
||||
rab_id,
|
||||
len,
|
||||
ctxt.module_id,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id);
|
||||
|
||||
#if defined ENABLE_PDCP_PAYLOAD_DEBUG
|
||||
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 {
|
||||
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",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id, key);
|
||||
"[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.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 (UE_NAS_USE_TUN) {
|
||||
//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);
|
||||
// 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);
|
||||
} else { // => ENB_NAS_USE_TUN
|
||||
//ctxt.rnti=pdcp_eNB_UE_instance_to_rnti[0];
|
||||
// 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_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
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);
|
||||
|
||||
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",
|
||||
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",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id);
|
||||
LOG_D(PDCP,
|
||||
"[FRAME %5u][UE][IP][INSTANCE %ld][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04lx][RB %ld]\n",
|
||||
ctxt.frame,
|
||||
ctxt.instance,
|
||||
rab_id,
|
||||
len,
|
||||
ctxt.module_id,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id);
|
||||
pdcp_data_req(
|
||||
&ctxt,
|
||||
SRB_FLAG_NO,
|
||||
@@ -360,22 +376,28 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p
|
||||
// );
|
||||
} else {
|
||||
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",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
ctxt.rnti, rab_id, key);
|
||||
//if (!UE_NAS_USE_TUN) {
|
||||
// pdcp_data_req(
|
||||
// &ctxt,
|
||||
// SRB_FLAG_NO,
|
||||
// DEFAULT_RAB_ID,
|
||||
// RLC_MUI_UNDEFINED,
|
||||
// RLC_SDU_CONFIRM_NO,
|
||||
// len,
|
||||
// (unsigned char *)nl_rx_buf,
|
||||
// PDCP_TRANSMISSION_MODE_TRANSPARENT
|
||||
// , NULL, NULL
|
||||
// );
|
||||
//}
|
||||
"[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.rntiMaybeUEid,
|
||||
rab_id,
|
||||
key);
|
||||
// if (!UE_NAS_USE_TUN) {
|
||||
// pdcp_data_req(
|
||||
// &ctxt,
|
||||
// SRB_FLAG_NO,
|
||||
// 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);
|
||||
|
||||
@@ -440,28 +462,30 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
||||
if (ctxt.enb_flag) {
|
||||
ctxt.module_id = 0;
|
||||
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) {
|
||||
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);
|
||||
|
||||
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,
|
||||
pdcp_read_header_g.inst,
|
||||
len,
|
||||
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
||||
nas_nlh_rx->nlmsg_len - sizeof(struct nlmsghdr),
|
||||
pdcp_read_header_g.rb_id,
|
||||
ctxt.rnti);
|
||||
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u]UE %u][RB %ld]\n",
|
||||
ctxt.rntiMaybeUEid);
|
||||
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,
|
||||
pdcp_read_header_g.inst,
|
||||
pdcp_read_header_g.rb_id,
|
||||
pdcp_read_header_g.data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id);
|
||||
pdcp_data_req(&ctxt,
|
||||
SRB_FLAG_NO,
|
||||
@@ -474,13 +498,14 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
||||
,NULL, NULL
|
||||
);
|
||||
} 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,
|
||||
pdcp_read_header_g.inst,
|
||||
pdcp_read_header_g.rb_id,
|
||||
pdcp_read_header_g.data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id);
|
||||
}
|
||||
} 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;
|
||||
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 == UE_IP_DEFAULT_RAB_ID) {
|
||||
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
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);
|
||||
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);
|
||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
||||
LOG_D(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||
} else {
|
||||
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",
|
||||
ctxt.module_id, ctxt.rnti, 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);
|
||||
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);
|
||||
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);
|
||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
||||
LOG_D(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||
}
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
@@ -528,13 +549,14 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
|
||||
len,
|
||||
nas_nlh_rx->nlmsg_len-sizeof(struct nlmsghdr),
|
||||
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,
|
||||
pdcp_read_header_g.inst,
|
||||
pdcp_read_header_g.rb_id,
|
||||
pdcp_read_header_g.data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id);
|
||||
pdcp_data_req(
|
||||
&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 */
|
||||
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,
|
||||
pdcp_read_header_g.inst,
|
||||
pdcp_read_header_g.rb_id,
|
||||
pdcp_read_header_g.data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id,
|
||||
key);
|
||||
} /* h_rc != HASH_TABLE_OK */
|
||||
} else {/* else of rab_id != 0 */
|
||||
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,
|
||||
pdcp_read_header_g.inst,
|
||||
pdcp_read_header_g.rb_id,
|
||||
pdcp_read_header_g.data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
DEFAULT_RAB_ID);
|
||||
pdcp_data_req (
|
||||
&ctxt,
|
||||
@@ -669,31 +692,27 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
|
||||
if (ctxt_cpy.enb_flag) {
|
||||
ctxt.module_id = 0;
|
||||
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 {
|
||||
ctxt.module_id = 0;
|
||||
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
|
||||
if (!ctxt.enb_flag) {
|
||||
if (rab_id != 0) {
|
||||
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",
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
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);
|
||||
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);
|
||||
LOG_D(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
||||
LOG_D(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||
} else {
|
||||
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",
|
||||
ctxt.module_id, ctxt.rnti, 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);
|
||||
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);
|
||||
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);
|
||||
LOG_I(PDCP,"request key %x : (%d,%x,%d,%ld)\n",
|
||||
(uint8_t)key,ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id);
|
||||
LOG_I(PDCP, "request key %x : (%d,%lx,%d,%ld)\n", (uint8_t)key, ctxt.module_id, ctxt.rntiMaybeUEid, ctxt.enb_flag, rab_id);
|
||||
}
|
||||
|
||||
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,
|
||||
bytes_received,
|
||||
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,
|
||||
pc5s_header->inst,
|
||||
pc5s_header->rb_id,
|
||||
pc5s_header->data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id);
|
||||
/* 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
|
||||
* gcc, from v9, now warns about it. fix these warnings by using local variables
|
||||
*/
|
||||
/* 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
|
||||
* gcc, from v9, now warns about it. fix these warnings by using local variables
|
||||
*/
|
||||
uint32_t sourceL2Id = pc5s_header->sourceL2Id;
|
||||
uint32_t destinationL2Id = pc5s_header->destinationL2Id;
|
||||
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;
|
||||
} else { /* else of h_rc == HASH_TABLE_OK */
|
||||
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,
|
||||
pc5s_header->inst,
|
||||
pc5s_header->rb_id,
|
||||
pc5s_header->data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
rab_id,
|
||||
key);
|
||||
}
|
||||
} else { /* else of if (rab_id == 0) */
|
||||
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,
|
||||
pc5s_header->inst,
|
||||
pc5s_header->rb_id,
|
||||
pc5s_header->data_size,
|
||||
ctxt.module_id,
|
||||
ctxt.rnti,
|
||||
ctxt.rntiMaybeUEid,
|
||||
DEFAULT_RAB_ID);
|
||||
/* 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
|
||||
|
||||
Reference in New Issue
Block a user