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
lizhongxiao
OpenXG-RAN
Commits
2afbdc6c
Commit
2afbdc6c
authored
Sep 08, 2022
by
Manu Agrawal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes Part1
parent
6ac0e403
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
20 deletions
+41
-20
common/utils/ocp_itti/intertask_interface.h
common/utils/ocp_itti/intertask_interface.h
+2
-2
executables/nr-gnb.c
executables/nr-gnb.c
+2
-2
executables/nr-softmodem.c
executables/nr-softmodem.c
+17
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+1
-0
openair3/SS/ss_gNB_port_man_task.c
openair3/SS/ss_gNB_port_man_task.c
+5
-5
openair3/SS/ss_gNB_sys_task.c
openair3/SS/ss_gNB_sys_task.c
+14
-10
No files found.
common/utils/ocp_itti/intertask_interface.h
View file @
2afbdc6c
...
...
@@ -327,9 +327,9 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_M3AP_MCE, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SCTP, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_PORTMAN, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_PORTMAN_
5G_NR,
TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_PORTMAN_
GNB,
TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SYS, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SYS_
5G_NR,
TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SYS_
GNB,
TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SYSIND, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_SS_SRB_ACP, TASK_PRIORITY_MED, 200, NULL, NULL) \
...
...
executables/nr-gnb.c
View file @
2afbdc6c
...
...
@@ -247,13 +247,13 @@ void rx_func(void *param) {
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
)
{
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS_
5G_NR
,
INSTANCE_DEFAULT
,
SS_NRUPD_TIM_INFO
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS_
GNB
,
INSTANCE_DEFAULT
,
SS_NRUPD_TIM_INFO
);
if
(
message_p
)
{
SS_NRUPD_TIM_INFO
(
message_p
).
slot
=
gNB
->
UL_INFO
.
slot
;
SS_NRUPD_TIM_INFO
(
message_p
).
sfn
=
gNB
->
UL_INFO
.
frame
;
int
send_res
=
itti_send_msg_to_task
(
TASK_SYS_
5G_NR
,
INSTANCE_DEFAULT
,
message_p
);
int
send_res
=
itti_send_msg_to_task
(
TASK_SYS_
GNB
,
INSTANCE_DEFAULT
,
message_p
);
if
(
send_res
<
0
)
{
printf
(
"Error in itti_send_msg_to_task"
);
...
...
executables/nr-softmodem.c
View file @
2afbdc6c
...
...
@@ -80,6 +80,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "gnb_paramdef.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "nfapi/oai_integration/vendor_ext.h"
#include "ss_gNB_sys_task.h"
#include "ss_gNB_port_man_task.h"
#include "ss_gNB_srb_task.h"
pthread_cond_t
nfapi_sync_cond
;
...
...
@@ -352,12 +354,26 @@ int create_gNB_tasks(uint32_t gnb_nb) {
LOG_E
(
GNB_APP
,
"Create task for gNB APP failed
\n
"
);
return
-
1
;
}
if
(
RC
.
ss
.
mode
>=
SS_SOFTMODEM
)
{
if
(
itti_create_task
(
TASK_SS_PORTMAN_GNB
,
ss_gNB_port_man_task
,
NULL
)
<
0
)
{
LOG_E
(
GNB_APP
,
"Create task for SS Port manager GNB failed
\n
"
);
return
-
1
;
}
/* This sleep is for gNB_app_task to load the RRC configuration */
usleep
(
1000
);
if
(
itti_create_task
(
TASK_SYS_GNB
,
ss_gNB_sys_task
,
NULL
)
<
0
)
{
LOG_E
(
GNB_APP
,
"Create task for SS GNB failed
\n
"
);
return
-
1
;
}
}
if
(
itti_create_task
(
TASK_SS_SRB
,
ss_gNB_srb_task
,
NULL
)
<
0
)
{
LOG_E
(
SCTP
,
"Create task for SS SRB failed
\n
"
);
return
-
1
;
}
LOG_I
(
NR_RRC
,
"Creating NR RRC gNB Task
\n
"
);
if
(
itti_create_task
(
TASK_RRC_GNB
,
rrc_gnb_task
,
NULL
)
<
0
)
{
...
...
openair2/GNB_APP/gnb_config.c
View file @
2afbdc6c
...
...
@@ -732,6 +732,7 @@ void RCconfig_nr_ssparam(void) {
RC
.
ss
.
Srbport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
GNB_CONFIG_SS_SRBPORT_IDX
].
iptr
);
RC
.
ss
.
Vngport
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
GNB_CONFIG_SS_VNGPORT_IDX
].
iptr
);
RC
.
ss
.
mode
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
GNB_CONFIG_SS_MODE_IDX
].
iptr
);
RC
.
ss
.
SysportNR
=
*
(
SSConfig_ParamList
.
paramarray
[
0
][
GNB_CONFIG_SS_SYSPORT_IDX
].
iptr
);
}
LOG_A
(
GNB_APP
,
"SS_Config:SSMode %d, hostIp=%s, Sysport=%d, Srbport=%d Vngport=%d
\n
"
,
RC
.
ss
.
mode
,
RC
.
ss
.
hostIp
,
RC
.
ss
.
Sysport
,
RC
.
ss
.
Srbport
,
RC
.
ss
.
Vngport
);
...
...
openair3/SS/ss_gNB_port_man_task.c
View file @
2afbdc6c
...
...
@@ -37,7 +37,7 @@ acpCtx_t nrctx_g = NULL;
enum
MsgUserId
{
MSG_SysProcess_userId
=
1
,
MSG_
Nr
SysProcess_userId
=
1
,
};
extern
SSConfigContext_t
SS_context
;
static
void
ss_dumpReqMsg
(
struct
SYSTEM_CTRL_REQ
*
msg
)
...
...
@@ -235,7 +235,7 @@ void ss_gNB_port_man_init(void)
/* TODO: Check for acpMsgTable 5G NR*/
const
struct
acpMsgTable
msgTable
[]
=
{
{
"
SysProcess5GNR"
,
MSG_
SysProcess_userId
},
{
"
NrSysProcess"
,
MSG_Nr
SysProcess_userId
},
// The last element should be NULL
{
NULL
,
0
}};
...
...
@@ -255,7 +255,7 @@ void ss_gNB_port_man_init(void)
//itti_subscribe_event_fd(TASK_SS_PORTMAN, fd1);
itti_mark_task_ready
(
TASK_SS_PORTMAN_
5G_NR
);
itti_mark_task_ready
(
TASK_SS_PORTMAN_
GNB
);
}
//------------------------------------------------------------------------------
...
...
@@ -326,7 +326,7 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
ss_dumpReqMsg
(
req
);
if
(
userId
==
MSG_SysProcess_userId
)
if
(
userId
==
MSG_
Nr
SysProcess_userId
)
{
#if 0
MessageDef *message_p = itti_alloc_new_message(TASK_SS_PORTMAN_5G_NR, INSTANCE_DEFAULT, SS_SYS_PORT_MSG_IND);
...
...
@@ -349,7 +349,7 @@ void *ss_port_man_5G_NR_process_itti_msg(void *notUsed)
MessageDef
*
received_msg
=
NULL
;
int
result
;
itti_poll_msg
(
TASK_SS_PORTMAN_
5G_NR
,
&
received_msg
);
itti_poll_msg
(
TASK_SS_PORTMAN_
GNB
,
&
received_msg
);
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
...
...
openair3/SS/ss_gNB_sys_task.c
View file @
2afbdc6c
...
...
@@ -29,6 +29,7 @@
#include "common/ran_context.h"
#include "acpSys.h"
#include "acpNrSys.h"
#include "ss_gNB_sys_task.h"
#include "ss_gNB_context.h"
...
...
@@ -139,7 +140,7 @@ static void bitStrint_to_byteArray(unsigned char arr[], int bit_length, unsigned
*/
int
cell_config_5g_done_indication
()
{
#if 0
if (cell_config_5g_done < 0)
{
printf("[SYS] Signal to OAI main code about cell config\n");
...
...
@@ -148,7 +149,7 @@ int cell_config_5g_done_indication()
pthread_cond_broadcast(&cell_config_5g_done_cond);
pthread_mutex_unlock(&cell_config_5g_done_mutex);
}
#endif
return
0
;
}
...
...
@@ -524,7 +525,7 @@ int sys_handle_nr_cell_config_req(struct CellConfigRequest_Type *Cell)
switch
(
Cell
->
d
)
{
case
CellConfigRequest_Type_AddOrReconfigure
:
#if 0
LOG_A(NR_RRC, "TASK_SYS_5G_NR: CellConfigRequest_Type_AddOrReconfigure received\n");
status = sys_add_nr_reconfig_cell(&(Cell->v.AddOrReconfigure));
if (status)
...
...
@@ -538,7 +539,7 @@ int sys_handle_nr_cell_config_req(struct CellConfigRequest_Type *Cell)
{
returnState = SS_STATE_CELL_CONFIGURED;
}
#endif
break
;
default:
...
...
@@ -1204,7 +1205,7 @@ static void sys_handle_paging_req(struct PagingTrigger_Type *pagingRequest, ss_s
*/
static
void
sys_handle_nr_enquire_timing
(
ss_nrset_timinfo_t
*
tinfo
)
{
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS_
5G_NR
,
INSTANCE_DEFAULT
,
SS_NRSET_TIM_INFO
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SYS_
GNB
,
INSTANCE_DEFAULT
,
SS_NRSET_TIM_INFO
);
if
(
message_p
)
{
LOG_A
(
RRC
,
"[SYS] Reporting info sfn:%d
\t
sf:%d.
\n
"
,
tinfo
->
sfn
,
tinfo
->
slot
);
...
...
@@ -1419,7 +1420,7 @@ static void sys_handle_as_security_req(struct AS_Security_Type *ASSecurity)
* Returns : Void
* ==========================================================================================================
*/
static
void
ss_task_sys_nr_handle_req
(
struct
SYSTEM_CTRL_REQ
*
req
,
ss_
set_timinfo_t
*
tinfo
)
static
void
ss_task_sys_nr_handle_req
(
struct
NR_SYSTEM_CTRL_REQ
*
req
,
ss_nr
set_timinfo_t
*
tinfo
)
{
int
enterState
=
RC
.
ss
.
State
;
int
exitState
=
RC
.
ss
.
State
;
...
...
@@ -1489,6 +1490,9 @@ bool valid_nr_sys_msg(struct SYSTEM_CTRL_REQ *req)
cnfType
=
SystemConfirm_Type_Cell
;
}
break
;
case
NR_SystemRequest_Type_EnquireTiming
:
valid
=
TRUE
;
break
;
default:
valid
=
FALSE
;
sendDummyCnf
=
FALSE
;
...
...
@@ -1496,7 +1500,7 @@ bool valid_nr_sys_msg(struct SYSTEM_CTRL_REQ *req)
if
(
sendDummyCnf
)
{
send_sys_cnf
(
resType
,
resVal
,
cnfType
,
NULL
);
LOG_A
(
NR_RRC
,
"TASK_SYS_
5G_NR
: Sending Dummy OK Req %d cnTfype %d ResType %d ResValue %d
\n
"
,
LOG_A
(
NR_RRC
,
"TASK_SYS_
GNB
: Sending Dummy OK Req %d cnTfype %d ResType %d ResValue %d
\n
"
,
req
->
Request
.
d
,
cnfType
,
resType
,
resVal
);
}
return
valid
;
...
...
@@ -1523,7 +1527,7 @@ void *ss_gNB_sys_process_itti_msg(void *notUsed)
//SS_context.sf = tinfo.sf;
/* 5G_cell_config end */
itti_receive_msg
(
TASK_SYS_
5G_NR
,
&
received_msg
);
itti_receive_msg
(
TASK_SYS_
GNB
,
&
received_msg
);
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
...
...
@@ -1546,7 +1550,7 @@ void *ss_gNB_sys_process_itti_msg(void *notUsed)
}
else
{
LOG_A
(
NR_RRC
,
"TASK_SYS_
5G_NR
: Not handled SYS_PORT message received
\n
"
);
LOG_A
(
NR_RRC
,
"TASK_SYS_
GNB
: Not handled SYS_PORT message received
\n
"
);
}
}
break
;
...
...
@@ -1557,7 +1561,7 @@ void *ss_gNB_sys_process_itti_msg(void *notUsed)
break
;
}
default:
LOG_A
(
NR_RRC
,
"TASK_SYS_
5G_NR
: Received unhandled message %d:%s
\n
"
,
LOG_A
(
NR_RRC
,
"TASK_SYS_
GNB
: Received unhandled message %d:%s
\n
"
,
ITTI_MSG_ID
(
received_msg
),
ITTI_MSG_NAME
(
received_msg
));
break
;
}
...
...
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