From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Eads, Gage" <gage.eads@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] example: add new service cores sample application
Date: Thu, 19 Oct 2017 10:02:14 +0000 [thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA650FC796E@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E13FF25E2@fmsmsx101.amr.corp.intel.com>
> From: Eads, Gage
> Sent: Monday, September 25, 2017 5:32 PM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] example: add new service cores sample application
>
> 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.
Nope - good suggestion, Fixed in v2.
> > +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.
They're not fatal, they shouldn't (and don't) occur in the sample app. The error handling is there to be a good example - panic() doesn't seem a good suggestion to handle and error.. I'll leave as is.
>
> > +
> > + 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);
Good catch, fixed in v2.
next prev parent reply other threads:[~2017-10-19 10:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 16:32 Eads, Gage
2017-10-19 10:02 ` Van Haaren, Harry [this message]
-- 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=E923DB57A917B54B9182A2E928D00FA650FC796E@IRSMSX102.ger.corp.intel.com \
--to=harry.van.haaren@intel.com \
--cc=dev@dpdk.org \
--cc=gage.eads@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).