> -----Original Message----- > From: Harini Katakam [mailto:hari...@xilinx.com] > Sent: Tuesday, March 12, 2019 11:00 PM > To: Keller, Jacob E <jacob.e.kel...@intel.com> > Cc: Paul Thomas <pthomas8...@gmail.com>; netdev@vger.kernel.org > Subject: Re: [PATCH] Check for SKBTX_HW_TSTAMP in macb driver > > Hi Paul, Jake, > On Wed, Mar 13, 2019 at 3:08 AM Keller, Jacob E > <jacob.e.kel...@intel.com> wrote: > > > > > > > > > -----Original Message----- > > > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > > > On > > > Behalf Of Paul Thomas > > > Sent: Tuesday, March 12, 2019 1:05 PM > > > To: netdev@vger.kernel.org > > > Subject: Re: [PATCH] Check for SKBTX_HW_TSTAMP in macb driver > > > > > > On Tue, Mar 12, 2019 at 3:51 PM Paul Thomas <pthomas8...@gmail.com> > wrote: > > > > > <snip> > > > > /* First, update TX stats if needed */ > > > > if (skb) { > > > > - if (gem_ptp_do_txstamp(queue, skb, > > > > desc) == 0) { > > > > - /* skb now belongs to timestamp > > > > buffer > > > > - * and will be removed later > > > > - */ > > > I think the above does the same thing as if CONFIG_MACB_USE_HWSTAMP is > > > undefined regarding cleanup, so there is no extra cleanup if the > > > gem_ptp_do_txstamp() path isn't taken, but I wasn't sure about the > > > "skb now belongs to the timestamp buffer" if we don't go down that > > > path. > > > > The path they're taking here seems a bit weird... I suspect the function > gem_ptp_do_txstamp is doing something. > > > > Normally the driver should use something like skb_get to obtain a reference > > to the > skb. > > Just FYI, this is the historical reason for the skb implementation here: > https://patchwork.kernel.org/patch/9473937/ > > Regards, > Harini
I'm not sure I follow that logic, but I obviously haven't dug into what gem_ptp_do_txstamp does, or what calls its making. Either way, I think this patch is a strict improvement on what was previously happening. It can be someone else's responsibility to change how the skb is handled if they find an issue with it. Thanks, Jake