From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0040.outbound.protection.outlook.com [104.47.34.40]) by dpdk.org (Postfix) with ESMTP id 6F70F107A for ; Mon, 11 Dec 2017 16:14:10 +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=ULnAIXmCzGOBIrrAUW2ZIXr7gDmt3FkKQB3oszGswz+gokkXW3GquDSUZtg5q7DLpbb65sSYEv+9tU3r71mdHHexBK+9GPtq1Z/7bMPxQnS9olN6NiSuve0ZB7BwrqnRrCLqrGcsn2y9HEZKilrrO29rBa2LLC/4D05PlIWPHe8= Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) 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 15:14:02 +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 20:43:39 +0530 Message-Id: <20171211151346.14405-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: DM5PR13CA0046.namprd13.prod.outlook.com (10.168.240.160) To CY4PR07MB3463.namprd07.prod.outlook.com (10.171.252.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73891806-7ca2-4be3-e03f-08d540a9d1d6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY4PR07MB3463; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 3:IYbLG21Cocj+fxvZz8XSMPjk5W5E3n5lEmcs2jKiHOovqPUFdXKvB2liNKGBbZKRY+rLIddZI7NL35s4BnB2YvNn3HF0AcmYN+RaNqTNSDk1P5DN1BMQuHHz4S1L249iepnz7KiefRa1NL2nAPemgu8I1n7w6wDyWhDi5EaEC8018COBOr3fclAKa4v26QksVJrPo+sBoeR2grPXDnNhGlxqW5jsP5L9IoYrtyIDt5h4EP9Izrh7pFn8GjJ9HB1C; 25:yTcwBdtn6K8X+yzxQeJvigz1vAoZmcoc09bAfxXfiVAoczkvxMQH9SHEqXRjkG8UMF+ybZ8dY7gXi+GCmKUEg7u3o1TlXy1c9DD+ewBNJGnaU22Tjb6KSXlOQge4f/xHyTMuXvgvL/iBL5QPpZrUZ+k5JL3yIErjtAdImB7sDTTNhuDwTCWMRxZXXV6VXCGFikmrtepaIEdJ5wlG2oJPg+r0HQPJTqjMrMeggxhceZ8YFk+eRmt2sxZV3O1qQOhsfa5v8TAk8sg0txw6j/HGMDT2MwdXfZF9pYnVDQeEX/5lZ8qA4Aw3SByU3va/pyXByETY7qluI7ufSiRXs6rSpw==; 31:OUZ5qpKkrig4zAP/0V2SMdr/RDL6Xf8v1D+c4ha1Q3v6RvhwCRtyINTSxipZFbb9TGnPK5DUDIvFl5vTw3TrJO/LtNRpFLE5lhDrcZctqCBaaR3Phj3OtNqBfhbuuoFNnMBX+jQyAHjIU2uYbIpvlZ5gpGO0RxcFyfqqr1+7FkLb/usEgrThYiWU50oJPNvYZEZs/GcvpdS5gxTZJam+jzUGck3lDg/wRewMtKYVIUI= X-MS-TrafficTypeDiagnostic: CY4PR07MB3463: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 20:LzCT4QdUzlQAaqh+SgfFvc3r6f6vhaDz/VwiYRyNO4ZpotRfy9HeoDZamNyGZLTjdoZ58IUt2sX8FjC2naKu+wBUdgtt5miSK5AWnzS1pqgvE0ZujH/uHC9wseWnjoUnhhXSwpSLO8RM2IHA1X9uy5/GijaPlk7mgdAvvyL4dYC3V2wciBQwxfxCnMI88/386dR/E2yIYxIf45vQLyLYNneCWnzKVccDrG0pns78r0Gf1yWxTECo9WLc2E7FVY9ndoAaf8UQ5U85LppmmDbO8V6NEyEjezP9GN5zpY1WaMOQBVDiROnH790HBp65a0lEO4ftoUwTWAAutVnTDYJK4LJklGO1GZh/2oOlj/xIZqcIswUbOaDe6vOOXfc7LVxbC5r7b1ONNUm/pxx8TzXlW1ge6YSB0JWfVXT+Zbws7z+rfbnoZZgvVZFpzfkLqDI0uEDQ1qU5CU7KbZR+/na90lGxyE1DlkPwMai5STZCewNNsejkJ4wyDD4PP3n2deD09SUf6cloW5detLyg2a4MYWQBzfgCFfcAfptuZ11PMuA4KMxWVnq5t9zHxav1nkgo6fiQNVxkF8kRmx4+G8aq/a3coJQEkkQSGdVNFu9jhK4=; 4:g4eJEkADzggw9ba4EsmRCwC1j3bYKj+nFvXneyKLer2E6Wt827kf7rTWuCtqvfkN1lm2SGBMYrRq7VCIfodbqrDtzI+hRBKAnuAfUtvhxJ5mL2FFijPvMwJFj67ZYh20T7DDtNmcAEqfhfVSvTN0oCGcEvG0/CWzkd8yCbF5xAOHzuWXACCvMd49C9cTtrkunVKy8XcaHQ/0FKJR2P4Mqi1gNsC0nqhi2RJj7qAu20UDfrCh4S7erJQxUVEjY6O3pdI52hZNxns9IrxW7zvM6A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231022)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY4PR07MB3463; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3463; X-Forefront-PRVS: 0518EEFB48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(199004)(189003)(97736004)(53936002)(53416004)(106356001)(16586007)(105586002)(8676002)(25786009)(1076002)(8936002)(107886003)(81166006)(36756003)(50226002)(69596002)(7736002)(305945005)(66066001)(50466002)(6506006)(4326008)(16526018)(6486002)(81156014)(3846002)(2906002)(2950100002)(5660300001)(42882006)(6636002)(6666003)(6116002)(316002)(68736007)(47776003)(478600001)(72206003)(52116002)(6512007)(8656006)(48376002)(5009440100003)(51416003)(59450400001)(76176011)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3463; H:Pavan-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; CY4PR07MB3463; 23:EkIeMWItAdO1TW9kby0ILOJBrch9c9p25Hx3nlJQh?= =?us-ascii?Q?6EzkLQ8bycATaZhXEqr6H43zi0OY6fQ+6TtA+9V4a4lX3MX5OV/BDuOnkb+8?= =?us-ascii?Q?eVHvBkIoiQPH7H2IGoV0Bs/xiJQCrUJVIyVjnccoqTsGR8K9F80B4kIpp1Q5?= =?us-ascii?Q?rmxghiKZmmm623oSoHbMT2/x2urn8r1TXsp8GlLYLdQ0JR37SnFhVOYFWo45?= =?us-ascii?Q?cMBHuDD3GDes4ECr/0cBC5TJmWJL9W06XlEmyOrJVDCC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ELs7F7TldRuxXNF7UspP8v8etS4uGGz+vFatkYr3H2dp?= =?us-ascii?Q?JDgPqspip3AfIs=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 6:eCYdesr/Php6ilCkjZOkrgDOk+AFqmNv6t9F5GEaSgZCvbSHxroLIw9/L7BSwciBuX6sw8SlNG2p5JxcTYZCwNXPW365sgwfi4cBGh/xGIiZKHFe75Xpn1UVy7u2asf4GKR0ewvBaClLe65jtqSlkL1tQoYY0y4hfvlTgkU79m1z+kfOhrJ+qMzbRs/zT2dG3j4rbIP4a4O0aVO75CLd8tfVLHCEiGZWYk133H2xfCqmMbC+5wbCK9xLViBUGtMP+3Em8BxK1W8qDZSUbbcZ3jGu0oWxdKgk4TbA+5+/FePASHEL4P8qZEc9dD+gQ/puAXkxSSlkgpx1fUOVahnQ1jI2++hqJYlP5hvV34aGM+g=; 5:YZfG+D8Bw7pjXa4gpntNd48BsFwmIpXg8lQ4Xu7IfbIyu6VK0BOSQKVA9T5585IW6U1gJW2CjOy+lP55cQE0PKCv0D0zKKONFw6j7YIDqAyQ75d2AVjUKE51poEqcJ4UU4HI2IhAbJtoGs7C1WNCWm5rnKsr0j8pctxdYyMcz34=; 24:gY9qfW3OSNuiTXAuns7MlObXli3+OU1Dzz33hyMcvJd2/ycqDodgaM6eLlPNwZ2QiYDcq83DGA8Comb01z+q1PeoeJrGeqEOXKW3LA3e2bs=; 7:QTAdDJWzve6BGnBJeG8k7esTADWv8SozX+taozErind8NzBk8LkEVw+30kHk8vjRl1u8t8Xr/4abOo+g35aj/Bjgvf7ewjrUh9VQ1DToNlXvAvNETnYHBPlcJNAgedBoA7oApBzEvpSZHSWCl0ZkZ0xiExXfv5krHba9exptM9oakgkcLTp/3h4fFc/pIw5LQZaNB1aIhlNkvkKACJxr5dsVfByW882T40NdInyMwmXhPGjDpbXJibSpFzCiiSCY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2017 15:14:02.4776 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73891806-7ca2-4be3-e03f-08d540a9d1d6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3463 Subject: [dpdk-dev] [PATCH v3 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 15:14:12 -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