Commit 64144a84 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/issue391-removeunusedcode_L2L1task' into...

Merge remote-tracking branch 'origin/issue391-removeunusedcode_L2L1task' into develop_integration_2019_w04
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parents 298de921 9d0c70c9
......@@ -145,6 +145,7 @@ extern "C" {
#define DEBUG_CTRLSOCKET (1<<10)
#define DEBUG_SECURITY (1<<11)
#define DEBUG_NAS (1<<12)
#define DEBUG_RLC (1<<13)
#define UE_TIMING (1<<20)
......@@ -162,6 +163,7 @@ extern "C" {
{"CTRLSOCKET", DEBUG_CTRLSOCKET},\
{"SECURITY", DEBUG_SECURITY},\
{"NAS", DEBUG_NAS},\
{"RLC", DEBUG_RLC},\
{"UE_TIMING", UE_TIMING},\
{NULL,-1}\
}
......
......@@ -25,46 +25,46 @@
#include <stdint.h>
typedef enum {
MIN_MSC_ENV = 0,
MSC_E_UTRAN = MIN_MSC_ENV,
MSC_E_UTRAN_LIPA,
MSC_MME_GW,
MSC_MME,
MSC_SP_GW,
MAX_MSC_ENV
MIN_MSC_ENV = 0,
MSC_E_UTRAN = MIN_MSC_ENV,
MSC_E_UTRAN_LIPA,
MSC_MME_GW,
MSC_MME,
MSC_SP_GW,
MAX_MSC_ENV
} msc_env_t;
typedef enum {
MIN_MSC_PROTOS = 0,
MSC_IP_UE = MIN_MSC_PROTOS,
MSC_NAS_UE,
MSC_RRC_UE,
MSC_PDCP_UE,
MSC_RLC_UE,
MSC_MAC_UE,
MSC_PHY_UE,
MSC_PHY_ENB,
MSC_MAC_ENB,
MSC_RLC_ENB,
MSC_PDCP_ENB,
MSC_RRC_ENB,
MSC_IP_ENB,
MSC_S1AP_ENB,
MSC_GTPU_ENB,
MSC_GTPU_SGW,
MSC_S1AP_MME,
MSC_MMEAPP_MME,
MSC_NAS_MME,
MSC_NAS_EMM_MME,
MSC_NAS_ESM_MME,
MSC_SP_GWAPP_MME,
MSC_S11_MME,
MSC_S6A_MME,
MSC_HSS,
MAX_MSC_PROTOS,
MSC_X2AP_SRC_ENB,
MSC_X2AP_TARGET_ENB,
MIN_MSC_PROTOS = 0,
MSC_IP_UE = MIN_MSC_PROTOS,
MSC_NAS_UE,
MSC_RRC_UE,
MSC_PDCP_UE,
MSC_RLC_UE,
MSC_MAC_UE,
MSC_PHY_UE,
MSC_PHY_ENB,
MSC_MAC_ENB,
MSC_RLC_ENB,
MSC_PDCP_ENB,
MSC_RRC_ENB,
MSC_IP_ENB,
MSC_S1AP_ENB,
MSC_GTPU_ENB,
MSC_GTPU_SGW,
MSC_S1AP_MME,
MSC_MMEAPP_MME,
MSC_NAS_MME,
MSC_NAS_EMM_MME,
MSC_NAS_ESM_MME,
MSC_SP_GWAPP_MME,
MSC_S11_MME,
MSC_S6A_MME,
MSC_HSS,
MAX_MSC_PROTOS,
MSC_X2AP_SRC_ENB,
MSC_X2AP_TARGET_ENB,
} msc_proto_t;
......@@ -73,22 +73,22 @@ typedef enum {
#define MSC_AS_TIME_FMT "%05u:%02u"
#define MSC_AS_TIME_ARGS(CTXT_Pp) \
(CTXT_Pp)->frame, \
(CTXT_Pp)->subframe
(CTXT_Pp)->frame, \
(CTXT_Pp)->subframe
typedef int(*msc_init_t)(const msc_env_t, const int );
typedef void(*msc_start_use_t)(void );
typedef void(*msc_end_t)(void);
typedef void(*msc_log_event_t)(const msc_proto_t,char *, ...);
typedef void(*msc_log_message_t)(const char * const, const msc_proto_t, const msc_proto_t,
const uint8_t* const, const unsigned int, char * , ...);
typedef void(*msc_log_message_t)(const char *const, const msc_proto_t, const msc_proto_t,
const uint8_t *const, const unsigned int, char *, ...);
typedef struct msc_interface {
int msc_loaded;
msc_init_t msc_init;
msc_start_use_t msc_start_use;
msc_end_t msc_end;
msc_log_event_t msc_log_event;
msc_log_message_t msc_log_message;
int msc_loaded;
msc_init_t msc_init;
msc_start_use_t msc_start_use;
msc_end_t msc_end;
msc_log_event_t msc_log_event;
msc_log_message_t msc_log_message;
} msc_interface_t;
#ifdef MSC_LIBRARY
......@@ -99,15 +99,17 @@ void msc_end(void);
void msc_log_declare_proto(const msc_proto_t protoP);
void msc_log_event(const msc_proto_t protoP,char *format, ...);
void msc_log_message(
const char * const message_operationP,
const msc_proto_t receiverP,
const msc_proto_t senderP,
const uint8_t* const bytesP,
const unsigned int num_bytes,
char *format, ...);
const char *const message_operationP,
const msc_proto_t receiverP,
const msc_proto_t senderP,
const uint8_t *const bytesP,
const unsigned int num_bytes,
char *format, ...);
#else
#define MESSAGE_CHART_GENERATOR msc_interface.msc_loaded
msc_interface_t msc_interface;
#define MSC_INIT(arg1,arg2) if(msc_interface.msc_loaded) msc_interface.msc_init(arg1,arg2)
#define MSC_START_USE if(msc_interface.msc_loaded) msc_interface.msc_start_use
......@@ -119,4 +121,4 @@ msc_interface_t msc_interface;
#define MSC_LOG_TX_MESSAGE_FAILED(sENDER, rECEIVER, bYTES, nUMbYTES, fORMAT, aRGS...) if(msc_interface.msc_loaded) msc_interface.msc_log_message("-x",sENDER, rECEIVER, (const uint8_t *)bYTES, nUMbYTES, fORMAT, ##aRGS)
#endif
#endif
#endif
......@@ -25,18 +25,11 @@ TASK_DEF(TASK_TIMER, TASK_PRIORITY_MAX, 10)
// Other possible tasks in the process
// Common tasks:
/// Layer 2 and Layer 1 task supporting all the synchronous processing
TASK_DEF(TASK_L2L1, TASK_PRIORITY_MAX_LEAST, 200)
/// Bearers Manager task
TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200)
// eNodeB tasks and sub-tasks:
//// Layer 2 and Layer 1 sub-tasks
SUB_TASK_DEF(TASK_L2L1, TASK_PHY_ENB, 200)
SUB_TASK_DEF(TASK_L2L1, TASK_MAC_ENB, 200)
SUB_TASK_DEF(TASK_L2L1, TASK_RLC_ENB, 200)
SUB_TASK_DEF(TASK_L2L1, TASK_PDCP_ENB, 200)
/// Radio Resource Control task
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200)
......@@ -63,11 +56,6 @@ TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200)
TASK_DEF(TASK_FLEXRAN_AGENT, TASK_PRIORITY_MED, 200)
// UE tasks and sub-tasks:
//// Layer 2 and Layer 1 sub-tasks
SUB_TASK_DEF(TASK_L2L1, TASK_PHY_UE, 200)
SUB_TASK_DEF(TASK_L2L1, TASK_MAC_UE, 200)
SUB_TASK_DEF(TASK_L2L1, TASK_RLC_UE, 200)
SUB_TASK_DEF(TASK_L2L1, TASK_PDCP_UE, 200)
/// Radio Resource Control task
TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -5499,37 +5499,6 @@ rrc_eNB_decode_ccch(
0,
0);
/*
#if defined(ENABLE_ITTI)
# if defined(DISABLE_ITTI_XER_PRINT)
{
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_UL_CCCH_MESSAGE);
memcpy(&message_p->ittiMsg, (void *)ul_ccch_msg, sizeof(RrcUlCcchMessage));
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, message_p);
}
# else
{
char message_string[10000];
size_t message_string_size;
if ((message_string_size =
xer_sprint(message_string, sizeof(message_string), &asn_DEF_LTE_UL_CCCH_Message, (void *)ul_ccch_msg)) > 0) {
MessageDef *msg_p;
msg_p = itti_alloc_new_message_sized(TASK_RRC_ENB, RRC_UL_CCCH, message_string_size + sizeof(IttiMsgText));
msg_p->ittiMsg.rrc_ul_ccch.size = message_string_size;
memcpy(&msg_p->ittiMsg.rrc_ul_ccch.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p);
}
}
# endif
#endif
*/
for (i = 0; i < 8; i++) {
LOG_T(RRC, "%x.", ((uint8_t *) & ul_ccch_msg)[i]);
}
......@@ -6017,12 +5986,8 @@ rrc_eNB_decode_dcch(
LTE_UL_DCCH_Message_t *ul_dcch_msg = NULL; //&uldcchmsg;
int i;
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
#if defined(ENABLE_ITTI)
# if defined(ENABLE_USE_MME)
MessageDef *msg_delete_tunnels_p = NULL;
uint8_t xid;
#endif
#endif
int dedicated_DRB=0;
T(T_ENB_RRC_UL_DCCH_DATA_IN, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
......
This diff is collapsed.
This diff is collapsed.
......@@ -36,103 +36,52 @@
#include "s1ap_common.h"
#include "s1ap_eNB_decoder.h"
static int s1ap_eNB_decode_initiating_message(S1AP_S1AP_PDU_t *pdu)
{
MessageDef *message_p;
MessagesIds message_id;
static int s1ap_eNB_decode_initiating_message(S1AP_S1AP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL);
switch(pdu->choice.initiatingMessage.procedureCode) {
case S1AP_ProcedureCode_id_downlinkNASTransport:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_DOWNLINK_NAS_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_downlink_nas_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_downlink_nas_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
break;
case S1AP_ProcedureCode_id_InitialContextSetup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_INITIAL_CONTEXT_SETUP_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_initial_context_setup_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_initial_context_setup_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
break;
case S1AP_ProcedureCode_id_UEContextRelease:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_UE_CONTEXT_RELEASE_COMMAND_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_ue_context_release_command_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_ue_context_release_command_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
break;
case S1AP_ProcedureCode_id_Paging:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_PAGING_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_paging_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_paging_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
S1AP_INFO("Paging initiating message\n");
free(res.buffer);
break;
case S1AP_ProcedureCode_id_E_RABSetup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_E_RAB_SETUP_REQUEST_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_e_rab_setup_request_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_e_rab_setup_request_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
S1AP_INFO("E_RABSetup initiating message\n");
break;
case S1AP_ProcedureCode_id_E_RABModify:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_E_RAB_MODIFY_REQUEST_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_e_rab_modify_request_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_e_rab_modify_request_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
S1AP_INFO("E_RABModify initiating message\n");
break;
case S1AP_ProcedureCode_id_E_RABRelease:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_E_RAB_RELEASE_REQUEST_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_e_rab_release_request_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_e_rab_release_request_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
S1AP_INFO("TODO E_RABRelease initiating message\n");
break;
case S1AP_ProcedureCode_id_ErrorIndication:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_ERROR_INDICATION_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id,
res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_error_indication_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_error_indication_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
S1AP_INFO("TODO ErrorIndication initiating message\n");
break;
......@@ -148,21 +97,13 @@ static int s1ap_eNB_decode_initiating_message(S1AP_S1AP_PDU_t *pdu)
return 0;
}
static int s1ap_eNB_decode_successful_outcome(S1AP_S1AP_PDU_t *pdu)
{
MessageDef *message_p;
MessagesIds message_id;
static int s1ap_eNB_decode_successful_outcome(S1AP_S1AP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL);
switch(pdu->choice.successfulOutcome.procedureCode) {
case S1AP_ProcedureCode_id_S1Setup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_S1_SETUP_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_s1_setup_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_s1_setup_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
break;
......@@ -175,21 +116,13 @@ static int s1ap_eNB_decode_successful_outcome(S1AP_S1AP_PDU_t *pdu)
return 0;
}
static int s1ap_eNB_decode_unsuccessful_outcome(S1AP_S1AP_PDU_t *pdu)
{
MessageDef *message_p;
MessagesIds message_id;
static int s1ap_eNB_decode_unsuccessful_outcome(S1AP_S1AP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} };
DevAssert(pdu != NULL);
switch(pdu->choice.unsuccessfulOutcome.procedureCode) {
case S1AP_ProcedureCode_id_S1Setup:
res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_S1AP_S1AP_PDU, pdu);
message_id = S1AP_S1_SETUP_LOG;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, res.result.encoded + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_s1_setup_log.size = res.result.encoded;
memcpy(&message_p->ittiMsg.s1ap_s1_setup_log.text, res.buffer, res.result.encoded);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(res.buffer);
break;
......@@ -203,13 +136,10 @@ static int s1ap_eNB_decode_unsuccessful_outcome(S1AP_S1AP_PDU_t *pdu)
}
int s1ap_eNB_decode_pdu(S1AP_S1AP_PDU_t *pdu, const uint8_t *const buffer,
const uint32_t length)
{
const uint32_t length) {
asn_dec_rval_t dec_ret;
DevAssert(pdu != NULL);
DevAssert(buffer != NULL);
dec_ret = aper_decode(NULL,
&asn_DEF_S1AP_S1AP_PDU,
(void **)&pdu,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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