From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 763ADA0544 for ; Fri, 11 Nov 2022 12:41:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71A7A4014F; Fri, 11 Nov 2022 12:41:01 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 05A6640141 for ; Fri, 11 Nov 2022 12:41:00 +0100 (CET) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id C9243412CE for ; Fri, 11 Nov 2022 11:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166859; bh=FD72TjWV14yB9wASj4i6uaXoVqE7rGVAi0w/g+Mgdok=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CNMvTrvNu4tBedljzZaH1lpTIUXnHDr0gru35kNMBN9tIs5xIBOt9oAmMI2+w+Epf 71td2KFagdPnO3JOmx7Gzp1jgMPmm9KLWEkvwOzT3bYgZ3EGGgJeKZ+fWcB9ah9j7F 0A78LJHgNdnr6oEkbAv65lb9gVxuUt/+DER8ujfExPLPhaVxA0GAf09jdCZDJLW7Si jsnb/oWjvqsM1PsxBfEPbdYJIxvTFJ9R1a/yKG8j3UuNYeFU3TjwtfObFvOWe+3zfW S1JvJgP08JOwZvG1yWL+CQe5bxIqaTu6rM1tO5+UjMVssF3mWFiqKU3513AB0UcAi5 jJQL3E4EOfXYA== Received: by mail-ej1-f71.google.com with SMTP id gt15-20020a1709072d8f00b007aaac7973fbso2911577ejc.23 for ; Fri, 11 Nov 2022 03:40:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FD72TjWV14yB9wASj4i6uaXoVqE7rGVAi0w/g+Mgdok=; b=FNmUOqQfLUKC+Wl4+mW7Yt0KUlsACkTYZW8jTXgzpNYsl5tSD6I19LlfWKNq2JNV3x yUoESs5kOQd9Ys4GcjHr8/wCugGlDDdvfMt5ax4YzNyuQJmKrLrJkfNTbc5DDVNKnxZX eCgG9cQMuX+U3XSYMLUrmCdYOAP0qDD+VYmzbkRBOaK3qz710C+CqGKc6fbsVThk/j/f L+Aa16hTrCMcvJTqBGOsupbP1K+6peUgaEN5zdpn7oyMW/NPfoehv+Gk0nEXAlVz5gx7 83Uukbe427mD8tDLl4h8B9gljS294Hl2CirCwIW+f6yt72ueMeWWsNlLRL5dn35TAxMI VtpQ== X-Gm-Message-State: ANoB5pknFuYf6STAtGn2D2ydThJSXP8qtHekZb1mejpvyfhHVjSg6W5x VvNKOaG0eO6l/4SKyP3zAPgSp9Av+vuW/dzqqY0kpqGvg0wng3ksBG5HDOH1yILCRZamVK5b74c 2M9RqkXxfQWOL761YnHZcu4am X-Received: by 2002:a17:906:79a:b0:73d:715c:5730 with SMTP id l26-20020a170906079a00b0073d715c5730mr1497828ejc.293.1668166859109; Fri, 11 Nov 2022 03:40:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf7CJBrd0ETsR9zmzHqH50xJcMY0dUJVviDcjHjx0OAk4hgMndr83bxluDVZBVjZAjAw+r/GKg== X-Received: by 2002:a17:906:79a:b0:73d:715c:5730 with SMTP id l26-20020a170906079a00b0073d715c5730mr1497820ejc.293.1668166858908; Fri, 11 Nov 2022 03:40:58 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id jz22-20020a17090775f600b0073dc4385d3bsm782322ejc.105.2022.11.11.03.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:40:58 -0800 (PST) From: christian.ehrhardt@canonical.com To: Jun Qiu Cc: Min Hu , dpdk stable Subject: patch 'net/bonding: fix Tx hash for TCP' has been queued to stable release 19.11.14 Date: Fri, 11 Nov 2022 12:38:51 +0100 Message-Id: <20221111113904.1549618-34-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.14 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/18/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/eda8213a0185c9566414e8cbb1aee280622c1544 Thanks. Christian Ehrhardt --- >From eda8213a0185c9566414e8cbb1aee280622c1544 Mon Sep 17 00:00:00 2001 From: Jun Qiu Date: Tue, 26 Jul 2022 06:19:24 +0000 Subject: [PATCH] net/bonding: fix Tx hash for TCP [ upstream commit 8168328854f1ff6ee319da8a4211584a30868e0e ] In the following two cases, tcp_hdr + sizeof(*tcp_hdr) == pkt_end, and the TCP port is not taken into account in calculating the HASH value of TCP packets. TCP connections with the same source and destination IP addresses will be hashed to the same slave port, which may cause load imbalance. 1. TCP Pure ACK packets with no options, The header length is 20 and there is no data. 2. A TCP packet contains data, but the first seg of the mbuf contains only the header information (ETH, IP, TCP), and the data is in subsequent segs, which is usually the case in the indirect mbuf used for zero-copy. Fixes: 726158060d55 ("net/bonding: fix potential out of bounds read") Signed-off-by: Jun Qiu Acked-by: Min Hu (Connor) --- drivers/net/bonding/rte_eth_bond_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 2032b3af50..c900eb1f4b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -772,7 +772,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts, ((char *)ipv4_hdr + ip_hdr_offset); if ((size_t)tcp_hdr + sizeof(*tcp_hdr) - < pkt_end) + <= pkt_end) l4hash = HASH_L4_PORTS(tcp_hdr); } else if (ipv4_hdr->next_proto_id == IPPROTO_UDP) { -- 2.38.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-11 12:35:05.986226132 +0100 +++ 0034-net-bonding-fix-Tx-hash-for-TCP.patch 2022-11-11 12:35:04.789192151 +0100 @@ -1 +1 @@ -From 8168328854f1ff6ee319da8a4211584a30868e0e Mon Sep 17 00:00:00 2001 +From eda8213a0185c9566414e8cbb1aee280622c1544 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8168328854f1ff6ee319da8a4211584a30868e0e ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index fd2d95a751..4081b21338 100644 +index 2032b3af50..c900eb1f4b 100644 @@ -31 +32 @@ -@@ -768,7 +768,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts, +@@ -772,7 +772,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,