All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Thomas <pthomas8589@gmail.com>
To: netdev@vger.kernel.org,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: Harini Katakam <harinik@xilinx.com>
Subject: Re: [PATCH] v2 Check for SKBTX_HW_TSTAMP in macb driver
Date: Thu, 4 Apr 2019 09:03:22 -0400	[thread overview]
Message-ID: <CAD56B7fBn25Q0i1+kt-wFT+oBwpUBrtp5_0yadkyDhDk+D3xJg@mail.gmail.com> (raw)
In-Reply-To: <20190319170449.24980-1-pthomas8589@gmail.com>

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

  parent reply	other threads:[~2019-04-04 13:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2019-04-04 13:16   ` Harini Katakam
2019-04-04 13:23     ` Paul Thomas
2019-04-04 13:52       ` Paul Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD56B7fBn25Q0i1+kt-wFT+oBwpUBrtp5_0yadkyDhDk+D3xJg@mail.gmail.com \
    --to=pthomas8589@gmail.com \
    --cc=davem@davemloft.net \
    --cc=harinik@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.