Commit b71dbbdb authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

snmp: report error when T24P not found in configuration

parent 62a093c3
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -55,6 +55,8 @@ struct wrsPortStatusTable_s {
int wrsPortStatusSfpTxBias;
int wrsPortStatusSfpTxPower;
int wrsPortStatusSfpRxPower;
int wrsPortStatusT24p;
int wrsPortStatusT24pValid;
};
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment