The max number of UDP gso segments is intended to cap to
UDP_MAX_SEGMENTS, this is checked in udp_send_skb().
skb->len contains network and transport header len here, we should use
only data len instead.
This is the ipv6 counterpart to the below referenced commit,
which missed the ipv6 change
Fixes: 158390e45612 ("udp: using datalen to cap max gso segments")
Signed-off-by: Coco Li <redacted>
Reviewed-by: Willem de Bruijn <willemb@google.com>
---
net/ipv6/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 <redacted>
Reviewed-by: Willem de Bruijn <willemb@google.com>
---
tools/testing/selftests/net/udpgso.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -156,13 +156,13 @@ struct testcase testcases_v4[] = {},{/* send max number of min sized segments */-.tlen=UDP_MAX_SEGMENTS-CONST_HDRLEN_V4,+.tlen=UDP_MAX_SEGMENTS,.gso_len=1,-.r_num_mss=UDP_MAX_SEGMENTS-CONST_HDRLEN_V4,+.r_num_mss=UDP_MAX_SEGMENTS,},{/* send max number + 1 of min sized segments: fail */-.tlen=UDP_MAX_SEGMENTS-CONST_HDRLEN_V4+1,+.tlen=UDP_MAX_SEGMENTS+1,.gso_len=1,.tfail=true,},
@@ -259,13 +259,13 @@ struct testcase testcases_v6[] = {},{/* send max number of min sized segments */-.tlen=UDP_MAX_SEGMENTS-CONST_HDRLEN_V6,+.tlen=UDP_MAX_SEGMENTS,.gso_len=1,-.r_num_mss=UDP_MAX_SEGMENTS-CONST_HDRLEN_V6,+.r_num_mss=UDP_MAX_SEGMENTS,},{/* send max number + 1 of min sized segments: fail */-.tlen=UDP_MAX_SEGMENTS-CONST_HDRLEN_V6+1,+.tlen=UDP_MAX_SEGMENTS+1,.gso_len=1,.tfail=true,},
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-12-24 03:19:25
On Thu, 23 Dec 2021 22:24:40 +0000 Coco Li wrote:
The max number of UDP gso segments is intended to cap to
UDP_MAX_SEGMENTS, this is checked in udp_send_skb().
skb->len contains network and transport header len here, we should use
only data len instead.
This is the ipv6 counterpart to the below referenced commit,
which missed the ipv6 change
Fixes: 158390e45612 ("udp: using datalen to cap max gso segments")
I'm gonna replace the Fixes tag with:
Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")
hope that's okay.
quoted hunk
Signed-off-by: Coco Li <redacted>
Reviewed-by: Willem de Bruijn <willemb@google.com>
---
net/ipv6/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-12-24 03:23:00
On Thu, 23 Dec 2021 19:19:22 -0800 Jakub Kicinski wrote:
On Thu, 23 Dec 2021 22:24:40 +0000 Coco Li wrote:
quoted
The max number of UDP gso segments is intended to cap to
UDP_MAX_SEGMENTS, this is checked in udp_send_skb().
skb->len contains network and transport header len here, we should use
only data len instead.
This is the ipv6 counterpart to the below referenced commit,
which missed the ipv6 change
Fixes: 158390e45612 ("udp: using datalen to cap max gso segments")
I'm gonna replace the Fixes tag with:
Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")
hope that's okay.
Or I'll fumble the git command and accidentally push as is... Whatever.
Hello:
This series was applied to netdev/net.git (master)
by Jakub Kicinski [off-list ref]:
On Thu, 23 Dec 2021 22:24:40 +0000 you wrote:
The max number of UDP gso segments is intended to cap to
UDP_MAX_SEGMENTS, this is checked in udp_send_skb().
skb->len contains network and transport header len here, we should use
only data len instead.
This is the ipv6 counterpart to the below referenced commit,
which missed the ipv6 change
[...]
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Date: 2021-12-24 03:49:33
On Thu, Dec 23, 2021 at 10:23 PM Jakub Kicinski [off-list ref] wrote:
On Thu, 23 Dec 2021 19:19:22 -0800 Jakub Kicinski wrote:
quoted
On Thu, 23 Dec 2021 22:24:40 +0000 Coco Li wrote:
quoted
The max number of UDP gso segments is intended to cap to
UDP_MAX_SEGMENTS, this is checked in udp_send_skb().
skb->len contains network and transport header len here, we should use
only data len instead.
This is the ipv6 counterpart to the below referenced commit,
which missed the ipv6 change
Fixes: 158390e45612 ("udp: using datalen to cap max gso segments")
I'm gonna replace the Fixes tag with:
Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT")
hope that's okay.
Or I'll fumble the git command and accidentally push as is... Whatever.
Thanks. I was in two minds which commit to use. From a backport to
stable point of view, it should not matter in practice.