From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0041.outbound.protection.outlook.com [104.47.38.41]) by dpdk.org (Postfix) with ESMTP id 0C7B214E8 for ; Mon, 11 Dec 2017 12:13:05 +0100 (CET) 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=E7j0BxvvQgLvBTzyvLyM+CQTxruByq373SeVn20VZps=; b=XKg2ez0R7MI4Li10eBslYIw1IK4BdHwjlUgcJRBR+YOMGHDF4UhSzegueSJ2OwGvEju5BnVIU+zZOWDrjkssmaP8i07/XeqeqH2Kl43xKuKi2bcPoZiyDHaXkNi+atgNVs9heXlhPXJ8BWWuUkF6BrTv8DYiOVQ0g7JyEIuxhjc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Mon, 11 Dec 2017 11:13:00 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, 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 Cc: dev@dpdk.org, Pavan Nikhilesh Date: Mon, 11 Dec 2017 16:42:29 +0530 Message-Id: <20171211111236.1331-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 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: BN6PR1301CA0010.namprd13.prod.outlook.com (10.174.84.151) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2cdd150b-bf61-4c6a-8ec6-08d5408825e5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:PWh5lirbm/MhSK2GHlzS4S8gD9agnwE9CBxjBWlDki2qJisj65w3rOea59h2Z8CYuujNJaAxo2AURKwNVmA2zL7a+ke/4H0PYgQRoCx++sqdUqdX1L0k06wkdfLLtJ8604+d3ag+oAhN4EF0F1kHEz5+Q7ugMyJJjQ9IrTIdXwfxGZMmgexp0SDV0YzzC5PAe0zWBR+VvN1ETTBKLQuigp/y/fWiWfyadICdwDzJiKzdFr+HFjiTRjiNPJ/atdXM; 25:wnYKKDaW5lYDQbq+aic6rhfyoYl4kO5rS9qdfC6aDHDiga1AuQMqIOrjCC+9p83okjiiBwVcOdm5oin19ouKZIiqGwQJWktpqSrfsZFTn55Ix5dB2Y8gklX2zL25L542Xd1R/Mg3SRZViciFtBUeH5sIBz35lh2STevPZC1k+gZkn+zrS5HdhkfM+n/l4cbJwrP3Kp95ATA+SV6vg98mhpSIU6f6DL1+BAZuHJBdfRzdAVSyS8yeA4953M4r8b7I1I/VGZhXFolKT2Mc4NexPb4zFjgYB08oJ9MASY8hM9KbABwpp2Sx00/Um6yQBotY3pqmnYYHygZete3rR5svZsg6S6+DteqCAjEAqmgRtcQ=; 31:4Si/dRDY/6mrOjpJ90NMHeif0f/xecZAyH/Kcdixj/wrmNgA/C41NmCzyA1RSY0uky0l6qD58vdhO8aphwCMh7m7BoOcfy1Um6zg7LjHjOGinkYIRsFtg/d79QkghThkQPpDys1EvWYDOo9ySC+stzpFLu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am-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(3231022)(10201501046)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148)(201708071742011); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3458; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(376002)(189003)(199004)(76176011)(51416003)(105586002)(48376002)(59450400001)(5660300001)(52116002)(6506006)(3846002)(2906002)(50466002)(106356001)(97736004)(66066001)(316002)(25786009)(305945005)(2950100002)(8656006)(478600001)(4326008)(16586007)(16526018)(42882006)(81166006)(6636002)(8676002)(81156014)(72206003)(8936002)(33646002)(107886003)(36756003)(68736007)(69596002)(6486002)(6666003)(50226002)(53936002)(47776003)(6116002)(53416004)(5009440100003)(1076002)(6512007)(7736002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; BN6PR07MB3458; 23:kt3liqg3otioyid7nidVFo7y+MSVVaF7mKCbQthLg?= =?us-ascii?Q?rCMKK3Swxq+3toR+4DITM13YsCezmkGAful9w4MaaVsP5euyADmnprugJDlQ?= =?us-ascii?Q?pIxWmzZU+l76+9Hd8A3pPbsuWQNwutCyzW9obAcQtGAwzYN+vNQ4I7WweX7U?= =?us-ascii?Q?CXCbT+iCUL6pDwS28wkWzDasoaKbJiZl8+E5Dm/IKu/30iLpouHraamBR2yK?= =?us-ascii?Q?KgIXONejqsVDGQVloowJMeg4ltUWBRJUl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SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 11:13:00.8949 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2cdd150b-bf61-4c6a-8ec6-08d5408825e5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: [dpdk-dev] [PATCH v2 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: Mon, 11 Dec 2017 11:13:06 -0000 Add command line option --prod_type_ethdev to specify that the events are generated by ethernet device. Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- v2 Changes: - Modified 'evt_parse_prod_type' to 'evt_parse_eth_prod_type' to accommodate other kinds of producers in future. 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 e2187dfc3..86e428905 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, @@ -106,6 +107,13 @@ evt_parse_queue_priority(struct evt_options *opt, const char *arg __rte_unused) return 0; } +static int +evt_parse_eth_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) { @@ -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_eth_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 a9a91252b..da7a6f863 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, + "Ethdev 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 e77b4723e..9d2865ed5 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.14.1