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

Kevin Traynor ktraynor at redhat.com
Thu Nov 5 13:39:23 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/10/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0b1b80325e9cc6c7ddd1b2bba0001d2c351c5c8b

Thanks.

Kevin.

---
>From 0b1b80325e9cc6c7ddd1b2bba0001d2c351c5c8b 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 927dee1213..a33b1f1c54 100644
--- a/lib/librte_gso/gso_udp4.c
+++ b/lib/librte_gso/gso_udp4.c
@@ -70,5 +70,8 @@ gso_udp4_segment(struct rte_mbuf *pkt,
 	}
 
-	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 */
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-05 12:38:54.566865691 +0000
+++ 0016-gso-fix-payload-unit-size-for-UDP.patch	2020-11-05 12:38:54.179895972 +0000
@@ -1 +1 @@
-From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 2001
+From 0b1b80325e9cc6c7ddd1b2bba0001d2c351c5c8b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 21fea09273..6fa68f243a 100644
+index 927dee1213..a33b1f1c54 100644



More information about the stable mailing list