Commit feb361b4 authored by nikaeinn's avatar nikaeinn

update the logging when the pdcp instance is not configured

parent 895775e5
...@@ -68,7 +68,6 @@ typedef uint32_t frame_t; ...@@ -68,7 +68,6 @@ typedef uint32_t frame_t;
typedef int32_t sframe_t; typedef int32_t sframe_t;
typedef uint32_t sub_frame_t; typedef uint32_t sub_frame_t;
typedef uint8_t module_id_t; typedef uint8_t module_id_t;
typedef uint8_t configured_t;
typedef uint8_t eNB_index_t; typedef uint8_t eNB_index_t;
typedef uint16_t ue_id_t; typedef uint16_t ue_id_t;
typedef int16_t smodule_id_t; typedef int16_t smodule_id_t;
...@@ -216,7 +215,7 @@ typedef struct protocol_ctxt_s { ...@@ -216,7 +215,7 @@ typedef struct protocol_ctxt_s {
frame_t frame; /*!< \brief LTE frame number.*/ frame_t frame; /*!< \brief LTE frame number.*/
sub_frame_t subframe; /*!< \brief LTE sub 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) */ 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; } protocol_ctxt_t;
// warning time hardcoded // warning time hardcoded
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe) #define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
......
...@@ -147,16 +147,15 @@ boolean_t pdcp_data_req( ...@@ -147,16 +147,15 @@ boolean_t pdcp_data_req(
if (h_rc != HASH_TABLE_OK) { if (h_rc != HASH_TABLE_OK) {
if (modeP != PDCP_TRANSMISSION_MODE_TRANSPARENT) { 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",
LOG_W(PDCP, PROTOCOL_CTXT_FMT" Instance is not configured for rb_id %d Ignoring SDU...\n", PROTOCOL_CTXT_ARGS(ctxt_pP),
PROTOCOL_CTXT_ARGS(ctxt_pP), rb_idP);
rb_idP); ctxt_pP->configured=FALSE;
ctxt_pP->configured=0;
return FALSE; return FALSE;
} }
}else{ }else{
// instance for a given RB is configured // instance for a given RB is configured
ctxt_pP->configured=1; ctxt_pP->configured=TRUE;
} }
if (ctxt_pP->enb_flag == ENB_FLAG_NO) { if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
*******************************************************************************/ *******************************************************************************/
/*! \file gtpv1u_eNB.c /*! \file gtpv1u_eNB.c
* \brief * \brief
* \author Sebastien ROUX, Lionel GAUTHIER * \author Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
* \version 1.0 * \version 1.0
* \company Eurecom * \company Eurecom
* \email: lionel.gauthier@eurecom.fr * \email: lionel.gauthier@eurecom.fr
...@@ -289,7 +289,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -289,7 +289,7 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
NwGtpv1uUlpHandleT hUlp, NwGtpv1uUlpHandleT hUlp,
NwGtpv1uUlpApiT *pUlpApi) NwGtpv1uUlpApiT *pUlpApi)
{ {
int result = 0; boolean_t result = FALSE;
teid_t teid = 0; teid_t teid = 0;
hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS; hashtable_rc_t hash_rc = HASH_TABLE_KEY_NOT_EXISTS;
gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL; gtpv1u_teid_data_t *gtpv1u_teid_data_p = NULL;
...@@ -335,38 +335,51 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req( ...@@ -335,38 +335,51 @@ NwGtpv1uRcT gtpv1u_eNB_process_stack_req(
//#warning "LG eps bearer mapping to DRB id to do (offset -4)" //#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); 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);
if (ctxt.configured == TRUE ) {
MSC_LOG_TX_MESSAGE(
MSC_GTPU_ENB, MSC_LOG_TX_MESSAGE(
MSC_PDCP_ENB, MSC_GTPU_ENB,
NULL,0, MSC_PDCP_ENB,
MSC_AS_TIME_FMT" DATA-REQ rb %u size %u", NULL,0,
0,0, MSC_AS_TIME_FMT" DATA-REQ rb %u size %u",
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4, 0,0,
buffer_len); (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
buffer_len);
result = pdcp_data_req(
&ctxt, result = pdcp_data_req(
SRB_FLAG_NO, &ctxt,
(gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4, SRB_FLAG_NO,
0, // mui (gtpv1u_teid_data_p->eps_bearer_id) ? gtpv1u_teid_data_p->eps_bearer_id - 4: 5-4,
SDU_CONFIRM_NO, // confirm 0, // mui
buffer_len, SDU_CONFIRM_NO, // confirm
buffer, buffer_len,
PDCP_TRANSMISSION_MODE_DATA); buffer,
AssertError (result == TRUE, return NW_GTPV1U_FAILURE ,"PDCP data request failed!\n"); 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 { } 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: { default: {
LOG_E(GTPU, "Received undefined UlpApi (%02x) from gtpv1u stack!\n", LOG_E(GTPU, "Received undefined UlpApi (%02x) from gtpv1u stack!\n",
pUlpApi->apiType); pUlpApi->apiType);
} }
}
} // end of switch
return NW_GTPV1U_OK; return NW_GTPV1U_OK;
} }
......
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