diff options
Diffstat (limited to 'examples/server_node_efd')
-rw-r--r-- | examples/server_node_efd/node/node.c | 2 | ||||
-rw-r--r-- | examples/server_node_efd/server/init.c | 9 | ||||
-rw-r--r-- | examples/server_node_efd/server/main.c | 2 |
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> |