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
net/i40e: fix Tx queue info get
[dpdk.git]
/
examples
/
l3fwd-power
/
main.c
diff --git
a/examples/l3fwd-power/main.c
b/examples/l3fwd-power/main.c
index
16f4d09
..
596d645
100644
(file)
--- a/
examples/l3fwd-power/main.c
+++ b/
examples/l3fwd-power/main.c
@@
-1056,7
+1056,7
@@
check_lcore_params(void)
}
static int
}
static int
-check_port_config(
const unsigned nb_ports
)
+check_port_config(
void
)
{
unsigned portid;
uint16_t i;
{
unsigned portid;
uint16_t i;
@@
-1068,7
+1068,7
@@
check_port_config(const unsigned nb_ports)
portid);
return -1;
}
portid);
return -1;
}
- if (
portid >= nb_ports
) {
+ if (
!rte_eth_dev_is_valid_port(portid)
) {
printf("port %u is not present on the board\n",
portid);
return -1;
printf("port %u is not present on the board\n",
portid);
return -1;
@@
-1650,9
+1650,9
@@
main(int argc, char **argv)
if (ret < 0)
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
if (ret < 0)
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
- nb_ports = rte_eth_dev_count();
+ nb_ports = rte_eth_dev_count
_avail
();
- if (check_port_config(
nb_ports
) < 0)
+ if (check_port_config() < 0)
rte_exit(EXIT_FAILURE, "check_port_config failed\n");
nb_lcores = rte_lcore_count();
rte_exit(EXIT_FAILURE, "check_port_config failed\n");
nb_lcores = rte_lcore_count();