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
littleBu
OpenXG-RAN
Commits
1933099f
Commit
1933099f
authored
Jan 12, 2024
by
Rúben Soares da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pin Aerial VNF Thread to core 10 to reduce timing issues between VNF and PNF
parent
e88be6b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
fapi/oai-integration/fapi_nvIPC.c
fapi/oai-integration/fapi_nvIPC.c
+15
-1
No files found.
fapi/oai-integration/fapi_nvIPC.c
View file @
1933099f
...
...
@@ -30,6 +30,8 @@
* \warning
*/
#ifdef ENABLE_AERIAL
#define _GNU_SOURCE
#include <sched.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
...
...
@@ -605,12 +607,24 @@ static int aerial_recv_msg(nv_ipc_t *ipc, nv_ipc_msg_t *recv_msg)
return
0
;
}
bool
recv_task_running
=
false
;
int
stick_this_thread_to_core
(
int
core_id
)
{
int
num_cores
=
sysconf
(
_SC_NPROCESSORS_ONLN
);
if
(
core_id
<
0
||
core_id
>=
num_cores
)
return
EINVAL
;
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
CPU_SET
(
core_id
,
&
cpuset
);
pthread_t
current_thread
=
pthread_self
();
return
pthread_setaffinity_np
(
current_thread
,
sizeof
(
cpu_set_t
),
&
cpuset
);
}
void
*
epoll_recv_task
(
void
*
arg
)
{
struct
epoll_event
ev
,
events
[
MAX_EVENTS
];
stick_this_thread_to_core
(
10
);
LOG_D
(
NFAPI_VNF
,
"Aerial recv task start
\n
"
);
int
epoll_fd
=
epoll_create1
(
0
);
if
(
epoll_fd
==
-
1
)
{
...
...
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