patch 'net/bonding: fix Tx hash for TCP' has been queued to stable release 19.11.14
christian.ehrhardt at canonical.com
christian.ehrhardt at canonical.com
Fri Nov 11 12:38:51 CET 2022
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 <christian.ehrhardt at canonical.com>
---
>From eda8213a0185c9566414e8cbb1aee280622c1544 Mon Sep 17 00:00:00 2001
From: Jun Qiu <jun.qiu at jaguarmicro.com>
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 <jun.qiu at jaguarmicro.com>
Acked-by: Min Hu (Connor) <humin29 at huawei.com>
---
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 at 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,
More information about the stable
mailing list