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
d019484f
Commit
d019484f
authored
Feb 17, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove sched_resp
parent
a0f809f9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
6 additions
and
39 deletions
+6
-39
executables/nr-gnb.c
executables/nr-gnb.c
+0
-3
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+0
-2
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+0
-13
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+0
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+0
-1
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+1
-2
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
+0
-2
openair2/NR_PHY_INTERFACE/nr_sched_response.c
openair2/NR_PHY_INTERFACE/nr_sched_response.c
+5
-15
No files found.
executables/nr-gnb.c
View file @
d019484f
...
...
@@ -172,9 +172,6 @@ static void tx_func(void *param)
ru_tx_func
((
void
*
)
&
syncMsgRU
);
stop_meas
(
&
info
->
gNB
->
phy_proc_tx
);
}
/* this thread is done with the sched_info, decrease the reference counter */
LOG_D
(
NR_PHY
,
"Calling deref_sched_response for id %d (tx_func) in %d.%d
\n
"
,
info
->
sched_response_id
,
frame_tx
,
slot_tx
);
deref_sched_response
(
info
->
sched_response_id
);
}
...
...
openair1/PHY/defs_gNB.h
View file @
d019484f
...
...
@@ -820,8 +820,6 @@ typedef struct processingData_L1tx {
uint16_t
num_pdsch_slot
;
int
num_dl_pdcch
;
int
num_ul_pdcch
;
/* a reference to the sched_response, to release it when not needed anymore */
int
sched_response_id
;
}
processingData_L1tx_t
;
typedef
struct
processingData_L1rx
{
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
d019484f
...
...
@@ -230,8 +230,6 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
bool
is_ul
=
slot_type
==
NR_UPLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
;
processingData_L1tx_t
*
msgTx
=
gNB
->
msgDataTx
;
/* store the sched_response_id for the TX thread to release it when done */
msgTx
->
sched_response_id
=
Sched_INFO
->
sched_response_id
;
DevAssert
(
Sched_INFO
->
DL_req
.
SFN
==
frame
);
DevAssert
(
Sched_INFO
->
DL_req
.
Slot
==
slot
);
...
...
@@ -247,11 +245,6 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
nr_schedule_tx_req
(
gNB
,
&
Sched_INFO
->
TX_req
);
nr_schedule_ul_dci_req
(
gNB
,
&
Sched_INFO
->
UL_dci_req
);
/* Both the current thread and the TX thread will access the sched_info
* at the same time, so increase its reference counter, so that it is
* released only when both threads are done with it.
*/
inc_ref_sched_response
(
Sched_INFO
->
sched_response_id
);
}
/*
...
...
@@ -271,11 +264,5 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
oai_nfapi_dl_tti_req(DL_req);
}
*/
/* this thread is done with the sched_info, decrease the reference counter */
if
((
slot_type
==
NR_DOWNLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
)
&&
NFAPI_MODE
==
NFAPI_MONOLITHIC
)
{
LOG_D
(
NR_PHY
,
"Calling dref_sched_response for id %d in %d.%d (sched_response)
\n
"
,
Sched_INFO
->
sched_response_id
,
frame
,
slot
);
deref_sched_response
(
Sched_INFO
->
sched_response_id
);
}
stop_meas
(
&
gNB
->
schedule_response_stats
);
}
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
d019484f
...
...
@@ -984,7 +984,6 @@ int main(int argc, char **argv)
exit
(
1
);
}
memset
(
Sched_INFO
,
0
,
sizeof
(
*
Sched_INFO
));
Sched_INFO
->
sched_response_id
=
-
1
;
while
((
round
<
num_rounds
)
&&
(
UE_harq_process
->
ack
==
0
))
{
round_trials
[
round
]
++
;
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
d019484f
...
...
@@ -713,7 +713,6 @@ int main(int argc, char *argv[])
NR_Sched_Rsp_t
*
Sched_INFO
=
malloc
(
sizeof
(
*
Sched_INFO
));
memset
((
void
*
)
Sched_INFO
,
0
,
sizeof
(
*
Sched_INFO
));
nfapi_nr_ul_tti_request_t
*
UL_tti_req
=
&
Sched_INFO
->
UL_tti_req
;
Sched_INFO
->
sched_response_id
=
-
1
;
nr_phy_data_tx_t
phy_data
=
{
0
};
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
d019484f
...
...
@@ -398,9 +398,8 @@ static void run_scheduler_monolithic(module_id_t module_id, int CC_id, int frame
NR_IF_Module_t
*
ifi
=
nr_if_inst
[
module_id
];
// gNB_MAC_INST *mac = RC.nrmac[module_id];
NR_Sched_Rsp_t
*
sched_info
;
NR_Sched_Rsp_t
*
sched_info
=
allocate_sched_response
()
;
LOG_D
(
NR_MAC
,
"Calling scheduler for %d.%d
\n
"
,
frame
,
slot
);
sched_info
=
allocate_sched_response
();
// clear UL DCI prior to handling ULSCH
sched_info
->
UL_dci_req
.
numPdus
=
0
;
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.h
View file @
d019484f
...
...
@@ -83,8 +83,6 @@ typedef struct {
typedef
struct
{
/// the ID of this sched_response - used by sched_reponse memory management
int
sched_response_id
;
/// Module ID
module_id_t
module_id
;
/// CC ID
...
...
openair2/NR_PHY_INTERFACE/nr_sched_response.c
View file @
d019484f
...
...
@@ -77,25 +77,15 @@ void init_sched_response(void)
NR_Sched_Rsp_t
*
allocate_sched_response
(
void
)
{
NR_Sched_Rsp_t
*
ret
;
int
new_head
;
if
(
pthread_mutex_lock
(
&
resp_mutex
))
AssertFatal
(
0
,
"pthread_mutex_lock failed
\n
"
);
AssertFatal
(
resp_freelist_inited
,
"sched_response used before init
\n
"
);
if
(
resp_freelist_head
==
-
1
)
{
LOG_E
(
PHY
,
"fatal: sched_response cannot be allocated, increase N_RESP
\n
"
);
exit
(
1
);
}
ret
=
&
resp
[
resp_freelist_head
];
ret
->
sched_response_id
=
resp_freelist_head
;
resp_refcount
[
resp_freelist_head
]
=
1
;
new_head
=
resp_freelist_next
[
resp_freelist_head
];
resp_freelist_next
[
resp_freelist_head
]
=
-
1
;
resp_freelist_head
=
new_head
;
static
int
next
=
0
;
ret
=
&
resp
[
next
++
];
next
%=
N_RESP
;
if
(
pthread_mutex_unlock
(
&
resp_mutex
))
AssertFatal
(
0
,
"pthread_mutex_unlock failed
\n
"
);
...
...
@@ -106,12 +96,11 @@ NR_Sched_Rsp_t *allocate_sched_response(void)
static
void
release_sched_response
(
int
sched_response_id
)
{
LOG_D
(
NR_MAC
,
"Releasing sched_response %d
\n
"
,
sched_response_id
);
resp_freelist_next
[
sched_response_id
]
=
resp_freelist_head
;
resp_freelist_head
=
sched_response_id
;
}
void
deref_sched_response
(
int
sched_response_id
)
{
AssertFatal
(
false
,
"don't call
\n
"
);
/* simulators (ulsim/dlsim) deal with their own sched_response but call
* functions that call this one, let's handle this case with a special
* value -1 where we do nothing (yes it's a hack)
...
...
@@ -136,6 +125,7 @@ void deref_sched_response(int sched_response_id)
void
inc_ref_sched_response
(
int
sched_response_id
)
{
AssertFatal
(
false
,
"don't call
\n
"
);
/* simulators (ulsim/dlsim) deal with their own sched_response but call
* functions that call this one, let's handle this case with a special
* value -1 where we do nothing (yes it's a hack)
...
...
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