Commit 915e2ca2 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: change order of branches in MIB

No technical change.

Change location of branch wrSwitchMIB.wrsStatus from high number (256) to
low (6), then move wrSwitchMIB.wrsEpertStatus to (7).
At the beginning wrsStatus branch was placed at high number because objects
from that branch might use several other objects to calculate their own value.
For example, there was a risk that query of wrsMainSystemStatus triggers
cascade of time consuming cache fills and snmpget timeouts. However, practice
shown that cache filling is significantly shorter that SNMP transfers.
Additionally, such risk was possible in case of snmpwalk or other method
querying objects in order.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent ee61b29a
This diff is collapsed.
......@@ -2,7 +2,7 @@
#define WRS_CURRENT_TIME_GROUP_H
#define WRSCURRENTTIME_CACHE_TIMEOUT 5
#define WRSCURRENTTIME_OID WRS_OID, 6, 1, 1
#define WRSCURRENTTIME_OID WRS_OID, 7, 1, 1
struct wrsCurrentTime_s {
uint64_t wrsDateTAI; /* current time in TAI */
......
#ifndef WRS_GENERAL_STATUS_GROUP_H
#define WRS_GENERAL_STATUS_GROUP_H
#define WRSGENERALSTATUS_OID WRS_OID, 254, 254
#define WRSGENERALSTATUS_OID WRS_OID, 6, 1
struct wrsGeneralStatus_s {
int wrsMainSystemStatus;
};
......
#ifndef WRS_OSSTATUS_GROUP_H
#define WRS_OSSTATUS_GROUP_H
#define WRSOSSTATUS_OID WRS_OID, 254, 1, 1
#define WRSOSSTATUS_OID WRS_OID, 6, 2, 1
#define WRS_TEMPERATURE_WARNING_THOLD_NOT_SET 1 /* warning */
#define WRS_TEMPERATURE_WARNING_OK 2 /* ok */
......
......@@ -2,7 +2,7 @@
#define WRS_PORT_STATUS_TABLE_H
#define WRSPORTSTATUSTABLE_CACHE_TIMEOUT 5
#define WRSPORTSTATUSTABLE_OID WRS_OID, 6, 6
#define WRSPORTSTATUSTABLE_OID WRS_OID, 7, 6
#define WRS_PORT_STATUS_SFP_ERROR_SFP_OK 1 /* ok */
#define WRS_PORT_STATUS_SFP_ERROR_SFP_ERROR 2 /* error */
......
......@@ -2,7 +2,7 @@
#define WRS_PSTATS_TABLE_H
#define WRSPSTATSTABLE_CACHE_TIMEOUT 5
#define WRSPSTATSTABLE_OID WRS_OID, 6, 4
#define WRSPSTATSTABLE_OID WRS_OID, 7, 4
#define PSTATS_MAX_N_COUNTERS 39 /* maximum number of counters */
#define PSTATS_SYSCTL_PATH "/proc/sys/pstats/" /* Path to sysclt entries */
......
......@@ -2,7 +2,7 @@
#define WRS_PTP_DATA_TABLE_H
#define WRSPTPDATATABLE_CACHE_TIMEOUT 5
#define WRSPTPDATATABLE_OID WRS_OID, 6, 5
#define WRSPTPDATATABLE_OID WRS_OID, 7, 5
/* Right now we allow only one servo instance, it will change in the future
* when switchover is implemented */
#define WRS_MAX_N_SERVO_INSTANCES 1
......
......@@ -2,7 +2,7 @@
#define WRS_SPLL_STATUS_GROUP_H
#define WRSSPLLSTATUS_CACHE_TIMEOUT 5
#define WRSSPLLSTATUS_OID WRS_OID, 6, 3, 2
#define WRSSPLLSTATUS_OID WRS_OID, 7, 3, 2
struct wrsSpllStatus_s {
int32_t wrsSpllMode;
......
......@@ -2,7 +2,7 @@
#define WRS_START_CNT_GROUP_H
#define WRSSTARTCNT_CACHE_TIMEOUT 5
#define WRSSTARTCNT_OID WRS_OID, 6, 2
#define WRSSTARTCNT_OID WRS_OID, 7, 2
struct wrsStartCnt_s {
uint32_t wrsStartCntHAL;
......
......@@ -2,7 +2,7 @@
#define WRS_TEMPERATURE_GROUP_H
#define WRSTEMPERATURE_CACHE_TIMEOUT 5
#define WRSTEMPERATURE_OID WRS_OID, 6, 1, 3
#define WRSTEMPERATURE_OID WRS_OID, 7, 1, 3
struct wrsTemperature_s {
int temp_fpga; /* FPGA temperature */
......
#ifndef WRS_VERSION_GROUP_H
#define WRS_VERSION_GROUP_H
#define WRSVERSION_OID WRS_OID, 254, 2
#define WRSVERSION_OID WRS_OID, 6, 3
struct wrsVersion_s {
char wrsVersions[13][32]; /* array of version strings */
......
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