mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Yuri Benditovich <yuri.benditovich@daynix.com>,
	willemdebruijn.kernel@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	shuah@kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	yan@daynix.com, andrew@daynix.com
Subject: Re: [PATCH] net: change maximum number of UDP segments to 128
Date: Sun, 7 Apr 2024 01:56:28 +0500	[thread overview]
Message-ID: <ac0743c0-616c-45e6-815f-c46fb03c329d@collabora.com> (raw)
In-Reply-To: <20240406082513.78692-1-yuri.benditovich@daynix.com>

On 4/6/24 1:25 PM, Yuri Benditovich wrote:
> Earlier commit fc8b2a619469378 ("net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 validation")
> added check of potential number of UDP segment vs UDP_MAX_SEGMENTS
> in linux/virtio_net.h.
> After this change certification test of USO guest-to-guest
> transmit on Windows driver for virtio-net device fails,
> for example with packet size of ~64K and mss of 536 bytes.
> In general the USO should not be more restrictive than TSO.
> Indeed, in case of unreasonably small mss a lot of segments
> can cause queue overflow and packet loss on the destination.
> Limit of 128 segments is good for any practical purpose,
> with minimal meaningful mss of 536 the maximal UDP packet will
> be divided to ~120 segments.
> 
> Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com

> ---
>  include/linux/udp.h                  | 2 +-
>  tools/testing/selftests/net/udpgso.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/udp.h b/include/linux/udp.h
> index 3748e82b627b..7e75ccdf25fe 100644
> --- a/include/linux/udp.h
> +++ b/include/linux/udp.h
> @@ -108,7 +108,7 @@ struct udp_sock {
>  #define udp_assign_bit(nr, sk, val)		\
>  	assign_bit(UDP_FLAGS_##nr, &udp_sk(sk)->udp_flags, val)
>  
> -#define UDP_MAX_SEGMENTS	(1 << 6UL)
> +#define UDP_MAX_SEGMENTS	(1 << 7UL)
>  
>  #define udp_sk(ptr) container_of_const(ptr, struct udp_sock, inet.sk)
>  
> diff --git a/tools/testing/selftests/net/udpgso.c b/tools/testing/selftests/net/udpgso.c
> index 1d975bf52af3..85b3baa3f7f3 100644
> --- a/tools/testing/selftests/net/udpgso.c
> +++ b/tools/testing/selftests/net/udpgso.c
> @@ -34,7 +34,7 @@
>  #endif
>  
>  #ifndef UDP_MAX_SEGMENTS
> -#define UDP_MAX_SEGMENTS	(1 << 6UL)
> +#define UDP_MAX_SEGMENTS	(1 << 7UL)
>  #endif
>  
>  #define CONST_MTU_TEST	1500

-- 
BR,
Muhammad Usama Anjum

      parent reply	other threads:[~2024-04-06 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-06  8:25 Yuri Benditovich
2024-04-06 15:03 ` Willem de Bruijn
2024-04-06 20:56 ` Muhammad Usama Anjum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac0743c0-616c-45e6-815f-c46fb03c329d@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=andrew@daynix.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=willemdebruijn.kernel@gmail.com \
    --cc=yan@daynix.com \
    --cc=yuri.benditovich@daynix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®