From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 338381B751; Wed, 11 Apr 2018 06:34:41 +0200 (CEST) Received: by mail-pg0-f67.google.com with SMTP id i124so205354pgc.10; Tue, 10 Apr 2018 21:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=o/ZDOU9TilHukh10CU9NjU2F9ap00wfw9pdqc/b6I+E=; b=aBRY6HCRrCPh6ne2fg2TcKD2HBbrtaFr6ilX7/ddbY+73BJBSVvGNEeAYpAjtL5mIb b4bm2P4G7TT7/5Vik73Jbe/4CgbQqoJca8ghwoQ0L7trKct4MCAbj06YPhNUrl+60+fo 2KANYN2wn1wXEklN2eaG2MveHqf6emRGu0ctOfRWxL9J3WVfhCNIsbkz4OwrV9Wmp64h uSbqIJJxFNqgy8v0y8ZwUQ3cg5yyJo0X+HuARqjk4Q5fSNdsvnS3CkYHybRrBx/8wJ7n SIYJ+ly0l+BOOb/bQTTVXPl72tAFZ8u2swtcXg7zQtYs5upOiwDih3p2UGNXYCbAju7g giCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=o/ZDOU9TilHukh10CU9NjU2F9ap00wfw9pdqc/b6I+E=; b=Yg+5IbwhVMadUAcSHCF3Pvo7iKn6D51zPESNiMlV07/2DliJkVulXSxpabAqgfcVkq 38wCQeQ1Hvh2+7HYbG5u4tmXI34jrNwzkMRXrW1WmTgxl6v37JOFyA69+KmqJ66CMPt4 3yri92jvdDn//zpYTvVc7yAW5oCt/b2eZkXfIdxlB45JPAHFrX0YJYV7EmSiyTUJzh8N IiV6SoaitIH0dLTIGzMIKgPSlDlr++eRlqL8eLDHF3j6vje8HnXzwRgzS/cYrso61orv AStx5jhlURjs5+WS0p+qtvKrzD6APKOGtcU6JEtHGLLrIcN6NeeLbg08NWHqH6ihR+WV ajCw== X-Gm-Message-State: ALQs6tBAt9WpV72eIXt73a5mo19VPDvXa9XwpatFuFK3QyeUBfeBkJiM BdRz+nk6h9xVDFEFx/I5Xy4= X-Google-Smtp-Source: AIpwx4/H0TxuT/6niEOsrs+FE3Ioc2EGnaNizA/roFx3/cCDi1NVf/+0V1tVAP6BunhXMqUC0scQsQ== X-Received: by 10.101.78.18 with SMTP id r18mr2321103pgt.128.1523421281241; Tue, 10 Apr 2018 21:34:41 -0700 (PDT) Received: from local.opencloud.tech.localdomain ([52.229.160.192]) by smtp.gmail.com with ESMTPSA id k7sm629169pfi.77.2018.04.10.21.34.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 21:34:40 -0700 (PDT) From: xiangxia.m.yue@gmail.com To: declan.doherty@intel.com Cc: dev@dpdk.org, Tonghao Zhang , stable@dpdk.org Date: Tue, 10 Apr 2018 21:34:28 -0700 Message-Id: <1523421269-7394-1-git-send-email-xiangxia.m.yue@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 1/2] net/bonding: free mempool used in mode6 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2018 04:34:42 -0000 From: Tonghao Zhang 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 --- 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