> -----Original Message----- > From: Richard Cochran <richardcoch...@gmail.com> > Sent: Tuesday, March 2, 2021 12:58 AM > To: Y.b. Lu <yangbo...@nxp.com> > Cc: linuxptp-devel@lists.sourceforge.net > Subject: Re: [Linuxptp-devel] [v3] Bump to IEEE 1588-2019 version > > Sorry for the churn, but now I understand how the minor version is > not part of the PORT_DATA_SET or of the VERSION_NUMBER TLV. Even > though this might have been an oversight, still, as written, the > standard is crystal clear on this point. >
I missed handling VERSION_NUMBER printing issue. Will add it. So, let's use only major version in TLV per current active 2020 standard. > On Mon, Mar 01, 2021 at 11:40:30AM +0800, Yangbo Lu wrote: > > > diff --git a/pmc.c b/pmc.c > > index 3678800..ea2af3f 100644 > > --- a/pmc.c > > +++ b/pmc.c > > @@ -413,12 +413,14 @@ static void pmc_show(struct ptp_message *msg, > FILE *fp) > > IFMT "logSyncInterval %hhd" > > IFMT "delayMechanism %hhu" > > IFMT "logMinPdelayReqInterval %hhd" > > - IFMT "versionNumber %hhu", > > + IFMT "versionNumber %u.%u", > > Please drop the .%u here, and ... Ok. > > > pid2str(&p->portIdentity), ps_str[p->portState], > > p->logMinDelayReqInterval, p->peerMeanPathDelay >> 16, > > p->logAnnounceInterval, p->announceReceiptTimeout, > > p->logSyncInterval, p->delayMechanism, > > - p->logMinPdelayReqInterval, p->versionNumber); > > + p->logMinPdelayReqInterval, > > + p->versionNumber & MAJOR_VERSION_MASK, > > keep this part, just in case some other stacks do include the minor > version in the reserved nibble. Ok. > > > + p->versionNumber >> 4); > > And drop this. Ok > > Please also update the code that sends PORT_DATA_SET and > VERSION_NUMBER so that it applies the mask: > > p->versionNumber & MAJOR_VERSION_MASK I think it could be done during port_open(). Let me sent v4 for reviewing. p->versionNumber = PTP_MAJOR_VERSION; > > Thanks, > Richard _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel