DPDK patches and discussions
 help / color / mirror / Atom feed
From: xiangxia.m.yue@gmail.com
To: declan.doherty@intel.com
Cc: dev@dpdk.org, Tonghao Zhang <xiangxia.m.yue@gmail.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 1/2] net/bonding: free mempool used in mode6
Date: Tue, 10 Apr 2018 21:34:28 -0700	[thread overview]
Message-ID: <1523421269-7394-1-git-send-email-xiangxia.m.yue@gmail.com> (raw)

From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

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: 06fe78b9 ("bond: add mode 6")
Fixes: ea0c20ea ("apps: use helper to create mbuf pools")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.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 9b02850..4bc2a01 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3127,6 +3127,10 @@ struct bwg_slave {
 	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);
-- 
1.8.3.1

             reply	other threads:[~2018-04-11  4:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11  4:34 xiangxia.m.yue [this message]
2018-04-11  4:34 ` [dpdk-dev] [PATCH 2/2] net/bonding: fix typo in log comment xiangxia.m.yue
2018-04-13 17:25 ` [dpdk-dev] [dpdk-stable] [PATCH 1/2] net/bonding: free mempool used in mode6 Ferruh Yigit
2018-04-13 17:26   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1523421269-7394-1-git-send-email-xiangxia.m.yue@gmail.com \
    --to=xiangxia.m.yue@gmail.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).