DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] ethdev: fix ethdev start return value
@ 2017-06-07 10:34 Pavan Nikhilesh
  2017-07-05 17:32 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Pavan Nikhilesh @ 2017-06-07 10:34 UTC (permalink / raw)
  To: dev; +Cc: jerin.jacob, Pavan Nikhilesh Bhagavatula

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: fix ethdev start return value
  2017-06-07 10:34 [dpdk-dev] [PATCH] ethdev: fix ethdev start return value Pavan Nikhilesh
@ 2017-07-05 17:32 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-07-05 17:32 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dev, jerin.jacob

07/06/2017 12:34, Pavan Nikhilesh:
> 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.

It is an API change and must be announced in a deprecation notice.

>  lib/librte_ether/rte_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Please update the doxygen in .h.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-05 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 10:34 [dpdk-dev] [PATCH] ethdev: fix ethdev start return value Pavan Nikhilesh
2017-07-05 17:32 ` Thomas Monjalon

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).