diff mbox series

[liburing,1/1] test/send-zerocopy: test fix datagrams over UDP limit

Message ID 285eca872bd46640ed209c0b09628f53744cb3ab.1724110909.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series [liburing,1/1] test/send-zerocopy: test fix datagrams over UDP limit | expand

Commit Message

Pavel Begunkov Aug. 20, 2024, 9:53 p.m. UTC
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 test/send-zerocopy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jens Axboe Aug. 21, 2024, 12:12 a.m. UTC | #1
On Tue, 20 Aug 2024 22:53:39 +0100, Pavel Begunkov wrote:
> 


Applied, thanks!

[1/1] test/send-zerocopy: test fix datagrams over UDP limit
      commit: 2d4e799017d64cd2f8304503eef9064931bb3fbd

Best regards,
Pavel Begunkov Aug. 22, 2024, 3:35 a.m. UTC | #2
On 8/22/24 04:30, Pavel Begunkov wrote:
> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>

Please ignore, was resent by accident. Apologies for the noise


> ---
>   test/send-zerocopy.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c
> index 8796974..597ecf1 100644
> --- a/test/send-zerocopy.c
> +++ b/test/send-zerocopy.c
> @@ -646,7 +646,8 @@ static int test_inet_send(struct io_uring *ring)
>   
>   				if (!buffers_iov[buf_index].iov_base)
>   					continue;
> -				if (!tcp && len > 4 * page_sz)
> +				/* UDP IPv4 max datagram size is under 64K */
> +				if (!tcp && len > (1U << 15))
>   					continue;
>   
>   				conf.buf_index = buf_index;
diff mbox series

Patch

diff --git a/test/send-zerocopy.c b/test/send-zerocopy.c
index 8796974..597ecf1 100644
--- a/test/send-zerocopy.c
+++ b/test/send-zerocopy.c
@@ -646,7 +646,8 @@  static int test_inet_send(struct io_uring *ring)
 
 				if (!buffers_iov[buf_index].iov_base)
 					continue;
-				if (!tcp && len > 4 * page_sz)
+				/* UDP IPv4 max datagram size is under 64K */
+				if (!tcp && len > (1U << 15))
 					continue;
 
 				conf.buf_index = buf_index;