Discussion:
[Linuxptp-users] v1.7 / v 1.8 differences.
Ian Thompson
2017-01-09 20:53:51 UTC
Permalink
We are running some embedded boards based on the Altera SOC with its stmicro/stmmac.

The v1.7 code runs well.

Jan 9 19:24:29 localhost user.info ptp4l: [265569.544] selected /dev/ptp0 as PTP clock
Jan 9 19:24:29 localhost user.notice ptp4l: [265569.545] port 1: INITIALIZING to LISTENING on INITIALIZE
Jan 9 19:24:29 localhost user.notice ptp4l: [265569.545] port 0: INITIALIZING to LISTENING on INITIALIZE
Jan 9 19:24:29 localhost user.notice ptp4l: [265569.668] port 1: new foreign master 000cec.fffe.0a085d-1
Jan 9 19:24:31 localhost user.notice ptp4l: [265571.668] selected best master clock 000cec.fffe.0a085d
Jan 9 19:24:31 localhost user.notice ptp4l: [265571.668] port 1: LISTENING to UNCALIBRATED on RS_SLAVE

I've just compiled v1.8 and replaced the v1.7 binary, no other changes, and it fails ....

Jan 9 19:19:07 localhost user.info ptp4l_18: [265247.971] selected /dev/ptp0 as PTP clock
Jan 9 19:19:07 localhost user.info ptp4l_18: [265247.973] driver rejected most general HWTSTAMP filter
Jan 9 19:19:07 localhost user.err ptp4l_18: [265247.973] ioctl SIOCSHWTSTAMP failed: Numerical result out of range
Jan 9 19:19:07 localhost user.notice ptp4l_18: [265247.973] port 1: INITIALIZING to FAULTY on INITIALIZE
Jan 9 19:19:07 localhost user.notice ptp4l_18: [265247.974] port 0: INITIALIZING to LISTENING on INITIALIZE
Jan 9 19:19:07 localhost user.notice ptp4l_18: [265247.974] port 1: link up
Jan 9 19:19:07 localhost user.info ptp4l_18: [265247.975] driver rejected most general HWTSTAMP filter
Jan 9 19:19:07 localhost user.err ptp4l_18: [265247.975] ioctl SIOCSHWTSTAMP failed: Numerical result out of range
Jan 9 19:19:07 localhost user.notice ptp4l_18: [265247.975] port 1: FAULTY to FAULTY on FAULT_CLEARED

The function that generates the failed ioctl error hasn't changed, so is this a problem with the added RTNL link code?

Any help is appreciated.
Regards
Ian T.
Richard Cochran
2017-01-10 09:08:01 UTC
Permalink
Post by Ian Thompson
We are running some embedded boards based on the Altera SOC with its stmicro/stmmac.
The v1.7 code runs well.
I've just compiled v1.8 and replaced the v1.7 binary, no other changes, and it fails ....
Possibly you compiled v1.8 with the wrong kernel headers?

Run both versions under strace to see what exactly is being passed and
returned.

Also, try running the hwstamp_ctl utility to see whether the error
appears there.
Post by Ian Thompson
The function that generates the failed ioctl error hasn't changed, so is this a problem with the added RTNL link code?
No, the rtnl code does not use the HWTSTAMP ioctl.

Thanks,
Richard
Richard Cochran
2017-01-10 18:24:21 UTC
Permalink
However, with the same config file, ptp4l v1.7 enters hwts_init() with one_step = 0 and v1.8 enters with one_step = 1.
The driver rejects HWTSTAMP_TX_ONESTEP_SYNC.
...
If I force v1.8 to one_step = 0, it works.
I attached the configuration file I'm using.
It looks like I was asking for one step, so is v1.8 getting it correct?
Right, v1.7 introduced a regression WRT one-step, and this bug was
fixed in v1.8.

So configure "twoStepFlag 1", and all will be well.

Thanks,
Richard

Continue reading on narkive:
Loading...