From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Subject: [PATCH 1/2] examples/ethtool: remove query of default config
Date: Wed, 13 Mar 2019 11:09:09 +0100 [thread overview]
Message-ID: <20190313100910.31260-2-thomas@monjalon.net> (raw)
In-Reply-To: <20190313100910.31260-1-thomas@monjalon.net>
The default config is used if the setup parameter is NULL.
No need to query the default config with rte_eth_dev_info_get().
The function call will be removed with another useless info.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
examples/ethtool/ethtool-app/main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index dc93adfe3..e23d3afd2 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -95,7 +95,6 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
char str_name[16];
uint16_t nb_rxd = PORT_RX_QUEUE_SIZE;
uint16_t nb_txd = PORT_TX_QUEUE_SIZE;
- struct rte_eth_txconf txconf;
memset(&cfg_port, 0, sizeof(cfg_port));
cfg_port.txmode.mq_mode = ETH_MQ_TX_NONE;
@@ -140,10 +139,9 @@ static void setup_ports(struct app_config *app_cfg, int cnt_ports)
rte_exit(EXIT_FAILURE,
"rte_eth_rx_queue_setup failed"
);
- txconf = dev_info.default_txconf;
if (rte_eth_tx_queue_setup(
idx_port, 0, nb_txd,
- rte_eth_dev_socket_id(idx_port), &txconf) < 0)
+ rte_eth_dev_socket_id(idx_port), NULL) < 0)
rte_exit(EXIT_FAILURE,
"rte_eth_tx_queue_setup failed"
);
--
2.20.1
next prev parent reply other threads:[~2019-03-13 10:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-13 10:09 [PATCH 0/2] examples/ethtool: remove useless device info query Thomas Monjalon
2019-03-13 10:09 ` Thomas Monjalon [this message]
2019-03-13 10:32 ` [PATCH 1/2] examples/ethtool: remove query of default config Bruce Richardson
2019-03-13 17:41 ` Rami Rosen
2019-03-20 13:46 ` Ferruh Yigit
2019-03-20 13:51 ` Thomas Monjalon
2019-03-20 13:56 ` Ferruh Yigit
2019-03-20 14:05 ` Thomas Monjalon
2019-03-13 10:09 ` [PATCH 2/2] examples/ethtool: allocate only one mempool Thomas Monjalon
2019-03-13 10:34 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190313100910.31260-2-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.