From patchwork Tue Mar 19 06:21:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 51316 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B14C11A4; Tue, 19 Mar 2019 07:22:08 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id D19CF239 for ; Tue, 19 Mar 2019 07:22:06 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2J6JwOI001737 for ; Mon, 18 Mar 2019 23:22:06 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=Bqn/wJANtWMH/aJ2ILrQ6WAYi0xNl87QBzMOt1Rx5KE=; b=dCDYLHfb+ZV+NCMgAy7bf141tfbIvIdQxl8QVQ1F4MwYmZ2thsXUpz+94+UUD0EStKWQ RRvMI6l1TYT1JK/xDZHJgMlakGXO05htu9m9yuVxSJNs6xvWSe0HyAMff7Icpu7FjlWA cNqEwlWlfqwA3cYtxUwxwRXLsLjNtG325pbOi4myCRyGH1aBlKomvQmZ2zWfZ1um0sAj BGw3gg4n30uvCBj0lQexaCkVmly0/wo/NXl0S9T0WAc0cHEFh0wG1lg1cj9rIXXfQVLV wbh9xqmKn6YKMJmGSywVlAQ/fGclPUg0RBueB1LTkei44UaeLqRA/2QPIUEYVzxWJrYG +A== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2raaprbj8w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 18 Mar 2019 23:22:06 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 18 Mar 2019 23:22:04 -0700 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (104.47.50.56) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Mon, 18 Mar 2019 23:22:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Bqn/wJANtWMH/aJ2ILrQ6WAYi0xNl87QBzMOt1Rx5KE=; b=oZXbbW3R+avhJqAANchVJmSz6KfzKIpPXun6Srgez9Mh0j37pqG37PWlsX5lBnzyEnDpgnuJMac/gjHY+sIN9jKVtQL2S+UxDz57txd64PUY7xFVERuIzFtRAMeiqqUNu7nDSimxr4DZuKd3X7sCoge+/EEnuk6Ac65uMEIiIO4= Received: from CY4PR1801MB1863.namprd18.prod.outlook.com (10.171.255.14) by CY4PR1801MB2023.namprd18.prod.outlook.com (10.171.255.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.15; Tue, 19 Mar 2019 06:22:00 +0000 Received: from CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::286d:5e93:974e:8bfa]) by CY4PR1801MB1863.namprd18.prod.outlook.com ([fe80::286d:5e93:974e:8bfa%2]) with mapi id 15.20.1709.015; Tue, 19 Mar 2019 06:22:00 +0000 From: Pavan Nikhilesh Bhagavatula To: Jerin Jacob Kollanukkaran CC: "dev@dpdk.org" , Pavan Nikhilesh Bhagavatula Thread-Topic: [dpdk-dev] [PATCH] app/eventdev: add option to set global dequeue tmo Thread-Index: AQHU3hwPFvuTcbKudkiWpQCENFJC+Q== Date: Tue, 19 Mar 2019 06:21:59 +0000 Message-ID: <20190319061845.12343-1-pbhagavatula@marvell.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SG2PR04CA0144.apcprd04.prod.outlook.com (2603:1096:3:16::28) To CY4PR1801MB1863.namprd18.prod.outlook.com (2603:10b6:910:7a::14) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.21.0 x-originating-ip: [115.113.156.3] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b9662ac5-a267-4e64-4415-08d6ac333170 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:CY4PR1801MB2023; x-ms-traffictypediagnostic: CY4PR1801MB2023: x-microsoft-antispam-prvs: x-forefront-prvs: 0981815F2F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(346002)(366004)(136003)(376002)(189003)(199004)(105586002)(107886003)(81156014)(8676002)(81166006)(316002)(5660300002)(106356001)(6436002)(54906003)(53936002)(66066001)(6512007)(25786009)(6486002)(6862004)(7736002)(305945005)(4326008)(37006003)(68736007)(36756003)(97736004)(1076003)(50226002)(8936002)(256004)(478600001)(2616005)(2906002)(14444005)(86362001)(6506007)(71190400001)(71200400001)(386003)(55236004)(102836004)(99286004)(52116002)(3846002)(6116002)(14454004)(186003)(26005)(486006)(6636002)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1801MB2023; H:CY4PR1801MB1863.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: WLsQMDqOlSY1RjOXaRZt540QwZqZPryfyFeM+53i6anK3PfzEhWr73GjqUBLvxCpbL+avzKGuuCNTFvj8qwn3BHXWzH959AHt4/dBgPODTatqZo0LLjhGZoH9RvaZViuAK1rutHvxgb2n2Mz08jWl+QTENvsyc+nr76ck+DvhL7kGfxr1IS1XCy8GZr+q+T6MbBZUu/epMRCtgEqZKIIpeFTB53B+mq/fZYzYInRUj+1rcJBj6nZihUAbG0ExZAkuCk5AO4AcxHDl+6hU2NCn/Z1MohQp5um/FWVnU+dpD5CPNCbm25/rvqgesMGOwmRW1fCpu+kEFcN1E2bhLvbPaWSsRcB+If4Hq2odJ/QkTwr8T5/lbjr7SpiEf0ThfHyyD90Is+DJyx1jyYsP8WXG68ZzvoMlVeLy52xSA1zJVw= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b9662ac5-a267-4e64-4415-08d6ac333170 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2019 06:21:59.9769 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1801MB2023 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-03-19_02:, , signatures=0 Subject: [dpdk-dev] [PATCH] app/eventdev: add option to set global dequeue tmo 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Pavan Nikhilesh Add option to provide a global dequeue timeout that is used to create the eventdev. The dequeue timeout provided will be common across all the worker ports. If the eventdev hardware supports power management through dequeue timeout then this option can be used for verifying power demands at various packet rates. Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/evt_options.c | 13 +++++++++++++ app/test-eventdev/evt_options.h | 2 ++ app/test-eventdev/test_order_atq.c | 1 + app/test-eventdev/test_order_queue.c | 1 + app/test-eventdev/test_perf_atq.c | 1 + app/test-eventdev/test_perf_queue.c | 1 + app/test-eventdev/test_pipeline_atq.c | 1 + app/test-eventdev/test_pipeline_queue.c | 1 + 8 files changed, 21 insertions(+) diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c index cfa43a165..af5c08bac 100644 --- a/app/test-eventdev/evt_options.c +++ b/app/test-eventdev/evt_options.c @@ -84,6 +84,16 @@ evt_parse_queue_priority(struct evt_options *opt, const char *arg __rte_unused) return 0; } +static int +evt_parse_deq_tmo_nsec(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint32(&(opt->deq_tmo_nsec), arg); + + return ret; +} + static int evt_parse_eth_prod_type(struct evt_options *opt, const char *arg __rte_unused) { @@ -240,6 +250,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--deq_tmo_nsec : global dequeue timeout\n" "\t--prod_type_ethdev : use ethernet device as producer.\n" "\t--prod_type_timerdev : use event timer device as producer.\n" "\t expity_nsec would be the timeout\n" @@ -311,6 +322,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_DEQ_TMO_NSEC, 1, 0, 0 }, { EVT_PROD_ETHDEV, 0, 0, 0 }, { EVT_PROD_TIMERDEV, 0, 0, 0 }, { EVT_PROD_TIMERDEV_BURST, 0, 0, 0 }, @@ -342,6 +354,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_DEQ_TMO_NSEC, evt_parse_deq_tmo_nsec}, { EVT_PROD_ETHDEV, evt_parse_eth_prod_type}, { EVT_PROD_TIMERDEV, evt_parse_timer_prod_type}, { EVT_PROD_TIMERDEV_BURST, evt_parse_timer_prod_type_burst}, diff --git a/app/test-eventdev/evt_options.h b/app/test-eventdev/evt_options.h index f3de48a17..c486c4185 100644 --- a/app/test-eventdev/evt_options.h +++ b/app/test-eventdev/evt_options.h @@ -31,6 +31,7 @@ #define EVT_SCHED_TYPE_LIST ("stlist") #define EVT_FWD_LATENCY ("fwd_latency") #define EVT_QUEUE_PRIORITY ("queue_priority") +#define EVT_DEQ_TMO_NSEC ("deq_tmo_nsec") #define EVT_PROD_ETHDEV ("prod_type_ethdev") #define EVT_PROD_TIMERDEV ("prod_type_timerdev") #define EVT_PROD_TIMERDEV_BURST ("prod_type_timerdev_burst") @@ -71,6 +72,7 @@ struct evt_options { uint8_t dev_id; uint32_t fwd_latency:1; uint32_t q_priority:1; + uint32_t deq_tmo_nsec; enum evt_prod_type prod_type; uint8_t timdev_use_burst; uint8_t timdev_cnt; diff --git a/app/test-eventdev/test_order_atq.c b/app/test-eventdev/test_order_atq.c index 4a8546e7f..94e51161a 100644 --- a/app/test-eventdev/test_order_atq.c +++ b/app/test-eventdev/test_order_atq.c @@ -119,6 +119,7 @@ order_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) const uint8_t nb_ports = nb_workers + 1; const struct rte_event_dev_config config = { + .dequeue_timeout_ns = opt->deq_tmo_nsec, .nb_event_queues = NB_QUEUES,/* one all types queue */ .nb_event_ports = nb_ports, .nb_events_limit = 4096, diff --git a/app/test-eventdev/test_order_queue.c b/app/test-eventdev/test_order_queue.c index a272c7a57..f643fc64a 100644 --- a/app/test-eventdev/test_order_queue.c +++ b/app/test-eventdev/test_order_queue.c @@ -119,6 +119,7 @@ order_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) const uint8_t nb_ports = nb_workers + 1; const struct rte_event_dev_config config = { + .dequeue_timeout_ns = opt->deq_tmo_nsec, .nb_event_queues = NB_QUEUES,/* q0 ordered, q1 atomic */ .nb_event_ports = nb_ports, .nb_events_limit = 4096, diff --git a/app/test-eventdev/test_perf_atq.c b/app/test-eventdev/test_perf_atq.c index 73f31e564..9cb1dd344 100644 --- a/app/test-eventdev/test_perf_atq.c +++ b/app/test-eventdev/test_perf_atq.c @@ -176,6 +176,7 @@ perf_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) } const struct rte_event_dev_config config = { + .dequeue_timeout_ns = opt->deq_tmo_nsec, .nb_event_queues = nb_queues, .nb_event_ports = nb_ports, .nb_events_limit = dev_info.max_num_events, diff --git a/app/test-eventdev/test_perf_queue.c b/app/test-eventdev/test_perf_queue.c index d89491364..50cd51b07 100644 --- a/app/test-eventdev/test_perf_queue.c +++ b/app/test-eventdev/test_perf_queue.c @@ -177,6 +177,7 @@ perf_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) } const struct rte_event_dev_config config = { + .dequeue_timeout_ns = opt->deq_tmo_nsec, .nb_event_queues = nb_queues, .nb_event_ports = nb_ports, .nb_events_limit = dev_info.max_num_events, diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c index 998a56cfd..0b7f92f95 100644 --- a/app/test-eventdev/test_pipeline_atq.c +++ b/app/test-eventdev/test_pipeline_atq.c @@ -315,6 +315,7 @@ pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) rte_event_dev_info_get(opt->dev_id, &info); const struct rte_event_dev_config config = { + .dequeue_timeout_ns = opt->deq_tmo_nsec, .nb_event_queues = nb_queues, .nb_event_ports = nb_ports, .nb_events_limit = info.max_num_events, diff --git a/app/test-eventdev/test_pipeline_queue.c b/app/test-eventdev/test_pipeline_queue.c index 7da89dad5..31f3dbad9 100644 --- a/app/test-eventdev/test_pipeline_queue.c +++ b/app/test-eventdev/test_pipeline_queue.c @@ -335,6 +335,7 @@ pipeline_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt) rte_event_dev_info_get(opt->dev_id, &info); const struct rte_event_dev_config config = { + .dequeue_timeout_ns = opt->deq_tmo_nsec, .nb_event_queues = nb_queues, .nb_event_ports = nb_ports, .nb_events_limit = info.max_num_events,