Skip to content

Rework usage of the control PF pointer in struct ice_adapter

Sergey Temerkhanov intel-wired-lan 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest posting 2/27 patches 5 repliesIn review
  2. v6 posting 1/27 patches 0 repliesSuperseded
  3. v58 patches 1 replySuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v43 patches2 repliesSuperseded
v33 patches3 repliesSuperseded
v2 posting 2/23 patches1 replySuperseded
v2 posting 1/23 patches0 repliesSuperseded
v13 patches6 repliesSuperseded

Patches in v6 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7ice: Protect the control PF pointer with RCU and a rwsemdrivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_adapter.c drivers/net/ethernet/intel/ice/ice_adapter.h +3 more+119 -371 reply
2/7ice: Cache struct ice_hw pointer for split register readsdrivers/net/ethernet/intel/ice/ice_ptp_hw.c+13 -40 replies
3/7ice: Reject PTP access without a control PFdrivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_ptp.c drivers/net/ethernet/intel/ice/ice_ptp.h +2 more+98 -361 reply
4/7ice: Clear the control PF pointer when the control PF is removeddrivers/net/ethernet/intel/ice/ice_ptp.c+22 -10 replies
5/7ice: Document control PF lock orderingdrivers/net/ethernet/intel/ice/ice_dpll.h+15 -31 reply
6/7ice: Annotate PTP control PF lock handoffdrivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_ptp_hw.c drivers/net/ethernet/intel/ice/ice_ptp_hw.h+32 -121 reply
7/7ice: Release control PF lock before RCU waitdrivers/net/ethernet/intel/ice/ice_ptp.c+13 -81 reply

Reviews trailers per patch

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

PatchArkadiusz KubalewskiAleksandr LoktionovFrederick LawlerPrzemyslaw KorbaAlexander Nowlin
1/7R-b R-b T-b
2/7R-b R-b T-b
3/7R-b T-b
4/7R-b R-b T-b
5/7R-b T-b
6/7R-b T-b
7/7R-b T-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 5 reviewers.

Read the v6 thread

Cover letter [PATCH RESEND iwl-net v6 0/7] Rework usage of the control PF pointer in struct ice_adapter

Rework usage of the control PF pointer in struct ice_adapter, so that it is always has a consistent state, since it is global for an adapter. Utilize RCU for reading the pointer value and atomic operations for changing it. Zero out the ctrl_pf pointer when the control PF is removed.

Previous version:
https://lore.kernel.org/intel-wired-lan/[email protected]/

v1->v2: Rebase onto the latest dev-queue branch
v2->v3: Cosmetic fixes
v3->v4: Add the rw_semaphore to protect the ctrl_pf
v4->v5: Split patches into smaller self-contained parts, tighten potential race
condition windows, annotate RCU-related code
v5->v6: Rebase on top of the latest dev-queue, remove absorbed changes

Sergey Temerkhanov (7):
ice: Protect the control PF pointer with RCU and a rwsem
ice: Cache struct ice_hw pointer for split register reads
ice: Reject PTP access without a control PF
ice: Clear the control PF pointer when the control PF is removed
ice: Document control PF lock ordering
ice: Annotate PTP control PF lock handoff
ice: Release control PF lock before RCU wait

 drivers/net/ethernet/intel/ice/ice.h          |  42 +++-
 drivers/net/ethernet/intel/ice/ice_adapter.c  |   1 +
 drivers/net/ethernet/intel/ice/ice_adapter.h  |   5 +-
 drivers/net/ethernet/intel/ice/ice_dpll.h     |  18 +-
 drivers/net/ethernet/intel/ice/ice_ptp.c      | 189 +++++++++++++-----
 drivers/net/ethernet/intel/ice/ice_ptp.h      |  11 +-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c   |  78 +++++++-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h   |   6 +-
 drivers/net/ethernet/intel/ice/ice_txclk.c    |  20 +-
 .../net/ethernet/intel/ice/virt/virtchnl.c    |   5 +-
 10 files changed, 293 insertions(+), 82 deletions(-)

base-commit: d2e3fa79cfab4d5c5715d6503a77c8648ef3c76c

Signature · 1 line
2.53.0