From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, stephen@networkplumber.org, stable@dpdk.org,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Subject: [dpdk-dev] [PATCH 4/4] examples/qos_sched: do not dereference global config struct
Date: Wed, 15 May 2019 09:54:22 +0200 [thread overview]
Message-ID: <1557906862-1116-4-git-send-email-david.marchand@redhat.com> (raw)
Message-ID: <20190515075422.3Pdo3XPWgj-EaE0knn_O8i3G9A3-ks6BmR7pvebmHFc@z> (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: de3cfa2c9823 ("sched: initial import")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
examples/qos_sched/args.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index 83eee95..7431b29 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -90,16 +90,15 @@ static inline int str_is(const char *str, const char *is)
static uint64_t
app_eal_core_mask(void)
{
- uint32_t i;
uint64_t cm = 0;
- struct rte_config *cfg = rte_eal_get_configuration();
+ uint32_t i;
for (i = 0; i < APP_MAX_LCORE; i++) {
- if (cfg->lcore_role[i] == ROLE_RTE)
+ if (rte_lcore_has_role(i, ROLE_RTE))
cm |= (1ULL << i);
}
- cm |= (1ULL << cfg->master_lcore);
+ cm |= (1ULL << rte_get_master_lcore());
return cm;
}
--
1.8.3.1
next prev parent reply other threads:[~2019-05-15 7:55 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 ` [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 ` David Marchand [this message]
2019-05-15 7:54 ` [dpdk-dev] [PATCH 4/4] examples/qos_sched: " 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-4-git-send-email-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=cristian.dumitrescu@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).