DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, stephen@networkplumber.org, stable@dpdk.org,
	Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Subject: [dpdk-dev] [PATCH 1/4] net/cxgbe: do not dereference global config struct
Date: Wed, 15 May 2019 09:54:19 +0200	[thread overview]
Message-ID: <1557906862-1116-1-git-send-email-david.marchand@redhat.com> (raw)

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

             reply	other threads:[~2019-05-15  7:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15  7:54 David Marchand [this message]
2019-05-15  7:54 ` David Marchand
2019-05-15  7:54 ` [dpdk-dev] [PATCH 2/4] net/softnic: " David Marchand
2019-05-15  7:54   ` David Marchand
2019-05-15 10:06   ` Maxime Coquelin
2019-05-15 10:06     ` Maxime Coquelin
2019-05-15  7:54 ` [dpdk-dev] [PATCH 3/4] examples/multi_process: " David Marchand
2019-05-15  7:54   ` David Marchand
2019-05-15 10:07   ` Maxime Coquelin
2019-05-15 10:07     ` Maxime Coquelin
2019-05-15  7:54 ` [dpdk-dev] [PATCH 4/4] examples/qos_sched: " David Marchand
2019-05-15  7:54   ` David Marchand
2019-05-15 10:08   ` Maxime Coquelin
2019-05-15 10:08     ` Maxime Coquelin
2019-05-15  9:29 ` [dpdk-dev] [PATCH 1/4] net/cxgbe: " Maxime Coquelin
2019-05-15  9:29   ` Maxime Coquelin
2019-05-29 22:31   ` Thomas Monjalon

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=1557906862-1116-1-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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 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).