Commit 20a0e8b5 authored by gauthier's avatar gauthier

Use itti for tunneling to GTPU from PDCP

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5971 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 32e81f8f
...@@ -411,9 +411,11 @@ boolean_t pdcp_data_ind( ...@@ -411,9 +411,11 @@ boolean_t pdcp_data_ind(
uint8_t pdcp_tailer_len = 0; uint8_t pdcp_tailer_len = 0;
pdcp_sn_t sequence_number = 0; pdcp_sn_t sequence_number = 0;
volatile sdu_size_t payload_offset = 0; volatile sdu_size_t payload_offset = 0;
rb_id_t rb_id = rb_idP; rb_id_t rb_id = rb_idP;
boolean_t packet_forwarded = FALSE; boolean_t packet_forwarded = FALSE;
#if defined(LINK_PDCP_TO_GTPV1U)
MessageDef *message_p = NULL;
#endif
#ifdef OAI_EMU #ifdef OAI_EMU
...@@ -690,13 +692,23 @@ boolean_t pdcp_data_ind( ...@@ -690,13 +692,23 @@ boolean_t pdcp_data_ind(
#if defined(LINK_PDCP_TO_GTPV1U) #if defined(LINK_PDCP_TO_GTPV1U)
if ((TRUE == enb_flagP) && (FALSE == srb_flagP)) { if ((TRUE == enb_flagP) && (FALSE == srb_flagP)) {
LOG_I(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset); LOG_I(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset);
gtpu_buffer = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U, sdu_buffer_sizeP - payload_offset);
gtpv1u_new_data_req( AssertFatal(gtpu_buffer != NULL, "OUT OF MEMORY");
memcpy(gtpu_buffer, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset);
message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_TUNNEL_DATA_REQ);
AssertFatal(message_p != NULL, "OUT OF MEMORY");
GTPV1U_TUNNEL_DATA_REQ(message_p).buffer = gtpu_buffer);
GTPV1U_TUNNEL_DATA_REQ(message_p).length = sdu_buffer_sizeP - payload_offset;
GTPV1U_TUNNEL_DATA_REQ(message_p).ue_module_id = ue_mod_idP;
GTPV1U_TUNNEL_DATA_REQ(message_p).rab_id; = rb_id + 4;
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
/*gtpv1u_new_data_req(
enb_mod_idP, //gtpv1u_data_t *gtpv1u_data_p, enb_mod_idP, //gtpv1u_data_t *gtpv1u_data_p,
ue_mod_idP,//rb_id/maxDRB, TO DO UE ID ue_mod_idP,//rb_id/maxDRB, TO DO UE ID
rb_id + 4, rb_id + 4,
&sdu_buffer_pP->data[payload_offset], &sdu_buffer_pP->data[payload_offset],
sdu_buffer_sizeP - payload_offset); sdu_buffer_sizeP - payload_offset);
*/
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