Commit ad9645ff authored by Robert Schmidt's avatar Robert Schmidt

LTE PDCP: Use GTP direct API instead of ITTI

See parent commit for more information.

LTE PDCP uses GTP, so need to link GTP into the corresponding library.
parent 2ffb674d
...@@ -1474,6 +1474,7 @@ add_library(L2_UE ...@@ -1474,6 +1474,7 @@ add_library(L2_UE
${MAC_SRC_UE} ${MAC_SRC_UE}
) )
target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(L2_UE PRIVATE GTPV1U)
add_library(L2_UE_LTE_NR add_library(L2_UE_LTE_NR
${L2_RRC_SRC_UE} ${L2_RRC_SRC_UE}
......
...@@ -597,7 +597,6 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP, ...@@ -597,7 +597,6 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 :0; uint8_t rb_offset= (srb_flagP == 0) ? DTCH -1 :0;
uint16_t pdcp_uid=0; uint16_t pdcp_uid=0;
MessageDef *message_p = NULL;
uint32_t rx_hfn_for_count; uint32_t rx_hfn_for_count;
int pdcp_sn_for_count; int pdcp_sn_for_count;
int security_ok; int security_ok;
...@@ -999,19 +998,11 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP, ...@@ -999,19 +998,11 @@ bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
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 %lx rab %ld len %u\n", ctxt_pP->rntiMaybeUEid, rb_id + 4, sdu_buffer_sizeP - payload_offset); ue_id_t ue_id = ctxt_pP->rntiMaybeUEid;
message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, 0, GTPV1U_TUNNEL_DATA_REQ, uint8_t *gtp_buf = sdu_buffer_pP + payload_offset;
sizeof(gtpv1u_tunnel_data_req_t) + size_t gtp_len = sdu_buffer_sizeP - payload_offset;
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX ); LOG_D(PDCP, "Sending packet to GTP ue %lx rab %ld len %ld\n", ue_id, rb_id + 4, gtp_len);
AssertFatal(message_p != NULL, "OUT OF MEMORY"); gtpv1uSendDirect(INSTANCE_DEFAULT, ue_id, rb_id + 4, gtp_buf, gtp_len, false, false);
gtpv1u_tunnel_data_req_t *req=&GTPV1U_TUNNEL_DATA_REQ(message_p);
req->buffer = (uint8_t*)(req+1);
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX, sdu_buffer_pP + 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->rntiMaybeUEid;
req->bearer_id = rb_id + 4;
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
packet_forwarded = true; packet_forwarded = true;
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment