DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: dev@dpdk.org
Cc: jerin.jacob@caviumnetworks.com,
	Pavan Nikhilesh Bhagavatula <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev]  [PATCH] ethdev: fix ethdev start return value
Date: Wed,  7 Jun 2017 16:04:08 +0530	[thread overview]
Message-ID: <1496831648-28048-1-git-send-email-pbhagavatula@caviumnetworks.com> (raw)

From: Pavan Nikhilesh Bhagavatula <pbhagavatula@caviumnetworks.com>

If ethdev has already started it should return -EBUSY instead of 0 when
rte_eth_dev_start is called.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 lib/librte_ether/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index d257406..00f1a8c 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -909,7 +909,7 @@ rte_eth_dev_start(uint8_t port_id)
 		RTE_PMD_DEBUG_TRACE("Device with port_id=%" PRIu8
 			" already started\n",
 			port_id);
-		return 0;
+		return -EBUSY;
 	}
 
 	diag = (*dev->dev_ops->dev_start)(dev);
-- 
2.7.4

             reply	other threads:[~2017-06-07 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 10:34 Pavan Nikhilesh [this message]
2017-07-05 17:32 ` Thomas Monjalon

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=1496831648-28048-1-git-send-email-pbhagavatula@caviumnetworks.com \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    /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).