All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Harini Katakam <harinik@xilinx.com>
Cc: Harini Katakam <harini.katakam@xilinx.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	David Miller <davem@davemloft.net>,
	Richard Cochran <richardcochran@gmail.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Paolo Abeni <pabeni@redhat.com>, netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michal Simek <michal.simek@xilinx.com>,
	Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Subject: Re: [PATCH 1/3] net: macb: Fix PTP one step sync support
Date: Tue, 17 May 2022 22:06:03 -0700	[thread overview]
Message-ID: <20220517220603.36eec66e@kernel.org> (raw)
In-Reply-To: <CAFcVEC+qdouQ+tJdBG_Vv8QsaUX99uFtjKnB5WwQawA1fxmgEQ@mail.gmail.com>

On Wed, 18 May 2022 09:53:29 +0530 Harini Katakam wrote:
> On Wed, May 18, 2022 at 8:12 AM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Tue, 17 May 2022 13:02:57 +0530 Harini Katakam wrote:  
> > > PTP one step sync packets cannot have CSUM padding and insertion in
> > > SW since time stamp is inserted on the fly by HW.
> > > In addition, ptp4l version 3.0 and above report an error when skb
> > > timestamps are reported for packets that not processed for TX TS
> > > after transmission.
> > > Add a helper to identify PTP one step sync and fix the above two
> > > errors.
> > > Also reset ptp OSS bit when one step is not selected.
> > >
> > > Fixes: ab91f0a9b5f4 ("net: macb: Add hardware PTP support")
> > > Fixes: 653e92a9175e ("net: macb: add support for padding and fcs computation")  
> >
> > Please make sure to CC authors of the patches under fixes.
> > ./scripts/get_maintainer should point them out.  
> 
> Thanks for the review.
> Rafal Ozieblo <rafalo@cadence.com> is the author of the first Fixes
> patch but that
> address hasn't worked in the last ~4 yrs.
> I have cced Claudiu and everyone else from the maintainers
> (Eric Dumazet <edumazet@google.com> also doesn't work)

I see, thanks, added Rafal's email to the ignore list, 
I'm quite sure Eric's email address works.

> > > @@ -1158,13 +1192,14 @@ static int macb_tx_complete(struct macb_queue *queue, int budget)
> > >
> > >                       /* First, update TX stats if needed */
> > >                       if (skb) {
> > > -                             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
> > > -                                      */
> > > -                                     tx_skb->skb = NULL;
> > > +                             if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&  
> >
> > ptp_oss already checks if HW_TSTAMP is set.  
> 
> The check for SKBTX_HW_TSTAMP is required here universally and not
> just inside ptp_oss.
> I will remove the redundant check in ptp_oss instead. Please see the
> reply below.

But then you need to add this check in the padding/fcs call site and
the place where NOCRC is set. If you wrap the check for SKBTX_HW_TSTAMP
in the helper with likely() and remove the inline - will the compiler
not split the function and inline just that check? And leave the rest
as a functionname.part... thing?

  reply	other threads:[~2022-05-18  5:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  7:32 [PATCH 0/3] Macb PTP updates Harini Katakam
2022-05-17  7:32 ` [PATCH 1/3] net: macb: Fix PTP one step sync support Harini Katakam
2022-05-18  2:42   ` Jakub Kicinski
2022-05-18  4:23     ` Harini Katakam
2022-05-18  5:06       ` Jakub Kicinski [this message]
2022-05-18 10:31         ` Harini Katakam
2022-05-17  7:32 ` [PATCH 2/3] net: macb: Enable PTP unicast Harini Katakam
2022-05-19  8:54   ` Claudiu.Beznea
2022-05-17  7:32 ` [PATCH 3/3] net: macb: Optimize reading HW timestamp Harini Katakam
2022-05-17 13:55 ` [PATCH 0/3] Macb PTP updates Richard Cochran

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=20220517220603.36eec66e@kernel.org \
    --to=kuba@kernel.org \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=harini.katakam@xilinx.com \
    --cc=harinik@xilinx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.com \
    --cc=radhey.shyam.pandey@xilinx.com \
    --cc=richardcochran@gmail.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.