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_SIZE + 1];
> > > >            int index;
> > > >            int slave_index;
> > > >            int linkup;
> > > >            int slave_changed;
> > > 
> > > I don't think this new state is needed, because...
> > 
> > Which state? all the new elements or just the last slave_changed variable?
> 
> I imagine that none of the new state is needed.
> 
> > So what you want is to get new ts_info in clock_create() and do not store
> > slave information in struct interface, right?
> 
> Yes, moving the single sk_get_ts_info() call site is better than
> adding new state just to remember values from
> config_create_interface() till clock_create(), don't you think?

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 slave changed and phc index need update?

Thanks
Hangbin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to