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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211201071118.749a3ed4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Wed, 1 Dec 2021 07:11:18 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Hangbin Liu <liuhangbin@...il.com>
Cc:     netdev@...r.kernel.org, Jay Vosburgh <j.vosburgh@...il.com>,
        Veaceslav Falico <vfalico@...il.com>,
        Andy Gospodarek <andy@...yhouse.net>, davem@...emloft.net,
        Richard Cochran <richardcochran@...il.com>,
        Miroslav Lichvar <mlichvar@...hat.com>
Subject: Re: [PATCH net-next] bond: pass get_ts_info and SIOC[SG]HWTSTAMP
 ioctl to active device

On Wed, 1 Dec 2021 12:57:22 +0800 Hangbin Liu wrote:
> On Tue, Nov 30, 2021 at 07:19:56AM -0800, Jakub Kicinski wrote:
> > On Tue, 30 Nov 2021 15:09:32 +0800 Hangbin Liu wrote:  
> > > We have VLAN PTP support(via get_ts_info) on kernel, and bond support(by
> > > getting active interface via netlink message) on userspace tool linuxptp.
> > > But there are always some users who want to use PTP with VLAN over bond,
> > > which is not able to do with the current implementation.
> > > 
> > > This patch passed get_ts_info and SIOC[SG]HWTSTAMP ioctl to active device
> > > with bond mode active-backup/tlb/alb. With this users could get kernel native
> > > bond or VLAN over bond PTP support.
> > > 
> > > Test with ptp4l and it works with VLAN over bond after this patch:
> > > ]# ptp4l -m -i bond0.23
> > > ptp4l[53377.141]: selected /dev/ptp4 as PTP clock
> > > ptp4l[53377.142]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
> > > ptp4l[53377.143]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
> > > ptp4l[53377.143]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
> > > ptp4l[53384.127]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
> > > ptp4l[53384.127]: selected local clock e41d2d.fffe.123db0 as best master
> > > ptp4l[53384.127]: port 1: assuming the grand master role  
> > 
> > Does the Ethernet spec say something about PTP over bond/LACP?  
> 
> bond_option_active_slave_get_rcu() only supports bond mode active-backup/tlb/alb.
> With LACP mode _no_ active interface returns and we will use software
> timestamping.

I understand that, I was asking about guidance from LACP as there is 
no IEEE standard for the other modes to my knowledge.

> But you remind me that we should return -EOPNOTSUPP when there is no real_dev
> for bond_eth_ioctl(). I will send a fixup later.
> 
> > What happens during failover? Presumably the user space daemon will
> > start getting HW stamps based on a different PHC than it's disciplining?  
> 
> linuxptp will switch to new active interface's PHC device when there is a
> bonding failover by filtering netlink message on pure bond.
> 
> But for VLAN over bond I need to figure out how to get the bond failover
> message on VLAN interface and update the new PHC device.

Yeah, there should be some form of well understood indication in the
uAPI telling the user space daemon that the PHC may get swapped on the
interface, and a reliable notification which indicates PHC change.
There is a number of user space daemons out there, fixing linuxptp does
not mean other user space won't be broken/surprised/angry.

What notification is linuxptp listening on, SETLINK?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ