Skip to content

mlxsw: Enable/disable PTP shapers

Ido Schimmel netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8mlxsw: reg: Add ptps field in QoS ETS Element Configuration Registerdrivers/net/ethernet/mellanox/mlxsw/reg.h+22 -00 replies
2/8mlxsw: spectrum: Add note about the PTP shaperdrivers/net/ethernet/mellanox/mlxsw/spectrum.c+3 -20 replies
3/8mlxsw: reg: Add QoS PTP Shaper Configuration Registerdrivers/net/ethernet/mellanox/mlxsw/reg.h+107 -00 replies
4/8mlxsw: spectrum_ptp: Set the PTP shaper parametersdrivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c+45 -00 replies
5/8mlxsw: spectrum: Add new operation for getting the port's speeddrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h+41 -280 replies
6/8mlxsw: spectrum_ptp: Enable/disable PTP shaper on a port when getting HWTSTAMP on/offdrivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c+52 -00 replies
7/8mlxsw: spectrum: Set up PTP shaper when port status has changeddrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c +1 more+36 -00 replies
8/8mlxsw: spectrum_ptp: Apply the PTP shaper enable/disable logicdrivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c+44 -00 replies

Reviews trailers per patch

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

PatchJiri PirkoPetr Machata
1/8A-b R-b
2/8A-b R-b
3/8A-b R-b
4/8A-b R-b
5/8A-b R-b
6/8A-b R-b
7/8A-b R-b
8/8A-b R-b

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

Read the v1 thread

Cover letter [PATCH net-next 0/8] mlxsw: Enable/disable PTP shapers

From: Ido Schimmel <[email protected]>

Shalom says:

In order to get more accurate hardware time stamping in Spectrum-1, the driver needs to apply a shaper on the port for speeds lower than 40Gbps. This shaper is called a PTP shaper and it is applied on hierarchy 0, which is the port hierarchy. This shaper may affect the shaper rates of all hierarchies.

This patchset adds the ability to enable or disable the PTP shaper on the port in two scenarios:
1. When the user wants to enable/disable the hardware time stamping
2. When the port is brought up or down (including port speed change)

Patch #1 adds the QEEC.ptps field that is used for enabling or disabling the PTP shaper on a port.

Patch #2 adds a note about disabling the PTP shaper when calling to mlxsw_sp_port_ets_maxrate_set().

Patch #3 adds the QPSC register that is responsible for configuring the PTP shaper parameters per speed.

Patch #4 sets the PTP shaper parameters during the ptp_init().

Patch #5 adds new operation for getting the port's speed.

Patch #6 enables/disables the PTP shaper when turning on or off the hardware time stamping.

Patch #7 enables/disables the PTP shaper when the port's status has changed (including port speed change).

Patch #8 applies the PTP shaper enable/disable logic by filling the PTP shaper parameters array.

Shalom Toledo (8):
mlxsw: reg: Add ptps field in QoS ETS Element Configuration Register
mlxsw: spectrum: Add note about the PTP shaper
mlxsw: reg: Add QoS PTP Shaper Configuration Register
mlxsw: spectrum_ptp: Set the PTP shaper parameters
mlxsw: spectrum: Add new operation for getting the port's speed
mlxsw: spectrum_ptp: Enable/disable PTP shaper on a port when getting
HWTSTAMP on/off
mlxsw: spectrum: Set up PTP shaper when port status has changed
mlxsw: spectrum_ptp: Apply the PTP shaper enable/disable logic

 drivers/net/ethernet/mellanox/mlxsw/reg.h     | 129 ++++++++++++++
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  81 +++++----
 .../net/ethernet/mellanox/mlxsw/spectrum.h    |   2 +
 .../ethernet/mellanox/mlxsw/spectrum_ptp.c    | 158 ++++++++++++++++++
 .../ethernet/mellanox/mlxsw/spectrum_ptp.h    |  10 ++
 5 files changed, 350 insertions(+), 30 deletions(-)
Signature · 1 line
2.20.1