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
bb6d772d
Commit
bb6d772d
authored
Feb 05, 2020
by
Haruki NAOI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add: fail safe for VNF and PNF out of sync.
(cherry picked from commit e8e15e650d4308bb4ff8ea9ca2e426ea13e71ae6)
parent
ceefddc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
+6
-4
No files found.
nfapi/open-nFAPI/vnf/src/vnf_p7_interface.c
View file @
bb6d772d
...
@@ -388,9 +388,6 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
...
@@ -388,9 +388,6 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
uint8_t
buf_1ms
[
32
];
uint8_t
buf_1ms
[
32
];
struct
sockaddr_in
addr
;
struct
sockaddr_in
addr
;
int
sock_1ms
;
int
sock_1ms
;
struct
timeval
tv
;
tv
.
tv_sec
=
0
;
tv
.
tv_usec
=
1200
;
fd_set
fds
,
readfds
;
fd_set
fds
,
readfds
;
int
retval
;
int
retval
;
int
ret
;
int
ret
;
...
@@ -459,12 +456,18 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
...
@@ -459,12 +456,18 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
{
{
sf_duration
.
tv_nsec
=
1000000
;
sf_duration
.
tv_nsec
=
1000000
;
}
}
nfapi_vnf_p7_connection_info_t
*
curr
=
vnf_p7
->
p7_connections
;
#ifndef UDP_1MS
#ifndef UDP_1MS
memcpy
(
&
fds
,
&
readfds
,
sizeof
(
fd_set
));
memcpy
(
&
fds
,
&
readfds
,
sizeof
(
fd_set
));
if
(
!
sync
)
{
if
(
!
sync
)
{
retval
=
select
(
vnf_p7
->
fapi_1ms_fd_list
[
0
]
+
1
,
&
fds
,
NULL
,
NULL
,
NULL
);
retval
=
select
(
vnf_p7
->
fapi_1ms_fd_list
[
0
]
+
1
,
&
fds
,
NULL
,
NULL
,
NULL
);
}
}
else
{
else
{
struct
timeval
tv
;
tv
.
tv_sec
=
0
;
tv
.
tv_usec
=
1200
;
retval
=
select
(
vnf_p7
->
fapi_1ms_fd_list
[
0
]
+
1
,
&
fds
,
NULL
,
NULL
,
&
tv
);
retval
=
select
(
vnf_p7
->
fapi_1ms_fd_list
[
0
]
+
1
,
&
fds
,
NULL
,
NULL
,
&
tv
);
}
}
...
@@ -488,7 +491,6 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
...
@@ -488,7 +491,6 @@ int nfapi_vnf_p7_time(nfapi_vnf_p7_config_t* config){
vnf_p7
->
sf_start_time_hr_old
=
vnf_p7
->
sf_start_time_hr
;
vnf_p7
->
sf_start_time_hr_old
=
vnf_p7
->
sf_start_time_hr
;
vnf_p7
->
sf_start_time_hr
=
vnf_get_current_time_hr
();
vnf_p7
->
sf_start_time_hr
=
vnf_get_current_time_hr
();
// pselect timed out
// pselect timed out
nfapi_vnf_p7_connection_info_t
*
curr
=
vnf_p7
->
p7_connections
;
#ifdef LOG
#ifdef LOG
fp
=
fopen
(
LOGFILE_PATH
,
"a"
);
fp
=
fopen
(
LOGFILE_PATH
,
"a"
);
...
...
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