summaryrefslogtreecommitdiff
path: root/examples/qos_meter
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2014-10-01 10:49:05 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-10-10 13:01:49 +0200
commit81f7ecd934372fc9f592d1322f8eff86350fa4f5 (patch)
tree25697a6664d0a28ad10e04a3027a6a4a6f107de9 /examples/qos_meter
parent27b31ee33fa5e7cc9a086c690b98ed8e1a153c6a (diff)
downloaddpdk-next-eventdev-81f7ecd934372fc9f592d1322f8eff86350fa4f5.zip
dpdk-next-eventdev-81f7ecd934372fc9f592d1322f8eff86350fa4f5.tar.gz
dpdk-next-eventdev-81f7ecd934372fc9f592d1322f8eff86350fa4f5.tar.xz
examples: use factorized default Rx/Tx configuration
For apps that were using default rte_eth_rxconf and rte_eth_txconf structures, these have been removed and now they are obtained by calling rte_eth_dev_info_get, just before setting up RX/TX queues. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: David Marchand <david.marchand@6wind.com>
Diffstat (limited to 'examples/qos_meter')
-rw-r--r--examples/qos_meter/main.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index c02ac50..b30bfde 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -102,26 +102,6 @@ static struct rte_eth_conf port_conf = {
},
};
-static const struct rte_eth_rxconf rx_conf = {
- .rx_thresh = {
- .pthresh = 8, /* RX prefetch threshold reg */
- .hthresh = 8, /* RX host threshold reg */
- .wthresh = 4, /* RX write-back threshold reg */
- },
- .rx_free_thresh = 32,
-};
-
-static const struct rte_eth_txconf tx_conf = {
- .tx_thresh = {
- .pthresh = 36, /* TX prefetch threshold reg */
- .hthresh = 0, /* TX host threshold reg */
- .wthresh = 0, /* TX write-back threshold reg */
- },
- .tx_free_thresh = 0,
- .tx_rs_thresh = 0,
- .txq_flags = 0x0,
-};
-
#define NIC_RX_QUEUE_DESC 128
#define NIC_TX_QUEUE_DESC 512
@@ -391,11 +371,15 @@ MAIN(int argc, char **argv)
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d configuration error (%d)\n", port_rx, ret);
- ret = rte_eth_rx_queue_setup(port_rx, NIC_RX_QUEUE, NIC_RX_QUEUE_DESC, rte_eth_dev_socket_id(port_rx), &rx_conf, pool);
+ ret = rte_eth_rx_queue_setup(port_rx, NIC_RX_QUEUE, NIC_RX_QUEUE_DESC,
+ rte_eth_dev_socket_id(port_rx),
+ NULL, pool);
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_rx, ret);
- ret = rte_eth_tx_queue_setup(port_rx, NIC_TX_QUEUE, NIC_TX_QUEUE_DESC, rte_eth_dev_socket_id(port_rx), &tx_conf);
+ ret = rte_eth_tx_queue_setup(port_rx, NIC_TX_QUEUE, NIC_TX_QUEUE_DESC,
+ rte_eth_dev_socket_id(port_rx),
+ NULL);
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d TX queue setup error (%d)\n", port_rx, ret);
@@ -403,11 +387,15 @@ MAIN(int argc, char **argv)
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d configuration error (%d)\n", port_tx, ret);
- ret = rte_eth_rx_queue_setup(port_tx, NIC_RX_QUEUE, NIC_RX_QUEUE_DESC, rte_eth_dev_socket_id(port_tx), &rx_conf, pool);
+ ret = rte_eth_rx_queue_setup(port_tx, NIC_RX_QUEUE, NIC_RX_QUEUE_DESC,
+ rte_eth_dev_socket_id(port_tx),
+ NULL, pool);
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d RX queue setup error (%d)\n", port_tx, ret);
- ret = rte_eth_tx_queue_setup(port_tx, NIC_TX_QUEUE, NIC_TX_QUEUE_DESC, rte_eth_dev_socket_id(port_tx), &tx_conf);
+ ret = rte_eth_tx_queue_setup(port_tx, NIC_TX_QUEUE, NIC_TX_QUEUE_DESC,
+ rte_eth_dev_socket_id(port_tx),
+ NULL);
if (ret < 0)
rte_exit(EXIT_FAILURE, "Port %d TX queue setup error (%d)\n", port_tx, ret);