lkml.org 
[lkml]   [2022]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/3] net: macb: Fix PTP one step sync support
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

\
 
 \ /
  Last update: 2022-05-18 12:32    [W:0.104 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site