Skip to content

dpll: rework fractional frequency offset reporting

Ivan Vecera linux-doc linux-rdma lkml netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesApplied 2/2
  2. v32 patches 6 repliesSuperseded
  3. v22 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches1 replySuperseded

Changes in v4 from the cover letter

- Replace dpll=NULL overloading with enum dpll_ffo_type and struct dpll_ffo_param (Jakub Kicinski)
- Add supported_ffo opt-in bitmask in dpll_pin_ops for fail-close driver validation (Jakub Kicinski)
- Add WARN_ON in dpll_pin_register for supported_ffo without ffo_get callback
- Use atomic64_t for freq_offset to prevent torn reads on 32-bit

Patches in v4 All 2 applied

#Subject and filesSizeRepliesApplied
1/2dpll: add fractional frequency offset to pin-parent-deviceDocumentation/driver-api/dpll.rst Documentation/netlink/specs/dpll.yaml drivers/dpll/dpll_core.c +5 more+81 -300 repliesApplied
2/2dpll: zl3073x: report FFO as DPLL vs input reference offsetdrivers/dpll/zl3073x/chan.c drivers/dpll/zl3073x/chan.h drivers/dpll/zl3073x/core.c +3 more+75 -820 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJiri PirkoPetr Oros
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net-next v4 0/2] dpll: rework fractional frequency offset reporting

Rework how the fractional frequency offset (FFO) is reported in the DPLL subsystem.

Both fractional-frequency-offset (PPM) and fractional-frequency-offset-ppt (PPT) attributes are now present at the top level of a pin and inside each pin-parent-device nest. They carry the same measurement at different precisions.

Introduce enum dpll_ffo_type and struct dpll_ffo_param to distinguish FFO contexts: DPLL_FFO_PORT_RXTX_RATE for the RX vs TX symbol rate offset at the top level, and DPLL_FFO_PIN_DEVICE for the pin vs parent DPLL offset in the nest. Drivers declare which types they support via the supported_ffo bitmask in dpll_pin_ops; the core only calls ffo_get for opted-in types.

Patch 1 adds the type-safe FFO API, updates the YAML spec, netlink handling, and documentation, and converts mlx5 and zl3073x drivers.

Patch 2 implements the nested FFO for zl3073x using the dpll_df_offset_x register with ref_ofst=1, providing 2^-48 resolution. The old per-reference frequency measurement is removed as it was redundant with measured-frequency.

Changes v3 -> v4:
- Replace dpll=NULL overloading with enum dpll_ffo_type and struct dpll_ffo_param (Jakub Kicinski)
- Add supported_ffo opt-in bitmask in dpll_pin_ops for fail-close driver validation (Jakub Kicinski)
- Add WARN_ON in dpll_pin_register for supported_ffo without ffo_get callback
- Use atomic64_t for freq_offset to prevent torn reads on 32-bit

Changes v2 -> v3:
- Keep both FFO attributes (PPM and PPT) at both levels instead of moving PPT under pin-parent-device only (Jiri Pirko)
- Unify attribute documentation to describe semantics at each level

Changes v1 -> v2:
- Minor commit message fixes

Ivan Vecera (2):
dpll: add fractional frequency offset to pin-parent-device
dpll: zl3073x: report FFO as DPLL vs input reference offset

 Documentation/driver-api/dpll.rst             | 20 +++++++++
 Documentation/netlink/specs/dpll.yaml         | 28 +++++++-----
 drivers/dpll/dpll_core.c                      |  3 +-
 drivers/dpll/dpll_netlink.c                   | 30 +++++++------
 drivers/dpll/dpll_nl.c                        |  2 +
 drivers/dpll/zl3073x/chan.c                   | 31 ++++++++++++-
 drivers/dpll/zl3073x/chan.h                   | 14 ++++++
 drivers/dpll/zl3073x/core.c                   | 45 -------------------
 drivers/dpll/zl3073x/dpll.c                   | 40 ++++++++---------
 drivers/dpll/zl3073x/ref.h                    | 14 ------
 drivers/dpll/zl3073x/regs.h                   | 15 +++++++
 .../net/ethernet/mellanox/mlx5/core/dpll.c    |  6 ++-
 include/linux/dpll.h                          | 16 ++++++-
 13 files changed, 154 insertions(+), 110 deletions(-)
Signature · 1 line
2.53.0