From f239aed5e674965691846e8ce3f187dd47523689 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 16 Aug 2017 18:42:05 +0100 Subject: New upstream version 17.08 Change-Id: I288b50990f52646089d6b1f3aaa6ba2f091a51d7 Signed-off-by: Luca Boccassi --- examples/qos_sched/init.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'examples/qos_sched/init.c') diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c index fe0221c6..a82cbd7d 100644 --- a/examples/qos_sched/init.c +++ b/examples/qos_sched/init.c @@ -106,6 +106,8 @@ app_init_port(uint8_t portid, struct rte_mempool *mp) struct rte_eth_link link; struct rte_eth_rxconf rx_conf; struct rte_eth_txconf tx_conf; + uint16_t rx_size; + uint16_t tx_size; /* check if port already initialized (multistream configuration) */ if (app_inited_port_mask & (1u << portid)) @@ -132,6 +134,15 @@ app_init_port(uint8_t portid, struct rte_mempool *mp) rte_exit(EXIT_FAILURE, "Cannot configure device: " "err=%d, port=%"PRIu8"\n", ret, portid); + rx_size = ring_conf.rx_size; + tx_size = ring_conf.tx_size; + ret = rte_eth_dev_adjust_nb_rx_tx_desc(portid, &rx_size, &tx_size); + if (ret < 0) + rte_exit(EXIT_FAILURE, "rte_eth_dev_adjust_nb_rx_tx_desc: " + "err=%d, port=%"PRIu8"\n", ret, portid); + ring_conf.rx_size = rx_size; + ring_conf.tx_size = tx_size; + /* init one RX queue */ fflush(stdout); ret = rte_eth_rx_queue_setup(portid, 0, (uint16_t)ring_conf.rx_size, -- cgit 1.2.3-korg