summaryrefslogtreecommitdiff
path: root/examples/netmap_compat
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/netmap_compat
parent27b31ee33fa5e7cc9a086c690b98ed8e1a153c6a (diff)
downloaddpdk-draft-windows-81f7ecd934372fc9f592d1322f8eff86350fa4f5.zip
dpdk-draft-windows-81f7ecd934372fc9f592d1322f8eff86350fa4f5.tar.gz
dpdk-draft-windows-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/netmap_compat')
-rw-r--r--examples/netmap_compat/bridge/bridge.c25
-rw-r--r--examples/netmap_compat/lib/compat_netmap.c6
-rw-r--r--examples/netmap_compat/lib/compat_netmap.h2
3 files changed, 2 insertions, 31 deletions
diff --git a/examples/netmap_compat/bridge/bridge.c b/examples/netmap_compat/bridge/bridge.c
index d9ceb42..0a8efbe 100644
--- a/examples/netmap_compat/bridge/bridge.c
+++ b/examples/netmap_compat/bridge/bridge.c
@@ -67,29 +67,6 @@ struct rte_eth_conf eth_conf = {
},
};
-struct rte_eth_txconf tx_conf = {
- .tx_thresh = {
- .pthresh = 36,
- .hthresh = 0,
- .wthresh = 0,
- },
- .tx_free_thresh = 0,
- .tx_rs_thresh = 0,
- .txq_flags = (ETH_TXQ_FLAGS_NOMULTSEGS |
- ETH_TXQ_FLAGS_NOVLANOFFL |
- ETH_TXQ_FLAGS_NOXSUMSCTP |
- ETH_TXQ_FLAGS_NOXSUMUDP |
- ETH_TXQ_FLAGS_NOXSUMTCP)
-};
-
-struct rte_eth_rxconf rx_conf = {
- .rx_thresh = {
- .pthresh = 8,
- .hthresh = 8,
- .wthresh = 4,
- },
-};
-
#define MAX_QUEUE_NUM 1
#define RX_QUEUE_NUM 1
#define TX_QUEUE_NUM 1
@@ -103,8 +80,6 @@ struct rte_eth_rxconf rx_conf = {
struct rte_netmap_port_conf port_conf = {
.eth_conf = &eth_conf,
- .tx_conf = &tx_conf,
- .rx_conf = &rx_conf,
.socket_id = SOCKET_ID_ANY,
.nr_tx_rings = TX_QUEUE_NUM,
.nr_rx_rings = RX_QUEUE_NUM,
diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c
index 44b3f8e..2348366 100644
--- a/examples/netmap_compat/lib/compat_netmap.c
+++ b/examples/netmap_compat/lib/compat_netmap.c
@@ -713,7 +713,7 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)
for (i = 0; i < conf->nr_tx_rings; i++) {
ret = rte_eth_tx_queue_setup(portid, i, tx_slots,
- conf->socket_id, conf->tx_conf);
+ conf->socket_id, NULL);
if (ret < 0) {
RTE_LOG(ERR, USER1,
@@ -724,7 +724,7 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)
}
ret = rte_eth_rx_queue_setup(portid, i, rx_slots,
- conf->socket_id, conf->rx_conf, conf->pool);
+ conf->socket_id, NULL, conf->pool);
if (ret < 0) {
RTE_LOG(ERR, USER1,
@@ -737,8 +737,6 @@ rte_netmap_init_port(uint8_t portid, const struct rte_netmap_port_conf *conf)
/* copy config to the private storage. */
ports[portid].eth_conf = conf->eth_conf[0];
- ports[portid].rx_conf = conf->rx_conf[0];
- ports[portid].tx_conf = conf->tx_conf[0];
ports[portid].pool = conf->pool;
ports[portid].socket_id = conf->socket_id;
ports[portid].nr_tx_rings = conf->nr_tx_rings;
diff --git a/examples/netmap_compat/lib/compat_netmap.h b/examples/netmap_compat/lib/compat_netmap.h
index f7f2276..f8a7812 100644
--- a/examples/netmap_compat/lib/compat_netmap.h
+++ b/examples/netmap_compat/lib/compat_netmap.h
@@ -56,8 +56,6 @@ struct rte_netmap_conf {
struct rte_netmap_port_conf {
struct rte_eth_conf *eth_conf;
- struct rte_eth_txconf *tx_conf;
- struct rte_eth_rxconf *rx_conf;
struct rte_mempool *pool;
int32_t socket_id;
uint16_t nr_tx_rings;