Commit 00929b60 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: error wrsSlaveLinksStatus when wrsSpllMode not in mode slave

To error when VLANs configuration does not match in master and slave.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 464b0a0f
...@@ -210,8 +210,9 @@ ...@@ -210,8 +210,9 @@
\snmpentrys{WR-SWITCH-MIB}{wrsTimingStatusGroup}{wrsSlaveLinksStatus}{ \snmpentrys{WR-SWITCH-MIB}{wrsTimingStatusGroup}{wrsSlaveLinksStatus}{
\underline{Description:} \underline{Description:}
Reports the status of the link on WR ports configured to slave role.\\ Reports the status of the link on WR ports configured to slave role.\\
\texttt{Error} when link to master is down for a switch in the Boundary \texttt{Error} when link to master is down or softpll mode is not slave for
Clock mode. Additionally, \texttt{Error} is generated when the a switch in the Boundary Clock mode.
Additionally, \texttt{Error} is generated when the
link to master is up for a switch in the Free-running Master or Grand link to master is up for a switch in the Free-running Master or Grand
Master mode.\\ Master mode.\\
\underline{On error:}\\ \underline{On error:}\\
...@@ -230,6 +231,8 @@ ...@@ -230,6 +231,8 @@
\item Check the configuration of the switch. Especially if the \item Check the configuration of the switch. Especially if the
\emph{Timing Mode} is correctly set (i.e. if it was not accidentally set \emph{Timing Mode} is correctly set (i.e. if it was not accidentally set
to \emph{Grand-Master} or \emph{Free-Running Master}). to \emph{Grand-Master} or \emph{Free-Running Master}).
\item Check the VLANs configuration. Whether both switches are configured
to use the same VLAN.
\item Check the status of the WR Master connected to the slave port of the \item Check the status of the WR Master connected to the slave port of the
WRS. WRS.
\item Replace the faulty switch with a new unit, if this does not solve \item Replace the faulty switch with a new unit, if this does not solve
......
...@@ -311,6 +311,7 @@ static void get_wrsSoftPLLStatus(void) ...@@ -311,6 +311,7 @@ static void get_wrsSoftPLLStatus(void)
static void get_wrsSlaveLinksStatus(unsigned int port_status_nrows) static void get_wrsSlaveLinksStatus(unsigned int port_status_nrows)
{ {
struct wrsSpllStatus_s *s;
struct wrsPortStatusTable_s *p_a; struct wrsPortStatusTable_s *p_a;
struct wrsTimingStatus_s *t; struct wrsTimingStatus_s *t;
int i; int i;
...@@ -323,6 +324,7 @@ static void get_wrsSlaveLinksStatus(unsigned int port_status_nrows) ...@@ -323,6 +324,7 @@ static void get_wrsSlaveLinksStatus(unsigned int port_status_nrows)
* and when every slave port is down when switch in master/grandmaster * and when every slave port is down when switch in master/grandmaster
* mode. Don't care about non-wr, none and auto ports. * mode. Don't care about non-wr, none and auto ports.
*/ */
s = &wrsSpllStatus_s;
p_a = wrsPortStatusTable_array; p_a = wrsPortStatusTable_array;
t = &wrsTimingStatus_s; t = &wrsTimingStatus_s;
slog_obj_name = wrsSlaveLinksStatus_str; slog_obj_name = wrsSlaveLinksStatus_str;
...@@ -356,12 +358,20 @@ static void get_wrsSlaveLinksStatus(unsigned int port_status_nrows) ...@@ -356,12 +358,20 @@ static void get_wrsSlaveLinksStatus(unsigned int port_status_nrows)
/* error when slave port is down when switch is in slave mode /* error when slave port is down when switch is in slave mode
*/ */
if (hal_shmem->hal_mode == HAL_TIMING_MODE_BC if (hal_shmem->hal_mode == HAL_TIMING_MODE_BC
&& (p_a[i].wrsPortStatusConfiguredMode == WRS_PORT_STATUS_CONFIGURED_MODE_SLAVE) && (p_a[i].wrsPortStatusConfiguredMode == WRS_PORT_STATUS_CONFIGURED_MODE_SLAVE)) {
&& (p_a[i].wrsPortStatusLink == WRS_PORT_STATUS_LINK_DOWN)) { if (p_a[i].wrsPortStatusLink == WRS_PORT_STATUS_LINK_DOWN) {
t->wrsSlaveLinksStatus = WRS_SLAVE_LINK_STATUS_ERROR; t->wrsSlaveLinksStatus = WRS_SLAVE_LINK_STATUS_ERROR;
snmp_log(LOG_ERR, "SNMP: " SL_ER " %s: " snmp_log(LOG_ERR, "SNMP: " SL_ER " %s: "
"In Boundary Clock mode, port %d (wri%d) configured as slave is down\n", "In Boundary Clock mode, port %d (wri%d) configured as slave is down\n",
slog_obj_name, i + 1, i + 1); slog_obj_name, i + 1, i + 1);
}
if (s->wrsSpllMode != WRS_SPLL_MODE_SLAVE) {
t->wrsSlaveLinksStatus = WRS_SLAVE_LINK_STATUS_ERROR;
snmp_log(LOG_ERR, "SNMP: " SL_ER " %s: "
"In Boundary Clock mode, port %d (wri%d) configured as slave, "
"wrsSpllMode not slave (%d), but %d\n",
slog_obj_name, i + 1, i + 1, WRS_SPLL_MODE_SLAVE, s->wrsSpllMode);
}
} }
/* error when slave port is up when switch is in master or /* error when slave port is up when switch is in master or
* grandmaster mode */ * grandmaster mode */
......
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