diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2015-12-02 19:01:54 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2015-12-25 22:13:57 +0300 |
commit | 849840d80532276e5ce51db8a0762559ea3be860 (patch) | |
tree | 603d10479c2221850c4d468a8a7a1e63608c31c2 /accel-dpdk/main.c | |
parent | 9d378f485befec164cbc23fba9653d8200348cc9 (diff) | |
download | accel-ppp-xebd-849840d80532276e5ce51db8a0762559ea3be860.tar.gz accel-ppp-xebd-849840d80532276e5ce51db8a0762559ea3be860.zip |
accel-dp: formed skeleton
Diffstat (limited to 'accel-dpdk/main.c')
-rw-r--r-- | accel-dpdk/main.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/accel-dpdk/main.c b/accel-dpdk/main.c deleted file mode 100644 index ecca086..0000000 --- a/accel-dpdk/main.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <stdint.h> -#include <errno.h> -#include <sys/queue.h> - -#include <rte_config.h> -#include <rte_memory.h> -#include <rte_memzone.h> -#include <rte_launch.h> -#include <rte_eal.h> -#include <rte_per_lcore.h> -#include <rte_lcore.h> -#include <rte_debug.h> - -static int -lcore_hello(__attribute__((unused)) void *arg) -{ - unsigned lcore_id; - lcore_id = rte_lcore_id(); - printf("hello from core %u\n", lcore_id); - return 0; -} - -int -main(int argc, char **argv) -{ - int ret; - unsigned lcore_id; - - ret = rte_eal_init(argc, argv); - if (ret < 0) - rte_panic("Cannot init EAL\n"); - - /* call lcore_hello() on every slave lcore */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { - rte_eal_remote_launch(lcore_hello, NULL, lcore_id); - } - - /* call it on master lcore too */ - lcore_hello(NULL); - - rte_eal_mp_wait_lcore(); - return 0; -} |