Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
83
Issues
83
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Software
Commits
b9d40358
Commit
b9d40358
authored
Dec 01, 2016
by
Grzegorz Daniluk
Committed by
Adam Wujek
Dec 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snmp: NetworkingStatusGroup: fix monitoring Tx frames
parent
fa8d4a44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
wrsNetworkingStatusGroup.c
userspace/snmpd/wrsNetworkingStatusGroup.c
+6
-2
No files found.
userspace/snmpd/wrsNetworkingStatusGroup.c
View file @
b9d40358
...
...
@@ -83,6 +83,11 @@ static int get_endpoint_status(struct ns_pstats *old,
return
ret
;
}
uint64_t
delta_uint64
(
uint64_t
a
,
uint64_t
b
)
{
return
(
a
>
b
)
?
(
a
-
b
)
:
(
b
-
a
);
}
/* don't use this function for now, return OK */
static
int
get_swcore_status
(
struct
ns_pstats
*
old
,
struct
wrsPstatsHCTable_s
*
new
,
...
...
@@ -108,8 +113,7 @@ static int get_swcore_status(struct ns_pstats *old,
tx_delta
=
new
[
i
].
wrsPstatsHCTXFrames
-
old
[
i
].
wrsPstatsHCTXFrames
;
if
(
/* shouldn't differ more than FORWARD_DELTA */
((
tx_delta
-
total_fwd_delta
)
>
FORWARD_DELTA
)
||
((
total_fwd_delta
-
tx_delta
)
>
FORWARD_DELTA
)
delta_uint64
(
tx_delta
,
total_fwd_delta
)
>
FORWARD_DELTA
)
{
/* if error, no need to check more, but do it just for
* logs */
...
...
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