1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
11 #include <rte_memory.h>
12 #include <rte_launch.h>
14 #include <rte_per_lcore.h>
15 #include <rte_lcore.h>
16 #include <rte_debug.h>
19 lcore_hello(__rte_unused void *arg)
22 lcore_id = rte_lcore_id();
23 printf("hello from core %u\n", lcore_id);
28 main(int argc, char **argv)
33 ret = rte_eal_init(argc, argv);
35 rte_panic("Cannot init EAL\n");
37 /* call lcore_hello() on every worker lcore */
38 RTE_LCORE_FOREACH_WORKER(lcore_id) {
39 rte_eal_remote_launch(lcore_hello, NULL, lcore_id);
42 /* call it on main lcore too */
45 rte_eal_mp_wait_lcore();
47 /* clean up the EAL */