Skip to content

ptp: Add generic helper functions

Kurt Kanzenbach netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest9 patches 6 repliesIn review
  2. v39 patches 34 repliesSuperseded
  3. v29 patches 13 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches7 repliesSuperseded

Changes since v2 from the cover letter

* Make ptp_parse_header() work in all scenarios (Russell King)
* Fix msgtype offset for ptp v1 packets

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9ptp: Add generic ptp v2 header parsing functioninclude/linux/ptp_classify.h net/core/ptp_classifier.c+74 -01 reply
2/9ptp: Add generic ptp message type functioninclude/linux/ptp_classify.h+25 -02 replies
3/9net: dsa: mv88e6xxx: Use generic helper functiondrivers/net/dsa/mv88e6xxx/hwtstamp.c+13 -462 replies
4/9mlxsw: spectrum_ptp: Use generic helper functiondrivers/net/ethernet/mellanox/mlxsw/spectrum_ptp.c+7 -250 replies
5/9ethernet: ti: am65-cpts: Use generic helper functiondrivers/net/ethernet/ti/am65-cpts.c+9 -280 replies
6/9ethernet: ti: cpts: Use generic helper functiondrivers/net/ethernet/ti/cpts.c+14 -280 replies
7/9net: phy: dp83640: Use generic helper functiondrivers/net/phy/dp83640.c+16 -540 replies
8/9ptp: ptp_ines: Use generic helper functiondrivers/ptp/ptp_ines.c+25 -630 replies
9/9ptp: Remove unused macroinclude/linux/ptp_classify.h+0 -10 replies

Reviews trailers per patch

7 of 9 patches have a Reviewed-by or Acked-by.

PatchRichard CochranFlorian FainelliPetr MachataRussell King
1/9R-b R-b R-b
2/9R-b R-b
3/9T-b R-b
4/9R-b Reviewed-and-tested-by
5/9
6/9
7/9T-b R-b
8/9R-b
9/9R-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 v4 thread

Cover letter [PATCH v4 0/9] ptp: Add generic helper functions

Hi!

in order to reduce code duplication (and cut'n'paste errors) in the ptp code of DSA, Ethernet and Phy drivers, create helper functions and move them to ptp_classify. This way all drivers can share the same implementation.

This is version four and contains bugfixes. Implemented as discussed [1] [2]
[3] [4].

Previous versions can be found here:

* https://lkml.kernel.org/netdev/[email protected]/
* https://lkml.kernel.org/netdev/[email protected]/
* https://lkml.kernel.org/netdev/[email protected]/

Thanks,
Kurt

Changes sinve v3:

* Coding style issues (Richard Cochran, Petr Machata)
* Add better documentation (Grygorii Strashko)
* Fix cpts code (Grygorii Strashko)
* Use ntohs() for TI code (Grygorii Strashko)
* Add tags

Changes since v2:

* Make ptp_parse_header() work in all scenarios (Russell King)
* Fix msgtype offset for ptp v1 packets

Changes since v1:

* Fix Kconfig (Richard Cochran)
* Include more drivers (Richard Cochran)

[1] - https://lkml.kernel.org/netdev/20200713140112.GB27934@hoboy/
[2] - https://lkml.kernel.org/netdev/20200720142146.GB16001@hoboy/
[3] - https://lkml.kernel.org/netdev/[email protected]/
[4] - https://lkml.kernel.org/netdev/[email protected]/

Kurt Kanzenbach (9):
ptp: Add generic ptp v2 header parsing function
ptp: Add generic ptp message type function
net: dsa: mv88e6xxx: Use generic helper function
mlxsw: spectrum_ptp: Use generic helper function
ethernet: ti: am65-cpts: Use generic helper function
ethernet: ti: cpts: Use generic helper function
net: phy: dp83640: Use generic helper function
ptp: ptp_ines: Use generic helper function
ptp: Remove unused macro

 drivers/net/dsa/mv88e6xxx/hwtstamp.c          | 59 +++----------
 .../ethernet/mellanox/mlxsw/spectrum_ptp.c    | 32 ++-----
 drivers/net/ethernet/ti/am65-cpts.c           | 37 ++------
 drivers/net/ethernet/ti/cpts.c                | 42 +++------
 drivers/net/phy/dp83640.c                     | 70 ++++-----------
 drivers/ptp/ptp_ines.c                        | 88 ++++++-------------
 include/linux/ptp_classify.h                  | 70 ++++++++++++++-
 net/core/ptp_classifier.c                     | 30 +++++++
 8 files changed, 183 insertions(+), 245 deletions(-)
Signature · 1 line
2.20.1