This patch set is to add linuxptp bond fail over support. The main idea is get bond's active slave interface via rtnl socket and store it in struct interface.
When active interface changed, we update the port phc index and switch to new phc on clock. After we get true ts interface, we need to use this interface in sk_timestamping_init() in transport_open(). Also we need update clock and phc_index in phc2sys. v2: 1. After the rtnl per port update, now we update ts_iface info in port_link_status(). 2. Fix port_dispatch event flood when change ts_iface info. This issue only happen with bond interface when fail over. Normal ethernet interface do not have this problem. Thanks Hangbin --- Testing: 1. Run linuxptp-testsuite and all passed. 2. Run ptp4l on non-bond interface 3. Run ptp4l on bond interface with following modes. the result looks good. # ./ptp4l -S -2 -i bond0 -m # ./ptp4l -i bond0 -m 4. Any other test scenario recommend? Hangbin Liu (9): config: add new element ts_iface in struct interface port: track interface info in port rtnl: update rtgenmsg to ifinfomsg when request link info rtnl: add function rtnl_link_info clock: use ts interface to get ts info clock: check required_modes before use new ts info port.c: fix port_dispatch event flood when change ts_iface info transport: pass struct interface to transport_open phc2sys: update clock clkid and phc_index if device changed clock.c | 52 +++++++++++++------- clock.h | 7 +++ config.c | 1 - config.h | 1 + phc2sys.c | 50 ++++++++++++++++++-- pmc_common.c | 5 +- port.c | 64 +++++++++++++++++++------ raw.c | 5 +- rtnl.c | 134 +++++++++++++++++++++++++++++++++++++++++++++++++--- rtnl.h | 17 +++++-- transport.c | 4 +- transport.h | 3 +- transport_private.h | 4 +- udp.c | 7 +-- udp6.c | 7 +-- uds.c | 3 +- 16 files changed, 302 insertions(+), 62 deletions(-) -- 2.5.5 ------------------------------------------------------------------------------ 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