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 -> v3: 1. Change the ts_iface to ts_label 2. Separate the original fourth patch "rtnl: add function rtnl_link_info" into two parts. The first part is update function rtnl_link_status to get bond slave info. And the second part add the new function rtnl_get_ts_label() to get interface ts_label info. 3. update port link_status to enum 4. Some small fixes. v1 -> 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 bond interface and trigger the failover, the result looks good. Hangbin Liu (10): config: add new element ts_label in struct interface port: track interface info in port rtnl: update rtgenmsg to ifinfomsg when request link info rtnl: update function rtnl_link_status to get bond slave info rtnl: add function rtnl_get_ts_label to get interface ts_label info port: update port link_status to enum clock: add clock_required_modes to obtain the required time stamping mode ptp4l: use ts label to get ts info transport: pass struct interface to transport_open phc2sys: update clock clkid and phc_index if device changed clock.c | 63 +++++++++++++++++-------- clock.h | 8 ++++ config.c | 1 - config.h | 1 + phc2sys.c | 50 ++++++++++++++++++-- pmc_common.c | 5 +- port.c | 79 +++++++++++++++++++++++++------ raw.c | 5 +- rtnl.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++------ rtnl.h | 28 +++++++---- transport.c | 4 +- transport.h | 3 +- transport_private.h | 4 +- udp.c | 7 +-- udp6.c | 7 +-- uds.c | 3 +- 16 files changed, 324 insertions(+), 75 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