From: "antoine.tenart@bootlin.com" <antoine.tenart@bootlin.com>
To: Saeed Mahameed <saeedm@mellanox.com>
Cc: "antoine.tenart@bootlin.com" <antoine.tenart@bootlin.com>,
"richardcochran@gmail.com" <richardcochran@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>,
"allan.nielsen@microchip.com" <allan.nielsen@microchip.com>
Subject: Re: [PATCH net-next v4 6/6] net: mscc: PTP Hardware Clock (PHC) support
Date: Tue, 6 Aug 2019 16:04:33 +0200 [thread overview]
Message-ID: <20190806140433.GB3249@kwain> (raw)
In-Reply-To: <20190731074609.GA3579@kwain>
On Wed, Jul 31, 2019 at 09:46:09AM +0200, antoine.tenart@bootlin.com wrote:
> On Fri, Jul 26, 2019 at 08:52:10PM +0000, Saeed Mahameed wrote:
> > On Thu, 2019-07-25 at 16:27 +0200, Antoine Tenart wrote:
> > > @@ -145,6 +151,22 @@ static irqreturn_t ocelot_xtr_irq_handler(int
> > > irq, void *arg)
> > > break;
> > > }
> > >
> > > + if (ocelot->ptp) {
> > > + ocelot_ptp_gettime64(&ocelot->ptp_info, &ts);
> > > +
> > > + tod_in_ns = ktime_set(ts.tv_sec, ts.tv_nsec);
> > > + if ((tod_in_ns & 0xffffffff) < info.timestamp)
> > > + full_ts_in_ns = (((tod_in_ns >> 32) -
> > > 1) << 32) |
> > > + info.timestamp;
> > > + else
> > > + full_ts_in_ns = (tod_in_ns &
> > > GENMASK_ULL(63, 32)) |
> > > + info.timestamp;
> > > +
> > > + shhwtstamps = skb_hwtstamps(skb);
> > > + memset(shhwtstamps, 0, sizeof(struct
> > > skb_shared_hwtstamps));
> > > + shhwtstamps->hwtstamp = full_ts_in_ns;
> >
> > the right way to set the timestamp is by calling:
> > skb_tstamp_tx(skb, &tstamp);
>
> I'll fix this.
This is in the Rx path, so we do not have to call this.
Thanks,
Antoine
--
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2019-08-06 14:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 14:27 [PATCH net-next v4 0/6] net: mscc: PTP Hardware Clock (PHC) support Antoine Tenart
2019-07-25 14:27 ` [PATCH net-next v4 1/6] Documentation/bindings: net: ocelot: document the PTP bank Antoine Tenart
2019-07-25 14:27 ` [PATCH net-next v4 2/6] Documentation/bindings: net: ocelot: document the PTP ready IRQ Antoine Tenart
2019-07-25 14:27 ` [PATCH net-next v4 3/6] net: mscc: describe the PTP register range Antoine Tenart
2019-07-25 14:27 ` [PATCH net-next v4 4/6] net: mscc: improve the frame header parsing readability Antoine Tenart
2019-07-25 14:27 ` [PATCH net-next v4 5/6] net: mscc: remove the frame_info cpuq member Antoine Tenart
2019-07-25 14:27 ` [PATCH net-next v4 6/6] net: mscc: PTP Hardware Clock (PHC) support Antoine Tenart
2019-07-26 20:52 ` Saeed Mahameed
2019-07-31 7:46 ` antoine.tenart
2019-08-06 14:04 ` antoine.tenart [this message]
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=20190806140433.GB3249@kwain \
--to=antoine.tenart@bootlin.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=allan.nielsen@microchip.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=saeedm@mellanox.com \
--cc=thomas.petazzoni@bootlin.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