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
f1d7785b
Commit
f1d7785b
authored
Feb 21, 2024
by
Rúben Soares da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert call NR_Slot_indication,
Trigger scheduler directly when handling a slot.indication from PNF
parent
0cff647e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
42 deletions
+50
-42
fapi/oai-integration/fapi_vnf_p5.c
fapi/oai-integration/fapi_vnf_p5.c
+2
-31
fapi/oai-integration/fapi_vnf_p7.c
fapi/oai-integration/fapi_vnf_p7.c
+47
-10
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
+1
-1
No files found.
fapi/oai-integration/fapi_vnf_p5.c
View file @
f1d7785b
...
@@ -127,6 +127,7 @@ void *aerial_vnf_nr_p7_thread_start(void *ptr)
...
@@ -127,6 +127,7 @@ void *aerial_vnf_nr_p7_thread_start(void *ptr)
void
aerial_oai_create_gnb
(
void
)
void
aerial_oai_create_gnb
(
void
)
{
{
int
bodge_counter
=
0
;
int
bodge_counter
=
0
;
/*
if (RC.gNB == NULL) {
if (RC.gNB == NULL) {
RC.gNB = (PHY_VARS_gNB **)calloc(1, sizeof(PHY_VARS_gNB *));
RC.gNB = (PHY_VARS_gNB **)calloc(1, sizeof(PHY_VARS_gNB *));
LOG_I(PHY, "gNB L1 structure RC.gNB allocated @ %p\n", RC.gNB);
LOG_I(PHY, "gNB L1 structure RC.gNB allocated @ %p\n", RC.gNB);
...
@@ -163,6 +164,7 @@ void aerial_oai_create_gnb(void)
...
@@ -163,6 +164,7 @@ void aerial_oai_create_gnb(void)
__FUNCTION__);
__FUNCTION__);
usleep(50000);
usleep(50000);
} while (gNB->configured != 1);
} while (gNB->configured != 1);
*/
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"%s() gNB is now configured
\n
"
,
__FUNCTION__
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"%s() gNB is now configured
\n
"
,
__FUNCTION__
);
}
}
...
@@ -728,37 +730,6 @@ int aerial_nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t *config)
...
@@ -728,37 +730,6 @@ int aerial_nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t *config)
}
}
}
}
nfapi_nr_slot_indication_scf_t
*
slot_ind
=
get_queue
(
&
gnb_slot_ind_queue
);
NFAPI_TRACE
(
NFAPI_TRACE_DEBUG
,
"This is the slot_ind queue size %ld in %s():%d
\n
"
,
gnb_slot_ind_queue
.
num_items
,
__FUNCTION__
,
__LINE__
);
if
(
slot_ind
)
{
gNB
->
UL_INFO
.
frame
=
slot_ind
->
sfn
;
gNB
->
UL_INFO
.
slot
=
slot_ind
->
slot
;
NFAPI_TRACE
(
NFAPI_TRACE_DEBUG
,
"gNB->UL_INFO.frame = %d and slot %d, prev_slot = %d
\n
"
,
gNB
->
UL_INFO
.
frame
,
gNB
->
UL_INFO
.
slot
,
prev_slot
);
if
(
setup_done
&&
prev_slot
!=
gNB
->
UL_INFO
.
slot
)
{
// Give the VNF sufficient time to setup before starting scheduling &&
// prev_slot != gNB->UL_INFO.slot
// Call the scheduler
gNB
->
UL_INFO
.
module_id
=
gNB
->
Mod_id
;
gNB
->
UL_INFO
.
CC_id
=
gNB
->
CC_id
;
NFAPI_TRACE
(
NFAPI_TRACE_DEBUG
,
"Calling NR_UL_indication for gNB->UL_INFO.frame = %d and slot %d
\n
"
,
gNB
->
UL_INFO
.
frame
,
gNB
->
UL_INFO
.
slot
);
gNB
->
if_inst
->
NR_slot_indication
(
gNB
->
Mod_id
,
gNB
->
CC_id
,
slot_ind
->
sfn
,
slot_ind
->
slot
);
prev_slot
=
gNB
->
UL_INFO
.
slot
;
}
free
(
slot_ind
);
slot_ind
=
NULL
;
}
}
}
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"Closing p7 socket
\n
"
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"Closing p7 socket
\n
"
);
close
(
vnf_p7
->
socket
);
close
(
vnf_p7
->
socket
);
...
...
fapi/oai-integration/fapi_vnf_p7.c
View file @
f1d7785b
...
@@ -711,6 +711,52 @@ int aerial_phy_nrach_indication(struct nfapi_vnf_p7_config *config, nfapi_nrach_
...
@@ -711,6 +711,52 @@ int aerial_phy_nrach_indication(struct nfapi_vnf_p7_config *config, nfapi_nrach_
return
1
;
return
1
;
}
}
NR_Sched_Rsp_t
g_sched_resp
;
void
gNB_dlsch_ulsch_scheduler
(
module_id_t
module_idP
,
frame_t
frame
,
sub_frame_t
slot
,
NR_Sched_Rsp_t
*
sched_info
);
int
oai_fapi_dl_tti_req
(
nfapi_nr_dl_tti_request_t
*
dl_config_req
);
int
oai_fapi_ul_tti_req
(
nfapi_nr_ul_tti_request_t
*
ul_tti_req
);
int
oai_fapi_tx_data_req
(
nfapi_nr_tx_data_request_t
*
tx_data_req
);
int
oai_fapi_ul_dci_req
(
nfapi_nr_ul_dci_request_t
*
ul_dci_req
);
int
oai_fapi_send_end_request
(
int
cell
,
uint32_t
frame
,
uint32_t
slot
);
int
trigger_scheduler
(
nfapi_nr_slot_indication_scf_t
*
slot_ind
)
{
NR_UL_IND_t
ind
=
{.
frame
=
slot_ind
->
sfn
,
.
slot
=
slot_ind
->
slot
,
};
NR_UL_indication
(
&
ind
);
// Call into the scheduler (this is hardcoded and should be init properly!)
// memset(sched_resp, 0, sizeof(*sched_resp));
gNB_dlsch_ulsch_scheduler
(
0
,
slot_ind
->
sfn
,
slot_ind
->
slot
,
&
g_sched_resp
);
if
(
NFAPI_MODE
==
NFAPI_MODE_AERIAL
)
{
#ifdef ENABLE_AERIAL
bool
send_slt_resp
=
false
;
if
(
g_sched_resp
.
DL_req
.
dl_tti_request_body
.
nPDUs
>
0
)
{
oai_fapi_dl_tti_req
(
&
g_sched_resp
.
DL_req
);
send_slt_resp
=
true
;
}
if
(
g_sched_resp
.
UL_tti_req
.
n_pdus
>
0
)
{
oai_fapi_ul_tti_req
(
&
g_sched_resp
.
UL_tti_req
);
send_slt_resp
=
true
;
}
if
(
g_sched_resp
.
TX_req
.
Number_of_PDUs
>
0
)
{
oai_fapi_tx_data_req
(
&
g_sched_resp
.
TX_req
);
send_slt_resp
=
true
;
}
if
(
g_sched_resp
.
UL_dci_req
.
numPdus
>
0
)
{
oai_fapi_ul_dci_req
(
&
g_sched_resp
.
UL_dci_req
);
send_slt_resp
=
true
;
}
if
(
send_slt_resp
)
{
oai_fapi_send_end_request
(
0
,
slot_ind
->
sfn
,
slot_ind
->
slot
);
}
#endif
}
return
1
;
}
int
aerial_phy_nr_slot_indication
(
nfapi_nr_slot_indication_scf_t
*
ind
)
int
aerial_phy_nr_slot_indication
(
nfapi_nr_slot_indication_scf_t
*
ind
)
{
{
uint8_t
vnf_slot_ahead
=
0
;
uint8_t
vnf_slot_ahead
=
0
;
...
@@ -719,16 +765,7 @@ int aerial_phy_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind)
...
@@ -719,16 +765,7 @@ int aerial_phy_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind)
uint8_t
vnf_slot
=
NFAPI_SFNSLOT2SLOT
(
vnf_sfn_slot
);
uint8_t
vnf_slot
=
NFAPI_SFNSLOT2SLOT
(
vnf_sfn_slot
);
LOG_D
(
MAC
,
"VNF SFN/Slot %d.%d
\n
"
,
vnf_sfn
,
vnf_slot
);
LOG_D
(
MAC
,
"VNF SFN/Slot %d.%d
\n
"
,
vnf_sfn
,
vnf_slot
);
// printf( "VNF SFN/Slot %d.%d \n", vnf_sfn, vnf_slot);
// printf( "VNF SFN/Slot %d.%d \n", vnf_sfn, vnf_slot);
trigger_scheduler
(
ind
);
nfapi_nr_slot_indication_scf_t
*
nr_slot_ind
=
CALLOC
(
1
,
sizeof
(
*
nr_slot_ind
));
nr_slot_ind
->
header
=
ind
->
header
;
nr_slot_ind
->
sfn
=
vnf_sfn
;
nr_slot_ind
->
slot
=
vnf_slot
;
if
(
!
put_queue
(
&
gnb_slot_ind_queue
,
nr_slot_ind
))
{
LOG_E
(
NR_MAC
,
"Put_queue failed for slot_ind
\n
"
);
free
(
nr_slot_ind
);
nr_slot_ind
=
NULL
;
}
return
1
;
return
1
;
}
}
...
...
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
View file @
f1d7785b
...
@@ -194,7 +194,7 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config)
...
@@ -194,7 +194,7 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config)
gNB
->
UL_INFO
.
CC_id
=
gNB
->
CC_id
;
gNB
->
UL_INFO
.
CC_id
=
gNB
->
CC_id
;
NFAPI_TRACE
(
NFAPI_TRACE_DEBUG
,
"Calling NR_UL_indication for gNB->UL_INFO.frame = %d and slot %d
\n
"
,
NFAPI_TRACE
(
NFAPI_TRACE_DEBUG
,
"Calling NR_UL_indication for gNB->UL_INFO.frame = %d and slot %d
\n
"
,
gNB
->
UL_INFO
.
frame
,
gNB
->
UL_INFO
.
slot
);
gNB
->
UL_INFO
.
frame
,
gNB
->
UL_INFO
.
slot
);
gNB
->
if_inst
->
NR_slot_indication
(
gNB
->
Mod_id
,
gNB
->
CC_id
,
slot_ind
->
sfn
,
slot_ind
->
slot
);
gNB
->
if_inst
->
NR_UL_indication
(
&
gNB
->
UL_INFO
);
prev_slot
=
gNB
->
UL_INFO
.
slot
;
prev_slot
=
gNB
->
UL_INFO
.
slot
;
}
}
free
(
slot_ind
);
free
(
slot_ind
);
...
...
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