Skip to content

intel: ptp: convert .adjfreq to .adjfine

Jacob Keller intel-wired-lan 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ice: implement adjfine with mul_u64_u64_div_u64drivers/net/ethernet/intel/ice/ice_ptp.c+3 -131 reply
2/7e1000e: remove unnecessary range check in e1000e_phc_adjfreqdrivers/net/ethernet/intel/e1000e/ptp.c+0 -31 reply
3/7e1000e: convert .adjfreq to .adjfinedrivers/net/ethernet/intel/e1000e/e1000.h drivers/net/ethernet/intel/e1000e/netdev.c drivers/net/ethernet/intel/e1000e/ptp.c+11 -101 reply
4/7i40e: use mul_u64_u64_div_u64 for PTP frequency calculationdrivers/net/ethernet/intel/i40e/i40e_ptp.c+4 -131 reply
5/7i40e: convert .adjfreq to .adjfinedrivers/net/ethernet/intel/i40e/i40e_ptp.c+12 -101 reply
6/7ixgbe: convert .adjfreq to .adjfinedrivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c+40 -331 reply
7/7igb: convert .adjfreq to .adjfinedrivers/net/ethernet/intel/igb/igb_ptp.c+7 -81 reply

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by.

PatchNaama MeirGurucharan
1/7T-b
2/7T-b
3/7T-b
4/7T-b
5/7T-b
6/7T-b
7/7T-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 [Intel-wired-lan] [net-next PATCH 0/7] intel: ptp: convert .adjfreq to .adjfine

Convert all of the Intel drivers with PTP support to the newer .adjfine implementation which uses scaled parts per million.

This improves the precision of the frequency adjustments by taking advantage of the full scaled parts per million input coming from user space.

In addition, all implementations are converted to using the mul_u64_u64_div_u64 function which better handles the intermediate value. This function supports architecture specific instructions where possible to avoid loss of precision if the normal 64-bit multiplication would overflow.

Of note, the i40e implementation is now able to avoid loss of precision on slower link speeds by taking advantage of this to multiply by the link speed factor first. This results in a significantly more precise adjustment by allowing the calculation to impact the lower bits.

This also gets us a step closer to being able to remove the .adjfreq entirely by removing its use from many drivers.

I plan to follow this up with a series to update the drivers from other vendors and drop the .adjfreq implementation entirely.

Jacob Keller (7):
ice: implement adjfine with mul_u64_u64_div_u64
e1000e: remove unnecessary range check in e1000e_phc_adjfreq
e1000e: convert .adjfreq to .adjfine
i40e: use mul_u64_u64_div_u64 for PTP frequency calculation
i40e: convert .adjfreq to .adjfine
ixgbe: convert .adjfreq to .adjfine
igb: convert .adjfreq to .adjfine

 drivers/net/ethernet/intel/e1000e/e1000.h    |  2 +-
 drivers/net/ethernet/intel/e1000e/netdev.c   |  4 +-
 drivers/net/ethernet/intel/e1000e/ptp.c      | 18 +++--
 drivers/net/ethernet/intel/i40e/i40e_ptp.c   | 35 ++++------
 drivers/net/ethernet/intel/ice/ice_ptp.c     | 16 +----
 drivers/net/ethernet/intel/igb/igb_ptp.c     | 15 ++--
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 73 +++++++++++---------
 7 files changed, 75 insertions(+), 88 deletions(-)

base-commit: 9f055d4106bdefd5a533316c1d3dc3b5e9821b9a

Signature · 6 lines
2.35.1.456.ga9c7032d4631

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan