Skip to content

net: ptp: use common defines for PTP message types in further drivers

Christian Eggers lkml netdev 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesApplied
  2. v13 patches 9 repliesSuperseded

Changes in v2 from the cover letter

----------------
- resend, as v1 was sent before the prerequisites were merged
- removed mismatch between From: and Signed-off-by:
- [2/3] Reviewed-by: Ido Schimmel <[email protected]>
- [3/3] Reviewed-by: Antoine Tenart <[email protected]>
- [3/3] removed dead email addresses from Cc:

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3net: phy: dp83640: use new PTP_MSGTYPE_SYNC definedrivers/net/phy/dp83640.c+1 -41 reply
2/3mlxsw: spectrum_ptp: use PTP wide message type definitionsdrivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h+4 -110 replies
3/3net: phy: mscc: use new PTP_MSGTYPE_* definesdrivers/net/phy/mscc/mscc_ptp.c drivers/net/phy/mscc/mscc_ptp.h+7 -120 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIdo SchimmelAntoine TenartKurt KanzenbachRichard Cochran
SeriesA-b
1/3R-b
2/3R-b
3/3R-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 4 reviewers.

Read the v2 thread

Cover letter [PATCH net-next v2 0/3] net: ptp: use common defines for PTP message types in further drivers

Changes in v2:
----------------
- resend, as v1 was sent before the prerequisites were merged
- removed mismatch between From: and Signed-off-by:
- [2/3] Reviewed-by: Ido Schimmel <[email protected]>
- [3/3] Reviewed-by: Antoine Tenart <[email protected]>
- [3/3] removed dead email addresses from Cc:

This series replaces further driver internal enumeration / uses of magic numbers with the newly introduced PTP_MSGTYPE_* defines.

Quoted 12 lines · Vladimir Oltean
Quoted 4 lines · Christian Eggers

This series introduces commen defines for PTP event messages. Driver internal defines are removed and some uses of magic numbers are replaced by the new defines.
[...]

I understand that you don't want to spend a lifetime on this, but I see that there are more drivers which you did not touch.

is_sync() in drivers/net/phy/dp83640.c can be made to

	return ptp_get_msgtype(hdr, type) == PTP_MSGTYPE_SYNC;
Quoted 7 lines

this can be removed from drivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.h:
enum {
MLXSW_SP_PTP_MESSAGE_TYPE_SYNC, MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ, MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ, MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP,
};

I think that I have found an addtional one in the Microsemi VSC85xx PHY driver.