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

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Wed Nov 16 11:39:59 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/23/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/03d094959aa50c899d5494599d579b64f60dc243

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 03d094959aa50c899d5494599d579b64f60dc243 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Wed, 9 Nov 2022 10:22:37 +0800
Subject: [PATCH] net/bonding: fix mbuf fast free handling

[ upstream commit b4924c0db589b5d4698abfab3ce60978d9df518b ]

The RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload can't be used in bonding
mode Broadcast and mode 8023AD. Currently, bonding driver forcibly removes
from the dev->data->dev_conf.txmode.offloads and processes as success in
bond_ethdev_configure(). But this still cause that rte_eth_dev_configure()
fails to execute because of the failure of validating Tx offload in the
eth_dev_validate_offloads(). So this patch moves the modification of txmode
offlaods to the stage of adding slave device to report the correct txmode
offloads.

Fixes: 18c41457cbae ("net/bonding: fix mbuf fast free usage")

Signed-off-by: Huisong Li <lihuisong at huawei.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/net/bonding/rte_eth_bond_api.c |  5 +++++
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 -----------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 7ae865c2cf..7b8d6fde91 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -536,6 +536,11 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 			return ret;
 	}
 
+	/* Bond mode Broadcast & 8023AD don't support MBUF_FAST_FREE offload. */
+	if (internals->mode == BONDING_MODE_8023AD ||
+	    internals->mode == BONDING_MODE_BROADCAST)
+		internals->tx_offload_capa &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+
 	bonded_eth_dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf &=
 			internals->flow_type_rss_offloads;
 
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 334a06cf73..24d9c1b414 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3569,7 +3569,6 @@ 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;
@@ -3630,16 +3629,6 @@ 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.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-16 11:36:50.581581891 +0100
+++ 0004-net-bonding-fix-mbuf-fast-free-handling.patch	2022-11-16 11:36:50.404775402 +0100
@@ -1 +1 @@
-From b4924c0db589b5d4698abfab3ce60978d9df518b Mon Sep 17 00:00:00 2001
+From 03d094959aa50c899d5494599d579b64f60dc243 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4924c0db589b5d4698abfab3ce60978d9df518b ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 694fe86115..c0178369b4 100644
+index 7ae865c2cf..7b8d6fde91 100644
@@ -29 +30 @@
-@@ -544,6 +544,11 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
+@@ -536,6 +536,11 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
@@ -36 +37 @@
-+		internals->tx_offload_capa &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
++		internals->tx_offload_capa &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
@@ -42 +43 @@
-index 864e073db8..2efaad1e8e 100644
+index 334a06cf73..24d9c1b414 100644
@@ -45 +46 @@
-@@ -3643,7 +3643,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+@@ -3569,7 +3569,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -52,2 +53,2 @@
- 	uint32_t link_speeds;
-@@ -3708,16 +3707,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
+ 	uint8_t agg_mode;
+@@ -3630,16 +3629,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
@@ -58 +59 @@
--	if ((offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) &&
+-	if ((offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) &&
@@ -63 +64 @@
--		offloads &= ~RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE;
+-		offloads &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
@@ -67,3 +68,3 @@
- 	link_speeds = dev->data->dev_conf.link_speeds;
- 	/*
- 	 * The default value of 'link_speeds' is zero. From its definition,
+ 	/* set the max_rx_pktlen */
+ 	internals->max_rx_pktlen = internals->candidate_max_rx_pktlen;
+ 


More information about the stable mailing list