lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFcVEC+K42w0eW_bCd2XaBz91bFwF9+r52m0rEziHP+MZr5TWQ@mail.gmail.com>
Date:   Wed, 18 May 2022 16:01:39 +0530
From:   Harini Katakam <harinik@...inx.com>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Harini Katakam <harini.katakam@...inx.com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        David Miller <davem@...emloft.net>,
        Richard Cochran <richardcochran@...il.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Paolo Abeni <pabeni@...hat.com>,
        netdev <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Michal Simek <michal.simek@...inx.com>,
        Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ