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
86
Issues
86
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
b71dbbdb
Commit
b71dbbdb
authored
May 22, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snmp: report error when T24P not found in configuration
parent
62a093c3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
6 deletions
+74
-6
fail.tex
doc/wrs_failures/fail.tex
+21
-0
snmp_objects.tex
doc/wrs_failures/snmp_objects.tex
+8
-2
WR-SWITCH-MIB.txt
userspace/snmpd/WR-SWITCH-MIB.txt
+22
-1
wrsPortStatusTable.c
userspace/snmpd/wrsPortStatusTable.c
+6
-0
wrsPortStatusTable.h
userspace/snmpd/wrsPortStatusTable.h
+2
-0
wrsTimingStatusGroup.c
userspace/snmpd/wrsTimingStatusGroup.c
+15
-3
No files found.
doc/wrs_failures/fail.tex
View file @
b71dbbdb
...
...
@@ -448,6 +448,27 @@ WR network.
\item
[]
\underline
{
SNMP objects
}
:
\emph
{
(not yet implemented)
}
\end{pck_descr}
\subsubsection
{
\bf
T2/T4 phase transition point was not provided in the configuration
}
\label
{
fail:timing:t24p
}
\begin{pck_descr}
\item
[]
\underline
{
Status
}
: DONE
\item
[]
\underline
{
Severity
}
: ERROR
\item
[]
\underline
{
Mode
}
:
\emph
{
all
}
\item
[]
\underline
{
Description
}
:
\\
Starting from release v6.0 WR switch needs to have T2/T4 phase transition
\
point (T24P) value provided in the configuration file. In case the switch
is booted with configuration file of the previous release, this parameter
is not present and can result in wrong correction of reception timestamps.
This can cause on some switches occasional synchronization problems.
\item
[]
\underline
{
SNMP objects
}
:
\\
{
\footnotesize
\snmpadd
{
WR-SWITCH-MIB::wrsPortStatusT24p.<n>
}
\\
\snmpadd
{
WR-SWITCH-MIB::wrsPortStatusT24pValid.<n>
}
\\
\snmpadd
{
WR-SWITCH-MIB::wrsPTPStatus
}
\\
\snmpadd
{
WR-SWITCH-MIB::wrsTimingStatus
}
\\
\snmpadd
{
WR-SWITCH-MIB::wrsMainSystemStatus
}
}
\end{pck_descr}
\newpage
\subsection
{
Data error
}
When the WR switch is not able to forward Ethernet traffic between devices
...
...
doc/wrs_failures/snmp_objects.tex
View file @
b71dbbdb
...
...
@@ -151,11 +151,15 @@
\ref
{
fail:timing:ppsi
_
track
_
phase
}
,
\ref
{
fail:timing:offset
_
jump
}
,
\ref
{
fail:timing:rtt
_
jump
}
), at least one of
the
$
\Delta
_{
TXM
}$
,
$
\Delta
_{
RXM
}$
,
$
\Delta
_{
TXS
}$
,
$
\Delta
_{
RXS
}$
is 0
(issue
\ref
{
fail:timing:deltas
_
report
}
) or PTP servo update counter is not
increasing.
\\
(issue
\ref
{
fail:timing:deltas
_
report
}
),
\emph
{
T24P
}
phase transition value
was not provided for at least one port (issue
\ref
{
fail:timing:t24p
}
) or PTP
servo update counter is not increasing.
\\
\underline
{
On error:
}
\begin{pck_proc}
\item
Dump state
\item
Check to configuration of WR Switch to make sure proper
$
\Delta
_{
TXM
}$
,
$
\Delta
_{
RXM
}$
,
$
\Delta
_{
TXS
}$
,
$
\Delta
_{
RXS
}$
and
\emph
{
T24P
}
are defined for each port.
\item
Check
\texttt
{
\glshyperlink
{
WR-SWITCH-MIB::wrsSoftPLLStatus
}}
on the
Master (WR device one step higher in a timing hierarchy). Eventually
proceed to investigate the problem on the Master switch. Otherwise,
...
...
@@ -707,6 +711,8 @@
\snmpentrye
{
WR-SWITCH-MIB
}{
wrsPortStatusTable
}{
wrsPortStatusSfpTxBiax.<n>
}{}
\snmpentrye
{
WR-SWITCH-MIB
}{
wrsPortStatusTable
}{
wrsPortStatusSfpTxPower.<n>
}{}
\snmpentrye
{
WR-SWITCH-MIB
}{
wrsPortStatusTable
}{
wrsPortStatusSfpRxPower.<n>
}{}
\snmpentrye
{
WR-SWITCH-MIB
}{
wrsPortStatusTable
}{
wrsPortStatusT24p.<n>
}{}
\snmpentrye
{
WR-SWITCH-MIB
}{
wrsPortStatusTable
}{
wrsPortStatusT24pValid.<n>
}{}
\snmpentrye
{
WR-SWITCH-MIB
}{}{
wrsPtpInstanceTable
}{
Table with all PTP instances.
This table has two indexes. The first one
\textit
{
n
}
, corresponds to port
...
...
userspace/snmpd/WR-SWITCH-MIB.txt
View file @
b71dbbdb
...
...
@@ -2179,7 +2179,9 @@ WrsPortStatusEntry ::=
wrsPortStatusSfpVcc INTEGER,
wrsPortStatusSfpTxBias INTEGER,
wrsPortStatusSfpTxPower INTEGER,
wrsPortStatusSfpRxPower INTEGER
wrsPortStatusSfpRxPower INTEGER,
wrsPortStatusT24p INTEGER,
wrsPortStatusT24pValid INTEGER
}
wrsPortStatusIndex OBJECT-TYPE
...
...
@@ -2386,6 +2388,25 @@ wrsPortStatusSfpRxPower OBJECT-TYPE
According to SFF-8472, accuracy of this value must be better than 3dB%"
::= { wrsPortStatusEntry 21 }
wrsPortStatusT24p OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"T2/T4 phase transition point used for Rx timestamps correction"
::= { wrsPortStatusEntry 22 }
wrsPortStatusT24pValid OBJECT-TYPE
SYNTAX INTEGER {
invalid(0),
readFromConfig(1)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Validity of wrsPortStatusT24p"
::= { wrsPortStatusEntry 23 }
-- wrsPstatsHCTable (.7.7)
wrsPstatsHCTable OBJECT-TYPE
SYNTAX SEQUENCE OF WrsPstatsHCEntry
...
...
userspace/snmpd/wrsPortStatusTable.c
View file @
b71dbbdb
...
...
@@ -30,6 +30,8 @@ static struct pickinfo wrsPortStatusTable_pickinfo[] = {
FIELD
(
wrsPortStatusTable_s
,
ASN_INTEGER
,
wrsPortStatusSfpTxBias
),
FIELD
(
wrsPortStatusTable_s
,
ASN_INTEGER
,
wrsPortStatusSfpTxPower
),
FIELD
(
wrsPortStatusTable_s
,
ASN_INTEGER
,
wrsPortStatusSfpRxPower
),
FIELD
(
wrsPortStatusTable_s
,
ASN_INTEGER
,
wrsPortStatusT24p
),
FIELD
(
wrsPortStatusTable_s
,
ASN_INTEGER
,
wrsPortStatusT24pValid
),
};
...
...
@@ -94,6 +96,10 @@ time_t wrsPortStatusTable_data_fill(unsigned int *n_rows)
wrsPortStatusTable
->
wrsPortStatusMonitor
=
port_state
->
monitor
;
/* wrsPtpT24p */
wrsPortStatusTable
->
wrsPortStatusT24p
=
port_state
->
t2_phase_transition
;
wrsPortStatusTable
->
wrsPortStatusT24pValid
=
port_state
->
t24p_from_config
;
/* No need to copy all ports structures, only what
* we're interested in.
* Keep value 0 for Not available
...
...
userspace/snmpd/wrsPortStatusTable.h
View file @
b71dbbdb
...
...
@@ -55,6 +55,8 @@ struct wrsPortStatusTable_s {
int
wrsPortStatusSfpTxBias
;
int
wrsPortStatusSfpTxPower
;
int
wrsPortStatusSfpRxPower
;
int
wrsPortStatusT24p
;
int
wrsPortStatusT24pValid
;
};
...
...
userspace/snmpd/wrsTimingStatusGroup.c
View file @
b71dbbdb
...
...
@@ -33,7 +33,7 @@ static char *wrsSoftPLLStatus_str = "wrsSoftPLLStatus";
static
char
*
wrsSlaveLinksStatus_str
=
"wrsSlaveLinksStatus"
;
static
char
*
wrsPTPFramesFlowing_str
=
"wrsPTPFramesFlowing"
;
static
void
get_wrsPTPStatus
(
unsigned
int
ptp_data_nrows
,
int
t_delta
);
static
void
get_wrsPTPStatus
(
unsigned
int
ptp_data_nrows
,
unsigned
int
port_status_nrows
,
int
t_delta
);
static
void
get_wrsSoftPLLStatus
();
static
void
get_wrsSlaveLinksStatus
(
unsigned
int
port_status_nrows
);
static
void
get_wrsPTPFramesFlowing
(
unsigned
int
port_status_nrows
);
...
...
@@ -87,7 +87,7 @@ time_t wrsTimingStatus_data_fill(void)
* otherwise there may be comparison between the same data */
if
(
time_ptp_data
>
time_update
&&
time_spll
>
time_update
)
{
get_wrsPTPStatus
(
ptp_data_nrows
,
get_wrsPTPStatus
(
ptp_data_nrows
,
port_status_nrows
,
time_ptp_data
-
time_ptp_data_prev
);
}
...
...
@@ -115,11 +115,12 @@ time_t wrsTimingStatus_data_fill(void)
return
time_update
=
get_monotonic_sec
();
}
static
void
get_wrsPTPStatus
(
unsigned
int
ptp_data_nrows
,
int
t_delta
)
static
void
get_wrsPTPStatus
(
unsigned
int
ptp_data_nrows
,
unsigned
int
port_status_nrows
,
int
t_delta
)
{
struct
wrsSpllStatus_s
*
s
;
struct
wrsPtpDataTable_s
*
pd_a
;
struct
wrsTimingStatus_s
*
t
;
struct
wrsPortStatusTable_s
*
p_a
;
int
i
;
static
int
first_run
=
1
;
...
...
@@ -138,6 +139,7 @@ static void get_wrsPTPStatus(unsigned int ptp_data_nrows, int t_delta)
*/
s
=
&
wrsSpllStatus_s
;
pd_a
=
wrsPtpDataTable_array
;
p_a
=
wrsPortStatusTable_array
;
t
=
&
wrsTimingStatus_s
;
slog_obj_name
=
wrsPTPStatus_str
;
...
...
@@ -218,6 +220,16 @@ static void get_wrsPTPStatus(unsigned int ptp_data_nrows, int t_delta)
wrsPtpRTTErrCnt_prev
[
i
]
=
pd_a
[
i
].
wrsPtpRTTErrCnt
;
}
/* Check if all ports have valid T24P configuration */
for
(
i
=
0
;
i
<
port_status_nrows
;
i
++
)
{
if
(
p_a
[
i
].
wrsPortStatusT24pValid
==
0
)
{
t
->
wrsPTPStatus
=
WRS_PTP_STATUS_ERROR
;
snmp_log
(
LOG_ERR
,
"SNMP: "
SL_ER
" %s: "
"T24P for port %d not found in configuration
\n
"
,
slog_obj_name
,
i
+
1
);
}
}
first_run
=
0
;
}
...
...
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