Skip to content
Snippets Groups Projects
Commit feb361b4 authored by nikaeinn's avatar nikaeinn
Browse files

update the logging when the pdcp instance is not configured

parent 895775e5
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,6 @@ typedef uint32_t frame_t;
typedef int32_t sframe_t;
typedef uint32_t sub_frame_t;
typedef uint8_t module_id_t;
typedef uint8_t configured_t;
typedef uint8_t eNB_index_t;
typedef uint16_t ue_id_t;
typedef int16_t smodule_id_t;
......@@ -216,7 +215,7 @@ typedef struct protocol_ctxt_s {
frame_t frame; /*!< \brief LTE frame number.*/
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
configured_t configured; /*!< \brief flag indicating whether the instance is configured or not */
boolean_t configured; /*!< \brief flag indicating whether the instance is configured or not */
} protocol_ctxt_t;
// warning time hardcoded
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
......
......@@ -147,16 +147,15 @@ boolean_t pdcp_data_req(
if (h_rc != HASH_TABLE_OK) {
if (modeP != PDCP_TRANSMISSION_MODE_TRANSPARENT) {
if ((ctxt_pP->configured == 0) && (ctxt_pP->frame%10 == 0))
LOG_W(PDCP, PROTOCOL_CTXT_FMT" Instance is not configured for rb_id %d Ignoring SDU...\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
rb_idP);
ctxt_pP->configured=0;
LOG_W(PDCP, PROTOCOL_CTXT_FMT" Instance is not configured for rb_id %d Ignoring SDU...\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
rb_idP);
ctxt_pP->configured=FALSE;
return FALSE;
}
}else{
// instance for a given RB is configured
ctxt_pP->configured=1;
ctxt_pP->configured=TRUE;
}
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
......
......@@ -28,7 +28,7 @@
*******************************************************************************/
/*! \file gtpv1u_eNB.c
* \brief
* \author Sebastien ROUX, Lionel GAUTHIER
* \author Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
* \version 1.0
* \company Eurecom
* \email: lionel.gauthier@eurecom.fr
......@@ -289,7 +289,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
NwGtpv1uUlpHandleT hUlp,
NwGtpv1uUlpApiT *pUlpApi)
{
int result = 0;
boolean_t result = FALSE;
teid_t teid = 0;
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
......@@ -335,38 +335,51 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
//#warning "LG eps bearer mapping to DRB id to do (offset -4)"
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, gtpv1u_teid_data_p->enb_id, ENB_FLAG_YES, gtpv1u_teid_data_p->ue_id, 0, 0,gtpv1u_teid_data_p->enb_id);
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_PDCP_ENB,
NULL,0,
MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
0,0,
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
buffer_len);
result = pdcp_data_req(
&ctxt,
SRB_FLAG_NO,
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
0, // mui
SDU_CONFIRM_NO, // confirm
buffer_len,
buffer,
PDCP_TRANSMISSION_MODE_DATA);
AssertError (result == TRUE, return NW_GTPV1U_FAILURE ,"PDCP data request failed!\n");
if (ctxt.configured == TRUE ) {
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB,
MSC_PDCP_ENB,
NULL,0,
MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
0,0,
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
buffer_len);
result = pdcp_data_req(
&ctxt,
SRB_FLAG_NO,
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
0, // mui
SDU_CONFIRM_NO, // confirm
buffer_len,
buffer,
PDCP_TRANSMISSION_MODE_DATA);
}
if ( result == FALSE ) {
if (ctxt.configured == FALSE )
LOG_W(GTPU, "PDCP data request failed, cause: RB is not configured!\n") ;
else
LOG_W(GTPU, "PDCP data request failed\n");
return NW_GTPV1U_FAILURE;
}
} else {
LOG_E(GTPU, "Received T-PDU from gtpv1u stack teid %u unknown size %u", teid, buffer_len);
LOG_W(GTPU, "Received T-PDU from gtpv1u stack teid %u unknown size %u", teid, buffer_len);
}
}
break;
break;
default: {
LOG_E(GTPU, "Received undefined UlpApi (%02x) from gtpv1u stack!\n",
pUlpApi->apiType);
}
}
} // end of switch
return NW_GTPV1U_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment