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
zzha zzha
OpenXG-RAN
Commits
43d8ed21
Commit
43d8ed21
authored
Aug 25, 2021
by
Deokseong "David" Kim
Committed by
Melissa
Aug 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update on scheduler to relax AssertFatal.
parent
72675ef3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
7 deletions
+50
-7
executables/nr-ue.c
executables/nr-ue.c
+16
-0
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+6
-0
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+1
-1
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+2
-2
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+22
-3
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+1
-1
No files found.
executables/nr-ue.c
View file @
43d8ed21
...
...
@@ -141,6 +141,9 @@ void init_nrUE_standalone_thread(int ue_idx)
int
standalone_rx_port
=
3612
+
ue_idx
*
2
;
nrue_init_standalone_socket
(
standalone_addr
,
standalone_tx_port
,
standalone_rx_port
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
pthread_mutex_init
(
&
mac
->
mutex_dl_info
,
NULL
);
pthread_t
thread
;
if
(
pthread_create
(
&
thread
,
NULL
,
nrue_standalone_pnf_task
,
NULL
)
!=
0
)
{
LOG_E
(
NR_MAC
,
"pthread_create failed for calling nrue_standalone_pnf_task"
);
...
...
@@ -179,7 +182,12 @@ static void L1_nsa_prach_procedures(frame_t frame, int slot, fapi_nr_ul_config_p
if
(
!
put_queue
(
&
nr_rach_ind_queue
,
rach_ind
))
{
for
(
int
pdu_index
=
0
;
pdu_index
<
rach_ind
->
number_of_pdus
;
pdu_index
++
)
{
free
(
rach_ind
->
pdu_list
[
pdu_index
].
preamble_list
);
}
free
(
rach_ind
->
pdu_list
);
free
(
rach_ind
);
}
LOG_I
(
NR_MAC
,
"Melissa, We have successfully filled the rach_ind queue with the recently filled rach ind
\n
"
);
}
...
...
@@ -287,6 +295,8 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
ul_info
.
frame_tx
=
(
ul_info
.
slot_rx
+
slot_ahead
>=
slots_per_frame
)
?
ul_info
.
frame_rx
+
1
:
ul_info
.
frame_rx
;
ul_info
.
ue_sched_mode
=
SCHED_ALL
;
if
(
pthread_mutex_unlock
(
&
mac
->
mutex_dl_info
))
abort
();
memset
(
&
mac
->
dl_info
,
0
,
sizeof
(
mac
->
dl_info
));
mac
->
dl_info
.
cc_id
=
CC_id
;
mac
->
dl_info
.
gNB_index
=
gNB_id
;
...
...
@@ -301,6 +311,9 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
{
nr_ue_dl_indication
(
&
mac
->
dl_info
,
&
ul_time_alignment
);
}
if
(
pthread_mutex_unlock
(
&
mac
->
mutex_dl_info
))
abort
();
if
(
is_nr_UL_slot
(
mac
->
scc
->
tdd_UL_DL_ConfigurationCommon
,
ul_info
.
slot_tx
,
mac
->
frame_type
))
{
LOG_D
(
NR_MAC
,
"Slot %d. calling nr_ue_ul_ind() from %s
\n
"
,
ul_info
.
slot_tx
,
__FUNCTION__
);
...
...
@@ -350,6 +363,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
free
(
rach_ind
->
pdu_list
[
i
].
preamble_list
);
}
free
(
rach_ind
->
pdu_list
);
free
(
rach_ind
);
nr_Msg1_transmitted
(
mod_id
,
CC_id
,
frame
,
gNB_id
);
}
if
(
rx_ind
&&
rx_ind
->
number_of_pdus
>
0
)
...
...
@@ -359,6 +373,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
};
send_nsa_standalone_msg
(
&
UL_INFO
,
rx_ind
->
header
.
message_id
);
free
(
rx_ind
->
pdu_list
);
free
(
rx_ind
);
}
if
(
crc_ind
&&
crc_ind
->
number_crcs
>
0
)
{
...
...
@@ -367,6 +382,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
};
send_nsa_standalone_msg
(
&
UL_INFO
,
crc_ind
->
header
.
message_id
);
free
(
crc_ind
->
crc_list
);
free
(
crc_ind
);
}
}
return
NULL
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
43d8ed21
...
...
@@ -197,6 +197,12 @@ int8_t nr_ue_scheduled_response_stub(nr_scheduled_response_t *scheduled_response
LOG_E
(
NR_MAC
,
"Put_queue failed for uci_ind
\n
"
);
//free(uci_ind->uci_list[0].pucch_pdu_format_0_1.harq->harq_list);
//free(uci_ind->uci_list[0].pucch_pdu_format_0_1.harq);
for
(
int
j
=
0
;
j
<
uci_ind
->
num_ucis
;
j
++
)
{
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
pdu_0_1
=
&
uci_ind
->
uci_list
[
j
].
pucch_pdu_format_0_1
;
free
(
pdu_0_1
->
harq
->
harq_list
);
free
(
pdu_0_1
->
harq
);
}
free
(
uci_ind
->
uci_list
);
free
(
uci_ind
);
}
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
43d8ed21
...
...
@@ -425,6 +425,8 @@ typedef struct {
nr_downlink_indication_t
dl_info
;
NR_UE_HARQ_STATUS_t
dl_harq_info
[
16
];
pthread_mutex_t
mutex_dl_info
;
}
NR_UE_MAC_INST_t
;
typedef
enum
seach_space_mask_e
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
43d8ed21
...
...
@@ -1521,7 +1521,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
LOG_D
(
NR_MAC
,
"numDlDci: %i
\n
"
,
pdcch_pdu_rel15
->
numDlDci
);
ra
->
state
=
WAIT_Msg4_ACK
;
LOG_I
(
NR_MAC
,
"[gNB %d][RAPROC] Frame %d, S
ubframe
%d: RA state %d
\n
"
,
module_idP
,
frameP
,
slotP
,
ra
->
state
);
LOG_I
(
NR_MAC
,
"[gNB %d][RAPROC] Frame %d, S
lot
%d: RA state %d
\n
"
,
module_idP
,
frameP
,
slotP
,
ra
->
state
);
}
}
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
43d8ed21
...
...
@@ -300,7 +300,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
NR_Sched_Rsp_t
*
sched_info
=
&
NR_Sched_INFO
[
module_id
][
CC_id
];
NR_IF_Module_t
*
ifi
=
nr_if_inst
[
module_id
];
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
module_id
];
LOG_D
(
PHY
,
"SFN/SF:%d
%d module_id:%d CC_id:%d UL_info[rach_pdus:%d rx_ind:%d crcs:%d]
\n
"
,
LOG_D
(
NR_PHY
,
"SFN/SLOT:%d.
%d module_id:%d CC_id:%d UL_info[rach_pdus:%d rx_ind:%d crcs:%d]
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
module_id
,
CC_id
,
UL_info
->
rach_ind
.
number_of_pdus
,
UL_info
->
rx_ind
.
number_of_pdus
,
UL_info
->
crc_ind
.
number_crcs
);
...
...
@@ -360,7 +360,7 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
ifi
->
NR_Schedule_response
(
sched_info
);
}
LOG_D
(
PHY
,
"NR_Schedule_response: SFN SLOT:%d %d dl_pdus:%d
\n
"
,
LOG_D
(
NR_
PHY
,
"NR_Schedule_response: SFN SLOT:%d %d dl_pdus:%d
\n
"
,
sched_info
->
frame
,
sched_info
->
slot
,
sched_info
->
DL_req
->
dl_tti_request_body
.
nPDUs
);
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
43d8ed21
...
...
@@ -274,6 +274,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
}
dl_info
->
rx_ind
=
CALLOC
(
1
,
sizeof
(
fapi_nr_rx_indication_t
));
AssertFatal
(
dl_info
->
rx_ind
!=
NULL
,
"%s: Out of memory in calloc"
,
__FUNCTION__
);
dl_info
->
rx_ind
->
sfn
=
tx_data_request
->
SFN
;
dl_info
->
rx_ind
->
slot
=
tx_data_request
->
Slot
;
dl_info
->
rx_ind
->
number_pdus
=
num_pdus
;
...
...
@@ -290,6 +291,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
LOG_I
(
NR_PHY
,
"%s: num_tlv %d and length %d, pdu index %d
\n
"
,
__FUNCTION__
,
pdu_list
->
num_TLV
,
length
,
i
);
uint8_t
*
pdu
=
malloc
(
length
);
AssertFatal
(
pdu
!=
NULL
,
"%s: Out of memory in malloc"
,
__FUNCTION__
);
dl_info
->
rx_ind
->
rx_indication_body
[
i
].
pdsch_pdu
.
pdu
=
pdu
;
for
(
int
j
=
0
;
j
<
pdu_list
->
num_TLV
;
j
++
)
{
...
...
@@ -332,6 +334,7 @@ static void copy_ul_dci_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
if
(
num_dci
>
0
)
{
dl_info
->
dci_ind
=
CALLOC
(
1
,
sizeof
(
fapi_nr_dci_indication_t
));
AssertFatal
(
dl_info
->
dci_ind
!=
NULL
,
"%s: Out of memory in calloc"
,
__FUNCTION__
);
dl_info
->
dci_ind
->
number_of_dcis
=
num_dci
;
dl_info
->
dci_ind
->
SFN
=
ul_dci_req
->
SFN
;
dl_info
->
dci_ind
->
slot
=
ul_dci_req
->
Slot
;
...
...
@@ -396,6 +399,12 @@ static void copy_ul_tti_data_req_to_dl_info(nr_downlink_indication_t *dl_info, n
};
send_nsa_standalone_msg
(
&
UL_INFO
,
uci_ind
->
header
.
message_id
);
}
for
(
int
j
=
0
;
j
<
uci_ind
->
num_ucis
;
j
++
)
{
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
pdu_0_1
=
&
uci_ind
->
uci_list
[
j
].
pucch_pdu_format_0_1
;
free
(
pdu_0_1
->
harq
->
harq_list
);
free
(
pdu_0_1
->
harq
);
}
free
(
uci_ind
->
uci_list
);
free
(
uci_ind
);
}
...
...
@@ -466,6 +475,8 @@ static void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
return
;
}
if
(
pthread_mutex_lock
(
&
mac
->
mutex_dl_info
))
abort
();
if
(
dl_tti_request
)
{
frame
=
dl_tti_request
->
SFN
;
...
...
@@ -496,6 +507,7 @@ static void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
}
else
{
if
(
pthread_mutex_unlock
(
&
mac
->
mutex_dl_info
))
abort
();
return
;
}
...
...
@@ -505,6 +517,8 @@ static void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
fill_dci_from_dl_config
(
&
mac
->
dl_info
,
&
mac
->
dl_config_request
);
nr_ue_dl_indication
(
&
mac
->
dl_info
,
&
ul_time_alignment
);
if
(
pthread_mutex_unlock
(
&
mac
->
mutex_dl_info
))
abort
();
// If we filled dl_info AFTER we got the slot indication, we want to check if we should fill tx_req:
nr_uplink_indication_t
ul_info
;
memset
(
&
ul_info
,
0
,
sizeof
(
ul_info
));
...
...
@@ -880,9 +894,14 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
}
//clean up nr_downlink_indication_t *dl_info
dl_info
->
rx_ind
=
NULL
;
dl_info
->
dci_ind
=
NULL
;
if
(
dl_info
->
dci_ind
!=
NULL
){
free
(
dl_info
->
dci_ind
);
dl_info
->
dci_ind
=
NULL
;
}
if
(
dl_info
->
rx_ind
!=
NULL
){
free
(
dl_info
->
rx_ind
);
dl_info
->
rx_ind
=
NULL
;
}
}
return
0
;
}
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
43d8ed21
...
...
@@ -2992,7 +2992,7 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len)
LOG_I
(
NR_RRC
,
"We got an RRC_CONFIG_COMPLETE_REQ
\n
"
);
uint32_t
nr_RadioBearer_size
=
hdr
.
RadioBearer_size
;
uint32_t
nr_SecondaryCellGroup_size
=
hdr
.
SecondaryCellGroup_size
;
AssertFatal
(
sizeof
(
hdr
)
+
nr_RadioBearer_size
+
nr_SecondaryCellGroup_size
=
=
msg_len
,
AssertFatal
(
sizeof
(
hdr
)
+
nr_RadioBearer_size
+
nr_SecondaryCellGroup_size
<
=
msg_len
,
"nr_RadioBearerConfig1_r15 size %d nr_SecondaryCellGroupConfig_r15 size %d sizeof(hdr) %zu, msg_len = %d
\n
"
,
nr_RadioBearer_size
,
nr_SecondaryCellGroup_size
,
...
...
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