Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
a5a85d39
Commit
a5a85d39
authored
Jul 09, 2015
by
Adam Wujek
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'adam-snmp_tune'
parents
78b2d08c
a2a2adcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
18 deletions
+8
-18
wr-api.h
proto-ext-whiterabbit/wr-api.h
+2
-2
wr-servo.c
proto-ext-whiterabbit/wr-servo.c
+6
-16
No files found.
proto-ext-whiterabbit/wr-api.h
View file @
a5a85d39
...
...
@@ -12,7 +12,8 @@
#include <ppsi/lib.h>
#include "wr-constants.h"
#define WRS_PPSI_SHMEM_VERSION 11
/* peer is per-ppi, not per-chan */
#define WRS_PPSI_SHMEM_VERSION 12
/* remove n_err_rxtx_deltas from struct
* wr_servo_state */
/*
* This structure is used as extension-specific data in the DSPort
...
...
@@ -176,7 +177,6 @@ struct wr_servo_state {
uint32_t
n_err_state
;
uint32_t
n_err_offset
;
uint32_t
n_err_delta_rtt
;
uint32_t
n_err_rxtx_deltas
;
};
/* All data used as extension ppsi-wr must be put here */
...
...
proto-ext-whiterabbit/wr-servo.c
View file @
a5a85d39
...
...
@@ -7,10 +7,8 @@
#define FIX_ALPHA_FRACBITS 40
/* Define threshold values for SNMP */
/* TODO: These values need to be tuned! */
#define SNMP_MAX_OFFSET 1000000
#define SNMP_MAX_DELTA_RTT 1000000
#define SNMP_MAX_RXTX_DELTAS 1000000
#define SNMP_MAX_OFFSET_PS 1000
#define SNMP_MAX_DELTA_RTT_PS 1000
static
const
char
*
servo_name
[]
=
{
[
WR_UNINITIALIZED
]
=
"Uninitialized"
,
...
...
@@ -411,23 +409,15 @@ int wr_servo_update(struct pp_instance *ppi)
s
->
n_err_state
++
;
/* Increase number of servo updates with offset exceeded
* SNMP_MAX_OFFSET (Used by SNMP) */
if
(
abs
(
s
->
offset
)
>
SNMP_MAX_OFFSET
)
* SNMP_MAX_OFFSET
_PS
(Used by SNMP) */
if
(
abs
(
s
->
offset
)
>
SNMP_MAX_OFFSET
_PS
)
s
->
n_err_offset
++
;
/* Increase number of servo updates with delta rtt exceeded
* SNMP_MAX_DELTA_RTT (Used by SNMP) */
if
(
abs
(
picos_mu_prev
-
s
->
picos_mu
)
>
SNMP_MAX_DELTA_RTT
)
* SNMP_MAX_DELTA_RTT
_PS
(Used by SNMP) */
if
(
abs
(
picos_mu_prev
-
s
->
picos_mu
)
>
SNMP_MAX_DELTA_RTT
_PS
)
s
->
n_err_delta_rtt
++
;
/* Increase number of servo updates with delta_*x_* bigger than
* SNMP_MAX_RXTX_DELTAS. (Used by SNMP) */
if
((
s
->
delta_tx_m
>
SNMP_MAX_RXTX_DELTAS
)
||
(
s
->
delta_rx_m
>
SNMP_MAX_RXTX_DELTAS
)
||
(
s
->
delta_tx_s
>
SNMP_MAX_RXTX_DELTAS
)
||
(
s
->
delta_rx_s
>
SNMP_MAX_RXTX_DELTAS
))
s
->
n_err_rxtx_deltas
++
;
out:
/* shmem unlock */
wrs_shm_write
(
ppsi_head
,
WRS_SHM_WRITE_END
);
...
...
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