Re: [Linuxptp-users] rogue peer delay response caused by port_synchronize()

2023-03-27 Thread Merlin He
Hi Richard,
Thank you, We are going to report this issue to Synopsys

Richard Cochran  于2023年3月28日周二 11:27写道:

> On Tue, Mar 28, 2023 at 10:57:43AM +0800, merlinhe wrote:
> > Hi Miroslav,
> >
> > We use Synopsys's IP, the driver is the same as stmmac
>
> Yeah, the stmmac driver is crazy bad.
>
> It is not clear to me whether setting the time when enabling time
> stamping is actually required by the IP core or not.
>
> But even if it were required, still the driver should attempt to keep
> the MAC unaltered by reprogramming the current MAC time.
>
> Thanks,
> Richard
>
___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users


Re: [Linuxptp-users] rogue peer delay response caused by port_synchronize()

2023-03-27 Thread Richard Cochran
On Tue, Mar 28, 2023 at 10:57:43AM +0800, merlinhe wrote:
> Hi Miroslav,
> 
> We use Synopsys's IP, the driver is the same as stmmac

Yeah, the stmmac driver is crazy bad.

It is not clear to me whether setting the time when enabling time
stamping is actually required by the IP core or not.

But even if it were required, still the driver should attempt to keep
the MAC unaltered by reprogramming the current MAC time.

Thanks,
Richard


___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users


Re: [Linuxptp-users] rogue peer delay response caused by port_synchronize()

2023-03-27 Thread merlinhe
Hi Miroslav,

We use Synopsys's IP, the driver is the same as stmmac

file: stmicro/stmmac/stmmac_main.c
function: static int stmmac_hwtstamp_set(struct net_device *dev, struct
ifreq *ifr)

 692 /* initialize system time */

* 693 ktime_get_real_ts64();* 694
 695 /* lower 32 bits of tv_sec are safe until y2106 */

* 696 stmmac_init_systime(priv, priv->ptpaddr, 697
(u32)now.tv_sec, now.tv_nsec);*

Miroslav Lichvar  于2023年3月27日周一 16:20写道:

> On Fri, Mar 24, 2023 at 03:46:49PM +0800, merlinhe wrote:
> >
> port.port_initialize()->transport_open()->raw_open()->sk_timestamping_init()->hwts_init()->*ioctl(fd,
> > SIOCSHWTSTAMP)(eth driver set PHC to SYS(year 2000) in this ioctl)*
>
> That ioctl definitely shouldn't cause the PHC to be stepped. What
> HW/driver is it?
>
> --
> Miroslav Lichvar
>
>
___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users


Re: [Linuxptp-users] rogue peer delay response caused by port_synchronize()

2023-03-27 Thread Miroslav Lichvar
On Fri, Mar 24, 2023 at 03:46:49PM +0800, merlinhe wrote:
>  
> port.port_initialize()->transport_open()->raw_open()->sk_timestamping_init()->hwts_init()->*ioctl(fd,
> SIOCSHWTSTAMP)(eth driver set PHC to SYS(year 2000) in this ioctl)*

That ioctl definitely shouldn't cause the PHC to be stepped. What
HW/driver is it?

-- 
Miroslav Lichvar



___
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users