]> git.droids-corp.org - dpdk.git/blobdiff - examples/l2fwd-cat/l2fwd-cat.c
net/sfc: check mbufs allocated using mempool API for Rx
[dpdk.git] / examples / l2fwd-cat / l2fwd-cat.c
index ed48780436ff88b453bb568829bba3fa2d46f4ae..0e6078aad8502d47252f154a456bf9e3a4e1343d 100644 (file)
@@ -173,7 +173,7 @@ main(int argc, char *argv[])
        argv += ret;
 
        /* Check that there is an even number of ports to send/receive on. */
-       nb_ports = rte_eth_dev_count();
+       nb_ports = rte_eth_dev_count_avail();
        if (nb_ports < 2 || (nb_ports & 1))
                rte_exit(EXIT_FAILURE, "Error: number of ports must be even\n");