git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix ethdev port id validation
[dpdk.git]
/
examples
/
bond
/
main.c
diff --git
a/examples/bond/main.c
b/examples/bond/main.c
index
d68162f
..
d4097d0
100644
(file)
--- a/
examples/bond/main.c
+++ b/
examples/bond/main.c
@@
-147,7
+147,7
@@
slave_port_init(uint16_t portid, struct rte_mempool *mbuf_pool)
struct rte_eth_txconf txq_conf;
struct rte_eth_conf local_port_conf = port_conf;
- if (
portid >= rte_eth_dev_count(
))
+ if (
!rte_eth_dev_is_valid_port(portid
))
rte_exit(EXIT_FAILURE, "Invalid port\n");
rte_eth_dev_info_get(portid, &dev_info);