DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chas Williams <3chas3@gmail.com>
To: dev@dpdk.org
Cc: declan.doherty@intel.com,
	"Charles (Chas) Williams" <chas3@att.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/bonding: set dev_started later
Date: Fri, 16 Mar 2018 12:34:41 -0400	[thread overview]
Message-ID: <20180316163441.31898-1-3chas3@gmail.com> (raw)

From: "Charles (Chas) Williams" <chas3@att.com>

There are several error paths where the bonding device may not start.
Don't set dev_started until we know that we are sure start is going
to succeed.

Fixes: 2efb58cbab ("bond: new link bonding library")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index b59ba9f7c..6d738f8c2 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2028,7 +2028,6 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 	}
 
 	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
-	eth_dev->data->dev_started = 1;
 
 	internals = eth_dev->data->dev_private;
 
@@ -2089,6 +2088,9 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
 		if (internals->slaves[i].link_status_poll_enabled)
 			internals->link_status_polling_enabled = 1;
 	}
+
+	eth_dev->data->dev_started = 1;
+
 	/* start polling if needed */
 	if (internals->link_status_polling_enabled) {
 		rte_eal_alarm_set(
-- 
2.13.6

             reply	other threads:[~2018-03-16 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 16:34 Chas Williams [this message]
2018-03-23 17:05 ` [dpdk-dev] [PATCH v2] net/bonding: clear dev_started if start fails Chas Williams
2018-04-05 10:58   ` Radu Nicolau
2018-04-06 10:03     ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2018-06-14 17:10 ` [dpdk-dev] [PATCH] net/bonding: set dev_started later Ferruh Yigit
2018-06-14 20:22   ` Chas Williams

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=20180316163441.31898-1-3chas3@gmail.com \
    --to=3chas3@gmail.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).