From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, stephen@networkplumber.org, stable@dpdk.org,
Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [dpdk-dev] [PATCH 3/4] examples/multi_process: do not dereference global config struct
Date: Wed, 15 May 2019 09:54:21 +0200 [thread overview]
Message-ID: <1557906862-1116-3-git-send-email-david.marchand@redhat.com> (raw)
In-Reply-To: <1557906862-1116-1-git-send-email-david.marchand@redhat.com>
Prefer the existing apis rather than direct access the configuration
structure.
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
examples/multi_process/symmetric_mp/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index c310e94..62771e0 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -271,7 +271,7 @@ struct port_stats{
assign_ports_to_cores(void)
{
- const unsigned lcores = rte_eal_get_configuration()->lcore_count;
+ const unsigned int lcores = rte_lcore_count();
const unsigned port_pairs = num_ports / 2;
const unsigned pairs_per_lcore = port_pairs / lcores;
unsigned extra_pairs = port_pairs % lcores;
--
1.8.3.1
next prev parent 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 [dpdk-dev] [PATCH 1/4] net/cxgbe: " David Marchand
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 ` David Marchand [this message]
2019-05-15 7:54 ` [dpdk-dev] [PATCH 3/4] examples/multi_process: " 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-3-git-send-email-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--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).