diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-08 14:15:11 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-08 14:45:54 +0000 |
commit | 055c52583a2794da8ba1e85a48cce3832372b12f (patch) | |
tree | 8ceb1cb78fbb46a0f341f8ee24feb3c6b5540013 /examples/multi_process/client_server_mp/mp_server | |
parent | f239aed5e674965691846e8ce3f187dd47523689 (diff) |
New upstream version 17.11-rc3
Change-Id: I6a5baa40612fe0c20f30b5fa773a6cbbac63a685
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples/multi_process/client_server_mp/mp_server')
5 files changed, 11 insertions, 13 deletions
diff --git a/examples/multi_process/client_server_mp/mp_server/Makefile b/examples/multi_process/client_server_mp/mp_server/Makefile index 5552999b..160c17b6 100644 --- a/examples/multi_process/client_server_mp/mp_server/Makefile +++ b/examples/multi_process/client_server_mp/mp_server/Makefile @@ -49,7 +49,7 @@ APP = mp_server # all source are stored in SRCS-y SRCS-y := main.c init.c args.c -INC := $(wildcard *.h) +INC := $(sort $(wildcard *.h)) CFLAGS += $(WERROR_FLAGS) -O3 CFLAGS += -I$(SRCDIR)/../shared diff --git a/examples/multi_process/client_server_mp/mp_server/args.c b/examples/multi_process/client_server_mp/mp_server/args.c index bf8c666c..a65884fd 100644 --- a/examples/multi_process/client_server_mp/mp_server/args.c +++ b/examples/multi_process/client_server_mp/mp_server/args.c @@ -74,7 +74,7 @@ parse_portmask(uint8_t max_ports, const char *portmask) { char *end = NULL; unsigned long pm; - uint8_t count = 0; + uint16_t count = 0; if (portmask == NULL || *portmask == '\0') return -1; @@ -128,7 +128,7 @@ parse_num_clients(const char *clients) * on error. */ int -parse_app_args(uint8_t max_ports, int argc, char *argv[]) +parse_app_args(uint16_t max_ports, int argc, char *argv[]) { int option_index, opt; char **argvopt = argv; diff --git a/examples/multi_process/client_server_mp/mp_server/args.h b/examples/multi_process/client_server_mp/mp_server/args.h index 23af1bd3..33888b89 100644 --- a/examples/multi_process/client_server_mp/mp_server/args.h +++ b/examples/multi_process/client_server_mp/mp_server/args.h @@ -34,6 +34,6 @@ #ifndef _ARGS_H_ #define _ARGS_H_ -int parse_app_args(uint8_t max_ports, int argc, char *argv[]); +int parse_app_args(uint16_t max_ports, int argc, char *argv[]); #endif /* ifndef _ARGS_H_ */ diff --git a/examples/multi_process/client_server_mp/mp_server/init.c b/examples/multi_process/client_server_mp/mp_server/init.c index 0bc92921..c8d02113 100644 --- a/examples/multi_process/client_server_mp/mp_server/init.c +++ b/examples/multi_process/client_server_mp/mp_server/init.c @@ -56,7 +56,6 @@ #include <rte_memcpy.h> #include <rte_mbuf.h> #include <rte_interrupts.h> -#include <rte_pci.h> #include <rte_ether.h> #include <rte_ethdev.h> #include <rte_malloc.h> @@ -114,7 +113,7 @@ init_mbuf_pools(void) * - start the port and report its status to stdout */ static int -init_port(uint8_t port_num) +init_port(uint16_t port_num) { /* for port configuration all features are off by default */ const struct rte_eth_conf port_conf = { @@ -129,7 +128,7 @@ init_port(uint8_t port_num) uint16_t q; int retval; - printf("Port %u init ... ", (unsigned)port_num); + printf("Port %u init ... ", port_num); fflush(stdout); /* Standard DPDK port initialisation - config port, then set up @@ -200,11 +199,12 @@ init_shm_rings(void) /* Check the link status of all ports in up to 9s, and print them finally */ static void -check_all_ports_link_status(uint8_t port_num, uint32_t port_mask) +check_all_ports_link_status(uint16_t port_num, uint32_t port_mask) { #define CHECK_INTERVAL 100 /* 100ms */ #define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */ - uint8_t portid, count, all_ports_up, print_flag = 0; + uint16_t portid; + uint8_t count, all_ports_up, print_flag = 0; struct rte_eth_link link; printf("\nChecking link status"); @@ -262,7 +262,7 @@ init(int argc, char *argv[]) { int retval; const struct rte_memzone *mz; - uint8_t i, total_ports; + uint16_t i, total_ports; /* init EAL, parsing EAL args */ retval = rte_eal_init(argc, argv); diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c index 7055b543..6eda556a 100644 --- a/examples/multi_process/client_server_mp/mp_server/main.c +++ b/examples/multi_process/client_server_mp/mp_server/main.c @@ -44,7 +44,6 @@ #include <rte_common.h> #include <rte_memory.h> -#include <rte_memzone.h> #include <rte_eal.h> #include <rte_launch.h> #include <rte_per_lcore.h> @@ -59,7 +58,6 @@ #include <rte_mbuf.h> #include <rte_ether.h> #include <rte_interrupts.h> -#include <rte_pci.h> #include <rte_ethdev.h> #include <rte_byteorder.h> #include <rte_malloc.h> @@ -88,7 +86,7 @@ struct client_rx_buf { static struct client_rx_buf *cl_rx_buf; static const char * -get_printable_mac_addr(uint8_t port) +get_printable_mac_addr(uint16_t port) { static const char err_address[] = "00:00:00:00:00:00"; static char addresses[RTE_MAX_ETHPORTS][sizeof(err_address)]; |