From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E463CA04DD for ; Wed, 28 Oct 2020 11:48:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DCDFC2C2A; Wed, 28 Oct 2020 11:48:40 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by dpdk.org (Postfix) with ESMTP id 18EBC2C2A for ; Wed, 28 Oct 2020 11:48:38 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id d3so4292752wma.4 for ; Wed, 28 Oct 2020 03:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PZS5EwBgg78ynwqrQtJp9rBdHf17pb3lRD6c7pW3wLI=; b=TP0GJC9KmERLcHkRqKBncYyYas91R4dNYMgYooDXGdYjH7yXBqG/Jxp9/Fulp1LIOY XFg5SaQyDIA60uBxjq6iNBaj6j1nDukUjNuCMTP3X/FAiSGjq02j3hG7+IfiUwyaB+nh TB96ka+jOozyCp+hGGC3TJaMNqit0W9Zbu8s+gfwv92Q/ArEkGsEKbdc1wV0UpFEYK48 t51G+kMMSpHPymxAnUa9mCn206ByBLq0h0PidY5/dDa4uaR1o3DD9m2ksQlGAa12qneI Ovq6Xatn+75vgCLMlQ66jVQmPu657ykgspELlURGrXD5WspXGvFCQkkk1Z0lrVKZDJIx rw6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PZS5EwBgg78ynwqrQtJp9rBdHf17pb3lRD6c7pW3wLI=; b=Adk52hXmD+mxH44xPp0lIr20W9Y3QYXLZHozVG08zEEvQfW4lRBWWSqWPV2FO2WTfy 1LKey7mjjV++TUfbbKXjNZDrRxFGbH1tRW8fIPdFdYiUPbeT8wdqXBKvw2MiZY08W9qK Ag9on0fYRfN9kNygAzuUFEXhdj37EX37NBVypadze/nqJphVh397wLXTAn1tgIS/FOr0 dg/CaLYZRHpG3yQ7OckgtJi7wtFxCPQsuIl91TftygdHMyFJpe+/3/BspXe2Z/x+Ogmr Sto1jRiZt7CXuycdiobqusW+gdkAFFXW7gA5Q3e70WW+Sf9tnmuprje0aAJai+sKM0LA XERw== X-Gm-Message-State: AOAM5302XTlZEC6q4T3kE25xxSYVDhc03W+8N1ma2XEFSmNcZPG7KCBv ULMg69O3ks2gkkw06eTlqBU= X-Google-Smtp-Source: ABdhPJyfNXSQctNsMOMllIa+VBY0fV4ZfkS9cddEk6ssWy1aZIh5rRIczfOkw7jSv/6ucOPmtdC5yg== X-Received: by 2002:a7b:ce18:: with SMTP id m24mr7398258wmc.169.1603882116819; Wed, 28 Oct 2020 03:48:36 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:7a8e:ed70:5c52:ea3]) by smtp.gmail.com with ESMTPSA id t6sm7138461wre.30.2020.10.28.03.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:48:36 -0700 (PDT) From: luca.boccassi@gmail.com To: Yi Yang Cc: Jiayu Hu , dpdk stable Date: Wed, 28 Oct 2020 10:43:25 +0000 Message-Id: <20201028104606.3504127-46-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Jiayu Hu --- 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 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@dpdk.org Signed-off-by: Yi Yang Acked-by: Jiayu Hu