All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH net-next 0/6] ptp: Support hardware clocks with additional free running time
@ 2022-03-06  8:56 Gerhard Engleder
  2022-03-06  8:56 ` [RFC PATCH net-next 1/6] bpf: Access hwtstamp field of hwtstamps directly Gerhard Engleder
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Gerhard Engleder @ 2022-03-06  8:56 UTC (permalink / raw)
  To: richardcochran, yangbo.lu, davem, kuba
  Cc: mlichvar, vinicius.gomes, netdev, Gerhard Engleder

ptp vclocks require a clock with free running time for the timecounter.
Currently only a physical clock forced to free running is supported.
If vclocks are used, then the physical clock cannot be synchronized
anymore. The synchronized time is not available in hardware in this
case. As a result, timed transmission with ETF/TAPRIO hardware support
is not possible anymore.

If hardware would support a free running time additionally to the
physical clock, then the physical clock does not need to be forced to
free running. Thus, the physical clocks can still be synchronized while
vclocks are in use.

The physical clock could be used to synchronize the time domain of the
TSN network and trigger ETF/TAPRIO. In parallel vclocks can be used to
synchronize other time domains.

One year ago I thought for two time domains within a TSN network also
two physical clocks are required. This would lead to new kernel
interfaces for asking for the second clock, ... . But actually for a
time triggered system like TSN there can be only one time domain that
controls the system itself. All other time domains belong to other
layers, but not to the time triggered system itself. So other time
domains can be based on a free running counter if similar mechanisms
to 2 step synchronisation are used.

Synchronisation was tested with two time domains between two directly
connected hosts. Each host run two ptp4l instances, the first used the
physical clock and the second used the virtual clock. I used my FPGA
based network controller as network device. ptp4l was used in
combination with the virtual clock support patch set from Miroslav
Lichvar.

Please give me some feedback. For me it seems like a straight forward
extension for ptp vclocks, but I'm new to this topic.

Gerhard Engleder (6):
  bpf: Access hwtstamp field of hwtstamps directly
  ptp: Initialize skb_shared_hwtstamps
  ptp: Add free running time support
  ptp: Support time stamps based on free running time
  ptp: Allow vclocks without free running physical clock
  tsnep: Add free running time support

 .../net/ethernet/cavium/liquidio/lio_main.c   |  1 +
 .../ethernet/cavium/liquidio/lio_vf_main.c    |  1 +
 .../net/ethernet/chelsio/cxgb4/cxgb4_ptp.c    |  1 +
 drivers/net/ethernet/engleder/tsnep_hw.h      |  9 ++++--
 drivers/net/ethernet/engleder/tsnep_main.c    |  6 ++++
 drivers/net/ethernet/engleder/tsnep_ptp.c     | 28 +++++++++++++++++++
 .../hisilicon/hns3/hns3pf/hclge_ptp.c         |  1 +
 .../ethernet/mellanox/mlxsw/spectrum_ptp.c    |  1 +
 drivers/net/ethernet/sfc/tx_common.c          |  1 +
 drivers/ptp/ptp_clock.c                       |  8 +++---
 drivers/ptp/ptp_ines.c                        |  1 +
 drivers/ptp/ptp_private.h                     |  9 ++++++
 drivers/ptp/ptp_sysfs.c                       | 11 ++++----
 drivers/ptp/ptp_vclock.c                      | 25 +++++++++++++----
 include/linux/ptp_clock_kernel.h              | 27 ++++++++++++++++++
 include/linux/skbuff.h                        |  3 ++
 net/core/filter.c                             |  3 +-
 17 files changed, 117 insertions(+), 19 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-03-08 20:55 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-06  8:56 [RFC PATCH net-next 0/6] ptp: Support hardware clocks with additional free running time Gerhard Engleder
2022-03-06  8:56 ` [RFC PATCH net-next 1/6] bpf: Access hwtstamp field of hwtstamps directly Gerhard Engleder
2022-03-06  8:56 ` [RFC PATCH net-next 2/6] ptp: Initialize skb_shared_hwtstamps Gerhard Engleder
2022-03-06  8:56 ` [RFC PATCH net-next 3/6] ptp: Add free running time support Gerhard Engleder
2022-03-06 16:36   ` Richard Cochran
2022-03-06  8:56 ` [RFC PATCH net-next 4/6] ptp: Support time stamps based on free running time Gerhard Engleder
2022-03-06 16:42   ` Richard Cochran
2022-03-06  8:56 ` [RFC PATCH net-next 5/6] ptp: Allow vclocks without free running physical clock Gerhard Engleder
2022-03-06  8:56 ` [RFC PATCH net-next 6/6] tsnep: Add free running time support Gerhard Engleder
2022-03-06 16:49 ` [RFC PATCH net-next 0/6] ptp: Support hardware clocks with additional free running time Richard Cochran
2022-03-06 16:53   ` Richard Cochran
2022-03-06 17:05 ` Richard Cochran
2022-03-06 18:38   ` Gerhard Engleder
2022-03-06 21:50     ` Richard Cochran
2022-03-07 14:34       ` Richard Cochran
2022-03-07 17:54         ` Gerhard Engleder
2022-03-07 21:30           ` Richard Cochran
2022-03-08  0:55           ` Richard Cochran
2022-03-08 19:49             ` Gerhard Engleder
2022-03-08 20:52               ` Richard Cochran
2022-03-08  0:57           ` Richard Cochran
2022-03-07 12:07 ` Michael Walle
2022-03-07 14:05   ` Richard Cochran
2022-03-07 14:23     ` Miroslav Lichvar
2022-03-07 14:37       ` Richard Cochran
2022-03-08 20:55         ` Richard Cochran
2022-03-07 16:01   ` Gerhard Engleder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.