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
591e0e1f
Commit
591e0e1f
authored
Jun 16, 2021
by
Deokseong "David" Kim
Committed by
Melissa
Jun 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted UDP port ids for multiple UE connection with proxy
parent
777bcc6c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
17 deletions
+34
-17
executables/nr-ue.c
executables/nr-ue.c
+3
-2
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+18
-3
executables/softmodem-common.h
executables/softmodem-common.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-1
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+4
-3
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+5
-5
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+2
-2
No files found.
executables/nr-ue.c
View file @
591e0e1f
...
...
@@ -129,8 +129,8 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
void
init_nrUE_standalone_thread
(
int
ue_idx
)
{
const
char
*
standalone_addr
=
"127.0.0.1"
;
int
standalone_tx_port
=
3611
+
(
ue_idx
)
*
2
;
int
standalone_rx_port
=
3612
+
(
ue_idx
)
*
2
;
int
standalone_tx_port
=
3611
+
ue_idx
*
2
;
int
standalone_rx_port
=
3612
+
ue_idx
*
2
;
nrue_init_standalone_socket
(
standalone_addr
,
standalone_tx_port
,
standalone_rx_port
);
pthread_t
thread
;
...
...
@@ -252,6 +252,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
}
}
}
return
NULL
;
}
...
...
executables/nr-uesoftmodem.c
View file @
591e0e1f
...
...
@@ -456,7 +456,7 @@ void init_openair0(void) {
}
}
void
init_pdcp
(
vo
id
)
{
void
init_pdcp
(
int
ue_
id
)
{
uint32_t
pdcp_initmask
=
(
!
IS_SOFTMODEM_NOS1
)
?
LINK_ENB_PDCP_TO_GTPV1U_BIT
:
(
LINK_ENB_PDCP_TO_GTPV1U_BIT
|
PDCP_USE_NETLINK_BIT
|
LINK_ENB_PDCP_TO_IP_DRIVER_BIT
);
/*if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM || (nfapi_getmode()==NFAPI_UE_STUB_PNF)) {
...
...
@@ -471,7 +471,7 @@ void init_pdcp(void) {
}
pdcp_layer_init();
nr_DRB_preconfiguration();*/
nr_pdcp_module_init
(
pdcp_initmask
,
0
);
nr_pdcp_module_init
(
pdcp_initmask
,
ue_id
);
pdcp_set_rlc_data_req_func
((
send_rlc_data_req_func_t
)
rlc_data_req
);
pdcp_set_pdcp_data_ind_func
((
pdcp_data_ind_func_t
)
pdcp_data_ind
);
LOG_I
(
PDCP
,
"Before getting out from init_pdcp()
\n
"
);
...
...
@@ -525,8 +525,23 @@ int main( int argc, char **argv ) {
LOG_I
(
HW
,
"Version: %s
\n
"
,
PACKAGE_VERSION
);
init_NR_UE
(
1
,
rrc_config_path
);
int
mode_offset
=
get_softmodem_params
()
->
nsa
?
NUMBER_OF_UE_MAX
:
0
;
int
node_number
=
get_softmodem_params
()
->
node_number
;
ue_id_g
=
(
node_number
==
0
)
?
0
:
node_number
-
2
;
AssertFatal
(
ue_id_g
>=
0
,
"UE id is expected to be nonnegative.
\n
"
);
if
(
IS_SOFTMODEM_NOS1
)
init_pdcp
();
{
if
(
node_number
==
0
)
{
init_pdcp
(
0
);
}
else
{
init_pdcp
(
mode_offset
+
node_number
-
1
);
}
}
NB_UE_INST
=
1
;
NB_INST
=
1
;
...
...
executables/softmodem-common.h
View file @
591e0e1f
...
...
@@ -148,7 +148,7 @@ extern "C"
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
{"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, iptr:&NSA, defintval:0, TYPE_INT, 0}, \
{"node-number", NULL, 0, u16ptr:&NODE_NUMBER, defuintval:
2
, TYPE_UINT16, 0}, \
{"node-number", NULL, 0, u16ptr:&NODE_NUMBER, defuintval:
0
, TYPE_UINT16, 0}, \
}
#define CONFIG_HLP_NSA "Enable NSA mode \n"
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
591e0e1f
...
...
@@ -530,7 +530,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if
(
ra
->
cfra
)
{
LOG_
I
(
NR_MAC
,
"(ue %i, rnti 0x%04x) CFRA procedure succeeded!
\n
"
,
UE_id
,
ra
->
rnti
);
LOG_
A
(
NR_MAC
,
"(ue %i, rnti 0x%04x) CFRA procedure succeeded!
\n
"
,
UE_id
,
ra
->
rnti
);
//nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
nr_clear_ra_proc
(
gnb_mod_idP
,
CC_idP
,
frameP
);
UE_info
->
active
[
UE_id
]
=
true
;
...
...
openair2/RRC/LTE/rrc_UE.c
View file @
591e0e1f
...
...
@@ -98,6 +98,7 @@ static int from_nr_ue_fd = -1;
static
int
to_nr_ue_fd
=
-
1
;
int
slrb_id
;
int
send_ue_information
=
0
;
extern
int
ue_id_g
;
// for malloc_clear
#include "PHY/defs_UE.h"
...
...
@@ -6515,7 +6516,7 @@ void nsa_sendmsg_to_nrue(const void *message, size_t msg_len, Rrc_Msg_Type_t msg
struct
sockaddr_in
sa
=
{
.
sin_family
=
AF_INET
,
.
sin_port
=
htons
(
6008
),
.
sin_port
=
htons
(
6008
+
ue_id_g
*
2
),
};
int
sent
=
sendto
(
to_nr_ue_fd
,
&
n_msg
,
to_send
,
0
,
(
struct
sockaddr
*
)
&
sa
,
sizeof
(
sa
));
...
...
@@ -6532,12 +6533,12 @@ void nsa_sendmsg_to_nrue(const void *message, size_t msg_len, Rrc_Msg_Type_t msg
LOG_I
(
RRC
,
"Sent a %d message to the nrUE (%d bytes)
\n
"
,
msg_type
,
sent
);
}
void
init_connections_with_nr_ue
(
void
)
void
init_connections_with_nr_ue
()
{
struct
sockaddr_in
sa
=
{
.
sin_family
=
AF_INET
,
.
sin_port
=
htons
(
6007
),
.
sin_port
=
htons
(
6007
+
ue_id_g
*
2
),
};
AssertFatal
(
from_nr_ue_fd
==
-
1
,
"from_nr_ue_fd was assigned already"
);
from_nr_ue_fd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
591e0e1f
...
...
@@ -133,7 +133,7 @@ uint8_t first_rrcreconfigurationcomplete = 0;
static
const
char
nsa_ipaddr
[]
=
"127.0.0.1"
;
static
int
from_lte_ue_fd
=
-
1
;
static
int
to_lte_ue_fd
=
-
1
;
uint16_t
ue_id_g
;
extern
uint16_t
ue_id_g
;
static
Rrc_State_NR_t
nr_rrc_get_state
(
module_id_t
ue_mod_idP
)
{
return
NR_UE_rrc_inst
[
ue_mod_idP
].
nrRrcState
;
...
...
@@ -2909,7 +2909,7 @@ void nsa_sendmsg_to_lte_ue(const void *message, size_t msg_len, MessagesIds msg_
struct
sockaddr_in
sa
=
{
.
sin_family
=
AF_INET
,
.
sin_port
=
htons
(
6007
),
.
sin_port
=
htons
(
6007
+
ue_id_g
*
2
),
};
int
sent
=
sendto
(
from_lte_ue_fd
,
&
n_msg
,
to_send
,
0
,
(
struct
sockaddr
*
)
&
sa
,
sizeof
(
sa
));
...
...
@@ -2931,7 +2931,7 @@ void init_connections_with_lte_ue(void)
struct
sockaddr_in
sa
=
{
.
sin_family
=
AF_INET
,
.
sin_port
=
htons
(
6008
),
.
sin_port
=
htons
(
6008
+
ue_id_g
*
2
),
};
AssertFatal
(
from_lte_ue_fd
==
-
1
,
"from_lte_ue_fd was assigned already"
);
from_lte_ue_fd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
...
...
@@ -2973,9 +2973,9 @@ static void start_oai_nrue_threads()
LOG_E
(
MAC
,
"sem_init() error
\n
"
);
abort
();
}
int
node_num
=
get_softmodem_params
()
->
node_number
;
ue_id_g
=
(
node_num
==
0
)
?
0
:
node_num
-
2
;
init_nrUE_standalone_thread
(
ue_id_g
);
}
static
void
nsa_rrc_ue_process_ueCapabilityEnquiry
(
void
)
...
...
targets/RT/USER/lte-ue.c
View file @
591e0e1f
...
...
@@ -421,8 +421,8 @@ void init_UE_stub_single_thread(int nb_inst,
void
init_UE_standalone_thread
(
int
ue_idx
)
{
const
char
*
standalone_addr
=
"127.0.0.1"
;
// these two lines go into init
int
standalone_tx_port
=
3211
+
ue_idx
*
2
;
int
standalone_rx_port
=
3212
+
ue_idx
*
2
;
int
standalone_tx_port
=
3211
+
ue_idx
*
2
;
int
standalone_rx_port
=
3212
+
ue_idx
*
2
;
ue_init_standalone_socket
(
standalone_addr
,
standalone_tx_port
,
standalone_rx_port
);
pthread_t
thread
;
...
...
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