patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/4] net/cxgbe: do not dereference global config struct
@ 2019-05-15  7:54 David Marchand
  2019-05-15  7:54 ` [dpdk-stable] [PATCH 2/4] net/softnic: " David Marchand
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Marchand @ 2019-05-15  7:54 UTC (permalink / raw)
  To: dev; +Cc: thomas, stephen, stable, Rahul Lakkireddy

Prefer the existing apis rather than direct access the configuration
structure.

Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/cxgbe/cxgbe_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 28c3c66..987aab4 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -504,7 +504,6 @@ int cxgbe_cfg_queue_count(struct rte_eth_dev *eth_dev)
 
 void cxgbe_cfg_queues(struct rte_eth_dev *eth_dev)
 {
-	struct rte_config *config = rte_eal_get_configuration();
 	struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
 	struct adapter *adap = pi->adapter;
 	struct sge *s = &adap->sge;
@@ -527,8 +526,8 @@ void cxgbe_cfg_queues(struct rte_eth_dev *eth_dev)
 				     (adap->params.nports - nb_ports)) /
 				     nb_ports;
 
-		if (q_per_port > config->lcore_count)
-			q_per_port = config->lcore_count;
+		if (q_per_port > rte_lcore_count())
+			q_per_port = rte_lcore_count();
 
 		for_each_port(adap, i) {
 			struct port_info *pi = adap2pinfo(adap, i);
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-05-29 22:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15  7:54 [dpdk-stable] [PATCH 1/4] net/cxgbe: do not dereference global config struct David Marchand
2019-05-15  7:54 ` [dpdk-stable] [PATCH 2/4] net/softnic: " David Marchand
2019-05-15 10:06   ` [dpdk-stable] [dpdk-dev] " Maxime Coquelin
2019-05-15  7:54 ` [dpdk-stable] [PATCH 3/4] examples/multi_process: " David Marchand
2019-05-15 10:07   ` [dpdk-stable] [dpdk-dev] " Maxime Coquelin
2019-05-15  7:54 ` [dpdk-stable] [PATCH 4/4] examples/qos_sched: " David Marchand
2019-05-15 10:08   ` [dpdk-stable] [dpdk-dev] " Maxime Coquelin
2019-05-15  9:29 ` [dpdk-stable] [dpdk-dev] [PATCH 1/4] net/cxgbe: " Maxime Coquelin
2019-05-29 22:31   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).