DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/flow_classify: fix failure in port_init function
@ 2018-04-30 13:43 Bernard Iremonger
  2018-04-30 13:46 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Bernard Iremonger @ 2018-04-30 13:43 UTC (permalink / raw)
  To: dev, thomas; +Cc: Bernard Iremonger

The port_init function calls the rte_eth_dev_is_valid_port function.
This function now returns 1 if the port state is attached.
A return value of 1 now means a valid port.

Fixes: a9dbe1802226 ("fix ethdev port id validation")
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 examples/flow_classify/flow_classify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 3b087ce..6412fe4 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -200,7 +200,7 @@ struct rte_flow_query_count count = {
 	struct rte_eth_dev_info dev_info;
 	struct rte_eth_txconf txconf;
 
-	if (rte_eth_dev_is_valid_port(port))
+	if (!rte_eth_dev_is_valid_port(port))
 		return -1;
 
 	rte_eth_dev_info_get(port, &dev_info);
-- 
1.9.1

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

* Re: [dpdk-dev] [PATCH] examples/flow_classify: fix failure in port_init function
  2018-04-30 13:43 [dpdk-dev] [PATCH] examples/flow_classify: fix failure in port_init function Bernard Iremonger
@ 2018-04-30 13:46 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-04-30 13:46 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: dev

30/04/2018 15:43, Bernard Iremonger:
> The port_init function calls the rte_eth_dev_is_valid_port function.
> This function now returns 1 if the port state is attached.
> A return value of 1 now means a valid port.
> 
> Fixes: a9dbe1802226 ("fix ethdev port id validation")
> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>

My mistake.

Applied, thanks

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

end of thread, other threads:[~2018-04-30 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 13:43 [dpdk-dev] [PATCH] examples/flow_classify: fix failure in port_init function Bernard Iremonger
2018-04-30 13:46 ` 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).