[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALHRZupLPK22=fia+sRNG5k0HDe7xjxfCOB+tFN5fhZOf4K_-Q@mail.gmail.com>
Date: Thu, 9 Jul 2020 18:24:42 +0530
From: sundeep subbaraya <sundeep.lkml@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: David Miller <davem@...emloft.net>, richardcochran@...il.com,
netdev@...r.kernel.org, sgoutham@...vell.com,
Aleksey Makarov <amakarov@...vell.com>,
Subbaraya Sundeep <sbhatta@...vell.com>
Subject: Re: [PATCH v2 net-next 3/3] octeontx2-pf: Add support for PTP clock
Hi Jakub,
On Wed, Jul 8, 2020 at 11:10 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Wed, 8 Jul 2020 22:20:18 +0530 sundeep.lkml@...il.com wrote:
> > From: Aleksey Makarov <amakarov@...vell.com>
> >
> > This patch adds PTP clock and uses it in Octeontx2
> > network device. PTP clock uses mailbox calls to
> > access the hardware counter on the RVU side.
> >
> > Co-developed-by: Subbaraya Sundeep <sbhatta@...vell.com>
> > Signed-off-by: Subbaraya Sundeep <sbhatta@...vell.com>
> > Signed-off-by: Aleksey Makarov <amakarov@...vell.com>
> > Signed-off-by: Sunil Goutham <sgoutham@...vell.com>
>
> Please address the new sparse warnings as well:
>
> drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c:130:42: warning: cast to restricted __be64
>
Sure. There are some already existing in octeontx2/ for those I will
fix and submit after this patch set.
> > +static inline void otx2_set_rxtstamp(struct otx2_nic *pfvf,
> > + struct sk_buff *skb, void *data)
> > +{
>
> Please don't use static inline in C files, compiler will know which
> static functions to inline, and static inline covers up unused code.
>
Sure.
Thanks,
Sundeep
> > + u64 tsns;
> > + int err;
> > +
> > + if (!(pfvf->flags & OTX2_FLAG_RX_TSTAMP_ENABLED))
> > + return;
> > +
> > + /* The first 8 bytes is the timestamp */
> > + err = otx2_ptp_tstamp2time(pfvf, be64_to_cpu(*(u64 *)data), &tsns);
> > + if (err)
> > + return;
> > +
> > + skb_hwtstamps(skb)->hwtstamp = ns_to_ktime(tsns);
> > +}
Powered by blists - more mailing lists