diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2017-08-16 18:42:05 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2017-08-16 18:46:04 +0100 |
commit | f239aed5e674965691846e8ce3f187dd47523689 (patch) | |
tree | a153a3125c6e183c73871a8ecaa4b285fed5fbd5 /examples/qos_sched/init.c | |
parent | bf7567fd2a5b0b28ab724046143c24561d38d015 (diff) |
New upstream version 17.08
Change-Id: I288b50990f52646089d6b1f3aaa6ba2f091a51d7
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'examples/qos_sched/init.c')
-rw-r--r-- | examples/qos_sched/init.c | 11 |
1 files changed, 11 insertions, 0 deletions
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, |