From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D50FA1B4B6; Thu, 2 Aug 2018 15:38:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 06:38:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,436,1526367600"; d="scan'208";a="59896136" Received: from dwdohert-mobl.ger.corp.intel.com (HELO [163.33.176.228]) ([163.33.176.228]) by fmsmga008.fm.intel.com with ESMTP; 02 Aug 2018 06:38:46 -0700 To: Radu Nicolau , dev@dpdk.org Cc: chas3@att.com, stable@dpdk.org References: <1533129523-1407-1-git-send-email-radu.nicolau@intel.com> From: "Doherty, Declan" Message-ID: <0c16cb66-6ee4-ff2d-6d16-7a3fdd021b0c@intel.com> Date: Thu, 2 Aug 2018 14:38:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1533129523-1407-1-git-send-email-radu.nicolau@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped 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: Thu, 02 Aug 2018 13:38:49 -0000 On 01/08/2018 2:18 PM, Radu Nicolau wrote: > When a bonding port is stopped also stop and deactivate all slaves. > Otherwise slaves will be still listed as active. > > Fixes: 69bce062132b ("net/bonding: do not clear active slave count") > Cc: stable@dpdk.org > > Signed-off-by: Radu Nicolau > --- > drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c > index 16105cb..960140c 100644 > --- a/drivers/net/bonding/rte_eth_bond_pmd.c > +++ b/drivers/net/bonding/rte_eth_bond_pmd.c > @@ -2229,12 +2229,15 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev) > tlb_last_obytets[internals->active_slaves[i]] = 0; > } > > - internals->link_status_polling_enabled = 0; > - for (i = 0; i < internals->slave_count; i++) > - internals->slaves[i].last_link_status = 0; > - > eth_dev->data->dev_link.link_status = ETH_LINK_DOWN; > eth_dev->data->dev_started = 0; > + > + internals->link_status_polling_enabled = 0; > + for (i = 0; i < internals->slave_count; i++) { > + internals->slaves[i].last_link_status = 0; > + rte_eth_dev_stop(internals->slaves[i].port_id); > + deactivate_slave(eth_dev, internals->slaves[i].port_id); > + } > } > > void > Acked-by: Declan Doherty