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
1d7925c6
Commit
1d7925c6
authored
Oct 17, 2022
by
Swetank Srivastava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cell Config API Support for 5G SA
parent
5fee4dc4
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
739 additions
and
266 deletions
+739
-266
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
executables/nr-softmodem.c
executables/nr-softmodem.c
+15
-6
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+204
-179
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+1
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+13
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+1
-0
openair3/SS/ss_eNB_sys_task.c
openair3/SS/ss_eNB_sys_task.c
+1
-1
openair3/SS/ss_gNB_port_man_task.c
openair3/SS/ss_gNB_port_man_task.c
+27
-9
openair3/SS/ss_gNB_srb_task.c
openair3/SS/ss_gNB_srb_task.c
+4
-2
openair3/SS/ss_gNB_sys_task.c
openair3/SS/ss_gNB_sys_task.c
+452
-67
openair3/SS/ss_gNB_sys_task.h
openair3/SS/ss_gNB_sys_task.h
+16
-0
openair3/UDP/udp_eNB_task.c
openair3/UDP/udp_eNB_task.c
+4
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
1d7925c6
...
...
@@ -2814,6 +2814,7 @@ target_link_libraries (nr-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries
(
nr-softmodem pthread m CONFIG_LIB rt crypt
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
sctp
${
XFORMS_LIBRARIES
}
${
PROTOBUF_LIB
}
${
CMAKE_DL_LIBS
}
${
LIBYAML_LIBRARIES
}
${
ATLAS_LIBRARIES
}
)
target_link_libraries
(
nr-softmodem
${
LIB_LMS_LIBRARIES
}
)
target_link_libraries
(
nr-softmodem
${
T_LIB
}
)
target_link_libraries
(
nr-softmodem UDP
)
add_dependencies
(
nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc
)
...
...
executables/nr-softmodem.c
View file @
1d7925c6
...
...
@@ -83,6 +83,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "ss_gNB_sys_task.h"
#include "ss_gNB_port_man_task.h"
#include "ss_gNB_srb_task.h"
#include "udp_eNB_task.h"
pthread_cond_t
nfapi_sync_cond
;
pthread_mutex_t
nfapi_sync_mutex
;
...
...
@@ -170,7 +171,7 @@ void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB, LTE_eNB_UCI *
extern
void
reset_opp_meas
(
void
);
extern
void
print_opp_meas
(
void
);
extern
void
*
udp_eNB_task
(
void
*
args_p
);
//
extern void *udp_eNB_task(void *args_p);
int
transmission_mode
=
1
;
int
emulate_rf
=
0
;
...
...
@@ -350,6 +351,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
}
if
(
gnb_nb
>
0
)
{
RCconfig_nr_ssparam
();
if
(
itti_create_task
(
TASK_GNB_APP
,
gNB_app_task
,
NULL
)
<
0
)
{
LOG_E
(
GNB_APP
,
"Create task for gNB APP failed
\n
"
);
return
-
1
;
...
...
@@ -370,11 +372,11 @@ int create_gNB_tasks(uint32_t gnb_nb) {
}
}
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_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
)
{
LOG_E
(
NR_RRC
,
"Create task for NR RRC gNB failed
\n
"
);
...
...
@@ -388,6 +390,13 @@ int create_gNB_tasks(uint32_t gnb_nb) {
return
-
1
;
}
}
if
(
itti_create_task
(
TASK_UDP
,
udp_eNB_task
,
NULL
)
<
0
)
{
LOG_E
(
GTPU
,
"Create task for UDP failed
\n
"
);
return
-
1
;
}
}
return
0
;
...
...
openair2/GNB_APP/gnb_app.c
View file @
1d7925c6
This diff is collapsed.
Click to expand it.
openair2/GNB_APP/gnb_paramdef.h
View file @
1d7925c6
...
...
@@ -244,6 +244,7 @@ typedef enum {
#define GNB_CONFIG_SS_SRBPORT_IDX 2
#define GNB_CONFIG_SS_VNGPORT_IDX 3
#define GNB_CONFIG_SS_MODE_IDX 4
//#define GNB_CONFIG_SS_NR_MODE_IDX 5
#define GNB_SSPARAMS_DESC { \
{GNB_CONFIG_SS_HOSTIP , NULL, 0, uptr:NULL, defstrval:"0.0.0.0", TYPE_STRING, 0}, \
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
1d7925c6
...
...
@@ -415,9 +415,21 @@ uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
scs_scaling
=
scs_scaling0
>>
2
;
scs_scaling2
=
scs_scaling0
>>
2
;
}
uint32_t
absolute_diff
=
(
*
configuration
->
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
-
NR_ARFCN_ValueNR_t
absoluteFrequencySSB
=
0
;
uint32_t
absolute_diff
=
0
;
if
(
RC
.
ss
.
mode
==
SS_SOFTMODEM
)
{
LOG_A
(
NR_RRC
,
"fxn:%s absoluteFrequencySSB:%d "
,
__FUNCTION__
,
absoluteFrequencySSB
);
absoluteFrequencySSB
=
*
RC
.
nrrrc
[
0
]
->
configuration
.
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
;
absolute_diff
=
absoluteFrequencySSB
-
configuration
->
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
;
}
else
{
absolute_diff
=
(
*
configuration
->
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencySSB
-
configuration
->
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
);
}
/*TODO: */
sib1
->
servingCellConfigCommon
->
downlinkConfigCommon
.
frequencyInfoDL
.
offsetToPointA
=
scs_scaling2
*
(
absolute_diff
/
(
12
*
scs_scaling
)
-
10
);
LOG_I
(
NR_RRC
,
"SIB1 freq: absoluteFrequencySSB %ld, absoluteFrequencyPointA %ld
\n
"
,
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
1d7925c6
...
...
@@ -224,6 +224,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
rrc
->
carrier
.
sib1_tda
=
configuration
->
sib1_tda
;
rrc
->
carrier
.
do_CSIRS
=
configuration
->
do_CSIRS
;
rrc
->
carrier
.
do_SRS
=
configuration
->
do_SRS
;
LOG_A
(
NR_RRC
,
"fxn:%s rrc->carrier:pci:%d rrc->configuration:pci:%d gnb_mod_idP:%d"
,
__FUNCTION__
,
rrc
->
carrier
.
physCellId
,
*
rrc
->
configuration
.
scc
->
physCellId
,
gnb_mod_idP
);
nr_rrc_config_ul_tda
(
configuration
->
scc
,
configuration
->
minRXTXTIME
);
/// System Information INIT
pthread_mutex_init
(
&
rrc
->
cell_info_mutex
,
NULL
);
...
...
openair3/SS/ss_eNB_sys_task.c
View file @
1d7925c6
...
...
@@ -194,7 +194,7 @@ static int sys_send_udp_msg(
if
(
message_p
)
{
LOG_A
(
ENB_SS
,
"Sending UDP_DATA_REQ length %u offset %u buffer %d %d %d
\n
"
,
buffer_len
,
buffer_offset
,
buffer
[
0
],
buffer
[
1
],
buffer
[
2
]
);
LOG_A
(
ENB_SS
,
"Sending UDP_DATA_REQ length %u offset %u buffer %d %d %d
to address peerIpAddr:%s and peer port:peerPort
\n
"
,
buffer_len
,
buffer_offset
,
buffer
[
0
],
buffer
[
1
],
buffer
[
2
],
peerIpAddr
,
peerPort
);
udp_data_req_p
=
&
message_p
->
ittiMsg
.
udp_data_req
;
udp_data_req_p
->
peer_address
=
peerIpAddr
;
udp_data_req_p
->
peer_port
=
peerPort
;
...
...
openair3/SS/ss_gNB_port_man_task.c
View file @
1d7925c6
...
...
@@ -77,7 +77,12 @@ void ss_nr_port_man_send_cnf(struct NR_SYSTEM_CTRL_CNF recvCnf)
case
NR_SystemConfirm_Type_Cell
:
cnf
.
Confirm
.
v
.
Cell
=
true
;
break
;
case
NR_SystemConfirm_Type_RadioBearerList
:
cnf
.
Confirm
.
v
.
RadioBearerList
=
true
;
break
;
case
NR_SystemConfirm_Type_CellAttenuationList
:
cnf
.
Confirm
.
v
.
CellAttenuationList
=
true
;
break
;
default:
LOG_A
(
GNB_APP
,
"[SYS] Error not handled CNF TYPE to [SS-PORTMAN] %d
\n
"
,
recvCnf
.
Confirm
.
d
);
}
...
...
@@ -232,14 +237,17 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
// Error handling
if
(
userId
<
0
)
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s userId:%d
\n
"
,
__FUNCTION__
,
userId
);
if
(
userId
==
-
ACP_ERR_SERVICE_NOT_MAPPED
)
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s userId:-ACP_ERR_SERVICE_NOT_MAPPED
\n
"
,
__FUNCTION__
);
// Message not mapped to user id,
// this error should not appear on server side for the messages
// received from clients
}
else
if
(
userId
==
-
ACP_ERR_SIDL_FAILURE
)
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s userId:-ACP_ERR_SIDL_FAILURE
\n
"
,
__FUNCTION__
);
// Server returned service error,
// this error should not appear on server side for the messages
// received from clients
...
...
@@ -248,29 +256,36 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
}
else
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
return
;
}
}
else
if
(
userId
==
0
)
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s userId:0
\n
"
,
__FUNCTION__
);
// No message (timeout on socket)
}
else
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] received msg %d from the client.
\n
"
,
userId
);
if
(
acpNrSysProcessDecSrv
(
ctx
,
buffer
,
msgSize
,
&
req
)
!=
0
)
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
return
;
}
ss_dumpReqMsg
(
req
);
if
(
userId
==
MSG_NrSysProcess_userId
)
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s userId: MSG_NrSysProcess_userId
\n
"
,
__FUNCTION__
);
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_SS_PORTMAN_GNB
,
INSTANCE_DEFAULT
,
SS_NR_SYS_PORT_MSG_IND
);
if
(
message_p
)
{
SS_NR_SYS_PORT_MSG_IND
(
message_p
).
req
=
req
;
SS_NR_SYS_PORT_MSG_IND
(
message_p
).
userId
=
userId
;
itti_send_msg_to_task
(
TASK_SYS_GNB
,
INSTANCE_DEFAULT
,
message_p
);
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] fxn:%s line:%d Msg sent to
\n
"
,
__FUNCTION__
,
__LINE__
,
TASK_SYS_GNB
);
}
}
}
...
...
@@ -281,13 +296,13 @@ static inline void ss_gNB_read_from_socket(acpCtx_t ctx)
//------------------------------------------------------------------------------
void
*
ss_port_man_5G_NR_process_itti_msg
(
void
*
notUsed
)
{
MessageDef
*
received_msg
=
NULL
;
int
result
;
MessageDef
*
received_msg
=
NULL
;
int
result
;
itti_poll_msg
(
TASK_SS_PORTMAN_GNB
,
&
received_msg
);
itti_poll_msg
(
TASK_SS_PORTMAN_GNB
,
&
received_msg
);
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
/* Check if there is a packet to handle */
if
(
received_msg
!=
NULL
)
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Received a message id : %d
\n
"
,
...
...
@@ -309,7 +324,10 @@ void *ss_port_man_5G_NR_process_itti_msg(void *notUsed)
}
break
;
case
TERMINATE_MESSAGE
:
itti_exit_task
();
{
LOG_A
(
GNB_APP
,
"[SS-PORTMAN-GNB] Received TERMINATE_MESSAGE
\n
"
);
itti_exit_task
();
}
break
;
default:
...
...
@@ -323,9 +341,9 @@ void *ss_port_man_5G_NR_process_itti_msg(void *notUsed)
received_msg
=
NULL
;
}
ss_gNB_read_from_socket
(
nrctx_g
);
ss_gNB_read_from_socket
(
nrctx_g
);
return
NULL
;
return
NULL
;
}
//------------------------------------------------------------------------------
...
...
openair3/SS/ss_gNB_srb_task.c
View file @
1d7925c6
...
...
@@ -361,9 +361,11 @@ void ss_gNB_srb_init(void)
buffer
=
(
unsigned
char
*
)
acpMalloc
(
size
);
assert
(
buffer
);
RC
.
ss
.
State
=
SS_STATE_CELL_ACTIVE
;
if
(
RC
.
ss
.
mode
==
SS_SOFTMODEM_SRB
)
{
RC
.
ss
.
State
=
SS_STATE_CELL_ACTIVE
;
}
itti_subscribe_event_fd
(
TASK_SS_SRB
,
fd1
);
itti_mark_task_ready
(
TASK_SS_SRB
);
}
...
...
openair3/SS/ss_gNB_sys_task.c
View file @
1d7925c6
This diff is collapsed.
Click to expand it.
openair3/SS/ss_gNB_sys_task.h
View file @
1d7925c6
...
...
@@ -2,6 +2,7 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include "ss_eNB_proxy_iface.h"
#ifndef SS_GNB_TASK_H_
#define SS_GNB_TASK_H_
...
...
@@ -23,4 +24,19 @@ typedef struct udpSockReq_s
char
*
address
;
}
udpSockReq_t
;
typedef
struct
CellConfig5GReq_s
{
proxy_ss_header_t
header
;
int16_t
maxRefPower
;
uint8_t
initialAttenuation
;
long
absoluteFrequencySSB
;
}
CellConfig5GReq_t
;
typedef
enum
_sys_Type
{
SYS_TYPE_LTE
,
SYS_TYPE_NR
,
SYS_TYPE_ENDC
}
sys_Type
;
#endif
/* SS_ENB_TASK_H_ */
openair3/UDP/udp_eNB_task.c
View file @
1d7925c6
...
...
@@ -308,8 +308,10 @@ void *udp_eNB_task(void *args_p)
itti_mark_task_ready
(
TASK_UDP
);
MSC_START_USE
();
LOG_I
(
UDP_
,
" Entry in %s
\n
"
,
__FUNCTION__
);
while
(
1
)
{
LOG_I
(
UDP_
,
" Fxn:%s line:%d
\n
"
,
__FUNCTION__
,
__LINE__
);
itti_receive_msg
(
TASK_UDP
,
&
received_message_p
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UDP_ENB_TASK
,
VCD_FUNCTION_IN
);
#if defined(LOG_UDP) && LOG_UDP > 0
...
...
@@ -343,7 +345,7 @@ void *udp_eNB_task(void *args_p)
struct
udp_socket_desc_s
*
udp_sock_p
=
NULL
;
udp_data_req_t
*
udp_data_req_p
;
struct
sockaddr_in
peer_addr
;
char
buffer
[
INET_ADDRSTRLEN
];
udp_data_req_p
=
&
received_message_p
->
ittiMsg
.
udp_data_req
;
memset
(
&
peer_addr
,
0
,
sizeof
(
struct
sockaddr_in
));
...
...
@@ -351,6 +353,7 @@ void *udp_eNB_task(void *args_p)
peer_addr
.
sin_family
=
AF_INET
;
peer_addr
.
sin_port
=
htons
(
udp_data_req_p
->
peer_port
);
peer_addr
.
sin_addr
.
s_addr
=
udp_data_req_p
->
peer_address
;
inet_ntop
(
AF_INET
,
&
peer_addr
.
sin_addr
,
buffer
,
sizeof
(
buffer
));
pthread_mutex_lock
(
&
udp_socket_list_mutex
);
udp_sock_p
=
udp_eNB_get_socket_desc
(
ITTI_MSG_ORIGIN_ID
(
received_message_p
));
...
...
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