From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chas Williams <3chas3@gmail.com> Subject: [PATCH] net/bonding: don't clear active slave count Date: Wed, 6 Jun 2018 08:26:27 -0400 Message-ID: <20180606122627.18418-1-3chas3@gmail.com> Cc: declan.doherty@intel.com, "Charles (Chas) Williams" To: dev@dpdk.org Return-path: Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by dpdk.org (Postfix) with ESMTP id EC5D4CF90 for ; Wed, 6 Jun 2018 14:26:33 +0200 (CEST) Received: by mail-qt0-f193.google.com with SMTP id q6-v6so6070207qtn.7 for ; Wed, 06 Jun 2018 05:26:33 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: "Charles (Chas) Williams" When the bond PMD is stopped, the active slave count is reset. For 802.3ad mode this potentially leaks memory and clears state since a second sequential activate_slave() will occur when the bond PMD is restarted and the LSC callback is triggered while the active slave count is 0. To fix this, don't clear the active slave count when stopping. Only deactivate_slave() should be used to clear the slaves. Signed-off-by: Chas Williams --- drivers/net/bonding/rte_eth_bond_pmd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 02d94b1b1..4ae577078 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2173,7 +2173,6 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) tlb_last_obytets[internals->active_slaves[i]] = 0; } - internals->active_slave_count = 0; internals->link_status_polling_enabled = 0; for (i = 0; i < internals->slave_count; i++) internals->slaves[i].last_link_status = 0; -- 2.14.3