提交 f6e53bb9 编写于 作者: C Coco Li 提交者: Zheng Zengkai

selftests: Calculate udpgso segment count without header adjustment

stable inclusion
from stable-v5.10.90
commit 13c1bf43b6744fcf28387cdec6f5b5c24a32f20a
bugzilla: 186168 https://gitee.com/openeuler/kernel/issues/I4SHY1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=13c1bf43b6744fcf28387cdec6f5b5c24a32f20a

--------------------------------

[ Upstream commit 5471d522 ]

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: 158390e4 ("udp: using datalen to cap max gso segments")
Signed-off-by: NCoco Li <lixiaoyan@google.com>
Reviewed-by: NWillem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20211223222441.2975883-2-lixiaoyan@google.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 6be8eae4
......@@ -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,
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册