diff options
author | Roman Zhukov <roman.zhukov@oktetlabs.ru> | 2017-05-25 16:57:54 +0100 |
---|---|---|
committer | Thomas Monjalon <thomas@monjalon.net> | 2017-07-08 18:47:00 +0200 |
commit | 60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc (patch) | |
tree | b1275fa51805e3666be7c86376722f6bfd7fb877 /examples/ip_fragmentation | |
parent | 0f67fc3baeb99e087ac32c6b9116d5fe44e50de6 (diff) | |
download | dpdk-60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc.zip dpdk-60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc.tar.gz dpdk-60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc.tar.xz |
examples: adjust Rx and Tx descriptors to device limits
Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Diffstat (limited to 'examples/ip_fragmentation')
-rw-r--r-- | examples/ip_fragmentation/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 654b315..00aefc7 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -960,6 +960,14 @@ main(int argc, char **argv) ret, portid); } + ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd, + &nb_txd); + if (ret < 0) { + printf("\n"); + rte_exit(EXIT_FAILURE, "Cannot adjust number of " + "descriptors: err=%d, port=%d\n", ret, portid); + } + /* init one RX queue */ ret = rte_eth_rx_queue_setup(portid, 0, nb_rxd, socket, NULL, |