From 47d9763a1dd3103d732da9eec350cfc1cd784717 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 8 Dec 2017 17:16:13 +0000 Subject: New upstream version 16.11.4 Change-Id: I733e0292d2e060161d148b3e114065d00b36d2ba Signed-off-by: Luca Boccassi --- examples/multi_process/l2fwd_fork/main.c | 5 +---- examples/multi_process/simple_mp/main.c | 4 ++-- examples/multi_process/simple_mp/mp_commands.c | 2 +- examples/multi_process/simple_mp/mp_commands.h | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'examples/multi_process') diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c index 820448bc..88b336e1 100644 --- a/examples/multi_process/l2fwd_fork/main.c +++ b/examples/multi_process/l2fwd_fork/main.c @@ -1205,10 +1205,7 @@ main(int argc, char **argv) message_pool = rte_mempool_create("ms_msg_pool", NB_CORE_MSGBUF * RTE_MAX_LCORE, sizeof(enum l2fwd_cmd), NB_CORE_MSGBUF / 2, - 0, - rte_pktmbuf_pool_init, NULL, - rte_pktmbuf_init, NULL, - rte_socket_id(), 0); + 0, NULL, NULL, NULL, NULL, rte_socket_id(), 0); if (message_pool == NULL) rte_exit(EXIT_FAILURE, "Create msg mempool failed\n"); diff --git a/examples/multi_process/simple_mp/main.c b/examples/multi_process/simple_mp/main.c index 2843d94e..53b87c5c 100644 --- a/examples/multi_process/simple_mp/main.c +++ b/examples/multi_process/simple_mp/main.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include "mp_commands.h" @@ -76,7 +77,6 @@ static const char *_MSG_POOL = "MSG_POOL"; static const char *_SEC_2_PRI = "SEC_2_PRI"; static const char *_PRI_2_SEC = "PRI_2_SEC"; -const unsigned string_size = 64; struct rte_ring *send_ring, *recv_ring; struct rte_mempool *message_pool; @@ -121,7 +121,7 @@ main(int argc, char **argv) send_ring = rte_ring_create(_PRI_2_SEC, ring_size, rte_socket_id(), flags); recv_ring = rte_ring_create(_SEC_2_PRI, ring_size, rte_socket_id(), flags); message_pool = rte_mempool_create(_MSG_POOL, pool_size, - string_size, pool_cache, priv_data_sz, + STR_TOKEN_SIZE, pool_cache, priv_data_sz, NULL, NULL, NULL, NULL, rte_socket_id(), flags); } else { diff --git a/examples/multi_process/simple_mp/mp_commands.c b/examples/multi_process/simple_mp/mp_commands.c index 8da244bb..cde3abd4 100644 --- a/examples/multi_process/simple_mp/mp_commands.c +++ b/examples/multi_process/simple_mp/mp_commands.c @@ -78,7 +78,7 @@ static void cmd_send_parsed(void *parsed_result, if (rte_mempool_get(message_pool, &msg) < 0) rte_panic("Failed to get message buffer\n"); - snprintf((char *)msg, string_size, "%s", res->message); + snprintf((char *)msg, STR_TOKEN_SIZE, "%s", res->message); if (rte_ring_enqueue(send_ring, msg) < 0) { printf("Failed to send message - message discarded\n"); rte_mempool_put(message_pool, msg); diff --git a/examples/multi_process/simple_mp/mp_commands.h b/examples/multi_process/simple_mp/mp_commands.h index 7e9a4ab2..452b3645 100644 --- a/examples/multi_process/simple_mp/mp_commands.h +++ b/examples/multi_process/simple_mp/mp_commands.h @@ -34,7 +34,6 @@ #ifndef _SIMPLE_MP_COMMANDS_H_ #define _SIMPLE_MP_COMMANDS_H_ -extern const unsigned string_size; extern struct rte_ring *send_ring; extern struct rte_mempool *message_pool; extern volatile int quit; -- cgit 1.2.3-korg