• Arnd Bergmann's avatar
    infiniband: cxgb4: use ktime_get for timestamps · f8109d9e
    Arnd Bergmann authored
    The debugfs file prints the difference between host timestamps as a
    seconds/nanoseconds tuple, along with a 64-bit nanoseconds hardware
    timestamp. The host time is read using getnstimeofday() which is
    deprecated because of the y2038 overflow, and it suffers from time jumps
    during settimeofday() and leap seconds.
    
    Converting to ktime_get_ts64() would solve those two, but I'm going
    a little further here by changing to ktime_get() and printing 64-bit
    nanoseconds on both host and hw timestamps.  This simplifies the code
    further and makes the output easier to understand.
    
    The format of the debugfs file obviously changes here, but this should
    only be read by humans and not scripts, so I assume it's fine.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Acked-by: default avatarSteve Wise <swise@opengridcomputing.com>
    Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
    f8109d9e
qp.c 54.7 KB