Merge remote-tracking branch 'origin/itti-no-threads' into integration_2023_w43
This commit is contained in:
@@ -47,8 +47,8 @@ int create_tasks_ue(uint32_t ue_nb) {
|
||||
if (users == NULL) abort();
|
||||
|
||||
users->count = ue_nb;
|
||||
|
||||
if (itti_create_task (TASK_NAS_UE, nas_ue_task, users) < 0) {
|
||||
ittiTask_parms_t parms = {users, NULL};
|
||||
if (itti_create_task(TASK_NAS_UE, nas_ue_task, &parms) < 0) {
|
||||
LOG_E(NAS, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void rx_func(void *param)
|
||||
pushTpool(&gNB->threadPool, res);
|
||||
}
|
||||
} else if (get_softmodem_params()->continuous_tx) {
|
||||
notifiedFIFO_elt_t *res = pullTpool(&gNB->L1_tx_free, &gNB->threadPool);
|
||||
notifiedFIFO_elt_t *res = pullNotifiedFIFO(&gNB->L1_tx_free);
|
||||
if (res == NULL)
|
||||
return; // Tpool has been stopped
|
||||
processingData_L1tx_t *syncMsg = (processingData_L1tx_t *)NotifiedFifoData(res);
|
||||
@@ -420,10 +420,8 @@ void *nrL1_stats_thread(void *param) {
|
||||
// two parallel L1 tx threads.
|
||||
void *tx_reorder_thread(void* param) {
|
||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
||||
notifiedFIFO_elt_t *resL1Reserve = NULL;
|
||||
|
||||
|
||||
resL1Reserve = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
|
||||
notifiedFIFO_elt_t *resL1Reserve = pullNotifiedFIFO(&gNB->L1_tx_out);
|
||||
AssertFatal(resL1Reserve != NULL, "pullTpool() did not return start message in %s\n", __func__);
|
||||
int next_tx_slot=((processingData_L1tx_t *)NotifiedFifoData(resL1Reserve))->slot;
|
||||
|
||||
@@ -436,15 +434,15 @@ void *tx_reorder_thread(void* param) {
|
||||
if (((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot) {
|
||||
LOG_E(PHY,"order mistake\n");
|
||||
resL1Reserve = NULL;
|
||||
resL1 = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
|
||||
resL1 = pullNotifiedFIFO(&gNB->L1_tx_out);
|
||||
}
|
||||
} else {
|
||||
resL1 = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
|
||||
} else {
|
||||
resL1 = pullNotifiedFIFO(&gNB->L1_tx_out);
|
||||
if (resL1 != NULL && ((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot) {
|
||||
if (resL1Reserve)
|
||||
LOG_E(PHY,"error, have a stored packet, then a second one\n");
|
||||
resL1Reserve = resL1;
|
||||
resL1 = pullTpool(&gNB->L1_tx_out, &gNB->threadPool);
|
||||
resL1 = pullNotifiedFIFO(&gNB->L1_tx_out);
|
||||
if (((processingData_L1tx_t *)NotifiedFifoData(resL1))->slot != next_tx_slot)
|
||||
LOG_E(PHY,"error, pull two msg, none is good\n");
|
||||
}
|
||||
|
||||
@@ -197,7 +197,8 @@ int create_tasks_nrue(uint32_t ue_nb) {
|
||||
|
||||
if (ue_nb > 0) {
|
||||
LOG_I(NR_RRC,"create TASK_RRC_NRUE \n");
|
||||
if (itti_create_task (TASK_RRC_NRUE, rrc_nrue_task, NULL) < 0) {
|
||||
const ittiTask_parms_t parmsRRC = {NULL, rrc_nrue};
|
||||
if (itti_create_task(TASK_RRC_NRUE, rrc_nrue_task, &parmsRRC) < 0) {
|
||||
LOG_E(NR_RRC, "Create task for RRC UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -208,7 +209,8 @@ int create_tasks_nrue(uint32_t ue_nb) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (itti_create_task (TASK_NAS_NRUE, nas_nrue_task, NULL) < 0) {
|
||||
const ittiTask_parms_t parmsNAS = {NULL, nas_nrue};
|
||||
if (itti_create_task(TASK_NAS_NRUE, nas_nrue_task, &parmsNAS) < 0) {
|
||||
LOG_E(NR_RRC, "Create task for NAS UE failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ void get_common_options(uint32_t execmask) {
|
||||
|
||||
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC;
|
||||
checkedparam_t cmdline_CheckParams[] = CMDLINE_PARAMS_CHECK_DESC;
|
||||
int numparams = sizeof(cmdline_params) / sizeof(paramdef_t);
|
||||
int numparams = sizeofArray(cmdline_params);
|
||||
config_set_checkfunctions(cmdline_params, cmdline_CheckParams, numparams);
|
||||
config_get(cmdline_params, sizeof(cmdline_params) / sizeof(paramdef_t), NULL);
|
||||
nfapi_index = config_paramidx_fromname(cmdline_params, sizeof(cmdline_params) / sizeof(paramdef_t),"nfapi");
|
||||
config_get(cmdline_params, numparams, NULL);
|
||||
nfapi_index = config_paramidx_fromname(cmdline_params, numparams, "nfapi");
|
||||
AssertFatal(nfapi_index >= 0,"Index for nfapi config option not found!");
|
||||
nfapi_mode = config_get_processedint(&cmdline_params[nfapi_index]);
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ extern "C"
|
||||
#define CONFIG_HLP_SYNC_REF "Sync Reference in Sidelink\n"
|
||||
#define CONFIG_HLP_NID1 "Set NID1 value in Sidelink\n"
|
||||
#define CONFIG_HLP_NID2 "Set NID2 value in Sidelink\n"
|
||||
#define CONFIG_HLP_NOITTI "Do not start itti threads, call queue processing in place, inside the caller thread"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
@@ -190,6 +191,7 @@ extern int usrp_tx_thread;
|
||||
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \
|
||||
{"nid1", CONFIG_HLP_NID1, 0, .iptr=&NID1, .defintval=10, TYPE_INT, 0}, \
|
||||
{"nid2", CONFIG_HLP_NID2, 0, .iptr=&NID2, .defintval=1, TYPE_INT, 0}, \
|
||||
{"no-itti-threads", CONFIG_HLP_NOITTI, PARAMFLAG_BOOL, .iptr=&softmodem_params.no_itti, .defintval=0, TYPE_INT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -238,6 +240,7 @@ extern int usrp_tx_thread;
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -349,6 +352,7 @@ typedef struct {
|
||||
int sync_ref;
|
||||
int nid1;
|
||||
int nid2;
|
||||
int no_itti;
|
||||
} softmodem_params_t;
|
||||
|
||||
extern uint64_t get_softmodem_optmask(void);
|
||||
|
||||
Reference in New Issue
Block a user