Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-19 Thread Hangbin Liu
On Mon, Jun 19, 2017 at 10:05:15AM +0200, Richard Cochran wrote: > On Mon, Jun 19, 2017 at 03:35:16PM +0800, Hangbin Liu wrote: > > But other device actions will also trigger a rtnl notification, i.e. mtu > > change. > > So we need to make sure the slave actually changed before reset clock/port. >

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-19 Thread Richard Cochran
On Mon, Jun 19, 2017 at 03:35:16PM +0800, Hangbin Liu wrote: > But other device actions will also trigger a rtnl notification, i.e. mtu > change. > So we need to make sure the slave actually changed before reset clock/port. Fair enough, but that requires only one additional variable per port. Th

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-19 Thread Hangbin Liu
On Mon, Jun 19, 2017 at 09:05:25AM +0200, Richard Cochran wrote: > On Mon, Jun 19, 2017 at 02:56:00PM +0800, Hangbin Liu wrote: > > Then how do we know the slave changed. Cause via netlink rta > > IFLA_BOND_ACTIVE_SLAVE, we only know the current active slave. If we do not > > store previous slave n

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-19 Thread Richard Cochran
On Mon, Jun 19, 2017 at 02:56:00PM +0800, Hangbin Liu wrote: > Then how do we know the slave changed. Cause via netlink rta > IFLA_BOND_ACTIVE_SLAVE, we only know the current active slave. If we do not > store previous slave name/index some where and compare with current value. > How do we know the

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-18 Thread Hangbin Liu
On Mon, Jun 19, 2017 at 07:54:53AM +0200, Richard Cochran wrote: > On Mon, Jun 19, 2017 at 10:55:21AM +0800, Hangbin Liu wrote: > > > >struct interface { > > > >STAILQ_ENTRY(interface) list; > > > >char name[MAX_IFNAME_SIZE + 1]; > > > >char slave[MAX_IFNAME_

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-18 Thread Richard Cochran
On Mon, Jun 19, 2017 at 10:55:21AM +0800, Hangbin Liu wrote: > > >struct interface { > > >STAILQ_ENTRY(interface) list; > > >char name[MAX_IFNAME_SIZE + 1]; > > >char slave[MAX_IFNAME_SIZE + 1]; > > >int index; > > >int slave_index; >

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-18 Thread Hangbin Liu
Hi Richard, Thanks for your comments. Here are the replies. On Sat, Jun 17, 2017 at 07:21:08AM +0200, Richard Cochran wrote: > > Here are the brief descriptions. > > > > 1. add slave info in struct interface, something like > >struct interface { > >STAILQ_ENTRY(interface) list; >

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-16 Thread Richard Cochran
On Thu, Jun 08, 2017 at 03:50:13PM +0200, Miroslav Lichvar wrote: > The question is if you would be ok with bonding/teaming-specific code > in ptp4l and if you have any suggestions on the design. Should there > be only one port, or should each slave interface has its own port? There should be only

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-16 Thread Richard Cochran
Hangbin Finally getting back to this... On Tue, Jun 06, 2017 at 06:22:28PM +0800, Hangbin Liu wrote: > Now more and more customers are asking for linuxptp bond/team fail over > support. > I have a draft plan to implement this feature. Would you like to help review > it > to see if it's OK or no

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-15 Thread Richard Cochran
On Thu, Jun 15, 2017 at 09:23:16PM +0800, Hangbin Liu wrote: > Sorry to bother you again. But customers are pushing for this. Well, I have been overloaded with work, and today I am feeling sick. So I will take a look as soon as I can, but your customers will have to be patient. > If you like, I

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-15 Thread Hangbin Liu
2017-06-08 22:34 GMT+08:00 Richard Cochran : >> The question is if you would be ok with bonding/teaming-specific code >> in ptp4l and if you have any suggestions on the design. Should there >> be only one port, or should each slave interface has its own port? > > Ok, I will think about this... Hi

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-08 Thread Richard Cochran
On Thu, Jun 08, 2017 at 03:50:13PM +0200, Miroslav Lichvar wrote: > What Hangbin is suggesting is different in that most of the work is > done in ptp4l and there are no or only minimal changes needed in the > kernel and phc2sys. ptp4l would use the master interface for > networking and slave interf

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-08 Thread Miroslav Lichvar
On Thu, Jun 08, 2017 at 11:52:14AM +0200, Richard Cochran wrote: > I was waiting for Miroslav to comment first ;) > > He did suggest something some time ago. I have not yet thought much > about bonding, and so I not yet ready to give an opinion... My suggestion was to modify the kernel to suppor

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-08 Thread Richard Cochran
On Thu, Jun 08, 2017 at 04:50:27PM +0800, Hangbin Liu wrote: > Do you have any comments? I was waiting for Miroslav to comment first ;) He did suggest something some time ago. I have not yet thought much about bonding, and so I not yet ready to give an opinion... Thanks, Richard --

Re: [Linuxptp-devel] Implement bond/team fail over support

2017-06-08 Thread Hangbin Liu
Hi Richard, Do you have any comments? Regards Hangbin 2017-06-06 18:22 GMT+08:00 Hangbin Liu : > Hi Richard, > > Now more and more customers are asking for linuxptp bond/team fail over > support. > I have a draft plan to implement this feature. Would you like to help review > it > to see if it

[Linuxptp-devel] Implement bond/team fail over support

2017-06-06 Thread Hangbin Liu
Hi Richard, Now more and more customers are asking for linuxptp bond/team fail over support. I have a draft plan to implement this feature. Would you like to help review it to see if it's OK or not? Here are the brief descriptions. 1. add slave info in struct interface, something like struct