Commit d2012524 authored by Adam Wujek's avatar Adam Wujek 💬

lib/snmp: restart ppsi after updating SFP data

Restart ppsi after updating deltas or alpha.
Update can be in memory or in database, restart ppsi in both cases.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 528f92bc
......@@ -1002,7 +1002,11 @@ static int set_ptp_config(uint8_t *buf, struct snmp_oid *obj)
sfp_deltaTx = snmp_ptp_config.dTx;
sfp_deltaRx = snmp_ptp_config.dRx;
sfp_alpha = snmp_ptp_config.alpha;
/* restart of ppsi is needed here */
/* Since ppsi does not support update of deltas in runtime,
* we need to restart the ppsi */
wrc_ptp_stop();
wrc_ptp_start();
*apply_mode = applySuccessful;
break;
case writeToFlashCurrentSfp:
......@@ -1038,7 +1042,11 @@ static int set_ptp_config(uint8_t *buf, struct snmp_oid *obj)
*apply_mode = applySuccessfulMatchFailed;
break;
}
/* restart of ppsi is needed here */
/* Since ppsi does not support update of deltas in runtime,
* we need to restart the ppsi */
wrc_ptp_stop();
wrc_ptp_start();
*apply_mode = applySuccessful;
break;
case eraseFlash:
......
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