summaryrefslogtreecommitdiff
path: root/examples/netmap_compat
diff options
context:
space:
mode:
authorRoman Zhukov <roman.zhukov@oktetlabs.ru>2017-05-25 16:57:54 +0100
committerThomas Monjalon <thomas@monjalon.net>2017-07-08 18:47:00 +0200
commit60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc (patch)
treeb1275fa51805e3666be7c86376722f6bfd7fb877 /examples/netmap_compat
parent0f67fc3baeb99e087ac32c6b9116d5fe44e50de6 (diff)
downloaddpdk-draft-windows-60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc.zip
dpdk-draft-windows-60efb44f73c9a5f3f19cc78ba2d6eaf398ab51dc.tar.gz
dpdk-draft-windows-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/netmap_compat')
-rw-r--r--examples/netmap_compat/lib/compat_netmap.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c
index d9b4051..af2d9f3 100644
--- a/examples/netmap_compat/lib/compat_netmap.c
+++ b/examples/netmap_compat/lib/compat_netmap.c
@@ -719,6 +719,15 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)
return ret;
}
+ ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &rx_slots, &tx_slots);
+
+ if (ret < 0) {
+ RTE_LOG(ERR, USER1,
+ "Couldn't ot adjust number of descriptors for port %hhu\n",
+ portid);
+ return ret;
+ }
+
for (i = 0; i < conf->nr_tx_rings; i++) {
ret = rte_eth_tx_queue_setup(portid, i, tx_slots,
conf->socket_id, NULL);