[dpdk-stable] patch 'net/bonding: free mempool used in mode 6' has been queued to LTS release 17.11.2

Yuanhan Liu yliu at fridaylinux.org
Sun Apr 22 17:09:49 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/29/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 45955450becaf6f4d2801105151465fc5a2bc915 Mon Sep 17 00:00:00 2001
From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Date: Tue, 10 Apr 2018 21:34:28 -0700
Subject: [PATCH] net/bonding: free mempool used in mode 6

[ upstream commit b9c0dea24beb4b893e88d93c1b52481003ff8999 ]

When creating bond device with mode6, dpdk will create
mempool for arp packets. If free the bond device and
create it with same name, there will be an error. Because
the mempool is not freed when destroying bond device.

Fixes: 06fe78b98ccd ("bond: add mode 6")
Fixes: ea0c20ea95fd ("apps: use helper to create mbuf pools")

Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 08444d9fc..e58d8bde2 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2972,6 +2972,10 @@ bond_remove(struct rte_vdev_device *dev)
 	eth_dev->tx_pkt_burst = NULL;
 
 	internals = eth_dev->data->dev_private;
+	/* Try to release mempool used in mode6. If the bond
+	 * device is not mode6, free the NULL is not problem.
+	 */
+	rte_mempool_free(internals->mode6.mempool);
 	rte_bitmap_free(internals->vlan_filter_bmp);
 	rte_free(internals->vlan_filter_bmpmem);
 	rte_free(eth_dev->data->dev_private);
-- 
2.11.0



More information about the stable mailing list