All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
@ 2017-12-27  2:17 Daniel Hua
  2017-12-27  2:17 ` [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered Daniel Hua
  2017-12-27 16:58 ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Alexander Duyck
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Hua @ 2017-12-27  2:17 UTC (permalink / raw)
  To: intel-wired-lan

Problem description:
After ethernet cable connect and disconnect for several iterations on a
device with i210, tx timestamp will stop being put into the socket.

Steps to reproduce:
1. Setup a device with i210 and wire it to a 802.1AS capable switch (
Extreme Networks Summit x440 is used in our case)
2. Have the gptp daemon running on the device and make sure it is synced 
with the switch
3. Have the switch disable and enable the port, wait for the device gets
resynced with the switch
4. Iterates step 3 until the device is not albe to get resynced
5. Review the log in dmesg and you will see warning message "igb : clearing
Tx timestamp hang"

Root cause:
If ptp_tx_work() gets scheduled just before the port gets disabled, a LINK
DOWN event will be processed before ptp_tx_work(), which may cause timeout
in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's TXTT bit (Transmit
timestamp valid bit) is not cleared, causing no new timestamp loaded to
TXSTMP register. Consequently therefore, no new interrupt is triggerred by
TSICR.TXTS bit and no more Tx timestamp send to the socket.

Daniel Hua (1):
  igb: bug fix Tx interrupt is not triggered

 drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

-- 
1.9.1

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

* [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered
  2017-12-27  2:17 [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
@ 2017-12-27  2:17 ` Daniel Hua
  2017-12-27 16:58 ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Alexander Duyck
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Hua @ 2017-12-27  2:17 UTC (permalink / raw)
  To: intel-wired-lan

Signed-off-by: Daniel Hua <daniel.hua@ni.com>
---
 drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 841c2a0..0746b19 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -643,6 +643,10 @@ static void igb_ptp_tx_work(struct work_struct *work)
 		adapter->ptp_tx_skb = NULL;
 		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 		adapter->tx_hwtstamp_timeouts++;
+		/* Clear the tx valid bit in TSYNCTXCTL register to enable
+		 * interrupt
+		 */
+		rd32(E1000_TXSTMPH);
 		dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
 		return;
 	}
@@ -717,6 +721,7 @@ void igb_ptp_rx_hang(struct igb_adapter *adapter)
  */
 void igb_ptp_tx_hang(struct igb_adapter *adapter)
 {
+	struct e1000_hw *hw = &adapter->hw;
 	bool timeout = time_is_before_jiffies(adapter->ptp_tx_start +
 					      IGB_PTP_TX_TIMEOUT);
 
@@ -736,6 +741,10 @@ void igb_ptp_tx_hang(struct igb_adapter *adapter)
 		adapter->ptp_tx_skb = NULL;
 		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 		adapter->tx_hwtstamp_timeouts++;
+		/* Clear the tx valid bit in TSYNCTXCTL register to enable
+		 * interrupt
+		 */
+		rd32(E1000_TXSTMPH);
 		dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
 	}
 }
-- 
1.9.1


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

* [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
  2017-12-27  2:17 [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
  2017-12-27  2:17 ` [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered Daniel Hua
@ 2017-12-27 16:58 ` Alexander Duyck
  2017-12-28  1:39   ` [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered Daniel Hua
  2017-12-28  2:22   ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
  1 sibling, 2 replies; 10+ messages in thread
From: Alexander Duyck @ 2017-12-27 16:58 UTC (permalink / raw)
  To: intel-wired-lan

On Tue, Dec 26, 2017 at 6:17 PM, Daniel Hua <daniel.hua@ni.com> wrote:
> Problem description:
> After ethernet cable connect and disconnect for several iterations on a
> device with i210, tx timestamp will stop being put into the socket.
>
> Steps to reproduce:
> 1. Setup a device with i210 and wire it to a 802.1AS capable switch (
> Extreme Networks Summit x440 is used in our case)
> 2. Have the gptp daemon running on the device and make sure it is synced
> with the switch
> 3. Have the switch disable and enable the port, wait for the device gets
> resynced with the switch
> 4. Iterates step 3 until the device is not albe to get resynced
> 5. Review the log in dmesg and you will see warning message "igb : clearing
> Tx timestamp hang"
>
> Root cause:
> If ptp_tx_work() gets scheduled just before the port gets disabled, a LINK
> DOWN event will be processed before ptp_tx_work(), which may cause timeout
> in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's TXTT bit (Transmit
> timestamp valid bit) is not cleared, causing no new timestamp loaded to
> TXSTMP register. Consequently therefore, no new interrupt is triggerred by
> TSICR.TXTS bit and no more Tx timestamp send to the socket.
>
> Daniel Hua (1):
>   igb: bug fix Tx interrupt is not triggered
>
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> --

Could you please combine this description of the issue with the patch
itself? It isn't really very useful to have the patch documented in a
cover letter that will never make it into the driver itself.

Thanks.

- Alex

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

* [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered
  2017-12-27 16:58 ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Alexander Duyck
@ 2017-12-28  1:39   ` Daniel Hua
  2017-12-28  2:22   ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Hua @ 2017-12-28  1:39 UTC (permalink / raw)
  To: intel-wired-lan

Signed-off-by: Daniel Hua <daniel.hua@ni.com>

Problem description:
After ethernet cable connect and disconnect for several iterations on a
device with i210, tx timestamp will stop being put into the socket.

Steps to reproduce:
1. Setup a device with i210 and wire it to a 802.1AS capable switch (
Extreme Networks Summit x440 is used in our case)
2. Have the gptp daemon running on the device and make sure it is synced 
with the switch
3. Have the switch disable and enable the port, wait for the device gets
resynced with the switch
4. Iterates step 3 until the device is not albe to get resynced
5. Review the log in dmesg and you will see warning message "igb : clearing
Tx timestamp hang"

Root cause:
If ptp_tx_work() gets scheduled just before the port gets disabled, a LINK
DOWN event will be processed before ptp_tx_work(), which may cause timeout
in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's TXTT bit (Transmit
timestamp valid bit) is not cleared, causing no new timestamp loaded to
TXSTMP register. Consequently therefore, no new interrupt is triggerred by
TSICR.TXTS bit and no more Tx timestamp send to the socket.

---
 drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 841c2a0..0746b19 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -643,6 +643,10 @@ static void igb_ptp_tx_work(struct work_struct *work)
 		adapter->ptp_tx_skb = NULL;
 		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 		adapter->tx_hwtstamp_timeouts++;
+		/* Clear the tx valid bit in TSYNCTXCTL register to enable
+		 * interrupt
+		 */
+		rd32(E1000_TXSTMPH);
 		dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
 		return;
 	}
@@ -717,6 +721,7 @@ void igb_ptp_rx_hang(struct igb_adapter *adapter)
  */
 void igb_ptp_tx_hang(struct igb_adapter *adapter)
 {
+	struct e1000_hw *hw = &adapter->hw;
 	bool timeout = time_is_before_jiffies(adapter->ptp_tx_start +
 					      IGB_PTP_TX_TIMEOUT);
 
@@ -736,6 +741,10 @@ void igb_ptp_tx_hang(struct igb_adapter *adapter)
 		adapter->ptp_tx_skb = NULL;
 		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 		adapter->tx_hwtstamp_timeouts++;
+		/* Clear the tx valid bit in TSYNCTXCTL register to enable
+		 * interrupt
+		 */
+		rd32(E1000_TXSTMPH);
 		dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
 	}
 }
-- 
1.9.1


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

* [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
  2017-12-27 16:58 ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Alexander Duyck
  2017-12-28  1:39   ` [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered Daniel Hua
@ 2017-12-28  2:22   ` Daniel Hua
  2017-12-29  9:20     ` Daniel Hua
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Hua @ 2017-12-28  2:22 UTC (permalink / raw)
  To: intel-wired-lan

Hi Alex,

Thanks for the comments. I have put the description in the patch and resent it.

Regards,
-Daniel

-----Original Message-----
From: Alexander Duyck [mailto:alexander.duyck at gmail.com] 
Sent: Thursday, December 28, 2017 12:58 AM
To: Daniel Hua <daniel.hua@ni.com>
Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not

On Tue, Dec 26, 2017 at 6:17 PM, Daniel Hua <daniel.hua@ni.com> wrote:
> Problem description:
> After ethernet cable connect and disconnect for several iterations on 
> a device with i210, tx timestamp will stop being put into the socket.
>
> Steps to reproduce:
> 1. Setup a device with i210 and wire it to a 802.1AS capable switch ( 
> Extreme Networks Summit x440 is used in our case) 2. Have the gptp 
> daemon running on the device and make sure it is synced with the 
> switch 3. Have the switch disable and enable the port, wait for the 
> device gets resynced with the switch 4. Iterates step 3 until the 
> device is not albe to get resynced 5. Review the log in dmesg and you 
> will see warning message "igb : clearing Tx timestamp hang"
>
> Root cause:
> If ptp_tx_work() gets scheduled just before the port gets disabled, a 
> LINK DOWN event will be processed before ptp_tx_work(), which may 
> cause timeout in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's 
> TXTT bit (Transmit timestamp valid bit) is not cleared, causing no new 
> timestamp loaded to TXSTMP register. Consequently therefore, no new 
> interrupt is triggerred by TSICR.TXTS bit and no more Tx timestamp send to the socket.
>
> Daniel Hua (1):
>   igb: bug fix Tx interrupt is not triggered
>
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> --

Could you please combine this description of the issue with the patch itself? It isn't really very useful to have the patch documented in a cover letter that will never make it into the driver itself.

Thanks.

- Alex

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

* [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
  2017-12-28  2:22   ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
@ 2017-12-29  9:20     ` Daniel Hua
  2017-12-29 14:49       ` Alexander Duyck
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Hua @ 2017-12-29  9:20 UTC (permalink / raw)
  To: intel-wired-lan

Hi Alex,

It seems I can't just update to the original patch, ends up sending many duplicated ones. Is there any way I can recall those duplicated patches? Sorry for the inconvenience.

Thanks,
-Daniel

-----Original Message-----
From: Daniel Hua 
Sent: Thursday, December 28, 2017 10:23 AM
To: 'Alexander Duyck' <alexander.duyck@gmail.com>
Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
Subject: RE: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not

Hi Alex,

Thanks for the comments. I have put the description in the patch and resent it.

Regards,
-Daniel

-----Original Message-----
From: Alexander Duyck [mailto:alexander.duyck at gmail.com]
Sent: Thursday, December 28, 2017 12:58 AM
To: Daniel Hua <daniel.hua@ni.com>
Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not

On Tue, Dec 26, 2017 at 6:17 PM, Daniel Hua <daniel.hua@ni.com> wrote:
> Problem description:
> After ethernet cable connect and disconnect for several iterations on 
> a device with i210, tx timestamp will stop being put into the socket.
>
> Steps to reproduce:
> 1. Setup a device with i210 and wire it to a 802.1AS capable switch ( 
> Extreme Networks Summit x440 is used in our case) 2. Have the gptp 
> daemon running on the device and make sure it is synced with the 
> switch 3. Have the switch disable and enable the port, wait for the 
> device gets resynced with the switch 4. Iterates step 3 until the 
> device is not albe to get resynced 5. Review the log in dmesg and you 
> will see warning message "igb : clearing Tx timestamp hang"
>
> Root cause:
> If ptp_tx_work() gets scheduled just before the port gets disabled, a 
> LINK DOWN event will be processed before ptp_tx_work(), which may 
> cause timeout in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's 
> TXTT bit (Transmit timestamp valid bit) is not cleared, causing no new 
> timestamp loaded to TXSTMP register. Consequently therefore, no new 
> interrupt is triggerred by TSICR.TXTS bit and no more Tx timestamp send to the socket.
>
> Daniel Hua (1):
>   igb: bug fix Tx interrupt is not triggered
>
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> --

Could you please combine this description of the issue with the patch itself? It isn't really very useful to have the patch documented in a cover letter that will never make it into the driver itself.

Thanks.

- Alex

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

* [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
  2017-12-29  9:20     ` Daniel Hua
@ 2017-12-29 14:49       ` Alexander Duyck
  2018-01-02  0:33         ` [Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is timeout Daniel Hua
  2018-01-02  0:35         ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
  0 siblings, 2 replies; 10+ messages in thread
From: Alexander Duyck @ 2017-12-29 14:49 UTC (permalink / raw)
  To: intel-wired-lan

I don't see multiple sends, I only see the one.

Also the formatting for the new one you sent out still isn't quite correct.

It should have your patch description before the "Signed-off-by:" line
and you don't want to have any "---" between the two. That way the
actual comments end up in the final patch.

- Alex

On Fri, Dec 29, 2017 at 1:20 AM, Daniel Hua <daniel.hua@ni.com> wrote:
> Hi Alex,
>
> It seems I can't just update to the original patch, ends up sending many duplicated ones. Is there any way I can recall those duplicated patches? Sorry for the inconvenience.
>
> Thanks,
> -Daniel
>
> -----Original Message-----
> From: Daniel Hua
> Sent: Thursday, December 28, 2017 10:23 AM
> To: 'Alexander Duyck' <alexander.duyck@gmail.com>
> Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
> Subject: RE: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
>
> Hi Alex,
>
> Thanks for the comments. I have put the description in the patch and resent it.
>
> Regards,
> -Daniel
>
> -----Original Message-----
> From: Alexander Duyck [mailto:alexander.duyck at gmail.com]
> Sent: Thursday, December 28, 2017 12:58 AM
> To: Daniel Hua <daniel.hua@ni.com>
> Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
> Subject: Re: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
>
> On Tue, Dec 26, 2017 at 6:17 PM, Daniel Hua <daniel.hua@ni.com> wrote:
>> Problem description:
>> After ethernet cable connect and disconnect for several iterations on
>> a device with i210, tx timestamp will stop being put into the socket.
>>
>> Steps to reproduce:
>> 1. Setup a device with i210 and wire it to a 802.1AS capable switch (
>> Extreme Networks Summit x440 is used in our case) 2. Have the gptp
>> daemon running on the device and make sure it is synced with the
>> switch 3. Have the switch disable and enable the port, wait for the
>> device gets resynced with the switch 4. Iterates step 3 until the
>> device is not albe to get resynced 5. Review the log in dmesg and you
>> will see warning message "igb : clearing Tx timestamp hang"
>>
>> Root cause:
>> If ptp_tx_work() gets scheduled just before the port gets disabled, a
>> LINK DOWN event will be processed before ptp_tx_work(), which may
>> cause timeout in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's
>> TXTT bit (Transmit timestamp valid bit) is not cleared, causing no new
>> timestamp loaded to TXSTMP register. Consequently therefore, no new
>> interrupt is triggerred by TSICR.TXTS bit and no more Tx timestamp send to the socket.
>>
>> Daniel Hua (1):
>>   igb: bug fix Tx interrupt is not triggered
>>
>>  drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> --
>
> Could you please combine this description of the issue with the patch itself? It isn't really very useful to have the patch documented in a cover letter that will never make it into the driver itself.
>
> Thanks.
>
> - Alex

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

* [Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is timeout
  2017-12-29 14:49       ` Alexander Duyck
@ 2018-01-02  0:33         ` Daniel Hua
  2018-01-11 22:54           ` Brown, Aaron F
  2018-01-02  0:35         ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
  1 sibling, 1 reply; 10+ messages in thread
From: Daniel Hua @ 2018-01-02  0:33 UTC (permalink / raw)
  To: intel-wired-lan

Problem description:
After ethernet cable connect and disconnect for several iterations on a
device with i210, tx timestamp will stop being put into the socket.

Steps to reproduce:
1. Setup a device with i210 and wire it to a 802.1AS capable switch (
Extreme Networks Summit x440 is used in our case)
2. Have the gptp daemon running on the device and make sure it is synced 
with the switch
3. Have the switch disable and enable the port, wait for the device gets
resynced with the switch
4. Iterates step 3 until the device is not albe to get resynced
5. Review the log in dmesg and you will see warning message "igb : clearing
Tx timestamp hang"

Root cause:
If ptp_tx_work() gets scheduled just before the port gets disabled, a LINK
DOWN event will be processed before ptp_tx_work(), which may cause timeout
in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's TXTT bit (Transmit
timestamp valid bit) is not cleared, causing no new timestamp loaded to
TXSTMP register. Consequently therefore, no new interrupt is triggerred by
TSICR.TXTS bit and no more Tx timestamp send to the socket.

Signed-off-by: Daniel Hua <daniel.hua@ni.com>
---
 drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 841c2a0..0746b19 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -643,6 +643,10 @@ static void igb_ptp_tx_work(struct work_struct *work)
 		adapter->ptp_tx_skb = NULL;
 		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 		adapter->tx_hwtstamp_timeouts++;
+		/* Clear the tx valid bit in TSYNCTXCTL register to enable
+		 * interrupt
+		 */
+		rd32(E1000_TXSTMPH);
 		dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
 		return;
 	}
@@ -717,6 +721,7 @@ void igb_ptp_rx_hang(struct igb_adapter *adapter)
  */
 void igb_ptp_tx_hang(struct igb_adapter *adapter)
 {
+	struct e1000_hw *hw = &adapter->hw;
 	bool timeout = time_is_before_jiffies(adapter->ptp_tx_start +
 					      IGB_PTP_TX_TIMEOUT);
 
@@ -736,6 +741,10 @@ void igb_ptp_tx_hang(struct igb_adapter *adapter)
 		adapter->ptp_tx_skb = NULL;
 		clear_bit_unlock(__IGB_PTP_TX_IN_PROGRESS, &adapter->state);
 		adapter->tx_hwtstamp_timeouts++;
+		/* Clear the tx valid bit in TSYNCTXCTL register to enable
+		 * interrupt
+		 */
+		rd32(E1000_TXSTMPH);
 		dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
 	}
 }
-- 
1.9.1


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

* [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not
  2017-12-29 14:49       ` Alexander Duyck
  2018-01-02  0:33         ` [Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is timeout Daniel Hua
@ 2018-01-02  0:35         ` Daniel Hua
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Hua @ 2018-01-02  0:35 UTC (permalink / raw)
  To: intel-wired-lan

Thanks for the comments, Alex. I have updated the patch accordingly and sent it out.

Thanks,
-Daniel

-----Original Message-----
From: Alexander Duyck [mailto:alexander.duyck at gmail.com] 
Sent: Friday, December 29, 2017 10:49 PM
To: Daniel Hua <daniel.hua@ni.com>
Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not

I don't see multiple sends, I only see the one.

Also the formatting for the new one you sent out still isn't quite correct.

It should have your patch description before the "Signed-off-by:" line and you don't want to have any "---" between the two. That way the actual comments end up in the final patch.

- Alex

On Fri, Dec 29, 2017 at 1:20 AM, Daniel Hua <daniel.hua@ni.com> wrote:
> Hi Alex,
>
> It seems I can't just update to the original patch, ends up sending many duplicated ones. Is there any way I can recall those duplicated patches? Sorry for the inconvenience.
>
> Thanks,
> -Daniel
>
> -----Original Message-----
> From: Daniel Hua
> Sent: Thursday, December 28, 2017 10:23 AM
> To: 'Alexander Duyck' <alexander.duyck@gmail.com>
> Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
> Subject: RE: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix 
> Tx interrupt is not
>
> Hi Alex,
>
> Thanks for the comments. I have put the description in the patch and resent it.
>
> Regards,
> -Daniel
>
> -----Original Message-----
> From: Alexander Duyck [mailto:alexander.duyck at gmail.com]
> Sent: Thursday, December 28, 2017 12:58 AM
> To: Daniel Hua <daniel.hua@ni.com>
> Cc: intel-wired-lan <intel-wired-lan@lists.osuosl.org>
> Subject: Re: [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix 
> Tx interrupt is not
>
> On Tue, Dec 26, 2017 at 6:17 PM, Daniel Hua <daniel.hua@ni.com> wrote:
>> Problem description:
>> After ethernet cable connect and disconnect for several iterations on 
>> a device with i210, tx timestamp will stop being put into the socket.
>>
>> Steps to reproduce:
>> 1. Setup a device with i210 and wire it to a 802.1AS capable switch ( 
>> Extreme Networks Summit x440 is used in our case) 2. Have the gptp 
>> daemon running on the device and make sure it is synced with the 
>> switch 3. Have the switch disable and enable the port, wait for the 
>> device gets resynced with the switch 4. Iterates step 3 until the 
>> device is not albe to get resynced 5. Review the log in dmesg and you 
>> will see warning message "igb : clearing Tx timestamp hang"
>>
>> Root cause:
>> If ptp_tx_work() gets scheduled just before the port gets disabled, a 
>> LINK DOWN event will be processed before ptp_tx_work(), which may 
>> cause timeout in ptp_tx_work(). In the timeout logic, the 
>> TSYNCTXCTL's TXTT bit (Transmit timestamp valid bit) is not cleared, 
>> causing no new timestamp loaded to TXSTMP register. Consequently 
>> therefore, no new interrupt is triggerred by TSICR.TXTS bit and no more Tx timestamp send to the socket.
>>
>> Daniel Hua (1):
>>   igb: bug fix Tx interrupt is not triggered
>>
>>  drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> --
>
> Could you please combine this description of the issue with the patch itself? It isn't really very useful to have the patch documented in a cover letter that will never make it into the driver itself.
>
> Thanks.
>
> - Alex

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

* [Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is timeout
  2018-01-02  0:33         ` [Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is timeout Daniel Hua
@ 2018-01-11 22:54           ` Brown, Aaron F
  0 siblings, 0 replies; 10+ messages in thread
From: Brown, Aaron F @ 2018-01-11 22:54 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Daniel Hua
> Sent: Monday, January 1, 2018 4:33 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Daniel Hua <daniel.hua@ni.com>
> Subject: [Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is
> timeout
> 
> Problem description:
> After ethernet cable connect and disconnect for several iterations on a
> device with i210, tx timestamp will stop being put into the socket.
> 
> Steps to reproduce:
> 1. Setup a device with i210 and wire it to a 802.1AS capable switch (
> Extreme Networks Summit x440 is used in our case)
> 2. Have the gptp daemon running on the device and make sure it is synced
> with the switch
> 3. Have the switch disable and enable the port, wait for the device gets
> resynced with the switch
> 4. Iterates step 3 until the device is not albe to get resynced
> 5. Review the log in dmesg and you will see warning message "igb : clearing
> Tx timestamp hang"
> 
> Root cause:
> If ptp_tx_work() gets scheduled just before the port gets disabled, a LINK
> DOWN event will be processed before ptp_tx_work(), which may cause
> timeout
> in ptp_tx_work(). In the timeout logic, the TSYNCTXCTL's TXTT bit (Transmit
> timestamp valid bit) is not cleared, causing no new timestamp loaded to
> TXSTMP register. Consequently therefore, no new interrupt is triggerred by
> TSICR.TXTS bit and no more Tx timestamp send to the socket.
> 
> Signed-off-by: Daniel Hua <daniel.hua@ni.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_ptp.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

I do not have an 802.1AS switch at the moment but have been able to check this with Linux ptp on systems both back to back and in a switched environment.  I have several Extreme X460s in the test setup and have an Extreme AVB Feature Pack license on order to activate the gptp on the switch.  I will revisit this when the license arrives, but it is working fine for me from a regression perspective and I don't want to hold the patch up any longer due to lack of the license.  So...

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

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

end of thread, other threads:[~2018-01-11 22:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-27  2:17 [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
2017-12-27  2:17 ` [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered Daniel Hua
2017-12-27 16:58 ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Alexander Duyck
2017-12-28  1:39   ` [Intel-wired-lan] [PATCH] igb: bug fix Tx interrupt is not triggered Daniel Hua
2017-12-28  2:22   ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua
2017-12-29  9:20     ` Daniel Hua
2017-12-29 14:49       ` Alexander Duyck
2018-01-02  0:33         ` [Intel-wired-lan] [PATCH] igb: Clear TXSTMP when ptp_tx_work() is timeout Daniel Hua
2018-01-11 22:54           ` Brown, Aaron F
2018-01-02  0:35         ` [Intel-wired-lan] [PATCH] Cover letter for igb: bug fix Tx interrupt is not Daniel Hua

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.