patch 'net/bonding: fix mbuf fast free usage' has been queued to stable release 19.11.13

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:54:36 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

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

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 84ee8673e5ecea79eebb2a544dd025c16b7bd8dc Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29 at huawei.com>
Date: Wed, 25 May 2022 09:08:28 +0800
Subject: [PATCH] net/bonding: fix mbuf fast free usage

[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]

Usage of 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload has two
constraints: per-queue all mbufs comes from the same mempool and
has refcnt = 1.

Bonding mode Broadcast, Tx mbuf has more than one refcnt.
Bonding mode 8023AD, It contains two mempools separately for LACP
packets and other packets. In Tx or Rx, Fast mbuf free will operate
mbuf from different mempool.

This patch will prevent 'RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE' offload
when in bonding mode Broadcast and mode 8023AD.

Fixes: 78aecefed955 ("bond: move param parsing in configure step")

Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 2c55621740..812bfb8bd3 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3540,6 +3540,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 	const char *name = dev->device->name;
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_kvargs *kvlist = internals->kvlist;
+	uint64_t offloads;
 	int arg_count;
 	uint16_t port_id = dev - rte_eth_devices;
 	uint8_t agg_mode;
@@ -3600,6 +3601,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 		}
 	}
 
+	offloads = dev->data->dev_conf.txmode.offloads;
+	if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
+			(internals->mode == BONDING_MODE_8023AD ||
+			internals->mode == BONDING_MODE_BROADCAST)) {
+		RTE_BOND_LOG(WARNING,
+			"bond mode broadcast & 8023AD don't support MBUF_FAST_FREE offload, force disable it.");
+		offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+		dev->data->dev_conf.txmode.offloads = offloads;
+	}
+
 	/* set the max_rx_pktlen */
 	internals->max_rx_pktlen = internals->candidate_max_rx_pktlen;
 
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:12.921571452 +0200
+++ 0041-net-bonding-fix-mbuf-fast-free-usage.patch	2022-07-07 09:54:10.913824296 +0200
@@ -1 +1 @@
-From 18c41457cbaeaf44a87f88fe861de35c923ab702 Mon Sep 17 00:00:00 2001
+From 84ee8673e5ecea79eebb2a544dd025c16b7bd8dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 18c41457cbaeaf44a87f88fe861de35c923ab702 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -27 +28 @@
-index f0668a636f..ace8f8b45e 100644
+index 2c55621740..812bfb8bd3 100644
@@ -30 +31 @@
-@@ -3583,6 +3583,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3540,6 +3540,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -38 +39 @@
-@@ -3643,6 +3644,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3600,6 +3601,16 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -43 +44 @@
-+	if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) &&
++	if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
@@ -48 +49 @@
-+		offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
++		offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;


More information about the stable mailing list