DPDK patches and discussions
 help / color / mirror / Atom feed
From: Radu Nicolau <radu.nicolau@intel.com>
To: dev@dpdk.org
Cc: declan.doherty@intel.com, chas3@att.com,
	Radu Nicolau <radu.nicolau@intel.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/bonding: stop and deactivate slaves when bonding port is stopped
Date: Wed,  1 Aug 2018 14:18:43 +0100	[thread overview]
Message-ID: <1533129523-1407-1-git-send-email-radu.nicolau@intel.com> (raw)

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 <radu.nicolau@intel.com>
---
 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

             reply	other threads:[~2018-08-01 13:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 13:18 Radu Nicolau [this message]
2018-08-01 13:44 ` Chas Williams
2018-08-01 14:02   ` Radu Nicolau
2018-08-02 13:38 ` Doherty, Declan
2018-08-05 21:55   ` Thomas Monjalon
2018-08-06 15:50     ` Chas Williams
2018-08-23 13:15       ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-08-23 15:21         ` Chas Williams
2018-08-24 10:39           ` Ferruh Yigit
2018-08-24 14:05             ` Chas Williams
2018-09-28 10:00               ` Ferruh Yigit
2018-09-28 10:03                 ` Ferruh Yigit
2018-09-28 11:04       ` 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=1533129523-1407-1-git-send-email-radu.nicolau@intel.com \
    --to=radu.nicolau@intel.com \
    --cc=chas3@att.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).