Skip to content

ice: lighter locking for PTP time reading

Michal Schmidt intel-wired-lan netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 6 repliesIn review
  2. v33 patches 6 repliesSuperseded
  3. v23 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches11 repliesSuperseded

Changes in v4 from the cover letter

- Patch 1: Use named GENMASK macros and FIELD_PREP.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ice: add ice_adapter for shared data across PFs on the same NICdrivers/net/ethernet/intel/ice/Makefile drivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_adapter.c +2 more+148 -11 reply
2/3ice: avoid the PTP hardware semaphore in gettimex64 pathdrivers/net/ethernet/intel/ice/ice_adapter.c drivers/net/ethernet/intel/ice/ice_adapter.h drivers/net/ethernet/intel/ice/ice_ptp.c +1 more+12 -71 reply
3/3ice: fold ice_ptp_read_time into ice_ptp_gettimex64drivers/net/ethernet/intel/ice/ice_ptp.c+3 -223 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.

PatchPrzemek KitszelJacob KellerIvan VeceraSai KrishnaPucha Himasekhar ReddyKalesh AP
SeriesR-b
1/3R-b T-b
2/3R-b R-b T-b
3/3R-b R-b T-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 6 reviewers.

Read the v4 thread

Cover letter [PATCH net-next v4 0/3] ice: lighter locking for PTP time reading

This series removes the use of the heavy-weight PTP hardware semaphore in the gettimex64 path. Instead, serialization of access to the time register is done using a host-side spinlock. The timer hardware is shared between PFs on the PCI adapter, so the spinlock must be shared between ice_pf instances too.

Replacing the PTP hardware semaphore entirely with a mutex is also possible and you can see it done in my git branch[1], but I am not posting those patches yet to keep the scope of this series limited.

[1] https://gitlab.com/mschmidt2/linux/-/commits/ice-ptp-host-side-lock-10

v4:
- Patch 1: Use named GENMASK macros and FIELD_PREP.

v3:
- Longer variable name ("a" -> "adapter").
- Propagate xarray error in ice_adapter_get with ERR_PTR.
- Added kernel-doc comments for ice_adapter_{get,put}.

v2:
- Patch 1: Rely on xarray's own lock. (Suggested by Jiri Pirko)
- Patch 2: Do not use *_irqsave with ptp_gltsyn_time_lock, as it's used only in process contexts.

Michal Schmidt (3):
ice: add ice_adapter for shared data across PFs on the same NIC
ice: avoid the PTP hardware semaphore in gettimex64 path
ice: fold ice_ptp_read_time into ice_ptp_gettimex64

 drivers/net/ethernet/intel/ice/Makefile      |   3 +-
 drivers/net/ethernet/intel/ice/ice.h         |   2 +
 drivers/net/ethernet/intel/ice/ice_adapter.c | 116 +++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_adapter.h |  28 +++++
 drivers/net/ethernet/intel/ice/ice_main.c    |   8 ++
 drivers/net/ethernet/intel/ice/ice_ptp.c     |  33 +-----
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c  |   3 +
 7 files changed, 163 insertions(+), 30 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/ice/ice_adapter.c
 create mode 100644 drivers/net/ethernet/intel/ice/ice_adapter.h
Signature · 1 line
2.43.2