diff options
Diffstat (limited to 'examples/l2fwd')
-rw-r--r-- | examples/l2fwd/Makefile | 2 | ||||
-rw-r--r-- | examples/l2fwd/main.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 78feeeb8..8896ab45 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/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/l2fwd/main.c b/examples/l2fwd/main.c index f9667272..14263358 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -54,7 +54,6 @@ #include <rte_memcpy.h> #include <rte_memzone.h> #include <rte_eal.h> -#include <rte_per_lcore.h> #include <rte_launch.h> #include <rte_atomic.h> #include <rte_cycles.h> @@ -666,6 +665,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, + "Cannot adjust number of descriptors: err=%d, port=%u\n", + ret, (unsigned) portid); + rte_eth_macaddr_get(portid,&l2fwd_ports_eth_addr[portid]); /* init one RX queue */ |