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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
ee86a667
Commit
ee86a667
authored
Jan 12, 2021
by
Michael Cook
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
0b40edef
' into episys/master
parents
a288e502
0b40edef
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
86 additions
and
53 deletions
+86
-53
common/utils/ocp_itti/intertask_interface.h
common/utils/ocp_itti/intertask_interface.h
+1
-0
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+6
-6
openair1/PHY/INIT/lte_init_ue.c
openair1/PHY/INIT/lte_init_ue.c
+1
-1
openair1/SCHED_UE/pusch_pc.c
openair1/SCHED_UE/pusch_pc.c
+1
-1
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
+11
-4
openair1/SIMULATION/ETH_TRANSPORT/proto.h
openair1/SIMULATION/ETH_TRANSPORT/proto.h
+2
-2
openair2/LAYER2/MAC/config_ue.c
openair2/LAYER2/MAC/config_ue.c
+2
-2
openair2/LAYER2/MAC/main_ue.c
openair2/LAYER2/MAC/main_ue.c
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+10
-10
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+23
-9
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+2
-2
openair3/NAS/UE/ESM/esm_ebr_context.c
openair3/NAS/UE/ESM/esm_ebr_context.c
+1
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+1
-1
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+2
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+6
-6
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+15
-5
No files found.
common/utils/ocp_itti/intertask_interface.h
View file @
ee86a667
...
...
@@ -351,6 +351,7 @@ typedef enum {
}
task_id_t
;
extern
uint16_t
ue_idx_standalone
;
extern
uint16_t
node_number
;
typedef
task_id_t
thread_id_t
;
...
...
nfapi/oai_integration/nfapi_pnf.c
View file @
ee86a667
...
...
@@ -485,7 +485,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
// to keep only the necessary just to keep the nfapi FSM rolling by sending a dummy response.
LTE_DL_FRAME_PARMS
*
fp
;
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
struct
PHY_VARS_eNB_s
*
eNB
=
RC
.
eNB
[
0
][
0
];
fp
=
&
eNB
->
frame_parms
;
}
else
{
...
...
@@ -647,7 +647,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
num_tlv
++
;
}
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
printf
(
"[PNF] CONFIG_REQUEST[num_tlv:%d] TLVs processed:%d
\n
"
,
req
->
num_tlv
,
num_tlv
);
printf
(
"[PNF] Simulating PHY CONFIG - DJP
\n
"
);
PHY_Config_t
phy_config
;
...
...
@@ -672,7 +672,7 @@ int config_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfap
nfapi_pnf_config_resp
(
config
,
&
nfapi_resp
);
printf
(
"[PNF] Sent NFAPI_CONFIG_RESPONSE phy_id:%d
\n
"
,
phy_info
->
id
);
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
free
(
fp
);
return
0
;
...
...
@@ -1035,7 +1035,7 @@ int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi
p7_config
->
tx_req
=
&
pnf_phy_tx_req
;
p7_config
->
lbt_dl_config_req
=
&
pnf_phy_lbt_dl_config_req
;
p7_config
->
ue_release_req
=
&
pnf_phy_ue_release_req
;
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
p7_config
->
dl_config_req
=
&
memcpy_dl_config_req
;
p7_config
->
ul_config_req
=
&
memcpy_ul_config_req
;
p7_config
->
hi_dci0_req
=
&
memcpy_hi_dci0_req
;
...
...
@@ -1092,7 +1092,7 @@ int start_request(nfapi_pnf_config_t *config, nfapi_pnf_phy_config_t *phy, nfapi
//phy_init_RU(RC.ru[0]);
printf
(
"[PNF] About to call init_eNB_afterRU()
\n
"
);
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
init_eNB_afterRU
();
}
...
...
@@ -1376,7 +1376,7 @@ void *pnf_start_thread(void *ptr) {
void
configure_nfapi_pnf
(
char
*
vnf_ip_addr
,
int
vnf_p5_port
,
char
*
pnf_ip_addr
,
int
pnf_p7_port
,
int
vnf_p7_port
)
{
printf
(
"%s() PNF
\n\n\n\n\n\n
"
,
__FUNCTION__
);
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
nfapi_setmode
(
NFAPI_MODE_PNF
);
// PNF!
}
...
...
openair1/PHY/INIT/lte_init_ue.c
View file @
ee86a667
...
...
@@ -547,7 +547,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
phy_vars_ue
->
decode_MIB
=
0
;
}
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
//phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
if
(
phy_vars_ue
->
pdcch_vars
[
0
][
eNB_id
]
->
crnti
==
0x1234
)
phy_vars_ue
->
pdcch_vars
[
0
][
eNB_id
]
->
crnti
=
phy_vars_ue
->
pdcch_vars
[
1
][
eNB_id
]
->
crnti
;
...
...
openair1/SCHED_UE/pusch_pc.c
View file @
ee86a667
...
...
@@ -115,7 +115,7 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
}
int8_t
get_PHR
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
eNB_index
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
return
PHY_vars_UE_g
[
Mod_id
][
CC_id
]
->
ulsch
[
eNB_index
]
->
PHR
;
else
return
40
;
// l1l2 simulator => ideal conditions
...
...
openair1/SIMULATION/ETH_TRANSPORT/netlink_init.c
View file @
ee86a667
...
...
@@ -95,11 +95,16 @@ static int tun_alloc(char *dev) {
}
int
netlink_init_mbms_tun
(
char
*
ifprefix
)
{
int
netlink_init_mbms_tun
(
char
*
ifprefix
,
int
id
)
{
//for UE, id = 1, 2, ...,
int
ret
;
char
ifname
[
64
];
sprintf
(
ifname
,
"oaitun_%.3s1"
,
ifprefix
);
// added "1": for historical reasons
if
(
id
>
0
){
sprintf
(
ifname
,
"oaitun_%.3s%d"
,
ifprefix
,
id
-
1
);
}
else
{
sprintf
(
ifname
,
"oaitun_%.3s1"
,
ifprefix
);
// added "1": for historical reasons
}
nas_sock_mbms_fd
=
tun_alloc
(
ifname
);
if
(
nas_sock_mbms_fd
==
-
1
)
{
...
...
@@ -151,11 +156,13 @@ int netlink_init_mbms_tun(char *ifprefix) {
return
1
;
}
int
netlink_init_tun
(
char
*
ifprefix
,
int
num_if
)
{
int
netlink_init_tun
(
char
*
ifprefix
,
int
num_if
,
int
id
)
{
//for UE, id = 1, 2, ...,
int
ret
;
char
ifname
[
64
];
for
(
int
i
=
0
;
i
<
num_if
;
i
++
)
{
int
begx
=
(
id
==
0
)
?
0
:
id
-
1
;
int
endx
=
(
id
==
0
)
?
num_if
:
id
;
for
(
int
i
=
begx
;
i
<
endx
;
i
++
)
{
sprintf
(
ifname
,
"oaitun_%.3s%d"
,
ifprefix
,
i
+
1
);
nas_sock_fd
[
i
]
=
tun_alloc
(
ifname
);
...
...
openair1/SIMULATION/ETH_TRANSPORT/proto.h
View file @
ee86a667
...
...
@@ -62,7 +62,7 @@ int multicast_link_read_data_from_sock(uint8_t eNB_flag);
void
clear_eNB_transport_info
(
uint8_t
);
void
clear_UE_transport_info
(
uint8_t
);
int
netlink_init
(
void
);
int
netlink_init_tun
(
char
*
ifsuffix
,
int
num_if
);
int
netlink_init_mbms_tun
(
char
*
ifsuffix
);
int
netlink_init_tun
(
char
*
ifsuffix
,
int
num_if
,
int
id
);
int
netlink_init_mbms_tun
(
char
*
ifsuffix
,
int
id
);
#endif
/* EMU_PROTO_H_ */
openair2/LAYER2/MAC/config_ue.c
View file @
ee86a667
...
...
@@ -203,7 +203,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5
;
}
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB
_PNF
)
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE
_PNF
)
phy_config_harq_ue
(
Mod_idP
,
0
,
eNB_index
,
UE_mac_inst
[
Mod_idP
].
scheduling_info
.
maxHARQ_Tx
);
if
(
mac_MainConfig
->
ul_SCH_Config
->
retxBSR_Timer
)
{
...
...
@@ -311,7 +311,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
}
if
(
physicalConfigDedicated
!=
NULL
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB
_PNF
)
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE
_PNF
)
phy_config_dedicated_ue
(
Mod_idP
,
0
,
eNB_index
,
physicalConfigDedicated
);
...
...
openair2/LAYER2/MAC/main_ue.c
View file @
ee86a667
...
...
@@ -91,7 +91,7 @@ mac_top_init_ue(int eMBMS_active, char *uecap_xer,
}
// mutex below are used for multiple UE's L2 FAPI simulation.
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
pthread_mutex_init
(
&
fill_ul_mutex
.
rx_mutex
,
NULL
);
pthread_mutex_init
(
&
fill_ul_mutex
.
crc_mutex
,
NULL
);
pthread_mutex_init
(
&
fill_ul_mutex
.
sr_mutex
,
NULL
);
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
ee86a667
...
...
@@ -998,7 +998,7 @@ pdcp_data_ind(
* for the UE compiled in noS1 mode, we need 0
* TODO: be sure of this
*/
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
#ifdef UESIM_EXPANSION
if
(
UE_NAS_USE_TUN
)
{
...
...
@@ -2278,7 +2278,7 @@ void pdcp_set_pdcp_data_ind_func(pdcp_data_ind_func_t pdcp_data_ind) {
pdcp_params
.
pdcp_data_ind_func
=
pdcp_data_ind
;
}
uint64_t
pdcp_module_init
(
uint64_t
pdcp_optmask
)
{
uint64_t
pdcp_module_init
(
uint64_t
pdcp_optmask
,
int
id
)
{
/* temporary enforce netlink when UE_NAS_USE_TUN is set,
this is while switching from noS1 as build option
to noS1 as config option */
...
...
@@ -2295,18 +2295,18 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
nas_getparams
();
if
(
UE_NAS_USE_TUN
)
{
int
num_if
=
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
IS_SOFTMODEM_SIML1
)
?
MAX_NUMBER_NETIF
:
1
;
netlink_init_tun
(
"ue"
,
num_if
);
int
num_if
=
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
IS_SOFTMODEM_SIML1
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
?
MAX_NUMBER_NETIF
:
1
;
netlink_init_tun
(
"ue"
,
num_if
,
id
);
if
(
IS_SOFTMODEM_NOS1
)
nas_config
(
1
,
1
,
2
,
"ue"
);
netlink_init_mbms_tun
(
"uem"
);
nas_config
(
1
,
1
,
2
,
"ue"
);
netlink_init_mbms_tun
(
"uem"
,
id
);
nas_config_mbms
(
1
,
2
,
2
,
"uem"
);
LOG_I
(
PDCP
,
"UE pdcp will use tun interface
\n
"
);
}
else
if
(
ENB_NAS_USE_TUN
)
{
netlink_init_tun
(
"enb"
,
1
);
netlink_init_tun
(
"enb"
,
1
,
0
);
nas_config
(
1
,
1
,
1
,
"enb"
);
if
(
pdcp_optmask
&
ENB_NAS_USE_TUN_W_MBMS_BIT
){
netlink_init_mbms_tun
(
"enm"
);
netlink_init_mbms_tun
(
"enm"
,
0
);
nas_config_mbms
(
1
,
2
,
1
,
"enm"
);
LOG_I
(
PDCP
,
"ENB pdcp will use mbms tun interface
\n
"
);
}
...
...
@@ -2318,8 +2318,8 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
}
else
{
if
(
pdcp_optmask
&
ENB_NAS_USE_TUN_W_MBMS_BIT
){
LOG_W
(
PDCP
,
"ENB pdcp will use tun interface for MBMS
\n
"
);
netlink_init_mbms_tun
(
"enm"
);
nas_config_mbms_s1
(
1
,
2
,
1
,
"enm"
);
netlink_init_mbms_tun
(
"enm"
,
1
);
nas_config_mbms_s1
(
1
,
2
,
1
,
"enm"
);
}
else
LOG_E
(
PDCP
,
"ENB pdcp will not use tun interface
\n
"
);
}
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
View file @
ee86a667
...
...
@@ -409,7 +409,7 @@ void pdcp_mbms_run (
*/
void
pdcp_run
(
const
protocol_ctxt_t
*
const
ctxt_pP
);
uint64_t
pdcp_module_init
(
uint64_t
pdcp_optmask
);
uint64_t
pdcp_module_init
(
uint64_t
pdcp_optmask
,
int
ue_id
);
void
pdcp_module_cleanup
(
void
);
void
nr_ip_over_LTE_DRB_preconfiguration
(
void
);
void
pdcp_layer_init
(
void
);
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
ee86a667
...
...
@@ -99,7 +99,7 @@ extern Packet_OTG_List_t *otg_pdcp_buffer;
extern
int
gtpv1u_new_data_req
(
uint8_t
enb_module_idP
,
rnti_t
ue_rntiP
,
uint8_t
rab_idP
,
uint8_t
*
buffer_pP
,
uint32_t
buf_lenP
,
uint32_t
buf_offsetP
);
uint16_t
ue_id_g
;
// global variable to identify ue id for each ue. Change happens only in main function of lte-uesoftmodem.c
void
debug_pdcp_pc5s_sdu
(
sidelink_pc5s_element
*
sl_pc5s_msg
,
char
*
title
)
{
LOG_I
(
PDCP
,
"%s:
\n
PC5S message, header traffic_type: %d)
\n
"
,
title
,
sl_pc5s_msg
->
pc5s_header
.
traffic_type
);
...
...
@@ -145,7 +145,14 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
}
printf
(
"
\n
"
);
#endif
ret
=
write
(
nas_sock_fd
[
ctxt_pP
->
module_id
],
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
if
(
ue_id_g
==
0
)
{
ret
=
write
(
nas_sock_fd
[
ctxt_pP
->
module_id
],
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
}
else
{
ret
=
write
(
nas_sock_fd
[
ue_id_g
],
&
(
sdu_p
->
data
[
sizeof
(
pdcp_data_ind_header_t
)]),
sizeToWrite
);
}
//LOG_I(PDCP,"[PDCP_FIFOS] ret %d TRIED TO PUSH DATA TO rb_id %d handle %d sizeToWrite %d\n",ret,rb_id,nas_sock_fd[ctxt_pP->module_id],sizeToWrite);
}
}
else
if
(
ENB_NAS_USE_TUN
)
{
...
...
@@ -232,8 +239,15 @@ int pdcp_fifo_read_input_sdus_fromtun (const protocol_ctxt_t *const ctxt_pP) {
do
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
1
);
len
=
read
(
UE_NAS_USE_TUN
?
nas_sock_fd
[
ctxt_pP
->
module_id
]
:
nas_sock_fd
[
0
],
&
nl_rx_buf
,
NL_MAX_PAYLOAD
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
if
(
ue_id_g
==
0
)
{
len
=
read
(
UE_NAS_USE_TUN
?
nas_sock_fd
[
ctxt_pP
->
module_id
]
:
nas_sock_fd
[
0
],
&
nl_rx_buf
,
NL_MAX_PAYLOAD
);
}
else
{
len
=
read
(
UE_NAS_USE_TUN
?
nas_sock_fd
[
ue_id_g
]
:
nas_sock_fd
[
0
],
&
nl_rx_buf
,
NL_MAX_PAYLOAD
);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
if
(
len
<=
0
)
continue
;
...
...
@@ -512,7 +526,7 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
}
}
}
else
{
// ctxt.enb_flag => UE
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
#ifdef UESIM_EXPANSION
ctxt
.
module_id
=
inst_pdcp_list
[
pdcp_read_header_g
.
inst
];
#else
...
...
@@ -568,8 +582,8 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
,
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
?
NULL
:&
pdcp_read_header_g
.
sourceL2Id
,
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
?
NULL
:&
pdcp_read_header_g
.
destinationL2Id
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
?
NULL
:&
pdcp_read_header_g
.
sourceL2Id
,
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
?
NULL
:&
pdcp_read_header_g
.
destinationL2Id
);
}
else
{
/* else of h_rc == HASH_TABLE_OK */
MSC_LOG_RX_DISCARDED_MESSAGE
(
...
...
@@ -613,8 +627,8 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
pdcp_read_header_g
.
data_size
,
(
unsigned
char
*
)
NLMSG_DATA
(
nas_nlh_rx
),
PDCP_TRANSMISSION_MODE_DATA
,
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
?
NULL
:&
pdcp_read_header_g
.
sourceL2Id
,
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
?
NULL
:&
pdcp_read_header_g
.
destinationL2Id
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
?
NULL
:&
pdcp_read_header_g
.
sourceL2Id
,
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
?
NULL
:&
pdcp_read_header_g
.
destinationL2Id
);
}
/* rab_id == 0 */
}
/*pdcp_read_state_g != 0 */
...
...
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
ee86a667
...
...
@@ -1507,8 +1507,8 @@ void enqueue_dl_config_req_tx_req(nfapi_dl_config_request_t *dl_config_req, nfap
nfapi_dl_config_request_t
*
dl_config_req_temp
=
memcpy_dl_config_req_standalone
(
dl_config_req
);
nfapi_tx_req_pdu_list_t
*
tx_req_temp
=
memcpy_tx_req_standalone
(
tx_req
);
LOG_
E
(
MAC
,
"This is the num_pdus for tx_req: %d
\n
"
,
tx_req_temp
->
num_pdus
);
LOG_
E
(
MAC
,
"This is the num_pdus for dl_config_req and the sfn_sf: %d, %d:%d
\n
"
,
dl_config_req_temp
->
dl_config_request_body
.
number_pdu
,
LOG_
I
(
MAC
,
"This is the num_pdus for tx_req: %d
\n
"
,
tx_req_temp
->
num_pdus
);
LOG_
I
(
MAC
,
"This is the num_pdus for dl_config_req and the sfn_sf: %d, %d:%d
\n
"
,
dl_config_req_temp
->
dl_config_request_body
.
number_pdu
,
NFAPI_SFNSF2SFN
(
dl_config_req_temp
->
sfn_sf
),
NFAPI_SFNSF2SF
(
dl_config_req_temp
->
sfn_sf
));
nfapi_dl_config_req_tx_req_t
*
req
=
malloc
(
sizeof
(
nfapi_dl_config_req_tx_req_t
));
...
...
openair3/NAS/UE/ESM/esm_ebr_context.c
View file @
ee86a667
...
...
@@ -267,7 +267,7 @@ int esm_ebr_context_create(
strcpy
(
broadcast
,
ipv4_addr
);
}
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
// this is for L2 FAPI simulator.
// change for multiple UE's like 256UEs.
// if it's made too many tables , OS may crush so we use one table.
...
...
targets/RT/USER/lte-softmodem.c
View file @
ee86a667
...
...
@@ -489,7 +489,7 @@ void init_pdcp(void) {
pdcp_initmask
=
pdcp_initmask
|
ENB_NAS_USE_TUN_W_MBMS_BIT
;
pdcp_module_init
(
pdcp_initmask
);
pdcp_module_init
(
pdcp_initmask
,
0
);
if
(
NODE_IS_CU
(
RC
.
rrc
[
0
]
->
node_type
))
{
pdcp_set_rlc_data_req_func
((
send_rlc_data_req_func_t
)
proto_agent_send_rlc_data_req
);
...
...
targets/RT/USER/lte-softmodem.h
View file @
ee86a667
...
...
@@ -117,6 +117,7 @@
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"A", CONFIG_HLP_TADV, 0, iptr:&(timingadv), defintval:0, TYPE_INT, 0}, \
{"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0}, \
{"node-number", NULL, 0, u16ptr:&node_number, defuintval:2, TYPE_UINT16, 0}, \
}
/*-----------------------------------------------------------------------------------------------------------------------------*/
...
...
@@ -207,7 +208,7 @@ extern int stop_L1L2(module_id_t enb_id);
extern
int
restart_L1L2
(
module_id_t
enb_id
);
extern
void
init_UE_stub_single_thread
(
int
nb_inst
,
int
eMBMS_active
,
int
uecap_xer_in
,
char
*
emul_iface
);
extern
void
init_UE_standalone_thread
(
void
);
extern
void
init_UE_standalone_thread
(
int
ue_idx
);
extern
PHY_VARS_UE
*
init_ue_vars
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
...
...
targets/RT/USER/lte-ue.c
View file @
ee86a667
...
...
@@ -193,7 +193,7 @@ PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
ue
->
mac_enabled
=
1
;
// In phy_stub_UE (MAC-to-MAC) mode these init functions don't need to get called. Is this correct?
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
// initialize all signal buffers
init_lte_ue_signal
(
ue
,
1
,
abstraction_flag
);
// intialize transport
...
...
@@ -426,11 +426,11 @@ void init_UE_stub_single_thread(int nb_inst,
}
}
void
init_UE_standalone_thread
()
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
;
int
standalone_rx_port
=
3212
;
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
;
...
...
@@ -466,7 +466,7 @@ void init_UE_stub(int nb_inst,
printf
(
"UE threads created
\n
"
);
LOG_I
(
PHY
,
"Starting multicast link on %s
\n
"
,
emul_iface
);
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
multicast_link_start
(
ue_stub_rx_handler
,
0
,
emul_iface
);
}
...
...
@@ -2399,7 +2399,7 @@ void init_UE_single_thread_stub(int nb_inst)
AssertFatal
(
PHY_vars_UE_g
[
i
]
!=
NULL
,
"PHY_vars_UE_g[inst] is NULL
\n
"
);
AssertFatal
(
PHY_vars_UE_g
[
i
][
0
]
!=
NULL
,
"PHY_vars_UE_g[inst][0] is NULL
\n
"
);
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE_STANDALONE_PNF
)
{
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE
_STANDALONE_PNF
)
{
#ifdef NAS_UE
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_NAS_UE
,
INITIALIZE_MESSAGE
);
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
ee86a667
...
...
@@ -86,7 +86,7 @@
#include "lte-softmodem.h"
extern
int
ue_id_g
;
/* temporary compilation wokaround (UE/eNB split */
uint16_t
sf_ahead
;
...
...
@@ -281,6 +281,7 @@ void exit_function(const char *file, const char *function, const int line, const
extern
int16_t
dlsch_demod_shift
;
uint16_t
ue_idx_standalone
=
0xFFFF
;
uint16_t
node_number
;
static
void
get_options
(
void
)
{
int
CC_id
=
0
;
int
tddflag
=
0
;
...
...
@@ -527,7 +528,7 @@ int restart_L1L2(module_id_t enb_id) {
return
0
;
}
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
))
{
...
...
@@ -537,7 +538,7 @@ void init_pdcp(void) {
if
(
IS_SOFTMODEM_NOKRNMOD
)
pdcp_initmask
=
pdcp_initmask
|
UE_NAS_USE_TUN_BIT
;
pdcp_module_init
(
pdcp_initmask
);
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
);
}
...
...
@@ -624,7 +625,16 @@ int main( int argc, char **argv ) {
MSC_INIT
(
MSC_E_UTRAN
,
THREAD_MAX
+
TASK_MAX
);
init_opt
();
init_pdcp
();
ue_id_g
=
(
node_number
==
0
)
?
0
:
node_number
-
2
;
//ue_id_g = 0, 1, ...,
if
(
node_number
==
0
)
{
init_pdcp
(
0
);
}
else
{
init_pdcp
(
node_number
-
1
);
}
//TTN for D2D
printf
(
"RRC control socket
\n
"
);
rrc_control_socket_init
();
...
...
@@ -747,7 +757,7 @@ int main( int argc, char **argv ) {
abort
();
}
init_UE_stub_single_thread
(
NB_UE_INST
,
eMBMS_active
,
uecap_xer_in
,
emul_iface
);
init_UE_standalone_thread
();
init_UE_standalone_thread
(
ue_id_g
);
}
else
{
init_UE
(
NB_UE_INST
,
eMBMS_active
,
uecap_xer_in
,
0
,
get_softmodem_params
()
->
phy_test
,
UE_scan
,
UE_scan_carrier
,
mode
,(
int
)
rx_gain
[
0
][
0
],
tx_max_power
[
0
],
frame_parms
[
0
]);
...
...
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