#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdarg.h>
#include <errno.h>
#include <unistd.h>
#include <termios.h>
#include <sys/queue.h>
#include <cmdline_rdline.h>
#include <cmdline_parse.h>
#include <cmdline_parse_string.h>
#include <cmdline_socket.h>
#include "mp_commands.h"
#define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1
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";
volatile int quit = 0;
static int
lcore_recv(__attribute__((unused)) void *arg)
{
printf("Starting core %u\n", lcore_id);
while (!quit){
void *msg;
usleep(5);
continue;
}
printf("core %u: Received '%s'\n", lcore_id, (char *)msg);
}
return 0;
}
int
main(int argc, char **argv)
{
const unsigned flags = 0;
const unsigned ring_size = 64;
const unsigned pool_size = 1024;
const unsigned pool_cache = 32;
const unsigned priv_data_sz = 0;
int ret;
unsigned lcore_id;
if (ret < 0)
rte_exit(EXIT_FAILURE,
"Cannot init EAL\n");
STR_TOKEN_SIZE, pool_cache, priv_data_sz,
NULL, NULL, NULL, NULL,
} else {
}
if (send_ring == NULL)
rte_exit(EXIT_FAILURE,
"Problem getting sending ring\n");
if (recv_ring == NULL)
rte_exit(EXIT_FAILURE,
"Problem getting receiving ring\n");
if (message_pool == NULL)
rte_exit(EXIT_FAILURE,
"Problem getting message pool\n");
RTE_LOG(INFO, APP,
"Finished Process Init.\n");
}
struct cmdline *cl = cmdline_stdin_new(simple_mp_ctx, "\nsimple_mp > ");
if (cl == NULL)
rte_exit(EXIT_FAILURE,
"Cannot create cmdline instance\n");
cmdline_interact(cl);
cmdline_stdin_exit(cl);
return 0;
}