[dpdk-stable] patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:43:25 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
From: Yi Yang <yangyi01 at inspur.com>
Date: Thu, 17 Sep 2020 10:12:49 +0800
Subject: [PATCH] gso: fix payload unit size for UDP

[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]

Fragment offset of IPv4 header is measured in units of
8 bytes. Fragment offset of UDP fragments will be wrong
after GSO if pyld_unit_size isn't multiple of 8. Say
pyld_unit_size is 1500, fragment offset of the second
UDP fragment will be 187 (i.e. 1500 / 8), which means 1496,
and it will result in 4-byte data loss (1500 - 1496 = 4).
So UDP GRO will reassemble out a wrong packet.

Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")

Signed-off-by: Yi Yang <yangyi01 at inspur.com>
Acked-by: Jiayu Hu <jiayu.hu at intel.com>
---
 lib/librte_gso/gso_udp4.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c
index 21fea09273..6fa68f243a 100644
--- a/lib/librte_gso/gso_udp4.c
+++ b/lib/librte_gso/gso_udp4.c
@@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
 		return 1;
 	}
 
-	pyld_unit_size = gso_size - hdr_offset;
+	/* pyld_unit_size must be a multiple of 8 because frag_off
+	 * uses 8 bytes as unit.
+	 */
+	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
 
 	/* Segment the payload */
 	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.228089104 +0000
+++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
@@ -1,8 +1,10 @@
-From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 2001
+From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
 From: Yi Yang <yangyi01 at inspur.com>
 Date: Thu, 17 Sep 2020 10:12:49 +0800
 Subject: [PATCH] gso: fix payload unit size for UDP
 
+[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
+
 Fragment offset of IPv4 header is measured in units of
 8 bytes. Fragment offset of UDP fragments will be wrong
 after GSO if pyld_unit_size isn't multiple of 8. Say
@@ -12,7 +14,6 @@
 So UDP GRO will reassemble out a wrong packet.
 
 Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yi Yang <yangyi01 at inspur.com>
 Acked-by: Jiayu Hu <jiayu.hu at intel.com>


More information about the stable mailing list