All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.9] ixgbe: prevent ptp_rx_hang from running when in FILTER_ALL mode
@ 2021-03-20  1:44 Wen Yang
  2021-03-20 10:53 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Wen Yang @ 2021-03-20  1:44 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Sasha Levin
  Cc: stable, Jacob Keller, Andrew Bowers, Jeff Kirsher, Wen Yang

From: Jacob Keller <jacob.e.keller@intel.com>

commit 6704a3abf4cf4181a1ee64f5db4969347b88ca1d upstream.

On hardware which supports timestamping all packets, the timestamps are
recorded in the packet buffer, and the driver no longer uses or reads
the registers. This makes the logic for checking and clearing Rx
timestamp hangs meaningless.

If we run the ixgbe_ptp_rx_hang() function in this case, then the driver
will continuously spam the log output with "Clearing Rx timestamp hang".
These messages are spurious, and confusing to end users.

The original code in commit a9763f3cb54c ("ixgbe: Update PTP to support
X550EM_x devices", 2015-12-03) did have a flag PTP_RX_TIMESTAMP_IN_REGISTER
which was intended to be used to avoid the Rx timestamp hang check,
however it did not actually check the flag before calling the function.

Do so now in order to stop the checks and prevent the spurious log
messages.

Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices", 2015-12-03)
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: <stable@vger.kernel.org> # 4.9.x: 622a2ef538fb: ixgbe: check for Tx timestamp timeouts during watchdog
Cc: <stable@vger.kernel.org> # 4.9.x
Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 66b1cc02..36d73bf 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7257,7 +7257,8 @@ static void ixgbe_service_task(struct work_struct *work)
 
 	if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state)) {
 		ixgbe_ptp_overflow_check(adapter);
-		ixgbe_ptp_rx_hang(adapter);
+		if (adapter->flags & IXGBE_FLAG_RX_HWTSTAMP_IN_REGISTER)
+			ixgbe_ptp_rx_hang(adapter);
 		ixgbe_ptp_tx_hang(adapter);
 	}
 
-- 
1.8.3.1


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

* Re: [PATCH 4.9] ixgbe: prevent ptp_rx_hang from running when in FILTER_ALL mode
  2021-03-20  1:44 [PATCH 4.9] ixgbe: prevent ptp_rx_hang from running when in FILTER_ALL mode Wen Yang
@ 2021-03-20 10:53 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2021-03-20 10:53 UTC (permalink / raw)
  To: Wen Yang
  Cc: Sasha Levin, stable, Jacob Keller, Andrew Bowers, Jeff Kirsher, Wen Yang

On Sat, Mar 20, 2021 at 09:44:51AM +0800, Wen Yang wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> commit 6704a3abf4cf4181a1ee64f5db4969347b88ca1d upstream.
> 
> On hardware which supports timestamping all packets, the timestamps are
> recorded in the packet buffer, and the driver no longer uses or reads
> the registers. This makes the logic for checking and clearing Rx
> timestamp hangs meaningless.
> 
> If we run the ixgbe_ptp_rx_hang() function in this case, then the driver
> will continuously spam the log output with "Clearing Rx timestamp hang".
> These messages are spurious, and confusing to end users.
> 
> The original code in commit a9763f3cb54c ("ixgbe: Update PTP to support
> X550EM_x devices", 2015-12-03) did have a flag PTP_RX_TIMESTAMP_IN_REGISTER
> which was intended to be used to avoid the Rx timestamp hang check,
> however it did not actually check the flag before calling the function.
> 
> Do so now in order to stop the checks and prevent the spurious log
> messages.
> 
> Fixes: a9763f3cb54c ("ixgbe: Update PTP to support X550EM_x devices", 2015-12-03)
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Cc: <stable@vger.kernel.org> # 4.9.x: 622a2ef538fb: ixgbe: check for Tx timestamp timeouts during watchdog
> Cc: <stable@vger.kernel.org> # 4.9.x
> Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Thanks for the backport, now queued up.

greg k-h

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

end of thread, other threads:[~2021-03-20 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-20  1:44 [PATCH 4.9] ixgbe: prevent ptp_rx_hang from running when in FILTER_ALL mode Wen Yang
2021-03-20 10:53 ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.