From: "Eads, Gage" <gage.eads@intel.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] example: add new service cores sample application
Date: Mon, 25 Sep 2017 16:32:29 +0000 [thread overview]
Message-ID: <9184057F7FC11744A2107296B6B8EB1E13FF25E2@fmsmsx101.amr.corp.intel.com> (raw)
Neat example. Looks good overall, I just have a few questions.
> +#define PROFILE_SERVICE_PER_CORE 8
Any reason not to use 5 here? That would remove a few zeroes from the profiles[] initializers.
> +static int
> +apply_profile(int profile_id)
> +{
> + uint32_t i;
> + uint32_t s;
> + int ret;
> + struct profile *p = &profiles[profile_id];
> + const uint8_t core_off = 1;
> +
> + for (i = 0; i < p->num_cores; i++) {
> + ret = rte_service_lcore_add(i + core_off);
> + if (ret && ret != -EALREADY)
> + printf("core %d added ret %d\n", i + core_off, ret);
I'm wondering if this and the other printfs in this function should be rte_panics? These seem like fatal errors.
> +
> + ret = rte_service_lcore_start(i + core_off);
> + if (ret && ret != -EALREADY)
> + printf("core %d start ret %d\n", i + core_off, ret);
> +
> + for (s = 0; s < NUM_SERVICES; s++) {
> + if (rte_service_map_lcore_set(s, i + core_off,
> + p->cores[i].mapped_services[s]))
> + rte_panic("failed to map lcore to 1\n");
What does '1' refer to here? Perhaps it should be: rte_panic("failed to map lcore %d to %s\n", i + core_off, services[s].name);
next reply other threads:[~2017-09-25 16:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 16:32 Eads, Gage [this message]
2017-10-19 10:02 ` Van Haaren, Harry
-- strict thread matches above, loose matches on Subject: below --
2017-09-25 13:23 Harry van Haaren
2017-10-13 22:20 ` Thomas Monjalon
2017-10-13 22:24 ` Thomas Monjalon
2017-10-19 10:04 ` Van Haaren, Harry
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=9184057F7FC11744A2107296B6B8EB1E13FF25E2@fmsmsx101.amr.corp.intel.com \
--to=gage.eads@intel.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
/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).