On Mon, May 15, 2023 at 06:26:04PM -0400, Kishen Maloor wrote: > @@ -1129,6 +1130,27 @@ static int port_management_fill_response(struct port > *target, > memcpy(pwr, &target->pwr, sizeof(*pwr)); > datalen = sizeof(*pwr); > break; > + case MID_CMLDS_INFO_NP: > + cmlds = (struct cmlds_info_np *)tlv->data; > + /* IEEE1588-2019 16.6.3.2 h) 1) && nrate.ratio_valid because > + * we have no extra field to convey that separately. > + */ > + cmlds->serviceMeasurementValid = > + target->peer_portid_valid && !target->pdr_missing && > + !target->multiple_pdr_detected && > + target->nrate.ratio_valid; > + cmlds->meanLinkDelay = target->peerMeanPathDelay; > + cmlds->scaledNeighborRateRatio = > + (Integer32) (target->nrate.ratio * POW2_41 - POW2_41);
> + /* 16.6.3.2: "Upon receipt of a request for information, the > + * Common Mean Link Delay Service may in addition return the > + * raw measurement data gathered by the service for use in > + * estimating the <meanLinkDelay> and <neighborRateRatio>." > + */ > + cmlds->egress_ts = tmv_to_nanoseconds(target->peer_delay_t1); > + cmlds->rx_ts = tmv_to_nanoseconds(target->peer_delay_t2); Please drop these two fields. They don't provide any benefit. If the clients don't trust the CMLDS values, then they are free to measure the p2p delay themselves! Thanks, Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel