netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/4] dpll: add all inputs phase offset monitor
@ 2025-04-15 18:15 Arkadiusz Kubalewski
  2025-04-15 18:15 ` [PATCH net-next v2 1/4] dpll: use struct dpll_device_info for dpll registration Arkadiusz Kubalewski
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Arkadiusz Kubalewski @ 2025-04-15 18:15 UTC (permalink / raw)
  To: donald.hunter, kuba, davem, edumazet, pabeni, horms,
	vadim.fedorenko, jiri, anthony.l.nguyen, przemyslaw.kitszel,
	andrew+netdev, saeedm, leon, tariqt, jonathan.lemon,
	richardcochran, aleksandr.loktionov, milena.olech
  Cc: netdev, linux-kernel, intel-wired-lan, linux-rdma,
	Arkadiusz Kubalewski

Add simple dpll device level feature and capabilties infrastructure over
netlink dpll interface.
Using new infrastructure add new feature: ALL_INPUTS_PHASE_OFFSET_MONITOR.
Allow users control with two new attributes:
- DPLL_A_CAPABILITIES - for checking if dpll device is capable,
- DPLL_A_FEATURES - for enable/disable a features.
Implement feature in ice driver for dpll-enabled devices.

Verify capability:
$ ./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/dpll.yaml \
 --dump device-get
[{'capabilities': set(),
  'clock-id': 4658613174691613800,
  'features': set(),
  'id': 0,
  'lock-status': 'locked-ho-acq',
  'mode': 'automatic',
  'mode-supported': ['automatic'],
  'module-name': 'ice',
  'type': 'eec'},
 {'capabilities': {'all-inputs-phase-offset-monitor'},
  'clock-id': 4658613174691613800,
  'features': set(),
  'id': 1,
  'lock-status': 'locked-ho-acq',
  'mode': 'automatic',
  'mode-supported': ['automatic'],
  'module-name': 'ice',
  'type': 'pps'}]

Enable the feature:
$ ./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/dpll.yaml \
 --do device-set --json '{"id":1, \
 "features":"all-inputs-phase-offset-monitor"}'

Verify feature is enabled:
$ ./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/dpll.yaml \
 --dump device-get
[
 [...]
 {'capabilities': {'all-inputs-phase-offset-monitor'},
  'clock-id': 4658613174691613800,
  'features': {'all-inputs-phase-offset-monitor'},
  'id': 1,
 [...]
]

Disable the feature:
$ ./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/dpll.yaml \
 --do device-set --json '{"id":1, \
 "features":0}'


Arkadiusz Kubalewski (4):
  dpll: use struct dpll_device_info for dpll registration
  dpll: add features and capabilities to dpll device spec
  dpll: features_get/set callbacks
  ice: add phase offset monitor for all PPS dpll inputs

 Documentation/netlink/specs/dpll.yaml         |  25 +++
 drivers/dpll/dpll_core.c                      |  34 +--
 drivers/dpll/dpll_core.h                      |   2 +-
 drivers/dpll/dpll_netlink.c                   |  86 +++++++-
 drivers/dpll/dpll_nl.c                        |   5 +-
 .../net/ethernet/intel/ice/ice_adminq_cmd.h   |  20 ++
 drivers/net/ethernet/intel/ice/ice_common.c   |  26 +++
 drivers/net/ethernet/intel/ice/ice_common.h   |   3 +
 drivers/net/ethernet/intel/ice/ice_dpll.c     | 195 +++++++++++++++++-
 drivers/net/ethernet/intel/ice/ice_dpll.h     |   7 +
 drivers/net/ethernet/intel/ice/ice_main.c     |   4 +
 .../net/ethernet/mellanox/mlx5/core/dpll.c    |  10 +-
 drivers/ptp/ptp_ocp.c                         |   7 +-
 include/linux/dpll.h                          |  16 +-
 include/uapi/linux/dpll.h                     |  13 ++
 15 files changed, 417 insertions(+), 36 deletions(-)


base-commit: bbfc077d457272bcea4f14b3a28247ade99b196d
-- 
2.38.1


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

end of thread, other threads:[~2025-05-08 12:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 18:15 [PATCH net-next v2 0/4] dpll: add all inputs phase offset monitor Arkadiusz Kubalewski
2025-04-15 18:15 ` [PATCH net-next v2 1/4] dpll: use struct dpll_device_info for dpll registration Arkadiusz Kubalewski
2025-04-16 12:13   ` Jiri Pirko
2025-04-17  9:33     ` Kubalewski, Arkadiusz
2025-04-17  9:56       ` Jiri Pirko
2025-04-17  2:09   ` Jakub Kicinski
2025-04-17  9:34     ` Kubalewski, Arkadiusz
2025-04-15 18:15 ` [PATCH net-next v2 2/4] dpll: add features and capabilities to dpll device spec Arkadiusz Kubalewski
2025-04-15 18:15 ` [PATCH net-next v2 3/4] dpll: features_get/set callbacks Arkadiusz Kubalewski
2025-04-16 12:10   ` Jiri Pirko
2025-04-17  9:23     ` Kubalewski, Arkadiusz
2025-04-17  9:59       ` Jiri Pirko
2025-05-08 12:30         ` Kubalewski, Arkadiusz
2025-04-15 18:15 ` [PATCH net-next v2 4/4] ice: add phase offset monitor for all PPS dpll inputs Arkadiusz Kubalewski

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).