Thread: [Linuxptp-users] ptp4l passive phc synchronization with active phc in linux bonding
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: shashank v. <sha...@gm...> - 2023-04-10 17:20:07
|
Hello experts, I need to configure PTP with linux bonding. I can see it is supported in active-passive configuration. I have following queries related to functioning of PTP with active-passive bonding: - Will passive/standby slave PHC synchronize itself with active slave PHC when active-passive NIC ports are on different PHCs? - Does the passive NIC port's PHC is ready to take-over when the current active slave NIC goes down or does this require the passive NIC's PHC to synchronize first? Thanks and regards Shashank Varshney |
From: Miroslav L. <mli...@re...> - 2023-04-11 07:20:57
|
On Mon, Apr 10, 2023 at 10:49:45PM +0530, shashank varshney wrote: > I have following queries related to functioning of PTP with active-passive > bonding: > > - Will passive/standby slave PHC synchronize itself with active slave > PHC when active-passive NIC ports are on different PHCs? No, phc2sys doesn't know about the other interfaces in the bond. > - Does the passive NIC port's PHC is ready to take-over when the current > active slave NIC goes down or does this require the passive NIC's PHC to > synchronize first? The latter. It's not a seamless switch. -- Miroslav Lichvar |
From: shashank v. <sha...@gm...> - 2023-04-16 08:24:39
|
Hi Miroslav, I Hope you are doing well and thanks a lot for the response. I was looking at Xillinx sfptpd utility and the following is the working mechanism of PTP over the Linux bonded interfaces: https://docs.xilinx.com/r/en-US/ug1602-ptp-user/PTP-over-Bonded-Interfaces *PTP over Bonded Interfaces* *sfptpd supports PTP packets over bonded interfaces in an active/standby mode. In addition, sfptpd also supports bonding over LACP (802.3ad) bonding.* *Bonding of interfaces on supported adapters employs the Linux bonding driver. Multiple ports can be included into a single bond where one port is selected as the active interface and all others are standby.* - *sfptpd will detect which port is active and which ports are passive in the bond.* - *sfptpd will discipline the high precision clock on the active port’s network adapter.* - *sfptpd will discipline the clocks of passive ports from the active adapter’s clock.* - *Via the bonding driver you can select the active port (and therefore clock).* - *A bond can include non-PTP capable ports on a supported adapter.* *sfptpd will switch to software time-stamping when a non-hardware time-stamping port becomes active.* - *A bond can include third party ports .* *sfptpd will switch to software time-stamping when a third party port becomes active.* - *A bond can include any number of ports.* *Is there any plan to include a similar kind of working mechanism for PTP over Linux Bonding for seamless switchover in case of failure of active-slave port to passive-slave port when both slaves are on different NICs with different PHCs?* Thanks and regards Shashank Varshney On Tue, Apr 11, 2023 at 12:50 PM Miroslav Lichvar <mli...@re...> wrote: > On Mon, Apr 10, 2023 at 10:49:45PM +0530, shashank varshney wrote: > > I have following queries related to functioning of PTP with > active-passive > > bonding: > > > > - Will passive/standby slave PHC synchronize itself with active slave > > PHC when active-passive NIC ports are on different PHCs? > > No, phc2sys doesn't know about the other interfaces in the bond. > > > - Does the passive NIC port's PHC is ready to take-over when the > current > > active slave NIC goes down or does this require the passive NIC's PHC > to > > synchronize first? > > The latter. It's not a seamless switch. > > -- > Miroslav Lichvar > > |
From: Richard C. <ric...@gm...> - 2023-04-16 15:11:07
|
On Sun, Apr 16, 2023 at 01:54:20PM +0530, shashank varshney wrote: > *sfptpd supports PTP packets over bonded interfaces in an active/standby > mode. In addition, sfptpd also supports bonding over LACP (802.3ad) > bonding.* Looks like sfptpd is a hacked version of the old ptpd program. If that works for you, then great. > *Is there any plan to include a similar kind of working mechanism for PTP > over Linux Bonding for seamless switchover in case of failure of > active-slave port to passive-slave port when both slaves are on different > NICs with different PHCs?* I'm not aware of any plan for that. If you feel like adding it, then we'll look forward to your patches on the list... Thanks, Richard |
From: shashank v. <sha...@gm...> - 2023-06-06 06:51:39
|
Hi Richard/Miroslav, Hope you are doing good. As mentioned, PTP switchover from one NIC port to another is not seamless when ports belong to different NICs with different hardware clocks. I am looking to utilize PTP for very time sensitive use cases like 5G wireless, stock markets, etc. which desire High Availability and redundancy at NIC port level while utilizing PTP. This is going to be a significant use case if we would like to move to open sourced environment and LinuxPTP is going to have significant role to play to achieve this aspect. Can someone help me with getting this functionality of seamless switchover by synchronizing Active Port PHC with PTP GM and then synchronizing system clock and standby PHCs with active PHC? PS: I am not from development background so it will be difficult to develop this functionality from my end. So need community help to get this functionality. Thanks and regards Shashank Varshney On Sun, Apr 16, 2023 at 8:40 PM Richard Cochran <ric...@gm...> wrote: > On Sun, Apr 16, 2023 at 01:54:20PM +0530, shashank varshney wrote: > > > *sfptpd supports PTP packets over bonded interfaces in an active/standby > > mode. In addition, sfptpd also supports bonding over LACP (802.3ad) > > bonding.* > > Looks like sfptpd is a hacked version of the old ptpd program. If > that works for you, then great. > > > *Is there any plan to include a similar kind of working mechanism for > PTP > > over Linux Bonding for seamless switchover in case of failure of > > active-slave port to passive-slave port when both slaves are on different > > NICs with different PHCs?* > > I'm not aware of any plan for that. If you feel like adding it, then > we'll look forward to your patches on the list... > > Thanks, > Richard > |
From: Johannes Z. <j....@pe...> - 2023-06-06 10:06:07
|
Hi Shashank, On 6/6/23 08:51, shashank varshney wrote: > Hi Richard/Miroslav, > Hope you are doing good. > > As mentioned, PTP switchover from one NIC port to another is not seamless when > ports belong to different NICs with different hardware clocks. if the different ports of your endpoint are taking part in the same PTP domain and if they are synchronized there should be little or no offset. Why not using 2 different NICs and having 2 daemons sync to the network? I don't quite get why you would even want to run PTP over LACP or something alike (using LACP in Realtime Network with tight timing budgets is asking for trouble anyway...). Maybe I entirely miss your point, but from reading this thread, I'd recommend to review your system design. > > I am looking to utilize PTP for very time sensitive use cases like 5G wireless, > stock markets, etc. which desire High Availability and redundancy at NIC port > level while utilizing PTP. You probably want to look a bit closer on PCR/FRER for data transport, the different ports of your talker/listener devices can take part in a single (g)PTP domain. > > This is going to be a significant use case if we would like to move to open > sourced environment and LinuxPTP is going to have significant role to play to > achieve this aspect. > > Can someone help me with getting this functionality of seamless switchover by > synchronizing Active Port PHC with PTP GM and then synchronizing system clock > and standby PHCs with active PHC? > > PS: I am not from development background so it will be difficult to develop > this functionality from my end. So need community help to get this functionality. > This is not quite how the opensource community works - we can give you pointers and discuss the technical background, but you will probably not find anyone who does the implementation _for_ you, at least not for free. You can either participate in the effort yourself or hire someone to do it, there is quite a lot of companies as well as well as freelance individual contributors with tons of expertise in PTP. Best regards Johannes > > Thanks and regards > Shashank Varshney > > > On Sun, Apr 16, 2023 at 8:40 PM Richard Cochran <ric...@gm... > <mailto:ric...@gm...>> wrote: > > On Sun, Apr 16, 2023 at 01:54:20PM +0530, shashank varshney wrote: > > > *sfptpd supports PTP packets over bonded interfaces in an active/standby > > mode. In addition, sfptpd also supports bonding over LACP (802.3ad) > > bonding.* > > Looks like sfptpd is a hacked version of the old ptpd program. If > that works for you, then great. > > > *Is there any plan to include a similar kind of working mechanism for PTP > > over Linux Bonding for seamless switchover in case of failure of > > active-slave port to passive-slave port when both slaves are on different > > NICs with different PHCs?* > > I'm not aware of any plan for that. If you feel like adding it, then > we'll look forward to your patches on the list... > > Thanks, > Richard > > > > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users -- Pengutronix e.K. | Johannes Zink | Steuerwalder Str. 21 | https://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686| Fax: +49-5121-206917-5555 | |