All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,
	"jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"Eads, Gage" <gage.eads@intel.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"nipun.gupta@nxp.com" <nipun.gupta@nxp.com>,
	"Rao, Nikhil" <nikhil.rao@intel.com>,
	"santosh.shukla@caviumnetworks.com"
	<santosh.shukla@caviumnetworks.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v3 7/8] app/eventdev: add service core configuration
Date: Tue, 19 Dec 2017 10:25:49 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA650FE380C@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20171211151346.14405-7-pbhagavatula@caviumnetworks.com>

> From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com]
<snip>
> Add service core configuration for Rx adapter. The configuration picks
> the least used service core to run the service on.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
>  app/test-eventdev/evt_common.h       | 41 ++++++++++++++++-----------------
> ---
>  app/test-eventdev/test_perf_atq.c    | 12 +++++++----
>  app/test-eventdev/test_perf_common.c | 13 ++++++++++++
>  app/test-eventdev/test_perf_queue.c  | 12 +++++++----
>  4 files changed, 47 insertions(+), 31 deletions(-)
> 
> diff --git a/app/test-eventdev/evt_common.h b/app/test-eventdev/evt_common.h
> index 0fadab4a0..042823a52 100644
> --- a/app/test-eventdev/evt_common.h
> +++ b/app/test-eventdev/evt_common.h
> @@ -94,41 +94,36 @@ evt_has_all_types_queue(uint8_t dev_id)
>  }
> 
>  static inline int
> -evt_service_setup(uint8_t dev_id)
> +evt_service_setup(uint32_t service_id)
>  {
> -	uint32_t service_id;
>  	int32_t core_cnt;
>  	unsigned int lcore = 0;
>  	uint32_t core_array[RTE_MAX_LCORE];
>  	uint8_t cnt;
>  	uint8_t min_cnt = UINT8_MAX;
> 
> -	if (evt_has_distributed_sched(dev_id))
> -		return 0;
> -
>  	if (!rte_service_lcore_count())
>  		return -ENOENT;

See last comment - we can try to get next lcore, and add it as a service core to continue running test?

> 
> -	if (!rte_event_dev_service_id_get(dev_id, &service_id)) {
> -		core_cnt = rte_service_lcore_list(core_array,
> -				RTE_MAX_LCORE);
> -		if (core_cnt < 0)
> -			return -ENOENT;
> -		/* Get the core which has least number of services running. */
> -		while (core_cnt--) {
> -			/* Reset default mapping */

> -			rte_service_map_lcore_set(service_id,
> -					core_array[core_cnt], 0);

Nit: these two can be on the same line

> 
> +		if (!(cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT)) {
> +			uint32_t service_id;
> +
> +			rte_event_eth_rx_adapter_service_id_get(prod,
> +					&service_id);
> +			ret = evt_service_setup(service_id);

> +			if (ret) {
> +				evt_err("Failed to setup service core"
> +						" for Rx adapter\n");

No need to split strings here.


> +	if (!evt_has_distributed_sched(opt->dev_id)) {
> +		uint32_t service_id;
> +		rte_event_dev_service_id_get(opt->dev_id, &service_id);
> +		ret = evt_service_setup(service_id);
> +		if (ret) {
> +			evt_err("No service lcore found to run event dev.");
> +			return ret;

Would it be better to try get next lcore, and add as a service core here? That way we could continue running the test.


With above suggestions;
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

  reply	other threads:[~2017-12-19 10:25 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 12:39 [PATCH 0/8] app/eventdev: add event eth Rx adapter support Pavan Nikhilesh
2017-10-18 12:39 ` [PATCH 1/8] app/eventdev: add ethernet device producer option Pavan Nikhilesh
2017-12-10  8:34   ` Jerin Jacob
2017-10-18 12:39 ` [PATCH 2/8] app/eventdev: modify app setup to support ethdev Pavan Nikhilesh
2017-12-10 11:56   ` Jerin Jacob
2017-10-18 12:39 ` [PATCH 3/8] app/eventdev: add pktmbuf pool for ethdev Pavan Nikhilesh
2017-12-10 12:01   ` Jerin Jacob
2017-10-18 12:39 ` [PATCH 4/8] app/eventdev: add ethernet device setup helpers Pavan Nikhilesh
2017-12-10 12:09   ` Jerin Jacob
2017-10-18 12:39 ` [PATCH 5/8] app/eventdev: add ethernet device tear down Pavan Nikhilesh
2017-12-10 12:10   ` Jerin Jacob
2017-10-18 12:39 ` [PATCH 6/8] app/eventdev: add event Rx adapter setup Pavan Nikhilesh
2017-12-10 12:13   ` Jerin Jacob
2017-10-18 12:39 ` [PATCH 7/8] app/eventdev: add service core configuration Pavan Nikhilesh
2017-10-18 12:39 ` [PATCH 8/8] doc: update app eventdev options Pavan Nikhilesh
2017-10-18 18:33   ` Mcnamara, John
2017-12-10 12:16   ` Jerin Jacob
2017-12-10  8:28 ` [PATCH 0/8] app/eventdev: add event eth Rx adapter support Jerin Jacob
2017-12-11  7:37   ` Pavan Nikhilesh Bhagavatula
2017-12-11 11:12 ` [PATCH v2 1/8] app/eventdev: add ethernet device producer option Pavan Nikhilesh
2017-12-11 11:12   ` [PATCH v2 2/8] app/eventdev: modify app setup to support ethdev Pavan Nikhilesh
2017-12-11 11:12   ` [PATCH v2 3/8] app/eventdev: add pktmbuf pool for ethdev Pavan Nikhilesh
2017-12-11 11:12   ` [PATCH v2 4/8] app/eventdev: add ethernet device setup helpers Pavan Nikhilesh
2017-12-11 11:12   ` [PATCH v2 5/8] app/eventdev: add ethernet device tear down Pavan Nikhilesh
2017-12-11 11:12   ` [PATCH v2 6/8] app/eventdev: add event Rx adapter setup Pavan Nikhilesh
2017-12-11 11:12   ` [PATCH v2 7/8] app/eventdev: add service core configuration Pavan Nikhilesh
2017-12-11 11:12   ` [PATCH v2 8/8] doc: update app eventdev options Pavan Nikhilesh
2017-12-16  9:34   ` [PATCH v2 1/8] app/eventdev: add ethernet device producer option Jerin Jacob
2017-12-11 15:13 ` [PATCH v3 " Pavan Nikhilesh
2017-12-11 15:13   ` [PATCH v3 2/8] app/eventdev: modify app setup to support ethdev Pavan Nikhilesh
2017-12-11 15:13   ` [PATCH v3 3/8] app/eventdev: add pktmbuf pool for ethdev Pavan Nikhilesh
2017-12-11 15:13   ` [PATCH v3 4/8] app/eventdev: add ethernet device setup helpers Pavan Nikhilesh
2017-12-11 15:13   ` [PATCH v3 5/8] app/eventdev: add ethernet device tear down Pavan Nikhilesh
2017-12-11 15:13   ` [PATCH v3 6/8] app/eventdev: add event Rx adapter setup Pavan Nikhilesh
2017-12-11 15:13   ` [PATCH v3 7/8] app/eventdev: add service core configuration Pavan Nikhilesh
2017-12-19 10:25     ` Van Haaren, Harry [this message]
2017-12-11 15:13   ` [PATCH v3 8/8] doc: update app eventdev options Pavan Nikhilesh
2017-12-11 17:34     ` Eads, Gage
2017-12-12  7:19       ` Pavan Nikhilesh Bhagavatula
2017-12-16  9:32       ` Jerin Jacob

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=E923DB57A917B54B9182A2E928D00FA650FE380C@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=nikhil.rao@intel.com \
    --cc=nipun.gupta@nxp.com \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=santosh.shukla@caviumnetworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.