From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0054.outbound.protection.outlook.com [104.47.34.54]) by dpdk.org (Postfix) with ESMTP id 01E29325D for ; Wed, 18 Oct 2017 14:40:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=W5ja6sFbODb8hO5l5k0LJl4YZHnbLNYvht4gp5Rudhg=; b=VhVEipsUCE01ZVaesD/1HJXOEA+Dk0ndErfLZnE79sVoFghmYg2DkGtZEmUIzSZ3jGbXvgPljJrKeSzFnIK/btGXlOngbAFfjsDmXREHl8XZbvfL2gwIXBrLm2THIr2dDy3tenUKw0CreEi3we6bymFWPL6GX5I3kQkPQfCnLQI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 18 Oct 2017 12:40:02 +0000 From: Pavan Nikhilesh To: bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, nikhil.rao@intel.com, santosh.shukla@caviumnetworks.com, jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 18 Oct 2017 18:09:01 +0530 Message-Id: <1508330348-30060-2-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1508330348-30060-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (10.174.214.26) To DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1113f0d7-83a3-4be5-503a-08d516255bca X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 3:0XKi/0IHKq2TdPYBDdpXNhYXuMKRRwWLXHylckftqaw6FIVt/mS5dwerjy3AtT6/o71jHGoIE3NrL2MhmwqVpwyGFIlbKLEcWxEp06YjAmzpiO772ZhphdFICZfVlfzP/TqEowAQplOd8xIwgr4x4JADsCEK2u1bOZatpX4zA9IrxDisTAT47Z41lyOMYP9ziqCLvT98JSnyJWbt6+jLPbkVpIxPIg3b4HwmXEpUjVxzOuJFic2DDNwP10c5xWz3; 25:7CKTFxUWrMx5rSfNs9HTV2sA39ehqiAPsU+lqJm70mcdnJYMH0PoGxli5hKlVDO2iya+wmx6JY51c2dgCabHAOcn+FIyx/zLlozbR5PYgt93xi0mDtXRb1734rX/RRtfN3l3qp8zwKymWfMOgf19WFWB5/5V2oAkEwtV5zuR9aeYvpfafw8TWsX3H/VH9fTXwd8UWvlq/bp/Yb2EkphJPhKVPHJIUXiD+XC8QaY8M6/TZ1nRuAfPTgHb5Lz8v0AEWrWxjGGj8tKsNj9e9dqscacF0Kr0/pzxhn6ZU0vGtlTy1srISKPL+3KQMjLNL6ceRj2r/N4vixqKsMmrpSWCdw==; 31:a7LiYCzRpl7BHKMXCUYo/h31E55jcjscGIrVeRt5c7Wa1e9+a1lL31FK3TdI21R430Q0SpprI9rubx8a/cmpdderNBPDJWISQCgY3VvsbQNy+p0KBDeCxF2nAwV73qJ5XTS0GMd+vTORZIvtRDXHF5LYsc2uBZwwXTxFy3S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-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3467; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3467; X-Forefront-PRVS: 0464DBBBC4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(346002)(376002)(199003)(189002)(36756003)(316002)(72206003)(478600001)(48376002)(16586007)(106356001)(25786009)(53936002)(107886003)(50226002)(8656005)(6636002)(105586002)(2950100002)(42882006)(8656005)(50466002)(5003940100001)(6512007)(6506006)(101416001)(189998001)(6116002)(33646002)(4326008)(5660300001)(2906002)(81166006)(7736002)(5009440100003)(6486002)(3846002)(97736004)(305945005)(53416004)(81156014)(66066001)(76176999)(8676002)(8936002)(16526018)(68736007)(50986999)(47776003)(69596002)(42262002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3467; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3467; 23:ilTrEWn4+tP1P7aMXZoK2Vi40MySVatFJdx8e7bg9?= =?us-ascii?Q?k3jL82OD3D471GT28OO+lJKMCxaLv0nNnJiWalxv61bRrIZza1u1DpMJqb6U?= =?us-ascii?Q?/IKQFCa4fbxHYhWWDyvu7NKLcibgvaPk1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akf9FxIitB/hh2a51qmutao3OlusJaIT081gnArYXLzQwULNap+weSAK0il4iaATF0l+0fafNr8TXvycn34d5Bzv5O6Vo1RULrWt7lJwkMmWn356QyB81yDwSFNobdEt1t7QOLW5FPUbmzGKeXTKbnGa51n3TtQOWYjZuYnk62AvsJ6uxdliH0sqpn+Ilci4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2017 12:40:02.0192 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3467 Subject: [dpdk-dev] [PATCH 1/8] app/eventdev: add ethernet device producer option X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2017 12:40:07 -0000 Add command line option --prod_type_ethdev to specify that the events are generated by ethernet device. Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/evt_options.c | 11 +++++++++++ app/test-eventdev/evt_options.h | 29 +++++++++++++++++++++++++++++ app/test-eventdev/test_perf_common.c | 34 ++++++++++++++++++++-------------- 3 files changed, 60 insertions(+), 14 deletions(-) diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c index e2187df..7db7cd9 100644 --- a/app/test-eventdev/evt_options.c +++ b/app/test-eventdev/evt_options.c @@ -55,6 +55,7 @@ evt_options_default(struct evt_options *opt) opt->pool_sz = 16 * 1024; opt->wkr_deq_dep = 16; opt->nb_pkts = (1ULL << 26); /* do ~64M packets */ + opt->prod_type = EVT_PROD_TYPE_SYNT; } typedef int (*option_parser_t)(struct evt_options *opt, @@ -107,6 +108,13 @@ evt_parse_queue_priority(struct evt_options *opt, const char *arg __rte_unused) } static int +evt_parse_prod_type(struct evt_options *opt, const char *arg __rte_unused) +{ + opt->prod_type = EVT_PROD_TYPE_ETH_RX_ADPTR; + return 0; +} + +static int evt_parse_test_name(struct evt_options *opt, const char *arg) { snprintf(opt->test_name, EVT_TEST_NAME_MAX_LEN, "%s", arg); @@ -189,6 +197,7 @@ usage(char *program) "\t--worker_deq_depth : dequeue depth of the worker\n" "\t--fwd_latency : perform fwd_latency measurement\n" "\t--queue_priority : enable queue priority\n" + "\t--prod_type_ethdev : use ethernet device as producer\n." ); printf("available tests:\n"); evt_test_dump_names(); @@ -249,6 +258,7 @@ static struct option lgopts[] = { { EVT_SCHED_TYPE_LIST, 1, 0, 0 }, { EVT_FWD_LATENCY, 0, 0, 0 }, { EVT_QUEUE_PRIORITY, 0, 0, 0 }, + { EVT_PROD_ETHDEV, 0, 0, 0 }, { EVT_HELP, 0, 0, 0 }, { NULL, 0, 0, 0 } }; @@ -272,6 +282,7 @@ evt_opts_parse_long(int opt_idx, struct evt_options *opt) { EVT_SCHED_TYPE_LIST, evt_parse_sched_type_list}, { EVT_FWD_LATENCY, evt_parse_fwd_latency}, { EVT_QUEUE_PRIORITY, evt_parse_queue_priority}, + { EVT_PROD_ETHDEV, evt_parse_prod_type}, }; for (i = 0; i < RTE_DIM(parsermap); i++) { diff --git a/app/test-eventdev/evt_options.h b/app/test-eventdev/evt_options.h index a9a9125..a6607e1 100644 --- a/app/test-eventdev/evt_options.h +++ b/app/test-eventdev/evt_options.h @@ -58,8 +58,16 @@ #define EVT_SCHED_TYPE_LIST ("stlist") #define EVT_FWD_LATENCY ("fwd_latency") #define EVT_QUEUE_PRIORITY ("queue_priority") +#define EVT_PROD_ETHDEV ("prod_type_ethdev") #define EVT_HELP ("help") +enum evt_prod_type { + EVT_PROD_TYPE_NONE, + EVT_PROD_TYPE_SYNT, /* Producer type Synthetic i.e. CPU. */ + EVT_PROD_TYPE_ETH_RX_ADPTR, /* Producer type Eth Rx Adapter. */ + EVT_PROD_TYPE_MAX, +}; + struct evt_options { #define EVT_TEST_NAME_MAX_LEN 32 char test_name[EVT_TEST_NAME_MAX_LEN]; @@ -76,6 +84,7 @@ struct evt_options { uint8_t dev_id; uint32_t fwd_latency:1; uint32_t q_priority:1; + enum evt_prod_type prod_type; }; void evt_options_default(struct evt_options *opt); @@ -266,4 +275,24 @@ evt_dump_sched_type_list(struct evt_options *opt) evt_dump_end; } +#define EVT_PROD_MAX_NAME_LEN 50 +static inline void +evt_dump_producer_type(struct evt_options *opt) +{ + char name[EVT_PROD_MAX_NAME_LEN]; + + switch (opt->prod_type) { + default: + case EVT_PROD_TYPE_SYNT: + snprintf(name, EVT_PROD_MAX_NAME_LEN, + "Synthetic producer lcores"); + break; + case EVT_PROD_TYPE_ETH_RX_ADPTR: + snprintf(name, EVT_PROD_MAX_NAME_LEN, + "Rx Adapter producers"); + break; + } + evt_dump("prod_type", "%s", name); +} + #endif /* _EVT_OPTIONS_ */ diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index e77b472..9d2865e 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -287,8 +287,10 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) { unsigned int lcores; - /* N producer + N worker + 1 master */ - lcores = 3; + /* N producer + N worker + 1 master when producer cores are used + * Else N worker + 1 master when Rx adapter is used + */ + lcores = opt->prod_type == EVT_PROD_TYPE_SYNT ? 3 : 2; if (rte_lcore_count() < lcores) { evt_err("test need minimum %d lcores", lcores); @@ -313,18 +315,21 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) return -1; } - /* Validate producer lcores */ - if (evt_lcores_has_overlap(opt->plcores, rte_get_master_lcore())) { - evt_err("producer lcores overlaps with master lcore"); - return -1; - } - if (evt_has_disabled_lcore(opt->plcores)) { - evt_err("one or more producer lcores are not enabled"); - return -1; - } - if (!evt_has_active_lcore(opt->plcores)) { - evt_err("minimum one producer is required"); - return -1; + if (opt->prod_type == EVT_PROD_TYPE_SYNT) { + /* Validate producer lcores */ + if (evt_lcores_has_overlap(opt->plcores, + rte_get_master_lcore())) { + evt_err("producer lcores overlaps with master lcore"); + return -1; + } + if (evt_has_disabled_lcore(opt->plcores)) { + evt_err("one or more producer lcores are not enabled"); + return -1; + } + if (!evt_has_active_lcore(opt->plcores)) { + evt_err("minimum one producer is required"); + return -1; + } } if (evt_has_invalid_stage(opt)) @@ -369,6 +374,7 @@ perf_opt_dump(struct evt_options *opt, uint8_t nb_queues) evt_dump("nb_evdev_queues", "%d", nb_queues); evt_dump_queue_priority(opt); evt_dump_sched_type_list(opt); + evt_dump_producer_type(opt); } void -- 2.7.4