Skip to content

Support one PTP device per hardware clock

Tariq Toukan netdev 1 version 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

  1. v1 Latest15 patches 9 repliesApplied 15/15

Patches in v1 All 15 applied

#Subject and filesSizeRepliesApplied
1/15net/mlx5: Add helper functions for PTP callbacksdrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c+22 -102 repliesApplied
2/15net/mlx5: Change parameters for PTP internal functionsdrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c+8 -112 repliesApplied
3/15net/mlx5: Add init and destruction functions for a single HW clockdrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c+31 -170 repliesApplied
4/15net/mlx5: Add API to get mlx5_core_dev from mlx5_clockdrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c+18 -170 repliesApplied
5/15net/mlx5: Change clock in mlx5_core_dev to mlx5_clock pointerdrivers/net/ethernet/mellanox/mlx5/core/en/ptp.c drivers/net/ethernet/mellanox/mlx5/core/en/trap.c drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c +6 more+116 -640 repliesApplied
6/15net/mlx5: Add devcom component for the clock shared by functionsdrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c drivers/net/ethernet/mellanox/mlx5/core/lib/devcom.h include/linux/mlx5/driver.h+61 -10 repliesApplied
7/15net/mlx5: Move PPS notifier and out_work to clock_statedrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h+18 -210 repliesApplied
8/15net/mlx5: Support one PTP device per hardware clockdrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h+203 -480 repliesApplied
9/15net/mlx5: Generate PPS IN event on new function for shared clockdrivers/net/ethernet/mellanox/mlx5/core/lib/clock.c drivers/net/ethernet/mellanox/mlx5/core/lib/clock.h drivers/net/ethernet/mellanox/mlx5/core/main.c+99 -70 repliesApplied
10/15ethtool: Add support for 200Gbps per lane link modesdrivers/net/phy/phy-core.c include/uapi/linux/ethtool.h net/ethtool/common.c+79 -10 repliesApplied
11/15net/mlx5: Add support for 200Gbps per lane link modesdrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c drivers/net/ethernet/mellanox/mlx5/core/port.c include/linux/mlx5/port.h+27 -00 repliesApplied
12/15net/mlx5e: Support FEC settings for 200G per lane link modesdrivers/net/ethernet/mellanox/mlx5/core/en/port.c drivers/net/ethernet/mellanox/mlx5/core/en/port.h drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c+56 -100 repliesApplied
13/15net/mlx5: Remove stray semicolon in LAG port selection table creationdrivers/net/ethernet/mellanox/mlx5/core/lag/port_sel.c+1 -11 replyApplied
14/15net/mlx5e: Remove unused mlx5e_tc_flow_action structdrivers/net/ethernet/mellanox/mlx5/core/en/tc/act/act.h+0 -51 replyApplied
15/15net/mlx5e: Avoid WARN_ON when configuring MQPRIO with HTB offload enableddrivers/net/ethernet/mellanox/mlx5/core/en_main.c+5 -21 replyApplied

Reviews trailers per patch

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

PatchCarolina JubranDragos TatuleaShahar ShitritCosmin RatiuYael ChemlaKalesh APMateusz Polchlopek
1/15R-b R-b R-b
2/15R-b R-b
3/15R-b R-b
4/15R-b R-b
5/15R-b R-b
6/15R-b R-b
7/15R-b R-b
8/15R-b R-b
9/15R-b R-b
10/15R-b
11/15R-b
12/15R-b
13/15R-b
14/15R-b R-b
15/15R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 00/15] Support one PTP device per hardware clock

Hi,

This series contains two features from Jianbo, followed by simple cleanups.

Patches 1-9 by Jianbo add support for one PTP device per hardware clock, described below [1].

Patches 10-12 by Jianbo add support for 200Gbps per-lane link modes in kernel and mlx5 driver.

Patches 13-15 are simple cleanups by Gal and Carolina.

Regards,
Tariq

[1]
PHC (PTP hardware clock) is normally shared by multiple functions (PF/VF/SF). mlx5 driver currently creates a separate PTP device for each network interface that shares one PHC.

PHC can be configured to work as free running mode or real time mode. In this series, only one PTP device is created for the shared PHC when it is running in real time mode.

To support this feature,
* Firmware needs to support clock identity. When functions share a PHC, the clock identities they query are same.
* Driver dynamically allocates mlx5_clock to represent a PHC.
* New devcom component is added for hardware clock. Functions are grouped by the identity, and one mlx5_clock is allocated and shared by the functions with the same identity.
* When PTP device accesses PHC by its callbacks, the first function in the clock devcom list is selected to send commands to firmware.
* PPS IN event is armed on one function. It should be re-armed on the other one when current is unloaded.

Carolina Jubran (1):
net/mlx5e: Avoid WARN_ON when configuring MQPRIO with HTB offload
enabled

Gal Pressman (2):
net/mlx5: Remove stray semicolon in LAG port selection table creation net/mlx5e: Remove unused mlx5e_tc_flow_action struct

Jianbo Liu (12):
net/mlx5: Add helper functions for PTP callbacks net/mlx5: Change parameters for PTP internal functions net/mlx5: Add init and destruction functions for a single HW clock net/mlx5: Add API to get mlx5_core_dev from mlx5_clock net/mlx5: Change clock in mlx5_core_dev to mlx5_clock pointer net/mlx5: Add devcom component for the clock shared by functions net/mlx5: Move PPS notifier and out_work to clock_state net/mlx5: Support one PTP device per hardware clock net/mlx5: Generate PPS IN event on new function for shared clock
ethtool: Add support for 200Gbps per lane link modes net/mlx5: Add support for 200Gbps per lane link modes net/mlx5e: Support FEC settings for 200G per lane link modes

 .../net/ethernet/mellanox/mlx5/core/en/port.c |  64 +-
 .../net/ethernet/mellanox/mlx5/core/en/port.h |   1 +
 .../net/ethernet/mellanox/mlx5/core/en/ptp.c  |   4 +-
 .../mellanox/mlx5/core/en/tc/act/act.h        |   5 -
 .../net/ethernet/mellanox/mlx5/core/en/trap.c |   2 +-
 .../net/ethernet/mellanox/mlx5/core/en/xdp.c  |   4 +-
 .../mellanox/mlx5/core/en/xsk/setup.c         |   2 +-
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |  22 +
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  11 +-
 .../mellanox/mlx5/core/lag/port_sel.c         |   2 +-
 .../ethernet/mellanox/mlx5/core/lib/clock.c   | 582 ++++++++++++++----
 .../ethernet/mellanox/mlx5/core/lib/clock.h   |  39 +-
 .../ethernet/mellanox/mlx5/core/lib/devcom.h  |   1 +
 .../net/ethernet/mellanox/mlx5/core/main.c    |  15 +-
 .../net/ethernet/mellanox/mlx5/core/port.c    |   3 +
 drivers/net/phy/phy-core.c                    |  20 +-
 include/linux/mlx5/driver.h                   |  33 +-
 include/linux/mlx5/port.h                     |   3 +
 include/uapi/linux/ethtool.h                  |  18 +
 net/ethtool/common.c                          |  42 ++
 20 files changed, 701 insertions(+), 172 deletions(-)

base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b

Signature · 1 line
2.45.0