All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
@ 2019-03-19 17:04 Paul Thomas
  2019-03-19 17:41 ` Paul Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Paul Thomas @ 2019-03-19 17:04 UTC (permalink / raw)
  To: netdev; +Cc: Paul Thomas

Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been
enabled for this skb It does fix the issue where normal socks that
aren't expecting a timestamp will not wake up on select. And when a
user does want a SOF_TIMESTAMPING_TX_HARDWARE this does work.

Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
---
 drivers/net/ethernet/cadence/macb_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index ad099fd01b45..48fc45ab514f 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -898,7 +898,8 @@ static void macb_tx_interrupt(struct macb_queue *queue)
 
 			/* First, update TX stats if needed */
 			if (skb) {
-				if (gem_ptp_do_txstamp(queue, skb, desc) == 0) {
+				if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
+					gem_ptp_do_txstamp(queue, skb, desc) == 0) {
 					/* skb now belongs to timestamp buffer
 					 * and will be removed later
 					 */
-- 
2.17.1


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

* Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
  2019-03-19 17:04 [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver Paul Thomas
@ 2019-03-19 17:41 ` Paul Thomas
  2019-03-20  6:15   ` Harini Katakam
  2019-03-20 17:48 ` David Miller
  2019-04-04 13:03 ` Paul Thomas
  2 siblings, 1 reply; 8+ messages in thread
From: Paul Thomas @ 2019-03-19 17:41 UTC (permalink / raw)
  To: netdev

Oh I notice that this is in the xilnx github repo so if it makes it in
from there that works too.
-Paul

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

* Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
  2019-03-19 17:41 ` Paul Thomas
@ 2019-03-20  6:15   ` Harini Katakam
  0 siblings, 0 replies; 8+ messages in thread
From: Harini Katakam @ 2019-03-20  6:15 UTC (permalink / raw)
  To: Paul Thomas; +Cc: netdev

Hi Paul,

On Tue, Mar 19, 2019 at 11:13 PM Paul Thomas <pthomas8589@gmail.com> wrote:
>
> Oh I notice that this is in the xilnx github repo so if it makes it in
> from there that works too.

No, I don't plan to send anything.
I just used your patch (retained your signed-off, of course) and
added the && check, because I wanted to pull in into our repo quickly.
Thanks

Regards,
Harini

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

* Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
  2019-03-19 17:04 [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver Paul Thomas
  2019-03-19 17:41 ` Paul Thomas
@ 2019-03-20 17:48 ` David Miller
  2019-04-04 13:03 ` Paul Thomas
  2 siblings, 0 replies; 8+ messages in thread
From: David Miller @ 2019-03-20 17:48 UTC (permalink / raw)
  To: pthomas8589; +Cc: netdev


Paul, please format your patch properly.

The Subject line should be of the form:

	[PATCH vX] $subsystem-prefix: Description.

Also please provide an accurate and proper Fixes: tag.

Thank you.

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

* Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
  2019-03-19 17:04 [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver Paul Thomas
  2019-03-19 17:41 ` Paul Thomas
  2019-03-20 17:48 ` David Miller
@ 2019-04-04 13:03 ` Paul Thomas
  2019-04-04 13:16   ` Harini Katakam
  2 siblings, 1 reply; 8+ messages in thread
From: Paul Thomas @ 2019-04-04 13:03 UTC (permalink / raw)
  To: netdev, Nicolas Ferre, David S. Miller; +Cc: Harini Katakam

On Tue, Mar 19, 2019 at 1:07 PM Paul Thomas <pthomas8589@gmail.com> wrote:
>
> Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been
> enabled for this skb It does fix the issue where normal socks that
> aren't expecting a timestamp will not wake up on select. And when a
> user does want a SOF_TIMESTAMPING_TX_HARDWARE this does work.
>
> Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
> ---
>  drivers/net/ethernet/cadence/macb_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index ad099fd01b45..48fc45ab514f 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -898,7 +898,8 @@ static void macb_tx_interrupt(struct macb_queue *queue)
>
>                         /* First, update TX stats if needed */
>                         if (skb) {
> -                               if (gem_ptp_do_txstamp(queue, skb, desc) == 0) {
> +                               if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
> +                                       gem_ptp_do_txstamp(queue, skb, desc) == 0) {
>                                         /* skb now belongs to timestamp buffer
>                                          * and will be removed later
>                                          */
> --
> 2.17.1
>

Hi All, just a reminder on this.

This is a bug fix that I'm sure others will hit at some point, I
imagine that it applies to the Microchip parts as well.

A quick recap on how this shows up. Without this and with HW
timestamps enabled ALL socks get notified through select() that the
timestamp is available (on the error queue). This causes applications
like ssh to break.

thanks,
Paul

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

* Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
  2019-04-04 13:03 ` Paul Thomas
@ 2019-04-04 13:16   ` Harini Katakam
  2019-04-04 13:23     ` Paul Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Harini Katakam @ 2019-04-04 13:16 UTC (permalink / raw)
  To: Paul Thomas; +Cc: netdev, Nicolas Ferre, David S. Miller

Hi Paul,

On Thu, Apr 4, 2019 at 6:35 PM Paul Thomas <pthomas8589@gmail.com> wrote:
>
> On Tue, Mar 19, 2019 at 1:07 PM Paul Thomas <pthomas8589@gmail.com> wrote:
> >
<snip>
> Hi All, just a reminder on this.

Could you please resend the patch addressing Dave's review comments
about subject line and Fixes tag?

Regards,
Harini

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

* Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
  2019-04-04 13:16   ` Harini Katakam
@ 2019-04-04 13:23     ` Paul Thomas
  2019-04-04 13:52       ` Paul Thomas
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Thomas @ 2019-04-04 13:23 UTC (permalink / raw)
  To: Harini Katakam; +Cc: netdev, Nicolas Ferre, David S. Miller

> Could you please resend the patch addressing Dave's review comments
> about subject line and Fixes tag?
Yup, sorry about that. I'm not subscribed to netdev, but I thought
replies would have me in the to:line, but I see the comments on the
archive. I'll send this out shortly.

-Paul

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

* Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
  2019-04-04 13:23     ` Paul Thomas
@ 2019-04-04 13:52       ` Paul Thomas
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Thomas @ 2019-04-04 13:52 UTC (permalink / raw)
  To: Harini Katakam; +Cc: netdev, Nicolas Ferre, David S. Miller

On Thu, Apr 4, 2019 at 9:23 AM Paul Thomas <pthomas8589@gmail.com> wrote:
>
> > Could you please resend the patch addressing Dave's review comments
> > about subject line and Fixes tag?
> Yup, sorry about that. I'm not subscribed to netdev, but I thought
> replies would have me in the to:line, but I see the comments on the
> archive. I'll send this out shortly.
>
> -Paul

Quick question, what should the Fixes: tag be? On the submitting
patches page it says to use this "If your patch fixes a bug in a
specific commit", but I think this has been there since PTP support
was added:
commit: ab91f0a9b5f4b9b5b341fdc0ed457121e69c20e1
Is that would should be referenced?

thanks,
Paul

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

end of thread, other threads:[~2019-04-04 13:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 17:04 [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver Paul Thomas
2019-03-19 17:41 ` Paul Thomas
2019-03-20  6:15   ` Harini Katakam
2019-03-20 17:48 ` David Miller
2019-04-04 13:03 ` Paul Thomas
2019-04-04 13:16   ` Harini Katakam
2019-04-04 13:23     ` Paul Thomas
2019-04-04 13:52       ` Paul Thomas

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.