add tx timestamp tests
v2 cover add tx timestamp tests
Add definitions / tests test for tx timestamping io_uring API. See
https://lore.kernel.org/all/[email protected]/
Pavel Begunkov (2):
Sync io_uring.h with tx timestamp api
tests: add a tx timestamp test
src/include/liburing/io_uring.h | 16 ++ test/Makefile | 1 + test/timestamp.c | 373 ++++++++++++++++++++++++++++++++ 3 files changed, 390 insertions(+) create mode 100644 test/timestamp.c
Signature · 1 line
2.49.0
PATCH v2 1/2 Sync io_uring.h with tx timestamp api
--- src/include/liburing/io_uring.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
src/include/liburing/io_uring.h +16 -0
@@ -915,6 +915,22 @@ enum io_uring_socket_op {SOCKET_URING_OP_SIOCOUTQ ,SOCKET_URING_OP_GETSOCKOPT ,SOCKET_URING_OP_SETSOCKOPT , + SOCKET_URING_OP_TX_TIMESTAMP, +}; + +/* +* SOCKET_URING_OP_TX_TIMESTAMP definitions +*/ + +#define IORING_TIMESTAMP_HW_SHIFT 16 +/* The cqe->flags bit from which the timestamp type is stored */ +#define IORING_TIMESTAMP_TYPE_SHIFT (IORING_TIMESTAMP_HW_SHIFT + 1) +/* The cqe->flags flag signifying whether it's a hardware timestamp */ +#define IORING_CQE_F_TSTAMP_HW ((__u32)1 << IORING_TIMESTAMP_HW_SHIFT); + +struct io_timespec { +__u64 tv_sec; +__u64 tv_nsec; };/* Zero copy receive refill queue entry */
Signature · 1 line
2.49.0
PATCH v2 2/2 tests: add a tx timestamp test
In reply to Pavel BegunkovAdd a test for tx timestamping io_uring API.
https://lore.kernel.org/all/[email protected]/
The test itself is just an adapted version of txtimestamp.c kernel selftest.
--- test/Makefile | 1 + test/timestamp.c | 373 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 374 insertions(+) create mode 100644 test/timestamp.c
test/Makefile +1 -0
@@ -249,6 +249,7 @@ test_srcs := \ xattr.c \ zcrx.c \ vec-regbuf.c \ + timestamp.c \ # EOL # Please keep this list sorted alphabetically.
test/timestamp.c new file +373 -0
373 lines not on this page · raw message
Signature · 1 line
2.49.0
Quoted 9 lines · Pavel Begunkov
Add definitions / tests test for tx timestamping
io_uringAPI. Seehttps://lore.kernel.org/all/[email protected]/
Pavel Begunkov (2):
Syncio_uring.hwith tx timestamp api
tests: add a tx timestamp test[...]
Applied, thanks!
[1/2] Sync io_uring.h with tx timestamp api
commit: 2b11d4753496335cec916d3c0a46c181ea79c6b6
[2/2] tests: add a tx timestamp test
commit: 21224848af24d379d54fbf1bd43a60861fe19f9bBest regards,
Signature · 1 line
Jens Axboe