DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: "Eads, Gage" <gage.eads@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>,
	"Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
	"nipun.gupta@nxp.com" <nipun.gupta@nxp.com>,
	"Vangati, Narender" <narender.vangati@intel.com>,
	"Rao, Nikhil" <nikhil.rao@intel.com>,
	"gprathyusha@caviumnetworks.com" <gprathyusha@caviumnetworks.com>
Subject: Re: [dpdk-dev] [PATCH 25/33] app/testeventdev: perf queue: add worker functions
Date: Fri, 2 Jun 2017 17:51:48 +0530	[thread overview]
Message-ID: <20170602122148.GB10169@jerin> (raw)
In-Reply-To: <9184057F7FC11744A2107296B6B8EB1E01EC6753@FMSMSX108.amr.corp.intel.com>

-----Original Message-----
> Date: Thu, 1 Jun 2017 21:04:15 +0000
> From: "Eads, Gage" <gage.eads@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, "dev@dpdk.org"
>  <dev@dpdk.org>
> CC: "Richardson, Bruce" <bruce.richardson@intel.com>, "Van Haaren, Harry"
>  <harry.van.haaren@intel.com>, "hemant.agrawal@nxp.com"
>  <hemant.agrawal@nxp.com>, "nipun.gupta@nxp.com" <nipun.gupta@nxp.com>,
>  "Vangati, Narender" <narender.vangati@intel.com>, "Rao, Nikhil"
>  <nikhil.rao@intel.com>, "gprathyusha@caviumnetworks.com"
>  <gprathyusha@caviumnetworks.com>
> Subject: RE: [dpdk-dev] [PATCH 25/33] app/testeventdev: perf queue: add
>  worker functions
> 
> 
> 
> >  -----Original Message-----
> >  From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> >  Sent: Sunday, May 28, 2017 2:59 PM
> >  To: dev@dpdk.org
> >  Cc: Richardson, Bruce <bruce.richardson@intel.com>; Van Haaren, Harry
> >  <harry.van.haaren@intel.com>; hemant.agrawal@nxp.com; Eads, Gage
> >  <gage.eads@intel.com>; nipun.gupta@nxp.com; Vangati, Narender
> >  <narender.vangati@intel.com>; Rao, Nikhil <nikhil.rao@intel.com>;
> >  gprathyusha@caviumnetworks.com; Jerin Jacob
> >  <jerin.jacob@caviumnetworks.com>
> >  Subject: [dpdk-dev] [PATCH 25/33] app/testeventdev: perf queue: add worker
> >  functions
> >  
> >  Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> >  ---
> >   app/test-eventdev/test_perf_common.h |  60 +++++++++++++++  app/test-
> >  eventdev/test_perf_queue.c  | 137 +++++++++++++++++++++++++++++++++++
> >   2 files changed, 197 insertions(+)
> >  
> >  diff --git a/app/test-eventdev/test_perf_common.h b/app/test-
> >  eventdev/test_perf_common.h
> >  index f8246953a..9888e5078 100644
> >  --- a/app/test-eventdev/test_perf_common.h
> >  +++ b/app/test-eventdev/test_perf_common.h
> >  @@ -86,6 +86,66 @@ struct perf_elt {
> >   	uint64_t timestamp;
> >   } __rte_cache_aligned;
> >  
> >  +#define BURST_SIZE 16
> >  +
> >  +#define PERF_WORKER_INIT\
> >  +	struct worker_data *w  = arg;\
> >  +	struct test_perf *t = w->t;\
> >  +	struct evt_options *opt = t->opt;\
> >  +	const uint8_t dev = w->dev_id;\
> >  +	const uint8_t port = w->port_id;\
> >  +	uint8_t *const sched_type_list = &t->sched_type_list[0];\
> >  +	struct rte_mempool *const pool = t->pool;\
> >  +	const uint8_t nb_stages = t->opt->nb_stages;\
> >  +	const uint8_t laststage = nb_stages - 1;\
> >  +	uint8_t cnt = 0;\
> >  +	void *bufs[16] __rte_cache_aligned;\
> >  +	int const sz = RTE_DIM(bufs);\
> >  +	if (opt->verbose_level > 1)\
> >  +		printf("%s(): lcore %d dev_id %d port=%d\n", __func__,\
> >  +				rte_lcore_id(), dev, port)
> >  +
> >  +static inline __attribute__((always_inline)) int
> >  +perf_process_last_stage(struct rte_mempool *const pool,
> >  +		struct rte_event *const ev, struct worker_data *const w,
> >  +		void *bufs[], int const buf_sz, uint8_t count) {
> >  +	bufs[count++] = ev->event_ptr;
> >  +	w->processed_pkts++;
> >  +	rte_smp_wmb();
> >  +
> >  +	if (unlikely(count == buf_sz)) {
> >  +		count = 0;
> >  +		rte_mempool_put_bulk(pool, bufs, buf_sz);
> >  +	}
> >  +	return count;
> >  +}
> >  +
> >  +static inline __attribute__((always_inline)) uint8_t
> >  +perf_process_last_stage_latency(struct rte_mempool *const pool,
> >  +		struct rte_event *const ev, struct worker_data *const w,
> >  +		void *bufs[], int const buf_sz, uint8_t count) {
> >  +	uint64_t latency;
> >  +	struct perf_elt *const m = ev->event_ptr;
> >  +
> >  +	bufs[count++] = ev->event_ptr;
> >  +	w->processed_pkts++;
> >  +
> >  +	if (unlikely(count == buf_sz)) {
> >  +		count = 0;
> >  +		latency = rte_get_timer_cycles() - m->timestamp;
> >  +		rte_mempool_put_bulk(pool, bufs, buf_sz);
> >  +	} else {
> >  +		latency = rte_get_timer_cycles() - m->timestamp;
> >  +	}
> >  +
> >  +	w->latency += latency;
> >  +	rte_smp_wmb();
> >  +	return count;
> >  +}
> 
> What purpose does the store barrier serve in these two functions?

The master core(!worker core) reads w->latency and
w->processed_pkts periodically from all workers.

  reply	other threads:[~2017-06-02 12:22 UTC|newest]

Thread overview: 133+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-28 19:58 [dpdk-dev] [PATCH 00/33] introduce generic eventdev test application framework Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 01/33] app/testeventdev: introduce dpdk-test-eventdev application Jerin Jacob
2017-06-23 12:23   ` Van Haaren, Harry
2017-05-28 19:58 ` [dpdk-dev] [PATCH 02/33] app/testeventdev: define eventdev test ops Jerin Jacob
2017-06-01 20:44   ` Eads, Gage
2017-06-23 12:27   ` Van Haaren, Harry
2017-05-28 19:58 ` [dpdk-dev] [PATCH 03/33] app/testeventdev: add eventdev test registration framework Jerin Jacob
2017-06-23 12:28   ` Van Haaren, Harry
2017-05-28 19:58 ` [dpdk-dev] [PATCH 04/33] app/testeventdev: add string parsing helpers Jerin Jacob
2017-06-23 12:30   ` Van Haaren, Harry
2017-05-28 19:58 ` [dpdk-dev] [PATCH 05/33] app/testeventdev: add common helper functions Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 06/33] app/testeventdev: define the test options Jerin Jacob
2017-06-23 13:07   ` Van Haaren, Harry
2017-07-03  7:10     ` Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 07/33] app/testeventdev: add helper functions to check options Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 08/33] app/testeventdev: add helper functions to dump options Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 09/33] app/testeventdev: update options through the command line Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 10/33] app/testeventdev: invoke the test ops Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 11/33] app/testeventdev: add the signal handler Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 12/33] app/testeventdev: order: add test setup and destroy Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 13/33] app/testeventdev: order: add basic functions Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 14/33] app/testeventdev: order: add eventdev port setup Jerin Jacob
2017-06-23 12:36   ` Van Haaren, Harry
2017-06-23 12:45     ` Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 15/33] app/testeventdev: order: launch lcores Jerin Jacob
2017-06-01 20:54   ` Eads, Gage
2017-05-28 19:58 ` [dpdk-dev] [PATCH 16/33] app/testeventdev: add order queue test Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 17/33] app/testeventdev: order queue: add worker functions Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 18/33] app/testeventdev: add order "all types queue" test Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 19/33] app/testeventdev: perf: add test setup and destroy Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 20/33] app/testeventdev: perf: add basic functions Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 21/33] app/testeventdev: perf: add opt dump and check functions Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 22/33] app/testeventdev: perf: add eventdev port setup Jerin Jacob
2017-06-23 12:42   ` Van Haaren, Harry
2017-05-28 19:58 ` [dpdk-dev] [PATCH 23/33] app/testeventdev: perf: launch lcores Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 24/33] app/testeventdev: add perf queue test Jerin Jacob
2017-06-23 12:47   ` Van Haaren, Harry
2017-07-03  8:38     ` Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 25/33] app/testeventdev: perf queue: add worker functions Jerin Jacob
2017-06-01 21:04   ` Eads, Gage
2017-06-02 12:21     ` Jerin Jacob [this message]
2017-05-28 19:58 ` [dpdk-dev] [PATCH 26/33] app/testeventdev: add perf "all types queue" test Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 27/33] app/testeventdev: perf: add "all type queue" worker function Jerin Jacob
2017-05-28 19:58 ` [dpdk-dev] [PATCH 28/33] doc: describe the new eventdev test application Jerin Jacob
2017-06-23 12:53   ` Van Haaren, Harry
2017-07-03  9:48     ` Jerin Jacob
2017-06-30 14:09   ` Mcnamara, John
2017-05-28 19:58 ` [dpdk-dev] [PATCH 29/33] doc/testeventdev: add "order queue" test details Jerin Jacob
2017-06-30 14:19   ` Mcnamara, John
2017-05-28 19:58 ` [dpdk-dev] [PATCH 30/33] doc/testeventdev: add "order all types " Jerin Jacob
2017-06-30 14:23   ` Mcnamara, John
2017-06-30 14:28   ` Mcnamara, John
2017-05-28 19:58 ` [dpdk-dev] [PATCH 31/33] doc/testeventdev: add "perf " Jerin Jacob
2017-06-01 21:11   ` Eads, Gage
2017-06-02 12:10     ` Jerin Jacob
2017-06-30 14:31   ` Mcnamara, John
2017-05-28 19:58 ` [dpdk-dev] [PATCH 32/33] doc/testeventdev: add "perf all types " Jerin Jacob
2017-06-23 12:56   ` Van Haaren, Harry
2017-05-28 19:58 ` [dpdk-dev] [PATCH 33/33] maintainers: claim responsibility for the eventdev test app Jerin Jacob
2017-06-23 12:58   ` Van Haaren, Harry
2017-06-23 12:21 ` [dpdk-dev] [PATCH 00/33] introduce generic eventdev test application framework Van Haaren, Harry
2017-07-03 19:13 ` [dpdk-dev] [PATCH v2 00/34] " Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 01/34] app/testeventdev: introduce dpdk-test-eventdev application Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 02/34] app/testeventdev: define eventdev test ops Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 03/34] app/testeventdev: add eventdev test registration framework Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 04/34] app/testeventdev: add string parsing helpers Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 05/34] app/testeventdev: add common helper functions Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 06/34] app/testeventdev: define the test options Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 07/34] app/testeventdev: add helper functions to check options Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 08/34] app/testeventdev: add helper functions to dump options Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 09/34] app/testeventdev: update options through the command line Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 10/34] app/testeventdev: invoke the test ops Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 11/34] app/testeventdev: add the signal handler Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 12/34] app/testeventdev: order: add test setup and destroy Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 13/34] app/testeventdev: order: add basic functions Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 14/34] app/testeventdev: order: add eventdev port setup Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 15/34] app/testeventdev: order: launch lcores Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 16/34] app/testeventdev: add order queue test Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 17/34] app/testeventdev: order queue: add worker functions Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 18/34] app/testeventdev: add order "all types queue" test Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 19/34] app/testeventdev: perf: add test setup and destroy Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 20/34] app/testeventdev: perf: add basic functions Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 21/34] app/testeventdev: perf: add opt dump and check functions Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 22/34] app/testeventdev: perf: add eventdev port setup Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 23/34] app/testeventdev: perf: launch lcores Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 24/34] app/testeventdev: add perf queue test Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 25/34] app/testeventdev: perf queue: add worker functions Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 26/34] app/testeventdev: add perf "all types queue" test Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 27/34] app/testeventdev: perf: add "all type queue" worker function Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 28/34] doc: describe the new eventdev test application Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 29/34] doc/testeventdev: add "order queue" test details Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 30/34] doc/testeventdev: add "order all types " Jerin Jacob
2017-07-03 19:13   ` [dpdk-dev] [PATCH v2 31/34] doc/testeventdev: add "perf " Jerin Jacob
2017-07-03 19:14   ` [dpdk-dev] [PATCH v2 32/34] doc/testeventdev: add "perf all types " Jerin Jacob
2017-07-03 19:14   ` [dpdk-dev] [PATCH v2 33/34] maintainers: claim responsibility for the eventdev test app Jerin Jacob
2017-07-03 19:14   ` [dpdk-dev] [PATCH v2 34/34] doc: update release notes for dpdk-test-eventdev application Jerin Jacob
2017-07-04  4:52   ` [dpdk-dev] [PATCH v3 00/34] introduce generic eventdev test application framework Jerin Jacob
2017-07-04  4:52     ` [dpdk-dev] [PATCH v3 01/34] app/testeventdev: introduce dpdk-test-eventdev application Jerin Jacob
2017-07-04  4:52     ` [dpdk-dev] [PATCH v3 02/34] app/testeventdev: define eventdev test ops Jerin Jacob
2017-07-04  4:52     ` [dpdk-dev] [PATCH v3 03/34] app/testeventdev: add eventdev test registration framework Jerin Jacob
2017-07-04  4:52     ` [dpdk-dev] [PATCH v3 04/34] app/testeventdev: add string parsing helpers Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 05/34] app/testeventdev: add common helper functions Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 06/34] app/testeventdev: define the test options Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 07/34] app/testeventdev: add helper functions to check options Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 08/34] app/testeventdev: add helper functions to dump options Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 09/34] app/testeventdev: update options through the command line Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 10/34] app/testeventdev: invoke the test ops Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 11/34] app/testeventdev: add the signal handler Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 12/34] app/testeventdev: order: add test setup and destroy Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 13/34] app/testeventdev: order: add basic functions Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 14/34] app/testeventdev: order: add eventdev port setup Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 15/34] app/testeventdev: order: launch lcores Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 16/34] app/testeventdev: add order queue test Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 17/34] app/testeventdev: order queue: add worker functions Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 18/34] app/testeventdev: add order "all types queue" test Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 19/34] app/testeventdev: perf: add test setup and destroy Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 20/34] app/testeventdev: perf: add basic functions Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 21/34] app/testeventdev: perf: add opt dump and check functions Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 22/34] app/testeventdev: perf: add eventdev port setup Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 23/34] app/testeventdev: perf: launch lcores Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 24/34] app/testeventdev: add perf queue test Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 25/34] app/testeventdev: perf queue: add worker functions Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 26/34] app/testeventdev: add perf "all types queue" test Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 27/34] app/testeventdev: perf: add "all type queue" worker function Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 28/34] doc: describe the new eventdev test application Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 29/34] doc/testeventdev: add "order queue" test details Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 30/34] doc/testeventdev: add "order all types " Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 31/34] doc/testeventdev: add "perf " Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 32/34] doc/testeventdev: add "perf all types " Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 33/34] maintainers: claim responsibility for the eventdev test app Jerin Jacob
2017-07-04  4:53     ` [dpdk-dev] [PATCH v3 34/34] doc: update release notes for dpdk-test-eventdev application Jerin Jacob
2017-07-04 11:33       ` Mcnamara, John
2017-07-07  5:48     ` [dpdk-dev] [PATCH v3 00/34] introduce generic eventdev test application framework 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=20170602122148.GB10169@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=gprathyusha@caviumnetworks.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=narender.vangati@intel.com \
    --cc=nikhil.rao@intel.com \
    --cc=nipun.gupta@nxp.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).