netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 00/11][pull request] idpf: add initial PTP support
@ 2025-04-25 21:52 Tony Nguyen
  2025-04-25 21:52 ` [PATCH net-next v2 01/11] idpf: change the method for mailbox workqueue allocation Tony Nguyen
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Tony Nguyen @ 2025-04-25 21:52 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, andrew+netdev, netdev
  Cc: Tony Nguyen, milena.olech, przemyslaw.kitszel, jacob.e.keller,
	richardcochran

Milena Olech says:

This patch series introduces support for Precision Time Protocol (PTP) to
Intel(R) Infrastructure Data Path Function (IDPF) driver. PTP feature is
supported when the PTP capability is negotiated with the Control
Plane (CP). IDPF creates a PTP clock and sets a set of supported
functions.

During the PTP initialization, IDPF requests a set of PTP capabilities
and receives a writeback from the CP with the set of supported options.
These options are:
- get time of the PTP clock
- get cross timestamp
- set the time of the PTP clock
- adjust the PTP clock
- Tx timestamping

Each feature is considered to have direct access, where the operations
on PCIe BAR registers are allowed, or the mailbox access, where the
virtchnl messages are used to perform any PTP action. Mailbox access
means that PTP requests are sent to the CP through dedicated secondary
mailbox and the CP reads/writes/modifies desired resource - PTP Clock
or Tx timestamp registers.

Tx timestamp capabilities are negotiated only for vports that have
UPLINK_VPORT flag set by the CP. Capabilities provide information about
the number of available Tx timestamp latches, their indexes and size of
the Tx timestamp value. IDPF requests Tx timestamp by setting the
TSYN bit and the requested timestamp index in the context descriptor for
the PTP packets. When the completion tag for that packet is received,
IDPF schedules a worker to read the Tx timestamp value.
---
v2:
create a separate patch for cross timestamping, change patch order,
improve get device clock time latch mechanism, change timestamp
extension algorithm, use one lock for latches lists, allocate each
index latch separately during caps negotiation, fix virtchnl comment

v1: https://lore.kernel.org/netdev/20250318161327.2532891-1-anthony.l.nguyen@intel.com/

IWL: https://lore.kernel.org/intel-wired-lan/20250416122142.86176-2-milena.olech@intel.com/

The following are changes since commit 4acf6d4f6afc3478753e49c495132619667549d9:
  Merge branch 'fix-netdevim-to-correctly-mark-napi-ids'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 200GbE

Milena Olech (11):
  idpf: change the method for mailbox workqueue allocation
  idpf: add initial PTP support
  virtchnl: add PTP virtchnl definitions
  idpf: move virtchnl structures to the header file
  idpf: negotiate PTP capabilities and get PTP clock
  idpf: add mailbox access to read PTP clock time
  idpf: add cross timestamping
  idpf: add PTP clock configuration
  idpf: add Tx timestamp capabilities negotiation
  idpf: add Tx timestamp flows
  idpf: add support for Rx timestamping

 drivers/net/ethernet/intel/idpf/Kconfig       |    1 +
 drivers/net/ethernet/intel/idpf/Makefile      |    3 +
 drivers/net/ethernet/intel/idpf/idpf.h        |   35 +
 .../ethernet/intel/idpf/idpf_controlq_api.h   |    3 +
 drivers/net/ethernet/intel/idpf/idpf_dev.c    |   14 +
 .../net/ethernet/intel/idpf/idpf_ethtool.c    |   75 +-
 .../ethernet/intel/idpf/idpf_lan_pf_regs.h    |    4 +
 .../net/ethernet/intel/idpf/idpf_lan_txrx.h   |   13 +-
 drivers/net/ethernet/intel/idpf/idpf_lib.c    |   57 +
 drivers/net/ethernet/intel/idpf/idpf_main.c   |    9 +-
 drivers/net/ethernet/intel/idpf/idpf_ptp.c    | 1023 +++++++++++++++++
 drivers/net/ethernet/intel/idpf/idpf_ptp.h    |  379 ++++++
 drivers/net/ethernet/intel/idpf/idpf_txrx.c   |  171 ++-
 drivers/net/ethernet/intel/idpf/idpf_txrx.h   |   18 +-
 .../net/ethernet/intel/idpf/idpf_virtchnl.c   |  161 ++-
 .../net/ethernet/intel/idpf/idpf_virtchnl.h   |   84 ++
 .../ethernet/intel/idpf/idpf_virtchnl_ptp.c   |  672 +++++++++++
 drivers/net/ethernet/intel/idpf/virtchnl2.h   |  314 ++++-
 18 files changed, 2933 insertions(+), 103 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/idpf/idpf_ptp.c
 create mode 100644 drivers/net/ethernet/intel/idpf/idpf_ptp.h
 create mode 100644 drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c

-- 
2.47.1


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

end of thread, other threads:[~2025-05-06 14:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 21:52 [PATCH net-next v2 00/11][pull request] idpf: add initial PTP support Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 01/11] idpf: change the method for mailbox workqueue allocation Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 02/11] idpf: add initial PTP support Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 03/11] virtchnl: add PTP virtchnl definitions Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 04/11] idpf: move virtchnl structures to the header file Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 05/11] idpf: negotiate PTP capabilities and get PTP clock Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 06/11] idpf: add mailbox access to read PTP clock time Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 07/11] idpf: add cross timestamping Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 08/11] idpf: add PTP clock configuration Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 09/11] idpf: add Tx timestamp capabilities negotiation Tony Nguyen
2025-04-25 21:52 ` [PATCH net-next v2 10/11] idpf: add Tx timestamp flows Tony Nguyen
2025-04-29  0:35   ` Jakub Kicinski
2025-05-05 17:08     ` Olech, Milena
2025-05-05 19:00       ` Jakub Kicinski
2025-04-29  0:37   ` Jakub Kicinski
2025-04-29 20:06     ` Jacob Keller
2025-04-25 21:52 ` [PATCH net-next v2 11/11] idpf: add support for Rx timestamping Tony Nguyen
2025-04-29  0:39 ` [PATCH net-next v2 00/11][pull request] idpf: add initial PTP support Jakub Kicinski
2025-04-29 21:41   ` Tony Nguyen
2025-04-29 21:52     ` Jakub Kicinski
2025-05-05 17:20       ` Olech, Milena
2025-05-05 19:02         ` Jakub Kicinski
2025-05-06 14:50           ` Olech, Milena

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).