From f239aed5e674965691846e8ce3f187dd47523689 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 16 Aug 2017 18:42:05 +0100 Subject: New upstream version 17.08 Change-Id: I288b50990f52646089d6b1f3aaa6ba2f091a51d7 Signed-off-by: Luca Boccassi --- examples/multi_process/l2fwd_fork/Makefile | 2 +- examples/multi_process/l2fwd_fork/flib.c | 1 - examples/multi_process/l2fwd_fork/flib.h | 2 +- examples/multi_process/l2fwd_fork/main.c | 10 +++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'examples/multi_process/l2fwd_fork') diff --git a/examples/multi_process/l2fwd_fork/Makefile b/examples/multi_process/l2fwd_fork/Makefile index ff257a35..11ae8ff4 100644 --- a/examples/multi_process/l2fwd_fork/Makefile +++ b/examples/multi_process/l2fwd_fork/Makefile @@ -33,7 +33,7 @@ ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif -# Default target, can be overriden by command line or environment +# Default target, can be overridden by command line or environment RTE_TARGET ?= x86_64-native-linuxapp-gcc include $(RTE_SDK)/mk/rte.vars.mk diff --git a/examples/multi_process/l2fwd_fork/flib.c b/examples/multi_process/l2fwd_fork/flib.c index 85bbc2d3..c22e983b 100644 --- a/examples/multi_process/l2fwd_fork/flib.c +++ b/examples/multi_process/l2fwd_fork/flib.c @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/multi_process/l2fwd_fork/flib.h b/examples/multi_process/l2fwd_fork/flib.h index 711e3b6d..1064c9bb 100644 --- a/examples/multi_process/l2fwd_fork/flib.h +++ b/examples/multi_process/l2fwd_fork/flib.h @@ -120,7 +120,7 @@ int flib_register_slave_exit_notify(unsigned slave_id, /** * Assign a lcore ID to non-slave thread. Non-slave thread refers to thread that * not created by function rte_eal_remote_launch or rte_eal_mp_remote_launch. - * These threads can either bind lcore or float among differnt lcores. + * These threads can either bind lcore or float among different lcores. * This lcore ID will be unique in multi-thread or multi-process DPDK running * environment, then it can benefit from using the cache mechanism provided in * mempool library. diff --git a/examples/multi_process/l2fwd_fork/main.c b/examples/multi_process/l2fwd_fork/main.c index d922522f..f8a626ba 100644 --- a/examples/multi_process/l2fwd_fork/main.c +++ b/examples/multi_process/l2fwd_fork/main.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -937,7 +936,6 @@ main(int argc, char **argv) unsigned rx_lcore_id; unsigned nb_ports_in_mask = 0; unsigned i; - int flags = 0; uint64_t prev_tsc, diff_tsc, cur_tsc, timer_tsc; /* Save cpu_affinity first, restore it in case it's floating process option */ @@ -987,7 +985,6 @@ main(int argc, char **argv) if ((l2fwd_enabled_port_mask & (1 << portid)) == 0) continue; char buf_name[RTE_MEMPOOL_NAMESIZE]; - flags = MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET; snprintf(buf_name, RTE_MEMPOOL_NAMESIZE, MBUF_NAME, portid); l2fwd_pktmbuf_pool[portid] = rte_pktmbuf_pool_create(buf_name, NB_MBUF, 32, @@ -1082,6 +1079,13 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "Cannot configure device: err=%d, port=%u\n", ret, (unsigned) portid); + ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd, + &nb_txd); + if (ret < 0) + rte_exit(EXIT_FAILURE, + "rte_eth_dev_adjust_nb_rx_tx_desc: err=%d, port=%u\n", + ret, (unsigned) portid); + rte_eth_macaddr_get(portid,&l2fwd_ports_eth_addr[portid]); /* init one RX queue */ -- cgit 1.2.3-korg