Commit 4ad7d7b5 authored by Michael Cook's avatar Michael Cook

Merge branch 'episys/andrew/dlsch_pdu_index_bug_fix' into 'episys/master'

Episys/andrew/dlsch pdu index bug fix

See merge request aburger/openairinterface5g!9
parents 3960694b cb4e5a35
......@@ -13,9 +13,9 @@ eNBs =
eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
tracking_area_code = 5;
plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } );
plmn_list = ( { mcc = 320; mnc = 230; mnc_length = 3; } );
tr_s_preference = "local_mac"
......@@ -172,7 +172,7 @@ eNBs =
////////// MME parameters:
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR";
mme_ip_address = ( { ipv4 = "192.168.61.3";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -188,12 +188,12 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "ens3";
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
ENB_INTERFACE_NAME_FOR_S1U = "ens3";
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
ENB_INTERFACE_NAME_FOR_S1_MME = "ctrl0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "172.16.1.1";
ENB_INTERFACE_NAME_FOR_S1U = "ctrl0";
ENB_IPV4_ADDRESS_FOR_S1U = "172.16.1.1";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
ENB_IPV4_ADDRESS_FOR_X2C = "0.0.0.0";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
};
......
......@@ -197,10 +197,11 @@ void set_softmodem_sighandler(void) {
memset(&act,0,sizeof(act));
act.sa_handler=signal_handler;
sigaction(SOFTMODEM_RTSIGNAL,&act,&oldact);
printf("Send signal %d to display resource usage...\n",SIGRTMIN+1);
signal(SIGSEGV, signal_handler);
signal(SIGINT, signal_handler);
signal(SIGTERM, signal_handler);
signal(SIGABRT, signal_handler);
// Disabled in order generate a core dump for analysis with gdb
// printf("Send signal %d to display resource usage...\n",SIGRTMIN+1);
// signal(SIGSEGV, signal_handler);
// signal(SIGINT, signal_handler);
// signal(SIGTERM, signal_handler);
// signal(SIGABRT, signal_handler);
}
......@@ -1000,13 +1000,14 @@ static int get_dlsch_pdu_indicies(const nfapi_dl_config_request_t *req, int *pdu
return num_pdu_indicies;
}
typedef struct dlsch_pdu_indicies_t
typedef struct dlsch_pdu_indicies_and_request_t
{
size_t num_indicies;
int *indicies;
}dlsch_pdu_indicies_t;
nfapi_dl_config_request_t *req;
}dlsch_pdu_indicies_and_request_t;
static void print_lists(const dlsch_pdu_indicies_t *dlsch_list, const nfapi_tx_req_pdu_list_t *tx_pdu_list)
static void print_lists(const dlsch_pdu_indicies_and_request_t *dlsch_list, const nfapi_tx_req_pdu_list_t *tx_pdu_list)
{
const size_t max_result = 1024;
uint16_t num_pdus = tx_pdu_list->num_pdus;
......@@ -1034,7 +1035,7 @@ static void print_lists(const dlsch_pdu_indicies_t *dlsch_list, const nfapi_tx_r
static bool match_dl_config_req(void *wanted_vp, void *candidate_vp)
{
dlsch_pdu_indicies_t *wanted = wanted_vp;
dlsch_pdu_indicies_and_request_t *wanted = wanted_vp;
const nfapi_tx_req_pdu_list_t *candidate = candidate_vp;
int num_pdus = candidate->num_pdus;
......@@ -1043,13 +1044,23 @@ static bool match_dl_config_req(void *wanted_vp, void *candidate_vp)
LOG_E(MAC, "tx_req_pdus not equal to dlsch_pdus:: %zu != %d\n", wanted->num_indicies, num_pdus);
return false;
}
for (int i = 0; i < num_pdus; ++i)
{
bool found = false;
const nfapi_tx_request_pdu_t *pdu = &candidate->pdus[i];
for (int j = 0; j < num_pdus; ++j)
{
if (pdu->pdu_index == wanted->indicies[i])
size_t dlsch_index = wanted->indicies[j];
AssertFatal(dlsch_index < wanted->req->dl_config_request_body.number_pdu, "dlsch_index is out of range of pdu_list\n");
nfapi_dl_config_request_pdu_t *dlsch_pdu = &wanted->req->dl_config_request_body.dl_config_pdu_list[dlsch_index];
// This may be redundant but wont hurt.
AssertFatal(dlsch_pdu->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE,
"dlsch_index: %zu does not map to a DLSCH_PDU in dl_config_req sfn.sf = %d.%d pdu_type = %d\n",
dlsch_index, wanted->req->sfn_sf >> 4, wanted->req->sfn_sf & 15, dlsch_pdu->pdu_type);
if (pdu->pdu_index == dlsch_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index)
{
found = true;
break;
......@@ -1084,21 +1095,22 @@ int memcpy_dl_config_req(L1_rxtx_proc_t *proc,
req->sfn_sf >> 4, req->sfn_sf & 15);
return 0;
}
dlsch_pdu_indicies_t wanted =
dlsch_pdu_indicies_and_request_t wanted =
{
num_dlsch_pdu_indicies,
dlsch_pdu_indicies,
req,
};
nfapi_tx_req_pdu_list_t *matched =
unqueue_matching(&tx_req_pdu_queue, /*max_depth=*/ 2,
match_dl_config_req, &wanted);
if (!matched)
{
LOG_W(MAC, "Could not unqueue_matching\n");
LOG_E(MAC, "Could not unqueue_matching\n");
return 0;
}
LOG_E(MAC, "REMOVING.. dl_config_req & tx_req\n");
LOG_I(MAC, "REMOVING.. dl_config_req & tx_req\n");
free(matched);
return 0;
......
......@@ -2430,7 +2430,7 @@ void init_UE_single_thread_stub(int nb_inst)
AssertFatal(PHY_vars_UE_g[i]!=NULL,"PHY_vars_UE_g[inst] is NULL\n");
AssertFatal(PHY_vars_UE_g[i][0]!=NULL,"PHY_vars_UE_g[inst][0] is NULL\n");
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) {
if(NFAPI_MODE==NFAPI_UE_STUB_PNF || NFAPI_MODE_STANDALONE_PNF) {
#ifdef NAS_UE
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_NAS_UE, INITIALIZE_MESSAGE);
......
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