[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200708104056.1ed85daf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 8 Jul 2020 10:40:56 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: sundeep.lkml@...il.com
Cc: 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
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
> +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.
> + 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