X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fpacket_ordering%2Fmain.c;h=b26c33df5660dd9b2b839db2f70596dea7824b90;hb=fc2ffae923d2b2a6b9b657f195256d30d11bea61;hp=49ae35b8ce67a49caea7ffde8512a160ba19fa6e;hpb=ecaed092b677d09b4b8645a3ddc38aac0ea929f7;p=dpdk.git diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index 49ae35b8ce..b26c33df56 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;