summaryrefslogtreecommitdiff
path: root/examples/ipv4_multicast
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/ipv4_multicast
parent0f67fc3baeb99e087ac32c6b9116d5fe44e50de6 (diff)
downloaddpdk-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/ipv4_multicast')
-rw-r--r--examples/ipv4_multicast/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 96a4ab6..ba4ab09 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -757,6 +757,13 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Cannot configure device: err=%d, port=%d\n",
ret, portid);
+ ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &nb_rxd,
+ &nb_txd);
+ if (ret < 0)
+ rte_exit(EXIT_FAILURE,
+ "Cannot adjust number of descriptors: err=%d, port=%d\n",
+ ret, portid);
+
rte_eth_macaddr_get(portid, &ports_eth_addr[portid]);
print_ethaddr(" Address:", &ports_eth_addr[portid]);
printf(", ");