GTP PDCP change rnti to ue id
This commit is contained in:
committed by
laurent
parent
a97dfedb78
commit
ec21db63eb
@@ -25,6 +25,7 @@ uint8_t nas_qfi;
|
||||
uint8_t nas_pduid;
|
||||
|
||||
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
|
||||
const ue_id_t ue_id,
|
||||
const srb_flag_t srb_flag,
|
||||
const rb_id_t rb_id,
|
||||
const mui_t mui,
|
||||
@@ -38,10 +39,10 @@ bool sdap_data_req(protocol_ctxt_t *ctxt_p,
|
||||
const bool rqi,
|
||||
const int pdusession_id) {
|
||||
nr_sdap_entity_t *sdap_entity;
|
||||
sdap_entity = nr_sdap_get_entity(ctxt_p->rnti, pdusession_id);
|
||||
sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id);
|
||||
|
||||
if(sdap_entity == NULL) {
|
||||
LOG_E(SDAP, "%s:%d:%s: Entity not found with ue rnti: %x and pdusession id: %d\n", __FILE__, __LINE__, __FUNCTION__, ctxt_p->rnti, pdusession_id);
|
||||
LOG_E(SDAP, "%s:%d:%s: Entity not found with ue: 0x%"PRIx64" and pdusession id: %d\n", __FILE__, __LINE__, __FUNCTION__, ue_id, pdusession_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -66,11 +67,11 @@ void sdap_data_ind(rb_id_t pdcp_entity,
|
||||
int has_sdap,
|
||||
int has_sdapULheader,
|
||||
int pdusession_id,
|
||||
int rnti,
|
||||
ue_id_t ue_id,
|
||||
char *buf,
|
||||
int size) {
|
||||
nr_sdap_entity_t *sdap_entity;
|
||||
sdap_entity = nr_sdap_get_entity(rnti, pdusession_id);
|
||||
sdap_entity = nr_sdap_get_entity(ue_id, pdusession_id);
|
||||
|
||||
if(sdap_entity == NULL) {
|
||||
LOG_E(SDAP, "%s:%d:%s: Entity not found for ue rnti: %x and pdusession id: %d\n", __FILE__, __LINE__, __FUNCTION__, rnti, pdusession_id);
|
||||
@@ -83,7 +84,7 @@ void sdap_data_ind(rb_id_t pdcp_entity,
|
||||
has_sdap,
|
||||
has_sdapULheader,
|
||||
pdusession_id,
|
||||
rnti,
|
||||
ue_id,
|
||||
buf,
|
||||
size);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
* Uplink - nrUE
|
||||
*/
|
||||
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
|
||||
const ue_id_t ue_id,
|
||||
const srb_flag_t srb_flag,
|
||||
const rb_id_t rb_id,
|
||||
const mui_t mui,
|
||||
@@ -57,7 +58,7 @@ void sdap_data_ind(rb_id_t pdcp_entity,
|
||||
int has_sdap,
|
||||
int has_sdapULheader,
|
||||
int pdusession_id,
|
||||
int rnti,
|
||||
ue_id_t ue_id,
|
||||
char *buf,
|
||||
int size
|
||||
);
|
||||
|
||||
@@ -175,7 +175,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
||||
int has_sdap,
|
||||
int has_sdapHeader,
|
||||
int pdusession_id,
|
||||
int rnti,
|
||||
ue_id_t ue_id,
|
||||
char *buf,
|
||||
int size) {
|
||||
/* The offset of the SDAP header, it might be 0 if the has_sdap is not true in the pdcp entity. */
|
||||
@@ -203,18 +203,18 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
||||
// Pushing SDAP SDU to GTP-U Layer
|
||||
MessageDef *message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB,
|
||||
0,
|
||||
GTPV1U_GNB_TUNNEL_DATA_REQ,
|
||||
sizeof(gtpv1u_gnb_tunnel_data_req_t)
|
||||
GTPV1U_TUNNEL_DATA_REQ,
|
||||
sizeof(gtpv1u_tunnel_data_req_t)
|
||||
+ size + GTPU_HEADER_OVERHEAD_MAX - offset);
|
||||
AssertFatal(message_p != NULL, "OUT OF MEMORY");
|
||||
gtpv1u_gnb_tunnel_data_req_t *req = >PV1U_GNB_TUNNEL_DATA_REQ(message_p);
|
||||
gtpv1u_tunnel_data_req_t *req = >PV1U_TUNNEL_DATA_REQ(message_p);
|
||||
uint8_t *gtpu_buffer_p = (uint8_t *) (req + 1);
|
||||
memcpy(gtpu_buffer_p + GTPU_HEADER_OVERHEAD_MAX, buf + offset, size - offset);
|
||||
req->buffer = gtpu_buffer_p;
|
||||
req->length = size - offset;
|
||||
req->offset = GTPU_HEADER_OVERHEAD_MAX;
|
||||
req->rnti = rnti;
|
||||
req->pdusession_id = pdusession_id;
|
||||
req->ue_id = ue_id;
|
||||
req->bearer_id = pdusession_id;
|
||||
LOG_D(SDAP, "%s() sending message to gtp size %d\n", __func__, size-offset);
|
||||
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
|
||||
} else { //nrUE
|
||||
@@ -250,7 +250,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
||||
if(!entity->qfi2drb_table[sdap_hdr->QFI].drb_id && entity->default_drb){
|
||||
nr_sdap_ul_hdr_t sdap_ctrl_pdu = entity->sdap_construct_ctrl_pdu(sdap_hdr->QFI);
|
||||
rb_id_t sdap_ctrl_pdu_drb = entity->sdap_map_ctrl_pdu(entity, pdcp_entity, SDAP_CTRL_PDU_MAP_DEF_DRB, sdap_hdr->QFI);
|
||||
entity->sdap_submit_ctrl_pdu(rnti, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
||||
entity->sdap_submit_ctrl_pdu(ue_id, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -266,7 +266,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
|
||||
has_sdapHeader ){
|
||||
nr_sdap_ul_hdr_t sdap_ctrl_pdu = entity->sdap_construct_ctrl_pdu(sdap_hdr->QFI);
|
||||
rb_id_t sdap_ctrl_pdu_drb = entity->sdap_map_ctrl_pdu(entity, pdcp_entity, SDAP_CTRL_PDU_MAP_RULE_DRB, sdap_hdr->QFI);
|
||||
entity->sdap_submit_ctrl_pdu(rnti, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
||||
entity->sdap_submit_ctrl_pdu(ue_id, sdap_ctrl_pdu_drb, sdap_ctrl_pdu);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -105,7 +105,7 @@ typedef struct nr_sdap_entity_s {
|
||||
int has_sdap,
|
||||
int has_sdapULheader,
|
||||
int pdusession_id,
|
||||
int rnti,
|
||||
ue_id_t ue_id,
|
||||
char *buf,
|
||||
int size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user