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 1821DA00C2 for ; Thu, 3 Nov 2022 10:33:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11EA540694; Thu, 3 Nov 2022 10:33:33 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id 6B7C840693 for ; Thu, 3 Nov 2022 10:33:31 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id h9so1797829wrt.0 for ; Thu, 03 Nov 2022 02:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d/e1peVlJ9XrrEs2+qJibM0V8vHPVFYoTdihkwuWN+c=; b=TiR5wvG00pK7F4+4vZtvJp0WNT78cIfM7LVot9WKc57lAwJbiz/YcVjWDo+G3HG0N9 shHHcQu/5756Vip1L3mFrvumvfbnbA5nk8GVdSGjFoZmwRePhhT8S9/u39OrlP9gUIaC KlHuyzK3do4+y+G2X2BasXCkDW1uhd8rg2yZwpJ+QnQnrCW4j+i5pjRieiSdl/tcXhBn Z/MAFgLW7vGcFrazUsqabAhd5ZBuN1Bqcw1ydNKnIQKVsw0EBoPELyf1Sld8xxNh1t0N rZT1IBnVssPkrThHP/cgp71tyl9MfAAf39e7x0VChp1owKgQaTMr0pXuiHZLIktZQ0qL VdgA== 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=d/e1peVlJ9XrrEs2+qJibM0V8vHPVFYoTdihkwuWN+c=; b=rEq39/bowm04VW2MXMa8hafVsZDRBRvveRY7U4nVheG6FdT4w3qeMEWe7d69Zc3iTw KeJ1Fh7zYXM8/ZxlzE8t0BsmEphW6s+Qlpl8Sk2dRz6Jhq8PJY6Vn+qCTxE9p0Yg34KX cxEryFW6W4/S2LG9r8XBr2JSZtx9JjNzIc/yqEe3eF0lYLL/X/ZBMSMj2r9VCh5Volro 4yV3ReaTAw2vvheUU3FgcU7AOf1YJ5efnoBK1wAOEuTOFBina5MQZf+n8SMGgbaE9KQc cciYyYySX4z8wZzo7DY+EGrQ/m5+n9jkIDH29ol6TWxujYmLQRfIfc3YYx4UjCN9asyx WfHg== X-Gm-Message-State: ACrzQf1yTVG3Uvywy0WSLp207+p8fNeUnfTQhkDH2QUVvzbNFIaoM6w+ 1r11K/P55hQod3/loXKMzLg= X-Google-Smtp-Source: AMsMyM67sa9PexYSOVdITXvxIEVBv8FYtbmyO7jqMUnuvt7LGVisg2d81Ku9r25+roOpx78O3AGdUA== X-Received: by 2002:adf:cd09:0:b0:236:659a:6902 with SMTP id w9-20020adfcd09000000b00236659a6902mr18591055wrm.574.1667468011108; Thu, 03 Nov 2022 02:33:31 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id h4-20020adff184000000b00236e9755c02sm291783wro.111.2022.11.03.02.33.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:33:30 -0700 (PDT) From: luca.boccassi@gmail.com To: Jun Qiu Cc: Min Hu , dpdk stable Subject: patch 'net/bonding: fix Tx hash for TCP' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:55 +0000 Message-Id: <20221103092758.1099402-97-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.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 20.11.7 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/05/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5941407eb9ea3e9b8d2618f65bbbcaddaf0b1614 Thanks. Luca Boccassi --- >From 5941407eb9ea3e9b8d2618f65bbbcaddaf0b1614 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 f1c9a4299e..a73d5bd497 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.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:31.413899661 +0000 +++ 0097-net-bonding-fix-Tx-hash-for-TCP.patch 2022-11-03 09:27:25.565426157 +0000 @@ -1 +1 @@ -From 8168328854f1ff6ee319da8a4211584a30868e0e Mon Sep 17 00:00:00 2001 +From 5941407eb9ea3e9b8d2618f65bbbcaddaf0b1614 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 f1c9a4299e..a73d5bd497 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,