DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh Bhagavatula <pbhagavatula@caviumnetworks.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] service: add API for service count per lcore
Date: Tue, 29 Aug 2017 15:58:50 +0530	[thread overview]
Message-ID: <20170829102848.GA25894@PBHAGAVATULA-LT> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA640C6D9FC@IRSMSX102.ger.corp.intel.com>

On Tue, Aug 29, 2017 at 09:57:11AM +0000, Van Haaren, Harry wrote:
> > From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com]
> > Sent: Monday, August 28, 2017 5:07 PM
> > To: Van Haaren, Harry <harry.van.haaren@intel.com>
> > Cc: dev@dpdk.org; Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH v2] service: add API for service count per lcore
> >
> > This new API returns the number of services that are running on a specific
> > service core. It allows an application to decide which service core to run
> > a new service on.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > ---
> >
> > v2 changes:
> >   - reword the commit title according to the check-git-log.sh
> >   - modify return types
> >   - add function to .map file
>
> Generally looks good, compile testing flags an error in the .map files (inline comment below).
>
> Perhaps mark the v1 patch as "Superseeded" in patchwork - keeps things tidy :)
>
Done.
>
> >  lib/librte_eal/bsdapp/eal/rte_eal_version.map   |  7 +++++++
> >  lib/librte_eal/common/include/rte_service.h     | 13 +++++++++++++
> >  lib/librte_eal/common/rte_service.c             | 13 +++++++++++++
> >  lib/librte_eal/linuxapp/eal/rte_eal_version.map |  7 +++++++
> >  4 files changed, 40 insertions(+)
> >
> > diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > index aac6fd7..5fe8d79 100644
> > --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map
> > @@ -237,3 +237,10 @@ EXPERIMENTAL {
> >  	rte_service_unregister;
> >
> >  } DPDK_17.08;
> > +
> > +EXPERIMENTAL {
> > +	global:
> > +
> > +	rte_service_lcore_count_services;
> > +
> > +} DPDK_17.11;
>
>
> The compile test output shows something here (and in linuxapp .map file) to be an issue:
> http://dpdk.org/ml/archives/test-report/2017-August/027931.html
>
> I think that the function can just be added in the "Experimental" section based on "DPDK_17.08".
> No need to define a new experimental section.
>

Will fix them and generate a v3.

>
> > diff --git a/lib/librte_eal/common/include/rte_service.h
> > b/lib/librte_eal/common/include/rte_service.h
> > index 7c6f738..9537ae5 100644
> > --- a/lib/librte_eal/common/include/rte_service.h
> > +++ b/lib/librte_eal/common/include/rte_service.h
> > @@ -374,6 +374,19 @@ int32_t rte_service_lcore_list(uint32_t array[], uint32_t n);
> >   * @warning
> >   * @b EXPERIMENTAL: this API may change without prior notice
> >   *
> > + * Get the numer of services running on the supplied lcore.
> > + *
> > + * @param Lcore Id of the service core.
> > + * @retval >=0 Number of services registered to this core.
> > + * @retval -EINVAL Invalid lcore provided
> > + * @retval -ENOTSUP The provided lcore is not a service core.
> > + */
> > +int32_t rte_service_lcore_count_services(uint32_t lcore);
> > +
> > +/**
> > + * @warning
> > + * @b EXPERIMENTAL: this API may change without prior notice
> > + *
> >   * Dumps any information available about the service. If service is NULL,
> >   * dumps info for all services.
> >   */
> > diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
> > index 7efb76d..616bad3 100644
> > --- a/lib/librte_eal/common/rte_service.c
> > +++ b/lib/librte_eal/common/rte_service.c
> > @@ -397,6 +397,19 @@ rte_service_lcore_list(uint32_t array[], uint32_t n)
> >  }
> >
> >  int32_t
> > +rte_service_lcore_count_services(uint32_t lcore)
> > +{
> > +	if (lcore >= RTE_MAX_LCORE)
> > +		return -EINVAL;
> > +
> > +	struct core_state *cs = &lcore_states[lcore];
> > +	if (!cs->is_service_core)
> > +		return -ENOTSUP;
> > +
> > +	return __builtin_popcountll(cs->service_mask);
> > +}
> > +
> > +int32_t
> >  rte_service_start_with_defaults(void)
> >  {
> >  	/* create a default mapping from cores to services, then start the
> > diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > index 3a8f154..e848c45 100644
> > --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
> > @@ -242,3 +242,10 @@ EXPERIMENTAL {
> >  	rte_service_unregister;
> >
> >  } DPDK_17.08;
> > +
> > +EXPERIMENTAL {
> > +	global:
> > +
> > +	rte_service_lcore_count_services;
> > +
> > +} DPDK_17.11;
> > --
> > 2.7.4
>
Thanks,
Pavan.

      reply	other threads:[~2017-08-29 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 16:06 Pavan Nikhilesh
2017-08-29  9:57 ` Van Haaren, Harry
2017-08-29 10:28   ` Pavan Nikhilesh Bhagavatula [this message]

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=20170829102848.GA25894@PBHAGAVATULA-LT \
    --to=pbhagavatula@caviumnetworks.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).