Patchwork [dpdk-dev,1/2] examples/ethtool: remove query of default config

login
register
mail settings
Submitter Thomas Monjalon
Date March 13, 2019, 10:09 a.m.
Message ID <20190313100910.31260-2-thomas@monjalon.net>
Download mbox | patch
Permalink /patch/747995/
State New
Headers show

Comments

Thomas Monjalon - March 13, 2019, 10:09 a.m.
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(-)
Bruce Richardson - March 13, 2019, 10:32 a.m.
On Wed, Mar 13, 2019 at 11:09:09AM +0100, Thomas Monjalon wrote:
> 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>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Rami Rosen - March 13, 2019, 5:41 p.m.
On Wed, Mar 13, 2019 at 11:09:09AM +0100, Thomas Monjalon wrote:
> > 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>
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>

Reviewed-by: Rami Rosen <ramirose@gmail.com>
Ferruh Yigit - March 20, 2019, 1:46 p.m.
On 3/13/2019 5:41 PM, Rami Rosen wrote:
> On Wed, Mar 13, 2019 at 11:09:09AM +0100, Thomas Monjalon wrote:
>>> 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>
>>
>> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>>
> 
> Reviewed-by: Rami Rosen <ramirose@gmail.com>
> 

Applied to dpdk-next-net/master, thanks.

(only this patch merged, not series. Other patch seems waiting for comment.)
Thomas Monjalon - March 20, 2019, 1:51 p.m.
20/03/2019 14:46, Ferruh Yigit:
> Applied to dpdk-next-net/master, thanks.
> 
> (only this patch merged, not series. Other patch seems waiting for comment.)

Applying half of patchset makes tracking of patches less obvious.
I prefer we avoid such practice.
Ferruh Yigit - March 20, 2019, 1:56 p.m.
On 3/20/2019 1:51 PM, Thomas Monjalon wrote:
> 20/03/2019 14:46, Ferruh Yigit:
>> Applied to dpdk-next-net/master, thanks.
>>
>> (only this patch merged, not series. Other patch seems waiting for comment.)
> 
> Applying half of patchset makes tracking of patches less obvious.
> I prefer we avoid such practice.

Generally I agree, this case the patches in patchset looks can be independent
and merged one was trivial, I tend to this for similar cases.
Do you prefer me drop the applied patch?
Thomas Monjalon - March 20, 2019, 2:05 p.m.
20/03/2019 14:56, Ferruh Yigit:
> On 3/20/2019 1:51 PM, Thomas Monjalon wrote:
> > 20/03/2019 14:46, Ferruh Yigit:
> >> Applied to dpdk-next-net/master, thanks.
> >>
> >> (only this patch merged, not series. Other patch seems waiting for comment.)
> > 
> > Applying half of patchset makes tracking of patches less obvious.
> > I prefer we avoid such practice.
> 
> Generally I agree, this case the patches in patchset looks can be independent
> and merged one was trivial, I tend to this for similar cases.

Even if it is independent (it is not really in this case),
it looks weird to see half of patchset pending in patchwork.
We may spend some time to understand what happened.

> Do you prefer me drop the applied patch?

You can keep it now it's applied.

Patch

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"
 				);