• Hangbin Liu's avatar
    bond: pass get_ts_info and SIOC[SG]HWTSTAMP ioctl to active device · 94dd016a
    Hangbin Liu authored
    We have VLAN PTP support(via get_ts_info) on kernel, and bond support(by
    getting active interface via netlink message) on userspace tool linuxptp.
    But there are always some users who want to use PTP with VLAN over bond,
    which is not able to do with the current implementation.
    
    This patch passed get_ts_info and SIOC[SG]HWTSTAMP ioctl to active device
    with bond mode active-backup/tlb/alb. With this users could get kernel native
    bond or VLAN over bond PTP support.
    
    Test with ptp4l and it works with VLAN over bond after this patch:
    ]# ptp4l -m -i bond0.23
    ptp4l[53377.141]: selected /dev/ptp4 as PTP clock
    ptp4l[53377.142]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[53377.143]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[53377.143]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
    ptp4l[53384.127]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
    ptp4l[53384.127]: selected local clock e41d2d.fffe.123db0 as best master
    ptp4l[53384.127]: port 1: assuming the grand master role
    Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    94dd016a
bond_main.c 165 KB