Commit 7d0df005 authored by Lionel Gauthier's avatar Lionel Gauthier

Not tested

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6327 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 36ecc848
...@@ -472,38 +472,42 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -472,38 +472,42 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
pdcp_t *pdcp = NULL; pdcp_t *pdcp = NULL;
pdcp_transmission_mode_t pdcp_mode = PDCP_TRANSMISSION_MODE_UNKNOWN; pdcp_transmission_mode_t pdcp_mode = PDCP_TRANSMISSION_MODE_UNKNOWN;
struct pdcp_netlink_element_s *data = NULL; struct pdcp_netlink_element_s *data = NULL;
protocol_ctxt_t ctxt_cpy;
while (pdcp_netlink_dequeue_element(ctxt_pP->enb_module_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag, &data) != 0) { protocol_ctxt_t ctxt;
ctxt_cpy = *ctxt_pP;
while (pdcp_netlink_dequeue_element(ctxt_pP, &data) != 0) {
DevAssert(data != NULL); DevAssert(data != NULL);
if (ctxt_pP->enb_flag == 0) { if (ctxt_cpy.enb_flag == ENB_FLAG_NO) {
rab_id = data->pdcp_read_header.rb_id % maxDRB; rab_id = data->pdcp_read_header.rb_id % maxDRB;
pdcp = &pdcp_array_drb_ue[ctxt_pP->ue_module_id][rab_id-1]; pdcp = &pdcp_array_drb_ue[ctxt_cpy.ue_module_id][rab_id-1];
} else { } else {
rab_id = data->pdcp_read_header.rb_id % maxDRB; rab_id = data->pdcp_read_header.rb_id % maxDRB;
ctxt_pP->ue_module_id = data->pdcp_read_header.rb_id / maxDRB; ctxt_cpy.ue_module_id = data->pdcp_read_header.rb_id / maxDRB;
pdcp = &pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ctxt_pP->ue_module_id][rab_id-1]; pdcp = &pdcp_array_drb_eNB[ctxt_cpy.enb_module_id][ctxt_cpy.ue_module_id][rab_id-1];
} }
if (ctxt_pP->enb_flag) { if (ctxt_cpy.enb_flag) {
AssertFatal ((ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0), AssertFatal ((ctxt_cpy.enb_module_id >= oai_emulation.info.first_enb_local) && (oai_emulation.info.nb_enb_local > 0),
"eNB module id is too low (%u/%d)!\n", "eNB module id is too low (%u/%d)!\n",
ctxt_pP->enb_module_id, ctxt_cpy.enb_module_id,
oai_emulation.info.first_enb_local); oai_emulation.info.first_enb_local);
AssertFatal ((ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0), AssertFatal ((ctxt_cpy.enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local)) && (oai_emulation.info.nb_enb_local > 0),
"eNB module id is too high (%u/%d)!\n", "eNB module id is too high (%u/%d)!\n",
ctxt_pP->enb_module_id, ctxt_cpy.enb_module_id,
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local); oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
AssertFatal (ctxt_pP->ue_module_id < NB_UE_INST, AssertFatal (ctxt_cpy.ue_module_id < NB_UE_INST,
"UE module id is too high (%u/%d)!\n", "UE module id is too high (%u/%d)!\n",
ctxt_pP->ue_module_id, ctxt_cpy.ue_module_id,
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
} else { } else {
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local), AssertFatal (ctxt_cpy.ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
"UE module id is too high (%u/%d)!\n", "UE module id is too high (%u/%d)!\n",
ctxt_pP->ue_module_id, ctxt_cpy.ue_module_id,
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local, AssertFatal (ctxt_cpy.ue_module_id >= oai_emulation.info.first_ue_local,
"UE module id is too low (%u/%d)!\n", "UE module id is too low (%u/%d)!\n",
ctxt_pP->ue_module_id, ctxt_cpy.ue_module_id,
oai_emulation.info.first_ue_local); oai_emulation.info.first_ue_local);
} }
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB); AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
...@@ -512,13 +516,13 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -512,13 +516,13 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
if (pdcp->instanciated_instance) { if (pdcp->instanciated_instance) {
LOG_D(PDCP, "[FRAME %05d][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ " LOG_D(PDCP, "[FRAME %05d][%s][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ "
"/ %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n", "/ %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
ctxt_pP->frame, ctxt_cpy.frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE", (ctxt_cpy.enb_flag) ? "eNB" : "UE",
data->pdcp_read_header.inst, data->pdcp_read_header.inst,
data->pdcp_read_header.rb_id, data->pdcp_read_header.rb_id,
data->pdcp_read_header.data_size, data->pdcp_read_header.data_size,
ctxt_pP->enb_module_id, ctxt_cpy.enb_module_id,
ctxt_pP->ue_module_id, ctxt_cpy.ue_module_id,
rab_id); rab_id);
#ifdef OAI_NW_DRIVER_TYPE_ETHERNET #ifdef OAI_NW_DRIVER_TYPE_ETHERNET
if ((data->pdcp_read_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) /*TRAFFIC_IPV6_TYPE_MULTICAST */ || if ((data->pdcp_read_header.traffic_type == TRAFFIC_IPV6_TYPE_MULTICAST) /*TRAFFIC_IPV6_TYPE_MULTICAST */ ||
...@@ -539,10 +543,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -539,10 +543,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
#else // NASMESH driver does not curreenlty support multicast traffic #else // NASMESH driver does not curreenlty support multicast traffic
pdcp_mode = PDCP_TRANSMISSION_MODE_DATA; pdcp_mode = PDCP_TRANSMISSION_MODE_DATA;
#endif #endif
pdcp_data_req(ctxt_pP->enb_module_id, pdcp_data_req(ctxt_pP,
ctxt_pP->ue_module_id,
ctxt_pP->frame,
ctxt_pP->enb_flag,
SRB_FLAG_NO, SRB_FLAG_NO,
rab_id % maxDRB, rab_id % maxDRB,
RLC_MUI_UNDEFINED, RLC_MUI_UNDEFINED,
...@@ -551,24 +552,26 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -551,24 +552,26 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
data->data, data->data,
pdcp_mode); pdcp_mode);
} else { } else {
LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u, UE_index %d, ctxt_pP->enb_flag %d eNB_index %d\n", LOG_E(PDCP, "Received packet for non-instanciated instance %u with rb_id %u, UE_index %d, ctxt_cpy.enb_flag %d eNB_index %d\n",
data->pdcp_read_header.inst, data->pdcp_read_header.rb_id, ctxt_pP->ue_module_id, ctxt_pP->enb_flag,ctxt_pP->enb_module_id); data->pdcp_read_header.inst, data->pdcp_read_header.rb_id, ctxt_cpy.ue_module_id, ctxt_cpy.enb_flag,ctxt_cpy.enb_module_id);
} }
} else if (ctxt_pP->enb_flag) { } else if (ctxt_cpy.enb_flag) {
/* rb_id = 0, thus interpreated as broadcast and transported as /* rb_id = 0, thus interpreated as broadcast and transported as
* multiple unicast is a broadcast packet, we have to send this * multiple unicast is a broadcast packet, we have to send this
* packet on all default RABS of all connected UEs * packet on all default RABS of all connected UEs
*/ */
LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID first_ue_local %u nb_ue_local %u\n", oai_emulation.info.first_ue_local, oai_emulation.info.nb_ue_local); LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID first_ue_local %u nb_ue_local %u\n", oai_emulation.info.first_ue_local, oai_emulation.info.nb_ue_local);
for (ue_id = 0; ue_id < NB_UE_INST; ue_id++) { for (ue_id = 0; ue_id < NB_UE_INST; ue_id++) {
pdcp = &pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ue_id][DEFAULT_RAB_ID-1]; pdcp = &pdcp_array_drb_eNB[ctxt_cpy.enb_module_id][ue_id][DEFAULT_RAB_ID-1];
if (pdcp->instanciated_instance) { if (pdcp->instanciated_instance) {
LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID UE %d\n", ue_id); LOG_D(PDCP, "eNB Try Forcing send on DEFAULT_RAB_ID UE %d\n", ue_id);
ctxt.enb_module_id = ctxt_cpy.enb_module_id;
ctxt.ue_module_id = ue_id;
ctxt.frame = ctxt_cpy.frame;
ctxt.enb_flag = ctxt_cpy.enb_flag;
pdcp_data_req( pdcp_data_req(
ctxt_pP->enb_module_id, &ctxt,
ue_id,
ctxt_pP->frame,
ctxt_pP->enb_flag,
SRB_FLAG_NO, SRB_FLAG_NO,
DEFAULT_RAB_ID, DEFAULT_RAB_ID,
RLC_MUI_UNDEFINED, RLC_MUI_UNDEFINED,
...@@ -581,10 +584,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -581,10 +584,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
} else { } else {
LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n"); LOG_D(PDCP, "Forcing send on DEFAULT_RAB_ID\n");
pdcp_data_req( pdcp_data_req(
ctxt_pP->enb_module_id, &ctxt_cpy,
ctxt_pP->ue_module_id,
ctxt_pP->frame,
ctxt_pP->enb_flag,
SRB_FLAG_NO, SRB_FLAG_NO,
DEFAULT_RAB_ID, DEFAULT_RAB_ID,
RLC_MUI_UNDEFINED, RLC_MUI_UNDEFINED,
...@@ -641,31 +641,33 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -641,31 +641,33 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
#ifdef OAI_EMU #ifdef OAI_EMU
// overwrite function input parameters, because only one netlink socket for all instances // overwrite function input parameters, because only one netlink socket for all instances
if (pdcp_read_header_g.inst < oai_emulation.info.nb_enb_local) { if (pdcp_read_header_g.inst < oai_emulation.info.nb_enb_local) {
ctxt_pP->enb_flag = 1; ctxt.frame = ctxt_cpy.frame;
ctxt_pP->ue_module_id = pdcp_read_header_g.rb_id / maxDRB + oai_emulation.info.first_ue_local; ctxt.enb_flag = ENB_FLAG_YES;
ctxt_pP->enb_module_id = pdcp_read_header_g.inst + oai_emulation.info.first_enb_local; ctxt.ue_module_id = pdcp_read_header_g.rb_id / maxDRB + oai_emulation.info.first_ue_local;
ctxt.enb_module_id = pdcp_read_header_g.inst + oai_emulation.info.first_enb_local;
rab_id = pdcp_read_header_g.rb_id % maxDRB; rab_id = pdcp_read_header_g.rb_id % maxDRB;
} else { } else {
ctxt_pP->enb_flag = 0; ctxt.frame = ctxt_cpy.frame;
ctxt_pP->ue_module_id = pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local; ctxt.enb_flag = ENB_FLAG_NO;
ctxt_pP->enb_module_id = 0; ctxt.ue_module_id = pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
ctxt.enb_module_id = 0;
rab_id = pdcp_read_header_g.rb_id; rab_id = pdcp_read_header_g.rb_id;
} }
AssertFatal (ctxt_pP->enb_module_id >= oai_emulation.info.first_enb_local, AssertFatal (ctxt.enb_module_id >= oai_emulation.info.first_enb_local,
"eNB inst is too low (%u/%d)!\n", "eNB inst is too low (%u/%d)!\n",
ctxt_pP->enb_module_id, ctxt.enb_module_id,
oai_emulation.info.first_enb_local); oai_emulation.info.first_enb_local);
AssertFatal (ctxt_pP->enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local), AssertFatal (ctxt.enb_module_id < (oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local),
"eNB inst is too high (%u/%d)!\n", "eNB inst is too high (%u/%d)!\n",
ctxt_pP->enb_module_id, ctxt.enb_module_id,
oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local); oai_emulation.info.first_enb_local + oai_emulation.info.nb_enb_local);
AssertFatal (ctxt_pP->ue_module_id >= oai_emulation.info.first_ue_local, AssertFatal (ctxt.ue_module_id >= oai_emulation.info.first_ue_local,
"UE inst is too low (%u/%d)!\n", "UE inst is too low (%u/%d)!\n",
ctxt_pP->ue_module_id, ctxt.ue_module_id,
oai_emulation.info.first_ue_local); oai_emulation.info.first_ue_local);
AssertFatal (ctxt_pP->ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local), AssertFatal (ctxt.ue_module_id < (oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local),
"UE inst is too high (%u/%d)!\n", "UE inst is too high (%u/%d)!\n",
ctxt_pP->ue_module_id, ctxt.ue_module_id,
oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local); oai_emulation.info.first_ue_local + oai_emulation.info.nb_ue_local);
AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB); AssertFatal (rab_id < maxDRB, "RB id is too high (%u/%d)!\n", rab_id, maxDRB);
/*LGpdcp_read_header.inst = (pdcp_read_header_g.inst >= oai_emulation.info.nb_enb_local) ? \ /*LGpdcp_read_header.inst = (pdcp_read_header_g.inst >= oai_emulation.info.nb_enb_local) ? \
...@@ -674,24 +676,27 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -674,24 +676,27 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
#else #else
pdcp_read_header_g.inst = 0; pdcp_read_header_g.inst = 0;
#warning "TO DO CORRCT VALUES FOR ue mod id, enb mod id" #warning "TO DO CORRCT VALUES FOR ue mod id, enb mod id"
if (ctxt_pP->enb_flag) { ctxt.frame = ctxt_cpy.frame;
ctxt_pP->ue_module_id = 0; if (ctxt_cpy.enb_flag) {
ctxt_pP->enb_module_id = 0; ctxt.enb_flag = ENB_FLAG_YES;
ctxt.ue_module_id = 0;
ctxt.enb_module_id = 0;
rab_id = pdcp_read_header_g.rb_id % maxDRB; rab_id = pdcp_read_header_g.rb_id % maxDRB;
} else { } else {
ctxt_pP->ue_module_id = 0; ctxt.enb_flag = ENB_FLAG_NO;
ctxt_pP->enb_module_id = 0; ctxt.ue_module_id = 0;
ctxt.enb_module_id = 0;
rab_id = pdcp_read_header_g.rb_id % maxDRB; rab_id = pdcp_read_header_g.rb_id % maxDRB;
} }
#endif #endif
if (ctxt_pP->enb_flag) { if (ctxt.enb_flag) {
if (rab_id != 0) { if (rab_id != 0) {
rab_id = rab_id % maxDRB; rab_id = rab_id % maxDRB;
if (pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ctxt_pP->ue_module_id][rab_id-1].instanciated_instance) { if (pdcp_array_drb_eNB[ctxt.enb_module_id][ctxt.ue_module_id][rab_id-1].instanciated_instance) {
#ifdef PDCP_DEBUG #ifdef PDCP_DEBUG
LOG_I(PDCP, "[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n", LOG_I(PDCP, "[FRAME %5u][eNB][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
ctxt_pP->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),
...@@ -699,15 +704,16 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -699,15 +704,16 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
#endif #endif
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n", LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
ctxt_pP->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_pP->enb_module_id, ctxt.enb_module_id,
ctxt_pP->ue_module_id, ctxt.ue_module_id,
rab_id); rab_id);
pdcp_data_req(ctxt_pP->enb_module_id,ctxt_pP->ue_module_id,ctxt_pP->frame, ctxt_pP->enb_flag,SRB_FLAG_NO, pdcp_data_req(&ctxt,
SRB_FLAG_NO,
rab_id, rab_id,
RLC_MUI_UNDEFINED, RLC_MUI_UNDEFINED,
RLC_SDU_CONFIRM_NO, RLC_SDU_CONFIRM_NO,
...@@ -716,32 +722,29 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -716,32 +722,29 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
PDCP_TRANSMISSION_MODE_DATA); PDCP_TRANSMISSION_MODE_DATA);
} else { } else {
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n", LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n",
ctxt_pP->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_pP->enb_module_id, ctxt.enb_module_id,
ctxt_pP->ue_module_id, ctxt.ue_module_id,
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
// is a broadcast packet, we have to send this packet on all default RABS of all connected UEs // is a broadcast packet, we have to send this packet on all default RABS of all connected UEs
#warning CODE TO BE REVIEWED, ONLY WORK FOR SIMPLE TOPOLOGY CASES #warning CODE TO BE REVIEWED, ONLY WORK FOR SIMPLE TOPOLOGY CASES
for (ctxt_pP->ue_module_id = 0; ctxt_pP->ue_module_id < NB_UE_INST; ctxt_pP->ue_module_id++) { for (ctxt.ue_module_id = 0; ctxt.ue_module_id < NB_UE_INST; ctxt.ue_module_id++) {
if (pdcp_array_drb_eNB[ctxt_pP->enb_module_id][ctxt_pP->ue_module_id][rab_id-1].instanciated_instance == TRUE) { if (pdcp_array_drb_eNB[ctxt.enb_module_id][ctxt.ue_module_id][rab_id-1].instanciated_instance == TRUE) {
LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n", LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
ctxt_pP->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_pP->enb_module_id, ctxt.enb_module_id,
ctxt_pP->ue_module_id, ctxt.ue_module_id,
DEFAULT_RAB_ID); DEFAULT_RAB_ID);
pdcp_data_req ( pdcp_data_req (
ctxt_pP->enb_module_id, &ctxt,
ctxt_pP->ue_module_id,
ctxt_pP->frame,
ctxt_pP->enb_flag,
SRB_FLAG_NO, SRB_FLAG_NO,
DEFAULT_RAB_ID, DEFAULT_RAB_ID,
RLC_MUI_UNDEFINED, RLC_MUI_UNDEFINED,
...@@ -754,30 +757,27 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -754,30 +757,27 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
} }
} else { } else {
if (rab_id != 0) { if (rab_id != 0) {
if (pdcp_array_drb_ue[ctxt_pP->ue_module_id][rab_id-1].instanciated_instance) { if (pdcp_array_drb_ue[ctxt.ue_module_id][rab_id-1].instanciated_instance) {
#ifdef PDCP_DEBUG #ifdef PDCP_DEBUG
LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n", LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
ctxt_pP->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);
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n", LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB %u]\n",
ctxt_pP->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_pP->enb_module_id, ctxt.enb_module_id,
ctxt_pP->ue_module_id, ctxt.ue_module_id,
rab_id); rab_id);
#endif #endif
pdcp_data_req( pdcp_data_req(
ctxt_pP->enb_module_id, &ctxt,
ctxt_pP->ue_module_id,
ctxt_pP->frame,
ctxt_pP->enb_flag,
SRB_FLAG_NO, SRB_FLAG_NO,
rab_id, rab_id,
RLC_MUI_UNDEFINED, RLC_MUI_UNDEFINED,
...@@ -787,29 +787,26 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP) ...@@ -787,29 +787,26 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
PDCP_TRANSMISSION_MODE_DATA); PDCP_TRANSMISSION_MODE_DATA);
} else { } else {
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n", LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u/%u][RB %u] NON INSTANCIATED INSTANCE, DROPPED\n",
ctxt_pP->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_pP->enb_module_id, ctxt.enb_module_id,
ctxt_pP->ue_module_id, ctxt.ue_module_id,
rab_id); rab_id);
} }
} else { } else {
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 %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n", LOG_D(PDCP, "[FRAME %5u][eNB][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u/%u][RB DEFAULT_RAB_ID %u]\n",
ctxt_pP->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_pP->enb_module_id, ctxt.enb_module_id,
ctxt_pP->ue_module_id, ctxt.ue_module_id,
DEFAULT_RAB_ID); DEFAULT_RAB_ID);
pdcp_data_req ( pdcp_data_req (
ctxt_pP->enb_module_id, &ctxt,
ctxt_pP->ue_module_id,
ctxt_pP->frame,
ctxt_pP->enb_flag,
SRB_FLAG_NO, SRB_FLAG_NO,
DEFAULT_RAB_ID, DEFAULT_RAB_ID,
RLC_MUI_UNDEFINED, RLC_MUI_UNDEFINED,
...@@ -842,7 +839,6 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) ...@@ -842,7 +839,6 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
uint8_t pdcp_mode, is_ue=0; uint8_t pdcp_mode, is_ue=0;
Packet_otg_elt_t *otg_pkt_info=NULL; Packet_otg_elt_t *otg_pkt_info=NULL;
int result; int result;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
src_id = ctxt_pP->enb_module_id; src_id = ctxt_pP->enb_module_id;
...@@ -875,9 +871,21 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) ...@@ -875,9 +871,21 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
pkt_size); pkt_size);
*/ */
//rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH; //rb_id = (/*NB_eNB_INST +*/ dst_id -1 ) * MAX_NUM_RB + DTCH;
ctxt.enb_module_id = ctxt_pP->enb_module_id;
ctxt.ue_module_id = dst_id;
ctxt.frame = ctxt_pP->frame;
ctxt.enb_flag = ctxt_pP->enb_flag;
LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n", LOG_D(OTG,"[eNB %d] Frame %d sending packet %d from module %d on rab id %d (src %d, dst %d) pkt size %d for pdcp mode %d\n",
ctxt_pP->enb_module_id, ctxt_pP->frame, pkt_cnt_enb++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode); ctxt_pP->enb_module_id, ctxt_pP->frame, pkt_cnt_enb++, module_id, rb_id, module_id, dst_id, pkt_size, pdcp_mode);
result = pdcp_data_req(ctxt_pP->enb_module_id, dst_id, ctxt_pP->frame, ctxt_pP->enb_flag, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED, RLC_SDU_CONFIRM_NO, pkt_size, otg_pkt,pdcp_mode); result = pdcp_data_req(&ctxt,
SRB_FLAG_NO,
rb_id,
RLC_MUI_UNDEFINED,
RLC_SDU_CONFIRM_NO,
pkt_size,
otg_pkt,
pdcp_mode);
AssertFatal (result == TRUE, "PDCP data request failed!\n"); AssertFatal (result == TRUE, "PDCP data request failed!\n");
} }
else { else {
...@@ -888,7 +896,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP) ...@@ -888,7 +896,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
ctxt_pP->ue_module_id, ctxt_pP->frame, pkt_cnt_ue++, src_id, rb_id, src_id, dst_id, pkt_size); ctxt_pP->ue_module_id, ctxt_pP->frame, pkt_cnt_ue++, src_id, rb_id, src_id, dst_id, pkt_size);
ctxt.enb_module_id = dst_id; ctxt.enb_module_id = dst_id;
ctxt.ue_module_id = ue_module_id; ctxt.ue_module_id = ctxt_pP->ue_module_id;
ctxt.frame = ctxt_pP->frame; ctxt.frame = ctxt_pP->frame;
ctxt.enb_flag = ctxt_pP->enb_flag; ctxt.enb_flag = ctxt_pP->enb_flag;
......
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