aboutsummaryrefslogtreecommitdiffstats
path: root/examples/packet_ordering
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/packet_ordering
parentbf7567fd2a5b0b28ab724046143c24561d38d015 (diff)
New upstream version 17.08
Change-Id: I288b50990f52646089d6b1f3aaa6ba2f091a51d7 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples/packet_ordering')
-rw-r--r--examples/packet_ordering/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 49ae35b8..b26c33df 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -290,6 +290,8 @@ configure_eth_port(uint8_t port_id)
const uint8_t nb_ports = rte_eth_dev_count();
int ret;
uint16_t q;
+ uint16_t nb_rxd = RX_DESC_PER_QUEUE;
+ uint16_t nb_txd = TX_DESC_PER_QUEUE;
if (port_id > nb_ports)
return -1;
@@ -298,8 +300,12 @@ configure_eth_port(uint8_t port_id)
if (ret != 0)
return ret;
+ ret = rte_eth_dev_adjust_nb_rx_tx_desc(port_id, &nb_rxd, &nb_txd);
+ if (ret != 0)
+ return ret;
+
for (q = 0; q < rxRings; q++) {
- ret = rte_eth_rx_queue_setup(port_id, q, RX_DESC_PER_QUEUE,
+ ret = rte_eth_rx_queue_setup(port_id, q, nb_rxd,
rte_eth_dev_socket_id(port_id), NULL,
mbuf_pool);
if (ret < 0)
@@ -307,7 +313,7 @@ configure_eth_port(uint8_t port_id)
}
for (q = 0; q < txRings; q++) {
- ret = rte_eth_tx_queue_setup(port_id, q, TX_DESC_PER_QUEUE,
+ ret = rte_eth_tx_queue_setup(port_id, q, nb_txd,
rte_eth_dev_socket_id(port_id), NULL);
if (ret < 0)
return ret;