From 9ef9f19916a6bd6182db84138eecd063b17e3f58 Mon Sep 17 00:00:00 2001 From: Alexandra Kossovsky Date: Tue, 26 Sep 2023 12:59:14 +0300 Subject: [PATCH] driver/linux_onload: remove wrong sendpage assertion Onload used to assert that a memory chunk passed to sendpage handler is always within one page. It was true at the time when the assertion was added. It is not true any more. If a user runs two splice() calls: OS socket -> OS pipe -> Onload socket, then Onload's sendpage handler gets a whole memory-continuous packet as it was received by the NIC. Such a packet tend to be a part of a compound page, and it may cross the bounds of an ordinary page. The real sense of this assertion was "ensure that we are handling a continuous chunk". This is still true. But the assertion is bad for linux>=6.1 and for some updates of older kernels. OL-Redmine-Id: 12010 Co-developed-by: Sergey Nikitin Signed-off-by: Sergey Nikitin Signed-off-by: Alexandra Kossovsky Reviewed-by: Sergey Nikitin --- src/driver/linux_onload/tcp_sendpage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/driver/linux_onload/tcp_sendpage.c b/src/driver/linux_onload/tcp_sendpage.c index 6eddf0393..fe0cc2b40 100644 --- a/src/driver/linux_onload/tcp_sendpage.c +++ b/src/driver/linux_onload/tcp_sendpage.c @@ -55,7 +55,6 @@ ssize_t linux_tcp_helper_fop_sendpage(struct file* filp, struct page* page, ci_assert(page); ci_assert_ge(offset, 0); ci_assert_gt(size, 0); - ci_assert_le(offset + size, CI_PAGE_SIZE); #ifndef MSG_SENDPAGE_NOTLAST /* "flags" is really "more". Convert it. */