From: Hangbin Liu <liuhangbin@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Jay Vosburgh <j.vosburgh@gmail.com>,
Veaceslav Falico <vfalico@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>,
davem@davemloft.net, Richard Cochran <richardcochran@gmail.com>,
Miroslav Lichvar <mlichvar@redhat.com>
Subject: Re: [PATCH net-next] bond: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to active device
Date: Wed, 1 Dec 2021 12:57:22 +0800 [thread overview]
Message-ID: <YacAstl+brTqgAu8@Laptop-X1> (raw)
In-Reply-To: <20211130071956.5ad2c795@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
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.
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.
Thanks
Hangbin
next prev parent reply other threads:[~2021-12-01 4:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 7:09 [PATCH net-next] bond: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to active device Hangbin Liu
2021-11-30 12:30 ` patchwork-bot+netdevbpf
2021-11-30 15:19 ` Jakub Kicinski
2021-12-01 4:57 ` Hangbin Liu [this message]
2021-12-01 15:11 ` Jakub Kicinski
2021-12-02 3:04 ` Hangbin Liu
2021-12-02 14:59 ` Jakub Kicinski
2021-12-03 2:55 ` Hangbin Liu
2021-12-03 2:58 ` Jakub Kicinski
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=YacAstl+brTqgAu8@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=j.vosburgh@gmail.com \
--cc=kuba@kernel.org \
--cc=mlichvar@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=vfalico@gmail.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