From: Harini Katakam <harinik@xilinx.com>
To: Jakub Kicinski <kuba@kernel.org>
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: Wed, 18 May 2022 16:01:39 +0530 [thread overview]
Message-ID: <CAFcVEC+K42w0eW_bCd2XaBz91bFwF9+r52m0rEziHP+MZr5TWQ@mail.gmail.com> (raw)
In-Reply-To: <20220517220603.36eec66e@kernel.org>
Hi Jakub,
<snip>
>
> > > > @@ -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?
Yes, I checked the disassembly and this is what's happening. This
should be good for
the non-PTP packet (going to "likely" branch) and the rest of ptp_oss
is evaluated for
PTP packets.
Regards,
Harini
next prev parent reply other threads:[~2022-05-18 10:32 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
2022-05-18 10:31 ` Harini Katakam [this message]
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=CAFcVEC+K42w0eW_bCd2XaBz91bFwF9+r52m0rEziHP+MZr5TWQ@mail.gmail.com \
--to=harinik@xilinx.com \
--cc=claudiu.beznea@microchip.com \
--cc=davem@davemloft.net \
--cc=harini.katakam@xilinx.com \
--cc=kuba@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).