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/virtio: fix kernel set features for multi-queue device
[dpdk.git]
/
examples
/
l3fwd-graph
/
main.c
diff --git
a/examples/l3fwd-graph/main.c
b/examples/l3fwd-graph/main.c
index
2306ba9
..
75c2e0e
100644
(file)
--- a/
examples/l3fwd-graph/main.c
+++ b/
examples/l3fwd-graph/main.c
@@
-167,8
+167,8
@@
check_lcore_params(void)
return -1;
}
return -1;
}
- if (lcore == rte_get_ma
ster
_lcore()) {
- printf("Error: lcore %u is ma
ster
lcore\n", lcore);
+ if (lcore == rte_get_ma
in
_lcore()) {
+ printf("Error: lcore %u is ma
in
lcore\n", lcore);
return -1;
}
socketid = rte_lcore_to_socket_id(lcore);
return -1;
}
socketid = rte_lcore_to_socket_id(lcore);
@@
-1091,16
+1091,16
@@
main(int argc, char **argv)
route_str, i);
}
route_str, i);
}
- /* Launch per-lcore init on every
slave
lcore */
- rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_MA
STER
);
+ /* Launch per-lcore init on every
worker
lcore */
+ rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_MA
IN
);
- /* Accumulate and print stats on ma
ster
until exit */
+ /* Accumulate and print stats on ma
in
until exit */
if (rte_graph_has_stats_feature())
print_stats();
if (rte_graph_has_stats_feature())
print_stats();
- /* Wait for
slave
cores to exit */
+ /* Wait for
worker
cores to exit */
ret = 0;
ret = 0;
- RTE_LCORE_FOREACH_
SLAVE
(lcore_id) {
+ RTE_LCORE_FOREACH_
WORKER
(lcore_id) {
ret = rte_eal_wait_lcore(lcore_id);
/* Destroy graph */
if (ret < 0 || rte_graph_destroy(
ret = rte_eal_wait_lcore(lcore_id);
/* Destroy graph */
if (ret < 0 || rte_graph_destroy(
@@
-1116,10
+1116,16
@@
main(int argc, char **argv)
if ((enabled_port_mask & (1 << portid)) == 0)
continue;
printf("Closing port %d...", portid);
if ((enabled_port_mask & (1 << portid)) == 0)
continue;
printf("Closing port %d...", portid);
- rte_eth_dev_stop(portid);
+ ret = rte_eth_dev_stop(portid);
+ if (ret != 0)
+ printf("Failed to stop port %u: %s\n",
+ portid, rte_strerror(-ret));
rte_eth_dev_close(portid);
printf(" Done\n");
}
rte_eth_dev_close(portid);
printf(" Done\n");
}
+
+ /* clean up the EAL */
+ rte_eal_cleanup();
printf("Bye...\n");
return ret;
printf("Bye...\n");
return ret;