netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5][pull request] ice: Improve miscellaneous interrupt code
@ 2023-06-08 20:21 Tony Nguyen
  2023-06-08 20:21 ` [PATCH net-next 1/5] ice: handle extts in the miscellaneous interrupt thread Tony Nguyen
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Tony Nguyen @ 2023-06-08 20:21 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, netdev
  Cc: Tony Nguyen, jacob.e.keller, richardcochran

Jacob Keller says:

This series improves the driver's use of the threaded IRQ and the
communication between ice_misc_intr() and the ice_misc_intr_thread_fn()
which was previously introduced by commit 1229b33973c7 ("ice: Add low
latency Tx timestamp read").

First, a new custom enumerated return value is used instead of a boolean for
ice_ptp_process_ts(). This significantly reduces the cognitive burden when
reviewing the logic for this function, as the expected action is clear from
the return value name.

Second, the unconditional loop in ice_misc_intr_thread_fn() is removed,
replacing it with a write to the Other Interrupt Cause register. This causes
the MAC to trigger the Tx timestamp interrupt again. This makes it possible
to safely use the ice_misc_intr_thread_fn() to handle other tasks beyond
just the Tx timestamps. It is also easier to reason about since the thread
function will exit cleanly if we do something like disable the interrupt and
call synchronize_irq().

Third, refactor the handling for external timestamp events to use the
miscellaneous thread function. This resolves an issue with the external
time stamps getting blocked while processing the periodic work function
task.

Fourth, a simplification of the ice_misc_intr() function to always return
IRQ_WAKE_THREAD, and schedule the ice service task in the
ice_misc_intr_thread_fn() instead.

Finally, the Other Interrupt Cause is kept disabled over the thread function
processing, rather than immediately re-enabled.

Special thanks to Michal Schmidt for the careful review of the series and
pointing out my misunderstandings of the kernel IRQ code. It has been
determined that the race outlined as being fixed in previous series was
actually introduced by this series itself, which I've since corrected.

The following are changes since commit bfd019d10fdabf70f9b01264aea6d6c7595f9226:
  Merge branch 'crypto-splice-net-make-af_alg-handle-sendmsg-msg_splice_pages'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE

Jacob Keller (3):
  ice: introduce ICE_TX_TSTAMP_WORK enumeration
  ice: trigger PFINT_OICR_TSYN_TX interrupt instead of polling
  ice: do not re-enable miscellaneous interrupt until thread_fn
    completes

Karol Kolacinski (2):
  ice: handle extts in the miscellaneous interrupt thread
  ice: always return IRQ_WAKE_THREAD in ice_misc_intr()

 drivers/net/ethernet/intel/ice/ice.h      |  7 +++
 drivers/net/ethernet/intel/ice/ice_main.c | 47 +++++++++++------
 drivers/net/ethernet/intel/ice/ice_ptp.c  | 62 ++++++++++++-----------
 drivers/net/ethernet/intel/ice/ice_ptp.h  | 16 ++++--
 4 files changed, 84 insertions(+), 48 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-12  8:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08 20:21 [PATCH net-next 0/5][pull request] ice: Improve miscellaneous interrupt code Tony Nguyen
2023-06-08 20:21 ` [PATCH net-next 1/5] ice: handle extts in the miscellaneous interrupt thread Tony Nguyen
2023-06-08 20:21 ` [PATCH net-next 2/5] ice: always return IRQ_WAKE_THREAD in ice_misc_intr() Tony Nguyen
2023-06-08 20:21 ` [PATCH net-next 3/5] ice: introduce ICE_TX_TSTAMP_WORK enumeration Tony Nguyen
2023-06-08 20:21 ` [PATCH net-next 4/5] ice: trigger PFINT_OICR_TSYN_TX interrupt instead of polling Tony Nguyen
2023-06-08 20:21 ` [PATCH net-next 5/5] ice: do not re-enable miscellaneous interrupt until thread_fn completes Tony Nguyen
2023-06-12  8:40 ` [PATCH net-next 0/5][pull request] ice: Improve miscellaneous interrupt code patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).