Add DPLL and syncE support

Bug #2053155 reported by William Tu
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-bluefield (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Fix Committed
Undecided
Unassigned

Bug Description

* intro
Synchronous Ethernet, or SyncE, is an ITU-T standard for computer networking that facilitates the transference of clock signals over the Ethernet physical layer. It is used to pass timing from node to node and is particularly important for mobile networks.

The DPLL subsystem in the Linux kernel provides a general interface for configuring devices that use any kind of Digital PLL. This subsystem is designed to manage the clock signal synchronization of a device with an external clock signal.

* Explain the bug(s)

We need to support mlx5 SyncE feature. The following patches are needed.
[net-next,v8,0/9] Create common DPLL configuration API
[net-next,v8,1/9] dpll: documentation on DPLL subsystem interface
[net-next,v8,2/9] dpll: spec: Add Netlink spec in YAML
[net-next,v8,3/9] dpll: core: Add DPLL framework base functions
[net-next,v8,4/9] dpll: netlink: Add DPLL framework base functions
[net-next,v8,5/9] netdev: expose DPLL pin handle for netdevice
[net-next,v8,6/9] ice: add admin commands to access cgu configuration
[net-next,v8,7/9] ice: implement dpll interface to control cgu
[net-next,v8,8/9] ptp_ocp: implement DPLL ops
[net-next,v8,9/9] mlx5: Implement SyncE support using DPLL infrastructure
https://<email address hidden>/

* Brief explanation of fixes

We identify several dependent patches, especially related to netlink gap between current master-next.
We cherry-pick/backport series of patches related to netlink.

* How to test
$ sudo ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml \
--dump device-get
ex:
root@bfqa-dell013-roy-oob:~/mlnx-ofa_kernel-4.0# /root/tools-net/ynl/cli.py --spec ~/netlink/specs/dpll.yaml --dump device-get
[{'clock-id': 5237736944144095348,
  'id': 0,
  'lock-status': 'unlocked',
  'mode': 'manual',
  'mode-supported': ['manual'],
  'module-name': 'mlx5_core',
  'type': 'eec'}]

$ sudo ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml \
--do pin-get
ex:
root@bfqa-dell013-roy-oob:~# /root/tools-net/ynl/cli.py --spec ~/netlink/specs/dpll.yaml --dump pin-get
[{'capabilities': 4,
  'clock-id': 5237736944144095348,
  'id': 0,
  'module-name': 'mlx5_core',
  'parent-device': [{'direction': 'input',
                     'parent-id': 0,
                     'state': 'disconnected'}],
  'phase-adjust-max': 0,
  'phase-adjust-min': 0,
  'type': 'synce-eth-port'},
 {'capabilities': 4,
  'clock-id': 5237736944144095348,
  'id': 1,
  'module-name': 'mlx5_core',
  'parent-device': [{'direction': 'input',
                     'parent-id': 0,
                     'state': 'disconnected'}],
  'phase-adjust-max': 0,
  'phase-adjust-min': 0,
  'type': 'synce-eth-port'}]

* detect whether your device supports DPLL/SyncE
root@bfqa-dell013-roy-oob:~/linux-bluefield-jammy# mlxreg -d 03:00.0 --reg_name MCAM --get -i "access_reg_group=2,feature_group=0"
Field Name | Data
===========================================
access_reg_group | 0x00000002
feature_group | 0x00000000
mng_access_reg_cap_mask[0] | 0x00000004
mng_access_reg_cap_mask[1] | 0x00600000 --> must see 6

OR,
$ mlxfwmanager
showing “Enhanced-SyncE & PTP GM support”,

* list of patches applied to 5.15 jammy
based on
911f816f4c04 mlxbf_gige: fix receive packet race condition

we applied the following
83a11d94c436 UBUNTU: SAUCE: fix build error after resv_start_op
036b2fecd315 genetlink: allow families to use split ops directly
9f40a82f73ea genetlink: inline old iteration helpers
d8ae137b98fc genetlink: use iterator in the op to policy map dumping
095792a3a723 genetlink: add iterator for walking family ops
764747ba0085 genetlink: limit the use of validation workarounds to old ops
35b95f016392 genetlink: inline genl_get_cmd()
c448680485e6 genetlink: support split policies in ctrl_dumppolicy_put_op()
a17efffb8ce8 genetlink: add policies for both doit and dumpit in ctrl_dumppolicy_start()
82af441de2fa genetlink: check for callback type at op load time
dc17c9675d6d genetlink: load policy based on validation flags
d867b1e130d3 genetlink: move the private fields in struct genl_family
b515a3664ef5 genetlink: piggy back on resv_op to default to a reject policy
1fa6e0ec60a4 genetlink: refactor the cmd <> policy mapping dump
c8ba54011c1d netlink: add helpers for extack attr presence checking
3d9c79882136 netlink: add support for ext_ack missing attributes
a0edd1e6e99c netlink: factor out extack composition
181e77073d7c genetlink: introduce split op representation
58077e5acc95 genetlink: reject use of nlmsg_flags for new commands
199935182e01 genetlink: start to validate reserved header bytes
137d6fb11693 kernel: make taskstats available from all net namespaces
75acbd978295 genetlink: fix kdoc warnings
05670bbfb561 dpll: remove leftover mode_supported() op and use mode_get() instead
e878653f5370 dpll: netlink/core: change pin frequency set behavior
d483a8e43651 dpll: netlink/core: add support for pin-dpll signal phase offset/adjust
71574fa963d0 dpll: spec: add support for pin-dpll signal phase offset/adjust
2b004af8572d netlink: specs: remove redundant type keys from attributes in subsets
473b6cb3696f dpll: docs: add support for pin signal phase offset/adjust
015ea1e2fbda Documentation: dpll: wrap DPLL_CMD_PIN_GET output in a code block
5167a94e40e1 Documentation: dpll: Fix code blocks
16ab1010e92d netdev: expose DPLL pin handle for netdevice
aa78df66e66b dpll: netlink: Add DPLL framework base functions
d0eafb969ef9 dpll: core: Add DPLL framework base functions
8bb4159242d6 dpll: spec: Add Netlink spec in YAML
3dbcbef38d8e dpll: documentation on DPLL subsystem interface

Changed in linux-bluefield (Ubuntu):
status: New → Invalid
William Tu (wtu)
description: updated
William Tu (wtu)
description: updated
Changed in linux-bluefield (Ubuntu Jammy):
status: New → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-bluefield/5.15.0-1039.41 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy-linux-bluefield' to 'verification-done-jammy-linux-bluefield'. If the problem still exists, change the tag 'verification-needed-jammy-linux-bluefield' to 'verification-failed-jammy-linux-bluefield'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-bluefield-v2 verification-needed-jammy-linux-bluefield
Tony Duan (yifeid)
tags: added: verification-done-jammy-linux-bluefield
removed: verification-needed-jammy-linux-bluefield
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.