summaryrefslogtreecommitdiff
path: root/examples/l2fwd-keepalive
diff options
context:
space:
mode:
Diffstat (limited to 'examples/l2fwd-keepalive')
-rw-r--r--examples/l2fwd-keepalive/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index e9ad91a..a18b707 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -561,7 +561,7 @@ main(int argc, char **argv)
if (l2fwd_pktmbuf_pool == NULL)
rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
- nb_ports = rte_eth_dev_count();
+ nb_ports = rte_eth_dev_count_avail();
if (nb_ports == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");