Hi Jakub,
On Wed, Jul 8, 2020 at 11:10 PM Jakub Kicinski <[email protected]> wrote:
>
> On Wed, 8 Jul 2020 22:20:18 +0530 [email protected] wrote:
> > From: Aleksey Makarov <[email protected]>
> >
> > 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 <[email protected]>
> > Signed-off-by: Subbaraya Sundeep <[email protected]>
> > Signed-off-by: Aleksey Makarov <[email protected]>
> > Signed-off-by: Sunil Goutham <[email protected]>
>
> 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);
> > +}