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: <DB7PR04MB50174906EE8CCEB4A02F4C17F81C9@DB7PR04MB5017.eurprd04.prod.outlook.com>
Date:   Mon, 5 Jul 2021 08:19:30 +0000
From:   "Y.b. Lu" <yangbo.lu@....com>
To:     Richard Cochran <richardcochran@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "mptcp@...ts.linux.dev" <mptcp@...ts.linux.dev>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Mat Martineau <mathew.j.martineau@...ux.intel.com>,
        Matthieu Baerts <matthieu.baerts@...sares.net>,
        Shuah Khan <shuah@...nel.org>,
        Michal Kubecek <mkubecek@...e.cz>,
        Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>, Rui Sousa <rui.sousa@....com>,
        Sebastien Laveze <sebastien.laveze@....com>
Subject: RE: [net-next, v5, 08/11] net: sock: extend SO_TIMESTAMPING for PHC
 binding

Hi Richard,

> -----Original Message-----
> From: Richard Cochran <richardcochran@...il.com>
> Sent: 2021年7月4日 21:34
> To: Y.b. Lu <yangbo.lu@....com>
> Cc: netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> linux-kselftest@...r.kernel.org; mptcp@...ts.linux.dev; David S . Miller
> <davem@...emloft.net>; Jakub Kicinski <kuba@...nel.org>; Mat Martineau
> <mathew.j.martineau@...ux.intel.com>; Matthieu Baerts
> <matthieu.baerts@...sares.net>; Shuah Khan <shuah@...nel.org>; Michal
> Kubecek <mkubecek@...e.cz>; Florian Fainelli <f.fainelli@...il.com>;
> Andrew Lunn <andrew@...n.ch>; Rui Sousa <rui.sousa@....com>; Sebastien
> Laveze <sebastien.laveze@....com>
> Subject: Re: [net-next, v5, 08/11] net: sock: extend SO_TIMESTAMPING for
> PHC binding
> 
> On Wed, Jun 30, 2021 at 04:11:59PM +0800, Yangbo Lu wrote:
> > Since PTP virtual clock support is added, there can be several PTP
> > virtual clocks based on one PTP physical clock for timestamping.
> >
> > This patch is to extend SO_TIMESTAMPING API to support PHC (PTP
> > Hardware Clock) binding by adding a new flag
> > SOF_TIMESTAMPING_BIND_PHC. When PTP virtual clocks are in use, user
> > space can configure to bind one for timestamping, but PTP physical
> > clock is not supported and not needed to bind.
> 
> Would it not be better to simply bind automatically?
> 
> Like this pseudo code:
> 
> 	if (hw_timestamping_requested() && interface_is_vclock()) {
> 		bind_vclock();
> 	}
> 
> It would be great to avoid forcing user space to use a new option.
> 
> Especially because NOT setting the option makes no sense.  Or maybe there is
> a use case for omitting the option?
> 
> 
> Thoughts?

When several ptp virtual clocks are created, the ptp physical clock is guaranteed for free running.

What I think is, for timestamping, if no flag SOF_TIMESTAMPING_BIND_PHC, the timestamping keeps using ptp physical clock.
If application wants to bind one ptp virtual clock for timestamping, the flag SOF_TIMESTAMPING_BIND_PHC should be set and clock index should be provided.
After all, several ptp virtual clocks created are likely for different timescale/use case. There should be a method for any of applications to select the right one to use.

Does it make sense?
Thank you.

> 
> Thanks,
> Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ