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] [thread-next>] [day] [month] [year] [list]
Message-ID: <03e101db619e$9d11d440$d7357cc0$@trustnetic.com>
Date: Wed, 8 Jan 2025 15:26:20 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Keller, Jacob E'" <jacob.e.keller@...el.com>,
	"'Andrew Lunn'" <andrew@...n.ch>
Cc: <andrew+netdev@...n.ch>,
	<davem@...emloft.net>,
	<edumazet@...gle.com>,
	<kuba@...nel.org>,
	<pabeni@...hat.com>,
	<richardcochran@...il.com>,
	<linux@...linux.org.uk>,
	<horms@...nel.org>,
	<netdev@...r.kernel.org>,
	<mengyuanlou@...-swift.com>,
	"'linglingzhang'" <linglingzhang@...-swift.com>
Subject: RE: [PATCH net-next 1/4] net: wangxun: Add support for PTP clock

> > > > > > > +/**
> > > > > > > + * wx_ptp_tx_hwtstamp_work
> > > > > > > + * @work: pointer to the work struct
> > > > > > > + *
> > > > > > > + * This work item polls TSYNCTXCTL valid bit to determine when a Tx
> > hardware
> > > > > > > + * timestamp has been taken for the current skb. It is necessary,
> > because the
> > > > > > > + * descriptor's "done" bit does not correlate with the timestamp event.
> > > > > > > + */
> > > > > >
> > > > > > Are you saying the "done" bit can be set, but the timestamp is not yet
> > > > > > in place? I've not read the whole patch, but do you start polling once
> > > > > > "done" is set, or as soon at the skbuff is queues for transmission?
> > > > >
> > > > > The descriptor's "done" bit cannot be used as a basis for Tx hardware
> > > > > timestamp. So we should poll the valid bit in the register.
> > > >
> > > > You did not answer my question. When do you start polling?
> > >
> > > As soon at the skbuff is queues for transmission.
> >
> > I assume polling is not for free? Is it possible to start polling once
> > 'done' is set? Maybe do some benchmarks and see if that saves you some
> > cycles?
> >
> > 	Andrew
> >
> 
> Agreed, I would try to benchmark that. Timestamps need to be returned
> relatively quickly, which means the polling rate needs to be high. This costs a lot
> of CPU, and so any mechanism that lets you start later will help the CPU cost.

May not. We should notify the stack as soon as we get Tx hardware timestamp.
But descriptor's "done" bit may hasn't been set yet.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ