Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/101271/?format=api
http://patches.dpdk.org/api/patches/101271/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211012210532.78287-1-rashmi.shetty@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20211012210532.78287-1-rashmi.shetty@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211012210532.78287-1-rashmi.shetty@intel.com", "date": "2021-10-12T21:05:32", "name": "app/test-eventdev: add burst enqueue support in perf_queue test", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "8d1c77394097fd26d5d0a03d50c2c838910bafda", "submitter": { "id": 2381, "url": "http://patches.dpdk.org/api/people/2381/?format=api", "name": "Rashmi Shetty", "email": "rashmi.shetty@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211012210532.78287-1-rashmi.shetty@intel.com/mbox/", "series": [ { "id": 19573, "url": "http://patches.dpdk.org/api/series/19573/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19573", "date": "2021-10-12T21:05:32", "name": "app/test-eventdev: add burst enqueue support in perf_queue test", "version": 1, "mbox": "http://patches.dpdk.org/series/19573/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/101271/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/101271/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1A230A0C4D;\n\tTue, 12 Oct 2021 23:05:39 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9EFBC410F6;\n\tTue, 12 Oct 2021 23:05:38 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 48960410DC\n for <dev@dpdk.org>; Tue, 12 Oct 2021 23:05:36 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Oct 2021 14:05:35 -0700", "from txanpdk02.an.intel.com ([10.123.117.76])\n by orsmga008.jf.intel.com with ESMTP; 12 Oct 2021 14:05:34 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10135\"; a=\"250676818\"", "E=Sophos;i=\"5.85,368,1624345200\"; d=\"scan'208\";a=\"250676818\"", "E=Sophos;i=\"5.85,368,1624345200\"; d=\"scan'208\";a=\"491150964\"" ], "X-ExtLoop1": "1", "From": "Rashmi Shetty <rashmi.shetty@intel.com>", "To": "dev@dpdk.org", "Cc": "jerinj@marvell.com, harry.van.haaren@intel.com, pravin.pathak@intel.com,\n Rashmi Shetty <rashmi.shetty@intel.com>", "Date": "Tue, 12 Oct 2021 16:05:32 -0500", "Message-Id": "<20211012210532.78287-1-rashmi.shetty@intel.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] app/test-eventdev: add burst enqueue support in\n perf_queue test", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "A new command line option prod_enq_burst_sz is introduced to set burst size\nfor eventdev enqueue at producer in perf_queue test. The newly added function\nperf_producer_burst is called when prod_enq_burst_sz is greater than 1.\n\nSigned-off-by: Rashmi Shetty <rashmi.shetty@intel.com>\n---\n app/test-eventdev/evt_common.h | 1 +\n app/test-eventdev/evt_main.c | 2 +-\n app/test-eventdev/evt_options.c | 14 +++++\n app/test-eventdev/evt_options.h | 1 +\n app/test-eventdev/test_perf_common.c | 80 +++++++++++++++++++++++++++-\n app/test-eventdev/test_perf_common.h | 1 +\n 6 files changed, 96 insertions(+), 3 deletions(-)", "diff": "diff --git a/app/test-eventdev/evt_common.h b/app/test-eventdev/evt_common.h\nindex 28afb114b3..f466434459 100644\n--- a/app/test-eventdev/evt_common.h\n+++ b/app/test-eventdev/evt_common.h\n@@ -64,6 +64,7 @@ struct evt_options {\n \tuint32_t nb_flows;\n \tuint32_t tx_first;\n \tuint32_t max_pkt_sz;\n+\tuint32_t prod_enq_burst_sz;\n \tuint32_t deq_tmo_nsec;\n \tuint32_t q_priority:1;\n \tuint32_t fwd_latency:1;\ndiff --git a/app/test-eventdev/evt_main.c b/app/test-eventdev/evt_main.c\nindex a8d304bab3..3534aabca7 100644\n--- a/app/test-eventdev/evt_main.c\n+++ b/app/test-eventdev/evt_main.c\n@@ -95,7 +95,7 @@ main(int argc, char **argv)\n \t/* Parse the command line arguments */\n \tret = evt_options_parse(&opt, argc, argv);\n \tif (ret) {\n-\t\tevt_err(\"parsing on or more user options failed\");\n+\t\tevt_err(\"parsing one or more user options failed\");\n \t\tgoto error;\n \t}\n \ndiff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c\nindex b0bcbc6c96..753a7dbd7d 100644\n--- a/app/test-eventdev/evt_options.c\n+++ b/app/test-eventdev/evt_options.c\n@@ -26,6 +26,7 @@ evt_options_default(struct evt_options *opt)\n \topt->nb_flows = 1024;\n \topt->socket_id = SOCKET_ID_ANY;\n \topt->pool_sz = 16 * 1024;\n+\topt->prod_enq_burst_sz = 1;\n \topt->wkr_deq_dep = 16;\n \topt->nb_pkts = (1ULL << 26); /* do ~64M packets */\n \topt->nb_timers = 1E8;\n@@ -304,6 +305,16 @@ evt_parse_per_port_pool(struct evt_options *opt, const char *arg __rte_unused)\n \treturn 0;\n }\n \n+static int\n+evt_parse_prod_enq_burst_sz(struct evt_options *opt, const char *arg)\n+{\n+\tint ret;\n+\n+\tret = parser_read_uint32(&(opt->prod_enq_burst_sz), arg);\n+\n+\treturn ret;\n+}\n+\n static void\n usage(char *program)\n {\n@@ -336,6 +347,7 @@ usage(char *program)\n \t\t\"\\t--expiry_nsec : event timer expiry ns.\\n\"\n \t\t\"\\t--mbuf_sz : packet mbuf size.\\n\"\n \t\t\"\\t--max_pkt_sz : max packet size.\\n\"\n+\t\t\"\\t--prod_enq_burst_sz : producer enqueue burst size.\\n\"\n \t\t\"\\t--nb_eth_queues : number of ethernet Rx queues.\\n\"\n \t\t\"\\t--enable_vector : enable event vectorization.\\n\"\n \t\t\"\\t--vector_size : Max vector size.\\n\"\n@@ -412,6 +424,7 @@ static struct option lgopts[] = {\n \t{ EVT_EXPIRY_NSEC, 1, 0, 0 },\n \t{ EVT_MBUF_SZ, 1, 0, 0 },\n \t{ EVT_MAX_PKT_SZ, 1, 0, 0 },\n+\t{ EVT_PROD_ENQ_BURST_SZ, 1, 0, 0 },\n \t{ EVT_NB_ETH_QUEUES, 1, 0, 0 },\n \t{ EVT_ENA_VECTOR, 0, 0, 0 },\n \t{ EVT_VECTOR_SZ, 1, 0, 0 },\n@@ -451,6 +464,7 @@ evt_opts_parse_long(int opt_idx, struct evt_options *opt)\n \t\t{ EVT_EXPIRY_NSEC, evt_parse_expiry_nsec},\n \t\t{ EVT_MBUF_SZ, evt_parse_mbuf_sz},\n \t\t{ EVT_MAX_PKT_SZ, evt_parse_max_pkt_sz},\n+\t\t{ EVT_PROD_ENQ_BURST_SZ, evt_parse_prod_enq_burst_sz},\n \t\t{ EVT_NB_ETH_QUEUES, evt_parse_eth_queues},\n \t\t{ EVT_ENA_VECTOR, evt_parse_ena_vector},\n \t\t{ EVT_VECTOR_SZ, evt_parse_vector_size},\ndiff --git a/app/test-eventdev/evt_options.h b/app/test-eventdev/evt_options.h\nindex 6436200b40..413d7092f0 100644\n--- a/app/test-eventdev/evt_options.h\n+++ b/app/test-eventdev/evt_options.h\n@@ -42,6 +42,7 @@\n #define EVT_EXPIRY_NSEC (\"expiry_nsec\")\n #define EVT_MBUF_SZ (\"mbuf_sz\")\n #define EVT_MAX_PKT_SZ (\"max_pkt_sz\")\n+#define EVT_PROD_ENQ_BURST_SZ (\"prod_enq_burst_sz\")\n #define EVT_NB_ETH_QUEUES (\"nb_eth_queues\")\n #define EVT_ENA_VECTOR (\"enable_vector\")\n #define EVT_VECTOR_SZ (\"vector_size\")\ndiff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c\nindex cc100650c2..c1749b9a88 100644\n--- a/app/test-eventdev/test_perf_common.c\n+++ b/app/test-eventdev/test_perf_common.c\n@@ -77,6 +77,70 @@ perf_producer(void *arg)\n \treturn 0;\n }\n \n+static inline int\n+perf_producer_burst(void *arg)\n+{\n+\tuint32_t i;\n+\tuint64_t timestamp;\n+\tstruct rte_event_dev_info dev_info;\n+\tstruct prod_data *p = arg;\n+\tstruct test_perf *t = p->t;\n+\tstruct evt_options *opt = t->opt;\n+\tconst uint8_t dev_id = p->dev_id;\n+\tconst uint8_t port = p->port_id;\n+\tstruct rte_mempool *pool = t->pool;\n+\tconst uint64_t nb_pkts = t->nb_pkts;\n+\tconst uint32_t nb_flows = t->nb_flows;\n+\tuint32_t flow_counter = 0;\n+\tuint16_t enq = 0;\n+\tuint64_t count = 0;\n+\tstruct perf_elt *m[MAX_PROD_ENQ_BURST_SIZE + 1] = {NULL};\n+\tstruct rte_event ev[MAX_PROD_ENQ_BURST_SIZE + 1];\n+\tuint32_t burst_size = opt->prod_enq_burst_sz;\n+\n+\trte_event_dev_info_get(dev_id, &dev_info);\n+\tif (dev_info.max_event_port_enqueue_depth < burst_size)\n+\t\tburst_size = dev_info.max_event_port_enqueue_depth;\n+\n+\tif (opt->verbose_level > 1)\n+\t\tprintf(\"%s(): lcore %d dev_id %d port=%d queue %d\\n\", __func__,\n+\t\t\t\trte_lcore_id(), dev_id, port, p->queue_id);\n+\n+\tfor (i = 0; i < burst_size; i++) {\n+\t\tev[i].op = RTE_EVENT_OP_NEW;\n+\t\tev[i].queue_id = p->queue_id;\n+\t\tev[i].sched_type = t->opt->sched_type_list[0];\n+\t\tev[i].priority = RTE_EVENT_DEV_PRIORITY_NORMAL;\n+\t\tev[i].event_type = RTE_EVENT_TYPE_CPU;\n+\t\tev[i].sub_event_type = 0; /* stage 0 */\n+\t}\n+\n+\twhile (count < nb_pkts && t->done == false) {\n+\t\tif (rte_mempool_get_bulk(pool, (void **)m, burst_size) < 0)\n+\t\t\tcontinue;\n+\t\ttimestamp = rte_get_timer_cycles();\n+\t\tfor (i = 0; i < burst_size; i++) {\n+\t\t\tev[i].flow_id = flow_counter++ % nb_flows;\n+\t\t\tev[i].event_ptr = m[i];\n+\t\t\tm[i]->timestamp = timestamp;\n+\t\t}\n+ enq = rte_event_enqueue_burst(dev_id, port, ev, burst_size);\n+ while (enq < burst_size) {\n+ enq += rte_event_enqueue_burst(dev_id, port,\n+ ev + enq,\n+\t\t\t\t\t\t\tburst_size - enq);\n+ if (t->done)\n+ break;\n+\t\t\trte_pause();\n+\t\t\ttimestamp = rte_get_timer_cycles();\n+\t\t\tfor (i = enq; i < burst_size; i++)\n+\t\t\t\tm[i]->timestamp = timestamp;\n+ }\n+\t\tcount += burst_size;\n+\t}\n+\treturn 0;\n+}\n+\n static inline int\n perf_event_timer_producer(void *arg)\n {\n@@ -212,9 +276,20 @@ perf_producer_wrapper(void *arg)\n {\n \tstruct prod_data *p = arg;\n \tstruct test_perf *t = p->t;\n-\t/* Launch the producer function only in case of synthetic producer. */\n-\tif (t->opt->prod_type == EVT_PROD_TYPE_SYNT)\n+\tbool burst = evt_has_burst_mode(p->dev_id);\n+\n+\t/* In case of synthetic producer, launch perf_producer or\n+\t * perf_producer_burst depending on producer enqueue burst size. */\n+\tif (t->opt->prod_type == EVT_PROD_TYPE_SYNT &&\n+\t\t\tt->opt->prod_enq_burst_sz == 1)\n \t\treturn perf_producer(arg);\n+\telse if (t->opt->prod_type == EVT_PROD_TYPE_SYNT &&\n+\t\t\tt->opt->prod_enq_burst_sz > 1) {\n+\t\tif (!burst)\n+\t\t\tevt_err(\"This event device does not support burst mode\");\n+\t\telse\n+\t\t\treturn perf_producer_burst(arg);\n+\t}\n \telse if (t->opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR &&\n \t\t\t!t->opt->timdev_use_burst)\n \t\treturn perf_event_timer_producer(arg);\n@@ -635,6 +710,7 @@ perf_opt_dump(struct evt_options *opt, uint8_t nb_queues)\n \tevt_dump_queue_priority(opt);\n \tevt_dump_sched_type_list(opt);\n \tevt_dump_producer_type(opt);\n+\tevt_dump(\"prod_enq_burst_sz\", \"%d\", opt->prod_enq_burst_sz);\n }\n \n void\ndiff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h\nindex 9785dc3e23..14dcf80429 100644\n--- a/app/test-eventdev/test_perf_common.h\n+++ b/app/test-eventdev/test_perf_common.h\n@@ -71,6 +71,7 @@ struct perf_elt {\n } __rte_cache_aligned;\n \n #define BURST_SIZE 16\n+#define MAX_PROD_ENQ_BURST_SIZE 128\n \n #define PERF_WORKER_INIT\\\n \tstruct worker_data *w = arg;\\\n", "prefixes": [] }{ "id": 101271, "url": "