ethdev: get default Rx/Tx configuration from dev info
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 1 Oct 2014 09:49:04 +0000 (10:49 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 10 Oct 2014 10:47:05 +0000 (12:47 +0200)
commitfbde27f19ab8f1d386868275bd8c016e693cf073
tree194f8a57af304f827c580d29cdcc7711f4ebea35
parenta30268e9a2d0618902e8cf96b90b27db4fb02d54
ethdev: get default Rx/Tx configuration from dev info

Many sample apps use duplicated code to set rte_eth_txconf and rte_eth_rxconf
structures. This patch allows the user to get a default optimal RX/TX configuration
through rte_eth_dev_info get, and still any parameters may be tweaked as wished,
before setting up queues.

Besides, if a NULL pointer is passed to rte_eth_rx_queue_setup or
rte_eth_tx_queue_setup, these functions get internally the default RX/TX
configuration for the user.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
[Thomas: split patch]
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h