aboutsummaryrefslogtreecommitdiffstats
path: root/examples/multi_process
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multi_process')
-rw-r--r--examples/multi_process/l2fwd_fork/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c
index 2dc8b829..2d951d93 100644
--- a/examples/multi_process/l2fwd_fork/main.c
+++ b/examples/multi_process/l2fwd_fork/main.c
@@ -442,7 +442,8 @@ reset_slave_all_ports(unsigned slaveid)
pool = rte_mempool_lookup(buf_name);
if (pool)
printf("Port %d mempool free object is %u(%u)\n", slave->port[i],
- rte_mempool_count(pool), (unsigned)NB_MBUF);
+ rte_mempool_avail_count(pool),
+ (unsigned int)NB_MBUF);
else
printf("Can't find mempool %s\n", buf_name);
@@ -979,9 +980,6 @@ main(int argc, char **argv)
if (nb_ports == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
- if (nb_ports > RTE_MAX_ETHPORTS)
- nb_ports = RTE_MAX_ETHPORTS;
-
/* create the mbuf pool */
for (portid = 0; portid < nb_ports; portid++) {
/* skip ports that are not enabled */