Skip to content

ptp cornercase cleanups

Jacob Keller intel-wired-lan 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest15 patches 0 repliesNew
  2. v35 patches 0 repliesSuperseded
  3. v25 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch0 repliesSuperseded

Changes in v4 from the cover letter

- Split the driver patches at request of Shannon Nelson
- Updated commit messages, but code content should be identical

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15e1000e: fix race condition around skb_tstamp_tx()drivers/net/ethernet/intel/e1000e/netdev.c+8 -21 reply
2/15i40e: fix race condition with PTP_TX_IN_PROGRESS bitsdrivers/net/ethernet/intel/i40e/i40e_ptp.c+11 -31 reply
3/15igb: fix race condition with PTP_TX_IN_PROGRESS bitsdrivers/net/ethernet/intel/igb/igb_ptp.c+10 -21 reply
4/15ixgbe: fix race condition with PTP_TX_IN_PROGRESS bitsdrivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c+12 -31 reply
5/15i40e: avoid permanent lock of *_PTP_TX_IN_PROGRESSdrivers/net/ethernet/intel/i40e/i40e_txrx.c+20 -61 reply
6/15igb: avoid permanent lock of *_PTP_TX_IN_PROGRESSdrivers/net/ethernet/intel/igb/igb_main.c+18 -51 reply
7/15ixgbe: avoid permanent lock of *_PTP_TX_IN_PROGRESSdrivers/net/ethernet/intel/ixgbe/ixgbe_main.c+15 -51 reply
8/15e1000e: add statistic indicating number of skipped Tx timestampsdrivers/net/ethernet/intel/e1000e/e1000.h drivers/net/ethernet/intel/e1000e/ethtool.c drivers/net/ethernet/intel/e1000e/netdev.c+12 -71 reply
9/15i40e: add statistic indicating number of skipped Tx timestampsdrivers/net/ethernet/intel/i40e/i40e.h drivers/net/ethernet/intel/i40e/i40e_ethtool.c drivers/net/ethernet/intel/i40e/i40e_txrx.c+3 -01 reply
10/15igb: add statistic indicating number of skipped Tx timestampsdrivers/net/ethernet/intel/igb/igb.h drivers/net/ethernet/intel/igb/igb_ethtool.c drivers/net/ethernet/intel/igb/igb_main.c+4 -01 reply
11/15ixgbe: add statistic indicating number of skipped Tx timestampsdrivers/net/ethernet/intel/ixgbe/ixgbe.h drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c drivers/net/ethernet/intel/ixgbe/ixgbe_main.c+16 -90 replies
12/15i40e: use pf data structure directly in i40e_ptp_rx_hangdrivers/net/ethernet/intel/i40e/i40e.h drivers/net/ethernet/intel/i40e/i40e_main.c drivers/net/ethernet/intel/i40e/i40e_ptp.c+4 -41 reply
13/15i40e: check for Tx timestamp timeouts during watchdogdrivers/net/ethernet/intel/i40e/i40e.h drivers/net/ethernet/intel/i40e/i40e_main.c drivers/net/ethernet/intel/i40e/i40e_ptp.c +1 more+34 -01 reply
14/15igb: check for Tx timestamp timeouts during watchdogdrivers/net/ethernet/intel/igb/igb.h drivers/net/ethernet/intel/igb/igb_main.c drivers/net/ethernet/intel/igb/igb_ptp.c+31 -01 reply
15/15ixgbe: check for Tx timestamp timeouts during watchdogdrivers/net/ethernet/intel/ixgbe/ixgbe.h drivers/net/ethernet/intel/ixgbe/ixgbe_main.c drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c+29 -01 reply

Reviews trailers per patch

None of the 15 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchShannon NelsonAndrew BowersAaron Brown
SeriesA-b
1/15T-b
2/15T-b
3/15T-b
4/15T-b
5/15T-b
6/15T-b
7/15T-b
8/15T-b
9/15T-b
10/15T-b
11/15
12/15T-b
13/15T-b
14/15T-b
15/15T-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 3 reviewers.

Read the v4 thread

Cover letter [Intel-wired-lan] [PATCH v4 00/15] ptp cornercase cleanups

This series contains fixes for similar corner cases in the e1000e, igb, i40e, and ixgbe drivers reported by David Mirabito on the ptp4l mailing list.

The first few patches fix a race condition with skb_tstamp_tx(). The next few patches ensure that we cleanup the state bit when exiting the _xmit_frame_ring() function with a DMA or TSO failure. After this, we add new statistic to count how many times the Tx timestamp is skipped due to already outstanding requests. The final few patches add some handling in the potential case where we somehow never finish a timestamp request, ensuring that we don't permanently lock the Tx timestamps forever in this rare case.

Changes in v4
- Split the driver patches at request of Shannon Nelson
- Updated commit messages, but code content should be identical

I apologize in advance, the patchworks will not track this properly because I necessarily changed the commit subjects when splitting the patches apart by driver.

Jacob Keller (15):
e1000e: fix race condition around skb_tstamp_tx()
i40e: fix race condition with PTP_TX_IN_PROGRESS bits
igb: fix race condition with PTP_TX_IN_PROGRESS bits
ixgbe: fix race condition with PTP_TX_IN_PROGRESS bits
i40e: avoid permanent lock of *_PTP_TX_IN_PROGRESS
igb: avoid permanent lock of *_PTP_TX_IN_PROGRESS
ixgbe: avoid permanent lock of *_PTP_TX_IN_PROGRESS
e1000e: add statistic indicating number of skipped Tx timestamps
i40e: add statistic indicating number of skipped Tx timestamps
igb: add statistic indicating number of skipped Tx timestamps
ixgbe: add statistic indicating number of skipped Tx timestamps
i40e: use pf data structure directly in i40e_ptp_rx_hang
i40e: check for Tx timestamp timeouts during watchdog
igb: check for Tx timestamp timeouts during watchdog
ixgbe: check for Tx timestamp timeouts during watchdog

 drivers/net/ethernet/intel/e1000e/e1000.h        |  1 +
 drivers/net/ethernet/intel/e1000e/ethtool.c      |  1 +
 drivers/net/ethernet/intel/e1000e/netdev.c       | 27 ++++++++-----
 drivers/net/ethernet/intel/i40e/i40e.h           |  5 ++-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c   |  1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c      |  3 +-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c       | 48 +++++++++++++++++++++---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c      | 28 +++++++++++---
 drivers/net/ethernet/intel/igb/igb.h             |  2 +
 drivers/net/ethernet/intel/igb/igb_ethtool.c     |  1 +
 drivers/net/ethernet/intel/igb/igb_main.c        | 26 ++++++++++---
 drivers/net/ethernet/intel/igb/igb_ptp.c         | 41 +++++++++++++++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe.h         |  2 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  3 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    | 42 ++++++++++++++-------
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c     | 42 +++++++++++++++++++--
 16 files changed, 227 insertions(+), 46 deletions(-)
Signature · 1 line
2.13.0.rc0.317.gcc792a6cad5a