Skip to content
Snippets Groups Projects
Commit 145608fe authored by Adam Wujek's avatar Adam Wujek
Browse files

userspace/snmpd/wrsPtpInstanceTable: adjust values of wrsPtpInstanceProfile


HA and WR profiles use the same value.

Signed-off-by: default avatarAdam Wujek <dev_public@wujek.eu>
parent 18796cd0
No related merge requests found
...@@ -40,6 +40,8 @@ wrSwitchMIB MODULE-IDENTITY ...@@ -40,6 +40,8 @@ wrSwitchMIB MODULE-IDENTITY
- wrsPtpDelayCoefficientStr - wrsPtpDelayCoefficientStr
- wrsPtpIngressLatency - wrsPtpIngressLatency
- wrsPtpEgressLatency - wrsPtpEgressLatency
Change enumeration values of:
- wrsPtpInstanceProfile (renamed value 2, removed value 3)
Improved description of: Improved description of:
- wrsPtpRTT - wrsPtpRTT
- wrsPtpLinkLength - wrsPtpLinkLength
...@@ -3179,14 +3181,15 @@ wrsPtpInstanceProfile OBJECT-TYPE ...@@ -3179,14 +3181,15 @@ wrsPtpInstanceProfile OBJECT-TYPE
SYNTAX INTEGER { -- ppsi/include/ppsi/ppsi.h SYNTAX INTEGER { -- ppsi/include/ppsi/ppsi.h
na(0), na(0),
defaultPTP(1), -- PPSI_PROFILE_PTP defaultPTP(1), -- PPSI_PROFILE_PTP
whiteRabbit(2), -- PPSI_PROFILE_WR highAccuracyWhiteRabbit(2), -- PPSI_PROFILE_HA_WR
highAccuracy(3), -- PPSI_PROFILE_HA highAccuracy(3), -- obsolete
custom(4) -- PPSI_PROFILE_CUSTOM custom(4) -- PPSI_PROFILE_CUSTOM
} }
MAX-ACCESS read-only MAX-ACCESS read-only
STATUS current STATUS current
DESCRIPTION DESCRIPTION
"Profile/Extension configured on a PTP Instance" "Profile configured on a PTP Instance. Please note that
High Accuracy and White Rabbit use the same profile."
::= { wrsPtpInstanceEntry 11 } ::= { wrsPtpInstanceEntry 11 }
wrsPtpInstanceExtension OBJECT-TYPE wrsPtpInstanceExtension OBJECT-TYPE
......
...@@ -46,6 +46,20 @@ static struct pickinfo wrsPtpInstanceTable_pickinfo[] = { ...@@ -46,6 +46,20 @@ static struct pickinfo wrsPtpInstanceTable_pickinfo[] = {
static char *slog_obj_name; static char *slog_obj_name;
static char *wrsPtpInstanceStatusError_str = "wrsPtpInstanceStatusError"; static char *wrsPtpInstanceStatusError_str = "wrsPtpInstanceStatusError";
static int get_profile_val(int profile)
{
switch(profile) {
case PPSI_PROFILE_PTP:
return WRS_PTP_INSTANCE_PROFILE_PTP;
case PPSI_PROFILE_HA_WR:
return WRS_PTP_INSTANCE_PROFILE_HA_WR;
case PPSI_PROFILE_CUSTOM:
return WRS_PTP_INSTANCE_PROFILE_CUSTOM;
default:
return WRS_PTP_INSTANCE_PROFILE_NA;
}
}
static inline struct hal_port_state *pp_wrs_lookup_port(char *name) static inline struct hal_port_state *pp_wrs_lookup_port(char *name)
{ {
int i; int i;
...@@ -155,7 +169,7 @@ time_t wrsPtpInstanceTable_data_fill(unsigned int *n_rows) ...@@ -155,7 +169,7 @@ time_t wrsPtpInstanceTable_data_fill(unsigned int *n_rows)
pit->wrsPtpInstanceExtPortCfgDesSt = ppsi_i->externalPortConfigurationPortDS.desiredState; pit->wrsPtpInstanceExtPortCfgDesSt = ppsi_i->externalPortConfigurationPortDS.desiredState;
pit->wrsPtpInstanceMechanism = ppsi_i->delayMechanism; pit->wrsPtpInstanceMechanism = ppsi_i->delayMechanism;
pit->wrsPtpInstanceProfile = ppsi_i->cfg.profile + 1; pit->wrsPtpInstanceProfile = get_profile_val(ppsi_i->cfg.profile);
pit->wrsPtpInstanceExtension = ppsi_i->protocol_extension+1; pit->wrsPtpInstanceExtension = ppsi_i->protocol_extension+1;
pit->wrsPtpInstanceAsymEnabled = ppsi_i->asymmetryCorrectionPortDS.enable + 1; pit->wrsPtpInstanceAsymEnabled = ppsi_i->asymmetryCorrectionPortDS.enable + 1;
pit->wrsPtpInstanceAsymConstAsymPS = interval_to_picos(ppsi_i->asymmetryCorrectionPortDS.constantAsymmetry); pit->wrsPtpInstanceAsymConstAsymPS = interval_to_picos(ppsi_i->asymmetryCorrectionPortDS.constantAsymmetry);
......
...@@ -17,6 +17,12 @@ ...@@ -17,6 +17,12 @@
#define WRS_PTP_INSTANCE_EXTENSION_CFG_HAWRAUTONEGOTIATION 4 #define WRS_PTP_INSTANCE_EXTENSION_CFG_HAWRAUTONEGOTIATION 4
#define WRS_PTP_INSTANCE_PROFILE_NA 0
#define WRS_PTP_INSTANCE_PROFILE_PTP 1
#define WRS_PTP_INSTANCE_PROFILE_HA_WR 2
/* 3 is obsolete */
#define WRS_PTP_INSTANCE_PROFILE_CUSTOM 4
struct wrsPtpInstanceTable_s { struct wrsPtpInstanceTable_s {
uint32_t wrsPtpInstancePortIndex; /* not reported, index fields has t o be marked uint32_t wrsPtpInstancePortIndex; /* not reported, index fields has t o be marked
......
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