summaryrefslogtreecommitdiffstats
path: root/examples/server_node_efd
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-08-16 18:42:05 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2017-08-16 18:46:04 +0100
commitf239aed5e674965691846e8ce3f187dd47523689 (patch)
treea153a3125c6e183c73871a8ecaa4b285fed5fbd5 /examples/server_node_efd
parentbf7567fd2a5b0b28ab724046143c24561d38d015 (diff)
New upstream version 17.08
Change-Id: I288b50990f52646089d6b1f3aaa6ba2f091a51d7 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples/server_node_efd')
-rw-r--r--examples/server_node_efd/node/node.c2
-rw-r--r--examples/server_node_efd/server/init.c9
-rw-r--r--examples/server_node_efd/server/main.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/examples/server_node_efd/node/node.c b/examples/server_node_efd/node/node.c
index f780b926..86e57c89 100644
--- a/examples/server_node_efd/node/node.c
+++ b/examples/server_node_efd/node/node.c
@@ -53,8 +53,6 @@
#include <rte_launch.h>
#include <rte_lcore.h>
#include <rte_ring.h>
-#include <rte_launch.h>
-#include <rte_lcore.h>
#include <rte_debug.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
diff --git a/examples/server_node_efd/server/init.c b/examples/server_node_efd/server/init.c
index 82457b44..d114e5bf 100644
--- a/examples/server_node_efd/server/init.c
+++ b/examples/server_node_efd/server/init.c
@@ -130,8 +130,8 @@ init_port(uint8_t port_num)
}
};
const uint16_t rx_rings = 1, tx_rings = num_nodes;
- const uint16_t rx_ring_size = RTE_MP_RX_DESC_DEFAULT;
- const uint16_t tx_ring_size = RTE_MP_TX_DESC_DEFAULT;
+ uint16_t rx_ring_size = RTE_MP_RX_DESC_DEFAULT;
+ uint16_t tx_ring_size = RTE_MP_TX_DESC_DEFAULT;
uint16_t q;
int retval;
@@ -147,6 +147,11 @@ init_port(uint8_t port_num)
if (retval != 0)
return retval;
+ retval = rte_eth_dev_adjust_nb_rx_tx_desc(port_num, &rx_ring_size,
+ &tx_ring_size);
+ if (retval != 0)
+ return retval;
+
for (q = 0; q < rx_rings; q++) {
retval = rte_eth_rx_queue_setup(port_num, q, rx_ring_size,
rte_eth_dev_socket_id(port_num),
diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c
index 597b4c25..dcdc0a48 100644
--- a/examples/server_node_efd/server/main.c
+++ b/examples/server_node_efd/server/main.c
@@ -38,7 +38,6 @@
#include <stdint.h>
#include <stdarg.h>
#include <inttypes.h>
-#include <inttypes.h>
#include <sys/queue.h>
#include <errno.h>
#include <netinet/ip.h>
@@ -47,7 +46,6 @@
#include <rte_memory.h>
#include <rte_memzone.h>
#include <rte_eal.h>
-#include <rte_byteorder.h>
#include <rte_launch.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>