Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
a828da1b
Commit
a828da1b
authored
Oct 30, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/itti-no-threads' into integration_2023_w43
parents
803fcb59
a1982390
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
411 additions
and
373 deletions
+411
-373
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+25
-16
common/utils/ocp_itti/intertask_interface.h
common/utils/ocp_itti/intertask_interface.h
+57
-73
executables/create_tasks_ue.c
executables/create_tasks_ue.c
+2
-2
executables/nr-gnb.c
executables/nr-gnb.c
+6
-8
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+4
-2
executables/softmodem-common.c
executables/softmodem-common.c
+3
-3
executables/softmodem-common.h
executables/softmodem-common.h
+4
-0
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+1
-1
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+1
-1
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
+4
-0
openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
+7
-1
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+180
-159
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+1
-0
openair3/NAS/NR_UE/nr_nas_msg_sim.c
openair3/NAS/NR_UE/nr_nas_msg_sim.c
+115
-107
openair3/NAS/NR_UE/nr_nas_msg_sim.h
openair3/NAS/NR_UE/nr_nas_msg_sim.h
+1
-0
No files found.
common/utils/ocp_itti/intertask_interface.cpp
View file @
a828da1b
...
...
@@ -30,17 +30,19 @@
extern
"C"
{
#include <intertask_interface.h>
#include <common/utils/system.h>
#include "executables/softmodem-common.h"
typedef
struct
timer_elm_s
{
timer_type_t
type
;
///< Timer type
long
instance
;
long
duration
;
uint64_t
timeout
;
void
*
timer_arg
;
///< Optional argument that will be passed when timer expires
}
timer_elm_t
;
typedef
struct
timer_elm_s
{
timer_type_t
type
;
///< Timer type
long
instance
;
long
duration
;
uint64_t
timeout
;
void
*
timer_arg
;
///< Optional argument that will be passed when timer expires
}
timer_elm_t
;
typedef
struct
task_list_s
{
task_info_t
admin
;
ittiTask_parms_t
task_parms
;
pthread_t
thread
;
pthread_mutex_t
queue_cond_lock
;
std
::
vector
<
MessageDef
*>
message_queue
;
...
...
@@ -162,12 +164,12 @@ extern "C" {
pthread_mutex_lock
(
&
t
->
queue_cond_lock
);
int
ret
=
itti_send_msg_to_task_locked
(
destination_task_id
,
destinationInstance
,
message
);
while
(
t
->
message_queue
.
size
()
>
0
&&
t
->
admin
.
func
!=
NULL
)
{
while
(
t
->
message_queue
.
size
()
>
0
&&
t
->
task_parms
.
shortcut_func
!=
NULL
)
{
if
(
t
->
message_queue
.
size
()
>
1
)
LOG_W
(
ITTI
,
"queue in no thread mode is %ld
\n
"
,
t
->
message_queue
.
size
());
pthread_mutex_unlock
(
&
t
->
queue_cond_lock
);
t
->
admin
.
func
(
NULL
);
t
->
task_parms
.
shortcut_
func
(
NULL
);
pthread_mutex_lock
(
&
t
->
queue_cond_lock
);
}
...
...
@@ -327,11 +329,20 @@ extern "C" {
pthread_mutex_unlock
(
&
t
->
queue_cond_lock
);
}
int
itti_create_task
(
task_id_t
task_id
,
void
*
(
*
start_routine
)(
void
*
),
void
*
args_p
)
{
int
itti_create_task
(
const
task_id_t
task_id
,
void
*
(
*
start_routine
)(
void
*
),
const
ittiTask_parms_t
*
parms
)
{
task_list_t
*
t
=
tasks
[
task_id
];
threadCreate
(
&
t
->
thread
,
start_routine
,
args_p
,
(
char
*
)
itti_get_task_name
(
task_id
),
-
1
,
OAI_PRIORITY_RT
);
if
(
get_softmodem_params
()
->
no_itti
&&
task_id
<
sizeofArray
(
tasks_info
)
&&
parms
&&
parms
->
shortcut_func
)
{
LOG_W
(
ITTI
,
"not starting the thread for %s, the msg processing will be done in place
\n
"
,
tasks_info
[
task_id
].
name
);
t
->
task_parms
.
shortcut_func
=
parms
->
shortcut_func
;
return
0
;
}
threadCreate
(
&
t
->
thread
,
start_routine
,
parms
?
parms
->
args_to_start_routine
:
NULL
,
(
char
*
)
itti_get_task_name
(
task_id
),
-
1
,
OAI_PRIORITY_RT
);
LOG_I
(
ITTI
,
"Created Posix thread %s
\n
"
,
itti_get_task_name
(
task_id
)
);
return
0
;
}
...
...
@@ -353,6 +364,7 @@ extern "C" {
AssertFatal
(
new_tasks
!=
NULL
,
"could not realloc() tasks list"
);
tasks
=
new_tasks
;
tasks
[
newQueue
]
=
new
task_list_t
;
tasks
[
newQueue
]
->
task_parms
=
{
0
};
pthread_mutex_unlock
(
&
lock_nb_queues
);
LOG_I
(
ITTI
,
"Starting itti queue: %s as task %d
\n
"
,
taskInfo
->
name
,
newQueue
);
pthread_mutex_init
(
&
tasks
[
newQueue
]
->
queue_cond_lock
,
NULL
);
...
...
@@ -361,9 +373,6 @@ extern "C" {
AssertFatal
(
(
tasks
[
newQueue
]
->
sem_fd
=
eventfd
(
0
,
EFD_SEMAPHORE
)
)
>=
0
,
""
);
itti_subscribe_event_fd
((
task_id_t
)
newQueue
,
tasks
[
newQueue
]
->
sem_fd
);
if
(
tasks
[
newQueue
]
->
admin
.
threadFunc
!=
NULL
)
itti_create_task
((
task_id_t
)
newQueue
,
tasks
[
newQueue
]
->
admin
.
threadFunc
,
NULL
);
return
newQueue
;
}
...
...
common/utils/ocp_itti/intertask_interface.h
View file @
a828da1b
...
...
@@ -275,87 +275,69 @@ typedef uint32_t itti_message_types_t;
typedef
unsigned
long
message_number_t
;
#define MESSAGE_NUMBER_SIZE (sizeof(unsigned long))
typedef
enum
task_priorities_e
{
TASK_PRIORITY_MAX
=
100
,
TASK_PRIORITY_MAX_LEAST
=
85
,
TASK_PRIORITY_MED_PLUS
=
70
,
TASK_PRIORITY_MED
=
55
,
TASK_PRIORITY_MED_LEAST
=
40
,
TASK_PRIORITY_MIN_PLUS
=
25
,
TASK_PRIORITY_MIN
=
10
,
}
task_priorities_t
;
typedef
struct
{
task_priorities_t
priority
;
unsigned
int
queue_size
;
/* Printable name */
char
name
[
256
];
void
*
(
*
func
)(
void
*
)
;
void
*
(
*
threadFunc
)(
void
*
)
;
}
task_info_t
;
//
//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)
//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL)
//TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)
//TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)
void
*
rrc_enb_process_msg
(
void
*
);
#define FOREACH_TASK(TASK_DEF) \
TASK_DEF(TASK_UNKNOWN, TASK_PRIORITY_MED, 50, NULL, NULL) \
TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10, NULL, NULL) \
TASK_DEF(TASK_L2L1, TASK_PRIORITY_MAX, 200, NULL, NULL) \
TASK_DEF(TASK_BM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PHY_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_S1AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NGAP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_X2AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M2AP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M2AP_MCE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP_MME, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_M3AP_MCE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_ENB_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_GNB_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MCE_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MME_APP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PHY_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RLC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RAL_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000, NULL, NULL) \
TASK_DEF(TASK_CU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DU_F1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_CUCP_E1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_CUUP_E1, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_UE_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_GNB_SIM, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_NSA_UE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_NSA_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_NAS_NRUE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_MAX, TASK_PRIORITY_MED, 200, NULL, NULL)
#define TASK_DEF(TaskID, pRIO, qUEUEsIZE, FuNc, ThreadFunc) { pRIO, qUEUEsIZE, #TaskID, FuNc, ThreadFunc },
#define FOREACH_TASK(TASK_DEF) \
TASK_DEF(TASK_UNKNOWN, 50) \
TASK_DEF(TASK_TIMER, 10) \
TASK_DEF(TASK_L2L1, 200) \
TASK_DEF(TASK_BM, 200) \
TASK_DEF(TASK_PHY_ENB, 200) \
TASK_DEF(TASK_MAC_GNB, 200) \
TASK_DEF(TASK_RLC_ENB, 200) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, 200) \
TASK_DEF(TASK_PDCP_ENB, 200) \
TASK_DEF(TASK_PDCP_GNB, 200) \
TASK_DEF(TASK_DATA_FORWARDING, 200) \
TASK_DEF(TASK_END_MARKER, 200) \
TASK_DEF(TASK_RRC_ENB, 200) \
TASK_DEF(TASK_RRC_GNB, 200) \
TASK_DEF(TASK_RAL_ENB, 200) \
TASK_DEF(TASK_S1AP, 200) \
TASK_DEF(TASK_NGAP, 200) \
TASK_DEF(TASK_X2AP, 200) \
TASK_DEF(TASK_M2AP_ENB, 200) \
TASK_DEF(TASK_M2AP_MCE, 200) \
TASK_DEF(TASK_M3AP, 200) \
TASK_DEF(TASK_M3AP_MME, 200) \
TASK_DEF(TASK_M3AP_MCE, 200) \
TASK_DEF(TASK_SCTP, 200) \
TASK_DEF(TASK_ENB_APP, 200) \
TASK_DEF(TASK_GNB_APP, 200) \
TASK_DEF(TASK_MCE_APP, 200) \
TASK_DEF(TASK_MME_APP, 200) \
TASK_DEF(TASK_PHY_UE, 200) \
TASK_DEF(TASK_MAC_UE, 200) \
TASK_DEF(TASK_RLC_UE, 200) \
TASK_DEF(TASK_PDCP_UE, 200) \
TASK_DEF(TASK_RRC_UE, 200) \
TASK_DEF(TASK_RRC_NRUE, 200) \
TASK_DEF(TASK_NAS_UE, 200) \
TASK_DEF(TASK_RAL_UE, 200) \
TASK_DEF(TASK_GTPV1_U, 1000) \
TASK_DEF(TASK_CU_F1, 200) \
TASK_DEF(TASK_DU_F1, 200) \
TASK_DEF(TASK_CUCP_E1, 200) \
TASK_DEF(TASK_CUUP_E1, 200) \
TASK_DEF(TASK_RRC_UE_SIM, 200) \
TASK_DEF(TASK_RRC_GNB_SIM, 200) \
TASK_DEF(TASK_RRC_NSA_UE, 200) \
TASK_DEF(TASK_RRC_NSA_NRUE, 200) \
TASK_DEF(TASK_NAS_NRUE, 200) \
TASK_DEF(TASK_MAX, 200)
#define TASK_DEF(TaskID, qUEUEsIZE) {qUEUEsIZE, #TaskID},
/* Map task id to printable name. */
static
const
task_info_t
tasks_info
[]
=
{
FOREACH_TASK
(
TASK_DEF
)
};
#define TASK_ENUM(TaskID,
pRIO, qUEUEsIZE, FuNc,ThreadFunc
) TaskID,
#define TASK_ENUM(TaskID,
qUEUEsIZE
) TaskID,
//! Tasks id of each task
typedef
enum
{
FOREACH_TASK
(
TASK_ENUM
)
...
...
@@ -502,9 +484,11 @@ void itti_poll_msg(task_id_t task_id, MessageDef **received_msg);
\param args_p Optional argument to pass to the start routine
@returns -1 on failure, 0 otherwise
**/
int
itti_create_task
(
task_id_t
task_id
,
void
*
(
*
start_routine
)
(
void
*
),
void
*
args_p
);
typedef
struct
{
void
*
args_to_start_routine
;
void
*
(
*
shortcut_func
)(
void
*
);
}
ittiTask_parms_t
;
int
itti_create_task
(
const
task_id_t
task_id
,
void
*
(
*
start_routine
)(
void
*
),
const
ittiTask_parms_t
*
args_p
);
int
itti_create_queue
(
const
task_info_t
*
task_info
);
...
...
executables/create_tasks_ue.c
View file @
a828da1b
...
...
@@ -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
,
user
s
)
<
0
)
{
ittiTask_parms_t
parms
=
{
users
,
NULL
};
if
(
itti_create_task
(
TASK_NAS_UE
,
nas_ue_task
,
&
parm
s
)
<
0
)
{
LOG_E
(
NAS
,
"Create task for NAS UE failed
\n
"
);
return
-
1
;
}
...
...
executables/nr-gnb.c
View file @
a828da1b
...
...
@@ -290,7 +290,7 @@ void rx_func(void *param)
pushTpool
(
&
gNB
->
threadPool
,
res
);
}
}
else
if
(
get_softmodem_params
()
->
continuous_tx
)
{
notifiedFIFO_elt_t
*
res
=
pull
Tpool
(
&
gNB
->
L1_tx_free
,
&
gNB
->
threadPool
);
notifiedFIFO_elt_t
*
res
=
pull
NotifiedFIFO
(
&
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
=
pull
Tpool
(
&
gNB
->
L1_tx_out
,
&
gNB
->
threadPool
);
resL1
=
pull
NotifiedFIFO
(
&
gNB
->
L1_tx_out
);
}
}
else
{
resL1
=
pull
Tpool
(
&
gNB
->
L1_tx_out
,
&
gNB
->
threadPool
);
}
else
{
resL1
=
pull
NotifiedFIFO
(
&
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
=
pull
Tpool
(
&
gNB
->
L1_tx_out
,
&
gNB
->
threadPool
);
resL1
=
pull
NotifiedFIFO
(
&
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
"
);
}
...
...
executables/nr-uesoftmodem.c
View file @
a828da1b
...
...
@@ -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
;
}
...
...
executables/softmodem-common.c
View file @
a828da1b
...
...
@@ -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
=
sizeof
Array
(
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
]);
...
...
executables/softmodem-common.h
View file @
a828da1b
...
...
@@ -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
);
...
...
nfapi/oai_integration/nfapi_pnf.c
View file @
a828da1b
...
...
@@ -1112,7 +1112,7 @@ notifiedFIFO_elt_t *l1tx_message_extract(PHY_VARS_gNB *gNB, int frame, int slot)
notifiedFIFO_elt_t
*
res
;
//TODO: This needs to be reworked for nfapi to work
res
=
pull
Tpool
(
&
gNB
->
L1_tx_free
,
&
gNB
->
threadPool
);
res
=
pull
NotifiedFIFO
(
&
gNB
->
L1_tx_free
);
return
res
;
}
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
a828da1b
...
...
@@ -161,7 +161,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
notifiedFIFO_elt_t
*
res
=
NULL
;
processingData_L1tx_t
*
msgTx
=
NULL
;
if
(
!
gNB
->
reorder_thread_disable
)
{
res
=
pullTpool
(
&
gNB
->
L1_tx_free
,
&
gNB
->
threadPool
);
res
=
pullNotifiedFIFO
(
&
gNB
->
L1_tx_free
);
if
(
res
==
NULL
)
return
;
// Tpool has been stopped, nothing to process
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
...
...
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
View file @
a828da1b
...
...
@@ -51,3 +51,7 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
)
{
return
0
;
}
void
*
rrc_nrue
(
void
*
notUsed
)
{
return
NULL
;
}
openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.c
View file @
a828da1b
...
...
@@ -45,7 +45,13 @@ nr_pdcp_ue_manager_t *new_nr_pdcp_ue_manager(int enb_flag)
exit
(
1
);
}
if
(
pthread_mutex_init
(
&
ret
->
lock
,
NULL
))
abort
();
pthread_mutexattr_t
Attr
;
pthread_mutexattr_init
(
&
Attr
);
// We need to be recursive because pdcp locks before forwarding, and calls in same thread,
// so, if same thread wants to send something back, and there is no itti intermediate thread, we deadlock on ourselves
pthread_mutexattr_settype
(
&
Attr
,
PTHREAD_MUTEX_RECURSIVE
);
if
(
pthread_mutex_init
(
&
ret
->
lock
,
&
Attr
))
abort
();
ret
->
enb_flag
=
enb_flag
;
return
ret
;
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
a828da1b
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_proto.h
View file @
a828da1b
...
...
@@ -114,6 +114,7 @@ int8_t nr_rrc_RA_succeeded(const module_id_t mod_id, const uint8_t gNB_index);
/**\brief RRC UE task.
\param void *args_p Pointer on arguments to start the task. */
void
*
rrc_nrue_task
(
void
*
args_p
);
void
*
rrc_nrue
(
void
*
args_p
);
void
nr_rrc_handle_timers
(
NR_UE_Timers_Constants_t
*
timers
);
...
...
openair3/NAS/NR_UE/nr_nas_msg_sim.c
View file @
a828da1b
This diff is collapsed.
Click to expand it.
openair3/NAS/NR_UE/nr_nas_msg_sim.h
View file @
a828da1b
...
...
@@ -174,6 +174,7 @@ typedef struct {
nr_ue_nas_t
*
get_ue_nas_info
(
module_id_t
module_id
);
void
generateRegistrationRequest
(
as_nas_info_t
*
initialNasMsg
,
nr_ue_nas_t
*
nas
);
void
*
nas_nrue_task
(
void
*
args_p
);
void
*
nas_nrue
(
void
*
args_p
);
#endif
/* __NR_NAS_MSG_SIM_H__*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment