From: Jakub Kicinski <kuba@kernel.org>
To: sundeep.lkml@gmail.com
Cc: davem@davemloft.net, richardcochran@gmail.com,
netdev@vger.kernel.org, sgoutham@marvell.com,
Aleksey Makarov <amakarov@marvell.com>,
Subbaraya Sundeep <sbhatta@marvell.com>
Subject: Re: [PATCH v2 net-next 3/3] octeontx2-pf: Add support for PTP clock
Date: Wed, 8 Jul 2020 10:40:56 -0700 [thread overview]
Message-ID: <20200708104056.1ed85daf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <1594227018-4913-4-git-send-email-sundeep.lkml@gmail.com>
On Wed, 8 Jul 2020 22:20:18 +0530 sundeep.lkml@gmail.com wrote:
> From: Aleksey Makarov <amakarov@marvell.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@marvell.com>
> Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
> Signed-off-by: Aleksey Makarov <amakarov@marvell.com>
> Signed-off-by: Sunil Goutham <sgoutham@marvell.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);
> +}
next prev parent reply other threads:[~2020-07-08 17:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 16:50 [PATCH v2 net-next 0/3] Add PTP support for Octeontx2 sundeep.lkml
2020-07-08 16:50 ` [PATCH v2 net-next 1/3] octeontx2-af: Support to enable/disable HW timestamping sundeep.lkml
2020-07-08 16:50 ` [PATCH v2 net-next 2/3] octeontx2-af: Add support for Marvell PTP coprocessor sundeep.lkml
2020-07-08 16:50 ` [PATCH v2 net-next 3/3] octeontx2-pf: Add support for PTP clock sundeep.lkml
2020-07-08 17:40 ` Jakub Kicinski [this message]
2020-07-09 12:54 ` sundeep subbaraya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200708104056.1ed85daf@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=amakarov@marvell.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=sundeep.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).