lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190806140433.GB3249@kwain>
Date:   Tue, 6 Aug 2019 16:04:33 +0200
From:   "antoine.tenart@...tlin.com" <antoine.tenart@...tlin.com>
To:     Saeed Mahameed <saeedm@...lanox.com>
Cc:     "antoine.tenart@...tlin.com" <antoine.tenart@...tlin.com>,
        "richardcochran@...il.com" <richardcochran@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        "alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "thomas.petazzoni@...tlin.com" <thomas.petazzoni@...tlin.com>,
        "allan.nielsen@...rochip.com" <allan.nielsen@...rochip.com>
Subject: Re: [PATCH net-next v4 6/6] net: mscc: PTP Hardware Clock (PHC)
 support

On Wed, Jul 31, 2019 at 09:46:09AM +0200, antoine.tenart@...tlin.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ