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
常顺宇
OpenXG-RAN
Commits
af92c512
Commit
af92c512
authored
4 years ago
by
Andrew Burger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Major queue changes note all the log supressions
parent
1b4c8d9e
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
6409 additions
and
6345 deletions
+6409
-6345
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+6249
-6257
openair1/PHY/LTE_UE_TRANSPORT/sldch.c
openair1/PHY/LTE_UE_TRANSPORT/sldch.c
+4
-4
openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
+3
-3
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+6
-7
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+99
-47
openair2/PHY_INTERFACE/phy_stub_UE.h
openair2/PHY_INTERFACE/phy_stub_UE.h
+26
-9
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+18
-17
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+4
-1
No files found.
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
af92c512
...
...
@@ -1553,11 +1553,11 @@ static uint8_t pack_tx_request_body_value(void* tlv, uint8_t **ppWritePackedMsg,
if
(
pdu
->
segments
[
j
].
segment_length
==
3
)
{
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"%s() BCH? segment_data:%x %x %x
\n
"
,
__FUNCTION__
,
pdu
->
segments
[
j
].
segment_data
[
0
],
pdu
->
segments
[
j
].
segment_data
[
1
],
pdu
->
segments
[
j
].
segment_data
[
2
]
);
// NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() BCH? segment_data:%x %x %x\n", __FUNCTION__,
// pdu->segments[j].segment_data[0],
// pdu->segments[j].segment_data[1],
// pdu->segments[j].segment_data[2]
// );
}
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() segment_data:%p segment_length:%u pusharray8()=%d\n", __FUNCTION__, pdu->segments[j].segment_data, pdu->segments[j].segment_length, push_ret);
...
...
@@ -4502,11 +4502,11 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
return
0
;
if
(
pdu
->
segments
[
0
].
segment_length
==
3
)
{
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"%s() BCH? segment_data:%x %x %x
\n
"
,
__FUNCTION__
,
pdu
->
segments
[
0
].
segment_data
[
0
],
pdu
->
segments
[
0
].
segment_data
[
1
],
pdu
->
segments
[
0
].
segment_data
[
2
]
);
// NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() BCH? segment_data:%x %x %x\n", __FUNCTION__,
// pdu->segments[0].segment_data[0],
// pdu->segments[0].segment_data[1],
// pdu->segments[0].segment_data[2]
// );
}
}
else
...
...
@@ -4530,48 +4530,40 @@ static uint8_t unpack_tx_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *
return
1
;
}
static
uint8_t
unpack_ue_release_request
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p7_codec_config_t
*
config
)
{
static
uint8_t
unpack_ue_release_request
(
uint8_t
**
ppReadPackedMsg
,
uint8_t
*
end
,
void
*
msg
,
nfapi_p7_codec_config_t
*
config
)
{
uint8_t
proceed
=
1
;
nfapi_ue_release_request_t
*
pNfapiMsg
=
(
nfapi_ue_release_request_t
*
)
msg
;
nfapi_ue_release_request_t
*
pNfapiMsg
=
(
nfapi_ue_release_request_t
*
)
msg
;
if
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
sfn_sf
,
end
)
==
0
)
if
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
sfn_sf
,
end
)
==
0
)
return
0
;
while
(((
uint8_t
*
)(
*
ppReadPackedMsg
)
<
end
)
&&
proceed
)
{
while
(((
uint8_t
*
)(
*
ppReadPackedMsg
)
<
end
)
&&
proceed
)
{
nfapi_tl_t
generic_tl
;
if
(
unpack_tl
(
ppReadPackedMsg
,
&
generic_tl
,
end
)
==
0
)
if
(
unpack_tl
(
ppReadPackedMsg
,
&
generic_tl
,
end
)
==
0
)
return
0
;
switch
(
generic_tl
.
tag
)
{
case
NFAPI_UE_RELEASE_BODY_TAG
:
{
switch
(
generic_tl
.
tag
)
{
case
NFAPI_UE_RELEASE_BODY_TAG
:
{
pNfapiMsg
->
ue_release_request_body
.
tl
=
generic_tl
;
if
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
ue_release_request_body
.
number_of_TLVs
,
end
)
==
0
)
if
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
ue_release_request_body
.
number_of_TLVs
,
end
)
==
0
)
return
0
;
if
(
pNfapiMsg
->
ue_release_request_body
.
number_of_TLVs
>
NFAPI_RELEASE_MAX_RNTI
)
{
if
(
pNfapiMsg
->
ue_release_request_body
.
number_of_TLVs
>
NFAPI_RELEASE_MAX_RNTI
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s number of relese rnti's exceed maxium (count:%d max:%d)
\n
"
,
__FUNCTION__
,
pNfapiMsg
->
ue_release_request_body
.
number_of_TLVs
,
NFAPI_RELEASE_MAX_RNTI
);
return
0
;
}
else
{
uint8_t
j
;
uint16_t
num
=
pNfapiMsg
->
ue_release_request_body
.
number_of_TLVs
;
for
(
j
=
0
;
j
<
num
;
++
j
)
{
if
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
ue_release_request_body
.
ue_release_request_TLVs_list
[
j
].
rnti
,
end
)
==
0
)
{
for
(
j
=
0
;
j
<
num
;
++
j
)
{
if
(
pull16
(
ppReadPackedMsg
,
&
pNfapiMsg
->
ue_release_request_body
.
ue_release_request_TLVs_list
[
j
].
rnti
,
end
)
==
0
)
{
return
0
;
}
}
}
}
break
;
default:
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"unpack_ue_release_request FIXME : Invalid type %d
\n
"
,
generic_tl
.
tag
);
}
break
;
}
break
;
default:
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"unpack_ue_release_request FIXME : Invalid type %d
\n
"
,
generic_tl
.
tag
);
}
break
;
};
}
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_UE_TRANSPORT/sldch.c
View file @
af92c512
...
...
@@ -49,10 +49,10 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
(
void
*
)
sldch
,
sizeof
(
SLDCH_t
));
LOG_I
(
PHY
,
"SLDCH configuration %zd bytes, TBS payload %d bytes => %zd bytes
\n
"
,
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
),
sldch
->
payload_length
,
sldch_header_len
+
sizeof
(
SLDCH_t
)
-
sizeof
(
uint8_t
*
)
+
sldch
->
payload_length
);
//
LOG_I(PHY,"SLDCH configuration %zd bytes, TBS payload %d bytes => %zd bytes\n",
//
sizeof(SLDCH_t)-sizeof(uint8_t*),
//
sldch->payload_length,
//
sldch_header_len+sizeof(SLDCH_t)-sizeof(uint8_t*)+sldch->payload_length);
multicast_link_write_sock
(
0
,
(
char
*
)
&
pdu
,
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
View file @
af92c512
...
...
@@ -242,9 +242,9 @@ multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP)
if
((
num
=
sendto
(
group_list
[
groupP
].
socket
,
dataP
,
sizeP
,
0
,
(
struct
sockaddr
*
)
&
group_list
[
groupP
].
sock_remote_addr
,
sizeof
(
group_list
[
groupP
].
sock_remote_addr
)))
<
0
)
{
LOG_E
(
PHY
,
"[MULTICAST] sendto has failed (%d:%s)
\n
(%s:%d)
\n
"
,
errno
,
strerror
(
errno
),
__FILE__
,
__LINE__
);
//
LOG_E(PHY, "[MULTICAST] sendto has failed (%d:%s)\n (%s:%d)\n",
//
errno, strerror(errno),
//
__FILE__, __LINE__);
}
return
num
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/ue_procedures.c
View file @
af92c512
...
...
@@ -160,7 +160,6 @@ void ue_init_mac(module_id_t module_idP) {
UE_mac_inst
[
module_idP
].
SI_Decoded
=
0
;
next_ra_frame
=
0
;
next_Mod_id
=
0
;
tx_request_pdu_list
=
NULL
;
tx_req_num_elems
=
0
;
}
}
...
...
@@ -2469,11 +2468,11 @@ ue_scheduler(const module_id_t module_idP,
if
(
msg_p
!=
NULL
)
{
switch
(
ITTI_MSG_ID
(
msg_p
))
{
case
RRC_MAC_CCCH_DATA_REQ
:
LOG_I
(
MAC
,
"Received %s from %s: instance %d, frameP %d, eNB_index %d
\n
"
,
ITTI_MSG_NAME
(
msg_p
),
ITTI_MSG_ORIGIN_NAME
(
msg_p
),
ITTI_MSG_INSTANCE
(
msg_p
),
RRC_MAC_CCCH_DATA_REQ
(
msg_p
).
frame
,
RRC_MAC_CCCH_DATA_REQ
(
msg_p
).
enb_index
);
//
LOG_I(MAC,
//
"Received %s from %s: instance %d, frameP %d, eNB_index %d\n",
//
ITTI_MSG_NAME(msg_p), ITTI_MSG_ORIGIN_NAME(msg_p), ITTI_MSG_INSTANCE(msg_p),
//
RRC_MAC_CCCH_DATA_REQ(msg_p).frame,
//
RRC_MAC_CCCH_DATA_REQ(msg_p).enb_index);
// TODO process CCCH data req.
break
;
...
...
@@ -3145,7 +3144,7 @@ SLDCH_t *ue_get_sldch(module_id_t Mod_id,int CC_id,frame_t frame_tx,sub_frame_t
0
);
if
(
sldch
->
payload_length
>
0
)
{
LOG_I
(
MAC
,
"Got %d bytes from RRC for SLDCH @ %p
\n
"
,
sldch
->
payload_length
,
sldch
);
//
LOG_I(MAC,"Got %d bytes from RRC for SLDCH @ %p\n",sldch->payload_length,sldch);
return
(
sldch
);
}
else
return
((
SLDCH_t
*
)
NULL
);
...
...
This diff is collapsed.
Click to expand it.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
af92c512
This diff is collapsed.
Click to expand it.
openair2/PHY_INTERFACE/phy_stub_UE.h
View file @
af92c512
...
...
@@ -13,6 +13,7 @@
#include "openair2/PHY_INTERFACE/IF_Module.h"
#include "nfapi_interface.h"
#include "nfapi_pnf_interface.h"
#include <pthread.h>
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
//#include "openair1/PHY/defs.h"
//#include "openair1/PHY/LTE_TRANSPORT/defs.h"
...
...
@@ -21,13 +22,9 @@
FILL_UL_INFO_MUTEX_t
fill_ul_mutex
;
//below 2 difinitions move to phy_stub_UE.c to add initialization when difinition.
extern
UL_IND_t
*
UL_INFO
;
extern
nfapi_tx_request_pdu_t
*
tx_request_pdu_list
;
// New
/// Pointers to config_request types. Used from nfapi callback functions.
//below 3 difinitions move to phy_stub_UE.c to add initialization when difinition.
extern
nfapi_dl_config_request_t
*
dl_config_req
;
extern
nfapi_ul_config_request_t
*
ul_config_req
;
extern
nfapi_hi_dci0_request_t
*
hi_dci0_req
;
int
tx_req_num_elems
;
...
...
@@ -36,9 +33,6 @@ int tx_req_num_elems;
//module_id_t next_Mod_id;
eth_params_t
stub_eth_params
;
// This function should return all the sched_response config messages which concern a specific UE. Inside this
// function we should somehow make the translation of config message's rnti to Mod_ID.
Sched_Rsp_t
get_nfapi_sched_response
(
uint8_t
Mod_id
);
...
...
@@ -97,7 +91,8 @@ void dl_config_req_UE_MAC_dci(int sfn,
int
sf
,
nfapi_dl_config_request_pdu_t
*
dci
,
nfapi_dl_config_request_pdu_t
*
dlsch
,
int
num_ue
);
int
num_ue
,
nfapi_tx_request_pdu_t
*
tx_request_pdu_list
);
void
dl_config_req_UE_MAC_bch
(
int
sfn
,
int
sf
,
nfapi_dl_config_request_pdu_t
*
bch
,
...
...
@@ -105,7 +100,8 @@ void dl_config_req_UE_MAC_bch(int sfn,
void
dl_config_req_UE_MAC_mch
(
int
sfn
,
int
sf
,
nfapi_dl_config_request_pdu_t
*
bch
,
int
num_ue
);
int
num_ue
,
nfapi_tx_request_pdu_t
*
tx_request_pdu_list
);
int
tx_req_UE_MAC
(
nfapi_tx_request_t
*
req
);
...
...
@@ -137,6 +133,27 @@ int ue_init_standalone_socket(const char *addr, int port);
// This function is used to read from standalone pnf socket call corresponding memcpy functions
void
*
ue_standalone_pnf_task
(
void
*
context
);
#define MAX_QUEUE_SIZE 512
typedef
struct
queue_t
{
void
*
items
[
MAX_QUEUE_SIZE
];
size_t
read_index
,
write_index
;
size_t
num_items
;
pthread_mutex_t
mutex
;
}
queue_t
;
void
init_queue
(
queue_t
*
q
);
void
put_queue
(
queue_t
*
q
,
void
*
item
);
void
*
get_queue
(
queue_t
*
q
);
extern
queue_t
dl_config_req_queue
;
extern
queue_t
tx_req_pdu_queue
;
extern
queue_t
ul_config_req_queue
;
extern
queue_t
hi_dci0_req_queue
;
extern
nfapi_ul_config_request_t
*
ul_config_req
;
extern
nfapi_hi_dci0_request_t
*
hi_dci0_req
;
#endif
/* PHY_STUB_UE_H_ */
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
af92c512
...
...
@@ -1026,10 +1026,8 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
}
proc
->
subframe_rx
=
proc
->
sub_frame_start
;
// Initializations for nfapi-L2-emulator mode
dl_config_req
=
NULL
;
ul_config_req
=
NULL
;
hi_dci0_req
=
NULL
;
tx_request_pdu_list
=
NULL
;
// waiting for all UE's threads set phy_stub_ticking->num_single_thread[ue_thread_id] = -1.
do
{
...
...
@@ -1130,6 +1128,12 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
}
}
nfapi_dl_config_request_t
*
dl_config_req
=
get_queue
(
&
dl_config_req_queue
);
nfapi_tx_request_pdu_t
*
tx_request_pdu_list
=
get_queue
(
&
tx_req_pdu_queue
);
// if ((dl_config_req != NULL) != (tx_request_pdu_list != NULL)) {
// LOG_E(MAC, "In behemoth dl_config_req: %p tx_req_pdu_list: %p\n", dl_config_req, tx_request_pdu_list);
// }
if
(
dl_config_req
&&
tx_request_pdu_list
)
{
nfapi_dl_config_request_body_t
*
dl_config_req_body
=
&
dl_config_req
->
dl_config_request_body
;
for
(
int
i
=
0
;
i
<
dl_config_req_body
->
number_pdu
;
++
i
)
{
...
...
@@ -1148,7 +1152,8 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
NFAPI_SFNSF2SF
(
dl_config_req
->
sfn_sf
),
pdu
,
dlsch
,
ue_num
);
ue_num
,
tx_request_pdu_list
);
}
else
if
(
pdu
->
pdu_type
==
NFAPI_DL_CONFIG_BCH_PDU_TYPE
)
{
dl_config_req_UE_MAC_bch
(
NFAPI_SFNSF2SFN
(
dl_config_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
dl_config_req
->
sfn_sf
),
...
...
@@ -1158,7 +1163,8 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
dl_config_req_UE_MAC_mch
(
NFAPI_SFNSF2SFN
(
dl_config_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
dl_config_req
->
sfn_sf
),
pdu
,
ue_num
);
ue_num
,
tx_request_pdu_list
);
}
}
}
...
...
@@ -1473,11 +1479,6 @@ static void *UE_phy_stub_thread_rxn_txnp4(void *arg)
phy_procedures_UE_SL_RX
(
UE
,
proc
);
oai_subframe_ind
(
timer_frame
,
timer_subframe
);
if
(
dl_config_req
!=
NULL
)
{
AssertFatal
(
0
,
"dl_config_req_UE_MAC() not handled
\n
"
);
//dl_config_req_UE_MAC(dl_config_req, Mod_id);
}
//if(UE_mac_inst[Mod_id].hi_dci0_req!= NULL){
if
(
hi_dci0_req
!=
NULL
&&
hi_dci0_req
->
hi_dci0_request_body
.
hi_dci0_pdu_list
!=
NULL
)
{
AssertFatal
(
0
,
"hi_dci0_req_UE_MAC() not handled
\n
"
);
...
...
@@ -2267,7 +2268,7 @@ static void *timer_thread( void *param )
pdu
.
header
.
packet_type
=
TTI_SYNC
;
pdu
.
header
.
absSF
=
(
timer_frame
*
10
)
+
timer_subframe
;
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_UE_STUB_PNF
&&
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
multicast_link_write_sock
(
0
,
(
char
*
)
&
pdu
,
sizeof
(
UE_tport_header_t
));
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-uesoftmodem.c
View file @
af92c512
...
...
@@ -722,7 +722,10 @@ int main( int argc, char **argv ) {
//init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
init_UE_stub_single_thread
(
NB_UE_INST
,
eMBMS_active
,
uecap_xer_in
,
emul_iface
);
}
else
if
(
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
// init thread and open socket
init_queue
(
&
dl_config_req_queue
);
init_queue
(
&
tx_req_pdu_queue
);
init_queue
(
&
hi_dci0_req_queue
);
init_queue
(
&
ul_config_req_queue
);
config_sync_var
=
0
;
init_UE_stub_single_thread
(
NB_UE_INST
,
eMBMS_active
,
uecap_xer_in
,
emul_iface
);
init_UE_standalone_thread
();
...
...
This diff is collapsed.
Click to expand it.
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