]> git.baikalelectronics.ru Git - kernel.git/commit
testptp: add option to shift clock by nanoseconds
authorMaciek Machnikowski <maciek@machnikowski.net>
Mon, 21 Feb 2022 20:06:37 +0000 (21:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Feb 2022 01:03:40 +0000 (17:03 -0800)
commit9c0c771bcfcb29890dc4f7c4d160b732287e5afc
tree34d534cde652d8f2ab5429d74795e509b6c66807
parenta01cd1dd0e3a0c88e89bf5543f51eeb026aa9f85
testptp: add option to shift clock by nanoseconds

Add option to shift the clock by a specified number of nanoseconds.

The new argument -n will specify the number of nanoseconds to add to the
ptp clock. Since the API doesn't support negative shifts those needs to
be calculated by subtracting full seconds and adding a nanosecond offset.

Signed-off-by: Maciek Machnikowski <maciek@machnikowski.net>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Link: https://lore.kernel.org/r/20220221200637.125595-1-maciek@machnikowski.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/ptp/testptp.c