diff mbox series

[liburing,7/7] tests/send: sends with offsets

Message ID df6ee2e8912b3709f410a84fa2b58683d69a936d.1676941370.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series test sends with huge pages | expand

Commit Message

Pavel Begunkov Feb. 21, 2023, 1:05 a.m. UTC
Apart from arbitrary shifting buffers before registration so they're
not page aligned, also add offsets to send requests.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 test/send-zerocopy.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c
index 8ddec39..57894aa 100644
--- a/test/send-zerocopy.c
+++ b/test/send-zerocopy.c
@@ -833,6 +833,15 @@  int main(int argc, char *argv[])
 		return T_EXIT_FAIL;
 	}
 
+	if (buffers_iov[BUF_T_HUGETLB].iov_base) {
+		buffers_iov[BUF_T_HUGETLB].iov_base += 13;
+		buffers_iov[BUF_T_HUGETLB].iov_len -= 26;
+	}
+	if (buffers_iov[BUF_T_LARGE].iov_base) {
+		buffers_iov[BUF_T_LARGE].iov_base += 13;
+		buffers_iov[BUF_T_LARGE].iov_len -= 26;
+	}
+
 	ret = test_inet_send(&ring);
 	if (ret) {
 		fprintf(stderr, "test_inet_send() failed\n");