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
12164ab5
Commit
12164ab5
authored
Feb 11, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scheduler in VNF + send answer
parent
2bc2fc3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
+25
-5
No files found.
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
View file @
12164ab5
...
...
@@ -96,6 +96,11 @@ struct timespec timespec_sub(struct timespec lhs, struct timespec rhs)
// monitor the p7 endpoints and the timing loop and
// send indications to mac
extern
void
gNB_dlsch_ulsch_scheduler
(
module_id_t
module_idP
,
frame_t
frame
,
sub_frame_t
slot
,
NR_Sched_Rsp_t
*
sched_info
);
extern
int
oai_nfapi_dl_tti_req
(
nfapi_nr_dl_tti_request_t
*
dl_config_req
);
extern
int
oai_nfapi_ul_tti_req
(
nfapi_nr_ul_tti_request_t
*
ul_tti_req
);
extern
int
oai_nfapi_tx_data_req
(
nfapi_nr_tx_data_request_t
*
tx_data_req
);
extern
int
oai_nfapi_ul_dci_req
(
nfapi_nr_ul_dci_request_t
*
ul_dci_req
);
int
nfapi_nr_vnf_p7_start
(
nfapi_vnf_p7_config_t
*
config
)
{
struct
PHY_VARS_gNB_s
*
gNB
=
RC
.
gNB
[
0
];
...
...
@@ -158,6 +163,8 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config)
struct
timespec
ref_time
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
ref_time
);
uint8_t
setup_done
=
1
;
NR_Sched_Rsp_t
*
sched_resp
=
malloc
(
sizeof
(
*
sched_resp
));
AssertFatal
(
sched_resp
!=
NULL
,
"out of memory
\n
"
);
while
(
vnf_p7
->
terminate
==
0
)
{
fd_set
rfds
;
...
...
@@ -194,11 +201,23 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config)
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_dlsch_ulsch_scheduler
(
0
,
0
,
slot_ind
->
sfn
,
slot_ind
->
slot
);
memset
(
sched_resp
,
0
,
sizeof
(
*
sched_resp
));
gNB_dlsch_ulsch_scheduler
(
0
,
slot_ind
->
sfn
,
slot_ind
->
slot
,
sched_resp
);
prev_slot
=
gNB
->
UL_INFO
.
slot
;
// TODO send stuff
}
if
(
sched_resp
->
DL_req
.
dl_tti_request_body
.
nPDUs
>
0
)
oai_nfapi_dl_tti_req
(
&
sched_resp
->
DL_req
);
if
(
sched_resp
->
UL_tti_req
.
n_pdus
>
0
)
oai_nfapi_ul_tti_req
(
&
sched_resp
->
UL_tti_req
);
if
(
sched_resp
->
TX_req
.
Number_of_PDUs
>
0
)
oai_nfapi_tx_data_req
(
&
sched_resp
->
TX_req
);
if
(
sched_resp
->
UL_dci_req
.
numPdus
>
0
)
oai_nfapi_ul_dci_req
(
&
sched_resp
->
UL_dci_req
);
free
(
slot_ind
);
slot_ind
=
NULL
;
}
...
...
@@ -235,6 +254,7 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config)
}
}
}
free
(
sched_resp
);
NFAPI_TRACE
(
NFAPI_TRACE_INFO
,
"Closing p7 socket
\n
"
);
close
(
vnf_p7
->
socket
);
...
...
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