lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b4f057ea-5e48-478d-999b-0b5faebc774c@linux.dev>
Date: Tue, 17 Jun 2025 17:10:11 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Oleksij Rempel <o.rempel@...gutronix.de>, Lukasz Majewski <lukma@...x.de>
Cc: netdev@...r.kernel.org, Arun Ramadoss <arun.ramadoss@...rochip.com>,
 Vladimir Oltean <olteanv@...il.com>, Tristram.Ha@...rochip.com,
 Richard Cochran <richardcochran@...il.com>,
 Christian Eggers <ceggers@...i.de>
Subject: Re: [PTP][KSZ9477][p2p1step] Questions for PTP support on KSZ9477
 device

On 17/06/2025 06:25, Oleksij Rempel wrote:
> On Mon, Jun 16, 2025 at 05:25:01PM +0200, Lukasz Majewski wrote:
>> Dear Community,
>>
>> As of [1] KSZ drivers support HW timestamping HWTSTAMP_TX_ONESTEP_P2P.
>> When used with ptp4l (config [2]) I'm able to see that two boards with
>> KSZ9477 can communicate and one of them is a grandmaster device.
>>
>> This is OK (/dev/ptp0 is created and works properly).
>>
>>  From what I have understood - the device which supports p2p1step also
>> supports "older" approaches, so communication with other HW shall be
>> possible.
> 
> This is not fully correct. "One step" and "two step" need different things from
> hardware and driver.
> 
> In "one step" mode, the switch modifies the PTP frame directly and inserts the
> timestamp during sending (start of frame). This works without host help.
> 
> But for "two step" mode, the hardware only timestamps after the frame is sent.
> The host must then read this timestamp. For that, the switch must trigger an
> interrupt to the host. This requires:
> - board to wire the IRQ line from switch to host,
> - and driver to handle that interrupt and read the timestamp (like in
> ksz_ptp_msg_thread_fn()).
> 
> So it's not only about switch HW. It also depends on board design and driver
> support.
> 
>> Hence the questions:
>>
>> 1. Would it be possible to communicate with beaglebone black (BBB)
>> connected to the same network?
> 
> No, this will not work correctly. Both sides must use the same timestamping
> mode: either both "one step" or both "two step".
>   

I'm not quite sure this statement is fully correct. I don't have a
hardware on hands to make this setup, but reading through the code in
linuxptp - the two-step fsm kicks off based on the message type bit. In 
case when linuxptp receives 1-step sync, it does all the calculations.
For delay response packets on GM side it doesn't matter as GM doesn't do
any calculations. I don't see any requirements here from the perspective
of protocol itself.

But again, I don't have HW to make a proof.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ