From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-io0-f194.google.com (mail-io0-f194.google.com [209.85.223.194]) by dpdk.org (Postfix) with ESMTP id 0E2E35F45; Wed, 1 Aug 2018 15:44:50 +0200 (CEST) Received: by mail-io0-f194.google.com with SMTP id g11-v6so16086055ioq.9; Wed, 01 Aug 2018 06:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MuzRaerxLz+/o+iezIs+HEcdgN2BbWAiVNrhtVv39gk=; b=uDL1UaFqHZX492LhiEC+009fqGjalNZXGMXh04xTVNY8vPivIEnWRljtt8zH5bc0CZ 0vhihDU1SSc3emG/19rMjUClfmk0o7rzO0GL4EgSlWQOVUN26oQDXnvJLOCmPNtzhUlO fzg104lrJsB/JA/R69XW9xW6uMW4GhR75vnaNLzIIg2is1YBdv8bTZoEoKnvl3MPO5qG NojSP4IuvtxIQ/GzlY8E0eqwn0SZp32JgnRqI/HbzIyvUx+ryuG6QI4VZS2GaVXnutcM FXQiSv2w5ZBDwA7L+a5RgYqiZ3szwwBbn9NvjREPioJnrXPYrE5dpu3CEPLUU0uTT4q7 PUUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MuzRaerxLz+/o+iezIs+HEcdgN2BbWAiVNrhtVv39gk=; b=M7QsNhaV3mcxC/0GrNQoHybsure6W4NEb5Lcbky6rcqJ0+OLydSHtpCYmWEGniFSUs 8AmFWganmHZ/uFRm7kRB95J0Tl8GHxVLRzbRvmtC1/PIId9905nE9VKN9VZ5LQkjc29M vw2IFHpLt9jMzRVwSNWkRJX7OMpjjmmxjl6X0AJpGTdVw0fHbaeFwOlthqrjqaNrm0X0 AO24nqTgCwLRPZ+417lhTP41+V9S9IEPmgVShahJG1yzBsVFPR5ZavoJhjCXsRIIHD2P tJlObShwzEkghwXZQwyPAwDhLMJ2ofIZrwEx3EaBk3q7o7EwqVYKURVcmY6QQnR1sOUw XfsA== X-Gm-Message-State: AOUpUlHndEArrL5ka1QEKq1sCm+uRafhw/M57Q0qdfNizvHay6qIu0mx I1/g6Ph9ucLH5NPMRvPM0iowfLECVW4CCSd41D4= X-Google-Smtp-Source: AAOMgpdTyXM6hjnFGtn2/18LlvLatRlVgomTbeilaSoe54XT6mOY001NvYiacHog3vzH2njLK9pXU1M0Vm+VUf3yooA= X-Received: by 2002:a5e:da45:: with SMTP id o5-v6mr3301636iop.215.1533131089454; Wed, 01 Aug 2018 06:44:49 -0700 (PDT) MIME-Version: 1.0 References: <1533129523-1407-1-git-send-email-radu.nicolau@intel.com> In-Reply-To: <1533129523-1407-1-git-send-email-radu.nicolau@intel.com> From: Chas Williams <3chas3@gmail.com> Date: Wed, 1 Aug 2018 09:44:38 -0400 Message-ID: To: Radu Nicolau Cc: dev@dpdk.org, Declan Doherty , Chas Williams , stable@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2018 13:44:50 -0000 On Wed, Aug 1, 2018 at 9:25 AM Radu Nicolau wrote: > When a bonding port is stopped also stop and deactivate all slaves. > Otherwise slaves will be still listed as active. > I have to think about this for a bit. The last time I tried this I had a problem because nothing activated the slaves again in 802.3ad mode because we use an external state machine. > > 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 > -- > 2.7.5 > >