<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/testing/selftests/net/udpgso.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-03-13T11:43:06Z</updated>
<entry>
<title>udp: gso: do not drop small packets when PMTU reduces</title>
<updated>2025-03-13T11:43:06Z</updated>
<author>
<name>Yan Zhai</name>
</author>
<published>2025-01-31T08:31:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4fae092c3c49cdacf1fb45680cc088fefe4ad02b'/>
<id>urn:sha1:4fae092c3c49cdacf1fb45680cc088fefe4ad02b</id>
<content type='text'>
[ Upstream commit 235174b2bed88501fda689c113c55737f99332d8 ]

Commit 4094871db1d6 ("udp: only do GSO if # of segs &gt; 1") avoided GSO
for small packets. But the kernel currently dismisses GSO requests only
after checking MTU/PMTU on gso_size. This means any packets, regardless
of their payload sizes, could be dropped when PMTU becomes smaller than
requested gso_size. We encountered this issue in production and it
caused a reliability problem that new QUIC connection cannot be
established before PMTU cache expired, while non GSO sockets still
worked fine at the same time.

Ideally, do not check any GSO related constraints when payload size is
smaller than requested gso_size, and return EMSGSIZE instead of EINVAL
on MTU/PMTU check failure to be more specific on the error cause.

Fixes: 4094871db1d6 ("udp: only do GSO if # of segs &gt; 1")
Signed-off-by: Yan Zhai &lt;yan@cloudflare.com&gt;
Suggested-by: Willem de Bruijn &lt;willemdebruijn.kernel@gmail.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: Calculate udpgso segment count without header adjustment</title>
<updated>2022-01-05T11:37:44Z</updated>
<author>
<name>Coco Li</name>
</author>
<published>2021-12-23T22:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3218d6bd6195ffac3efcbec9967f386886ebbdc7'/>
<id>urn:sha1:3218d6bd6195ffac3efcbec9967f386886ebbdc7</id>
<content type='text'>
[ Upstream commit 5471d5226c3b39b3d2f7011c082d5715795bd65c ]

The below referenced commit correctly updated the computation of number
of segments (gso_size) by using only the gso payload size and
removing the header lengths.

With this change the regression test started failing. Update
the tests to match this new behavior.

Both IPv4 and IPv6 tests are updated, as a separate patch in this series
will update udp_v6_send_skb to match this change in udp_send_skb.

Fixes: 158390e45612 ("udp: using datalen to cap max gso segments")
Signed-off-by: Coco Li &lt;lixiaoyan@google.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Link: https://lore.kernel.org/r/20211223222441.2975883-2-lixiaoyan@google.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: net: Fix printf format warnings on arm</title>
<updated>2019-12-31T15:45:09Z</updated>
<author>
<name>Masami Hiramatsu</name>
</author>
<published>2019-10-23T04:58:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=347d4a868c1a583ba3ed9a8c76b892b7fdf28a17'/>
<id>urn:sha1:347d4a868c1a583ba3ed9a8c76b892b7fdf28a17</id>
<content type='text'>
[ Upstream commit 670cd6849ea36ea4df2f2941cf4717dff8755abe ]

Fix printf format warnings on arm (and other 32bit arch).

 - udpgso.c and udpgso_bench_tx use %lu for size_t but it
   should be unsigned long long on 32bit arch.

 - so_txtime.c uses %ld for int64_t, but it should be
   unsigned long long on 32bit arch.

Signed-off-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Willem de Bruijn &lt;willemb@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>udp: only do GSO if # of segs &gt; 1</title>
<updated>2019-10-03T15:47:10Z</updated>
<author>
<name>Josh Hunt</name>
</author>
<published>2019-10-02T17:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4094871db1d65810acab3d57f6089aa39ef7f648'/>
<id>urn:sha1:4094871db1d65810acab3d57f6089aa39ef7f648</id>
<content type='text'>
Prior to this change an application sending &lt;= 1MSS worth of data and
enabling UDP GSO would fail if the system had SW GSO enabled, but the
same send would succeed if HW GSO offload is enabled. In addition to this
inconsistency the error in the SW GSO case does not get back to the
application if sending out of a real device so the user is unaware of this
failure.

With this change we only perform GSO if the # of segments is &gt; 1 even
if the application has enabled segmentation. I've also updated the
relevant udpgso selftests.

Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")
Signed-off-by: Josh Hunt &lt;johunt@akamai.com&gt;
Reviewed-by: Willem de Bruijn &lt;willemb@google.com&gt;
Reviewed-by: Alexander Duyck &lt;alexander.h.duyck@linux.intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftest/net: Remove duplicate header</title>
<updated>2019-03-04T19:35:51Z</updated>
<author>
<name>Souptick Joarder</name>
</author>
<published>2019-03-04T18:20:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e9322e5d28e433f1f25f01ffa0aa5762c75dad6'/>
<id>urn:sha1:9e9322e5d28e433f1f25f01ffa0aa5762c75dad6</id>
<content type='text'>
Remove duplicate header which is included twice.

Signed-off-by: Sabyasachi Gupta &lt;sabyasachi.linux@gmail.com&gt;
Signed-off-by: Souptick Joarder &lt;jrdr.linux@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests/net: udpgso: test small gso_size boundary conditions</title>
<updated>2018-06-04T13:49:39Z</updated>
<author>
<name>Willem de Bruijn</name>
</author>
<published>2018-05-31T16:14:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00f333e8d64d9064e636fe4024f6281e2b035a4c'/>
<id>urn:sha1:00f333e8d64d9064e636fe4024f6281e2b035a4c</id>
<content type='text'>
Verify that udpgso can generate segments smaller than device mtu, down
to the extreme case of 1B gso_size.

Verify that irrespective of gso_size, udpgso restricts the number of
segments it will generate per call (UDP_MAX_SEGMENTS).

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: udp gso with corking</title>
<updated>2018-04-26T19:09:52Z</updated>
<author>
<name>Willem de Bruijn</name>
</author>
<published>2018-04-26T17:42:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f12817fe3827b83e757617c2ff99f0ab088f5b9'/>
<id>urn:sha1:3f12817fe3827b83e757617c2ff99f0ab088f5b9</id>
<content type='text'>
Corked sockets take a different path to construct a udp datagram than
the lockless fast path. Test this alternate path.

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: udp gso with connected sockets</title>
<updated>2018-04-26T19:09:52Z</updated>
<author>
<name>Willem de Bruijn</name>
</author>
<published>2018-04-26T17:42:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5b2d91c2d12c197e9863def909a46302b45aa01'/>
<id>urn:sha1:e5b2d91c2d12c197e9863def909a46302b45aa01</id>
<content type='text'>
Connected sockets use path mtu instead of device mtu.

Test this path by inserting a route mtu that is lower than the device
mtu. Verify that the path mtu for the connection matches this lower
number, then run the same test as in the connectionless case.

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selftests: udp gso</title>
<updated>2018-04-26T19:09:40Z</updated>
<author>
<name>Willem de Bruijn</name>
</author>
<published>2018-04-26T17:42:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a160725780e3e086cf936722b0267408f17fceaa'/>
<id>urn:sha1:a160725780e3e086cf936722b0267408f17fceaa</id>
<content type='text'>
Validate udp gso, including edge cases (such as min/max gso sizes).

Signed-off-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
