From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0041.outbound.protection.outlook.com [104.47.41.41]) by dpdk.org (Postfix) with ESMTP id CEB144C70 for ; Sun, 18 Mar 2018 14:13:06 +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=os7IyAE9no6S8BP2IJJyQe+DhNMdzFwFYbH7ktxatTY=; b=U9sUi0sUvJyDDdQf3NMp5TwV6cgPUwitB1Z7Etqpxy2XL1tLbA0EJ7qO1cC/kKa9GBl5kqTL2mrRTlzWijjLAtBG68VTTjKS6q5zoqID9qSDtkdqVUdAfzL9/pUsz6g5Yl1AaU+Ay4axA5A89xFvH8XzvdeSkA3tWXc6is3AS8o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by MWHPR07MB3469.namprd07.prod.outlook.com (2603:10b6:301:63::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Sun, 18 Mar 2018 13:13:04 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, erik.g.carrillo@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Sun, 18 Mar 2018 18:42:15 +0530 Message-Id: <20180318131216.11699-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180318131216.11699-1-pbhagavatula@caviumnetworks.com> References: <20180318131216.11699-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR0401CA0016.apcprd04.prod.outlook.com (2603:1096:3:1::26) To MWHPR07MB3469.namprd07.prod.outlook.com (2603:10b6:301:63::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da972b9e-a7f6-4277-3397-08d58cd1fc98 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:MWHPR07MB3469; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 3:SAIPR+Kvv4v4MuP3p5AuTxmz4K/Rklx7fGvHnk+rkLg2nFLLURPLfqfESsY70PHM7mb1I6t+ryG7xfynBMXCMtoDjlx4MLMdyac/rhIOD3SjHqBXZExnKVS36hxhKIvkPMIWvHZVp2F+ZTpiP+Mm1AjJlnB25lXEc6GyofZbgS4YdVXJT/XD7efHL6UgmgX5gLslfikkZVw1cS0HGUq2t9JPyUOYWbnI6a8IXN98wR8oiZWZdTdjdZWceSDXtJqr; 25:ro7Xs8QF4Kqlx8ZOkn5LMGxr3y6J32JNqjt7fBMYcXwMx8YdkDLhfrSCDzpeJChzkXV3emPahKajO8Zs9A0wMnZ9ia7xPaZO3gdBAZundrX9uEw/00XyLlOTWYp5x49X8MOL7hu0A00yLkV+DYBJJVlnNfePa3RFbhGPCdI+zexgExap6ill5ttA7FokDJBF15xFKh0dGmTfgSGZDhGdvmTudKZeyqsOGR/PLGZB9Eqzmy7VNSuawLS1Zn2kSFSCmstWQeTPTdk+0roAgM90MWhLYkohdoMZOAtkz1tZJYKVWJ7WzIxwnksy8/6+WlDz5SVz71gBaFgrmURpJ15APw==; 31:0f5DMx3bUg/fkULQhJMIz8R/36Ug3dHm6YaCDqwNY25ySvAX54eoXjWSeqS5wy20gYFAfs/WiQT2IplUeMwsC1vUuR7KR42kynJap2jTmDZcAJRJkeWTKqX4pW6em5Ib3b/Dno48LEoABhKfpkqAzRRrhHtsH93q6iZvKYKwtUw9mMpuB2+VWIFSuKm9HIOwHL7ii40vV/U1DMVxmwVcAGoPKj+r07VR6xFZ4Gtn8z8= X-MS-TrafficTypeDiagnostic: MWHPR07MB3469: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 20:cnlAjkhXDyRLpPWJbOnedv6wUTQyyVSyRyHKT54O6ry4QmgaF/8LovnauoPSf+Lxit4VJcc/FMyFUWwNH2IZFIH43rAwtqxhtuUIAxmboB3x2BbEt6dPI7IAWjETwil3ueuS5yEbieAwA9J1L7gmIak4qdXNcEdPQSz5yTcXEa38bkzxB0uSYv++Z6TUt9K1tZng1c8qfVcuNL0iArsfVacOkoejU+3H+/PGi8H432XBWo5FMRk50GBbMAqHsIRL7zvurxx8NoBjTVdek28vHmgpCOE8HaHbvvWD/SKRNZq3XpPSsM8t28uxDYhb357CxuggzyVKIla2KCx3Hxy4x1jOR+wcnz5OuKpxggMaOD26iMQnsZam3dse9sx2eyA39RnHle6yKtSXPORxleczQD/MaYuhh3Bf/VQYdWPFSNu19enbuT5ILnT4JjLStEFxeoRlBQnns4xcXvnaw5Irn4JRw5vJZUnMPgLJVUnLusu+aZNu26HKxtTzGz2kfF1/JKh4PI17S9FA1fRBsw/nrekjL1qj63iaGg9JA5EQrQG6nVMYNQ3enbGDYbGDORPgtfGPJIiEgRSpDPkUIiCOGJpUBke6Pxq5sh6PsDxCBdY=; 4:gQSLOuARYPcmnul5BTt+4Op+Y+T6R0mk+sBR0v1cWrLtWMwlJe5rhXiyinr4FuPaFhf4qv4Xd1UPmDLbXMo+KEhdxUbYRDJWgl3HvIXJ+cEcJGEZnwpOeTdYX9/1QF66tiUuU0V1uyYZAxTUnyLhiEFYTCyZ+34Qigpnc/49EUWjwmWc8jAMmkWBHad3askf3NHE5G9hqjcHIBtXqmI0SJq5C6RsBc6wl0qYrC80XPU96RmayB/mAKxpYCLSj0xeDBC/UQE6vHgRpfe8kW9ONQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(3002001)(3231221)(944501244)(52105095)(10201501046)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:MWHPR07MB3469; BCL:0; PCL:0; RULEID:; SRVR:MWHPR07MB3469; X-Forefront-PRVS: 06157D541C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39850400004)(346002)(376002)(39380400002)(396003)(366004)(189003)(199004)(50466002)(81156014)(5660300001)(316002)(105586002)(6486002)(7736002)(305945005)(42882007)(6512007)(8676002)(50226002)(2906002)(68736007)(48376002)(6666003)(478600001)(16586007)(53936002)(5009440100003)(106356001)(72206003)(2950100002)(1857600001)(16526019)(66066001)(386003)(6506007)(47776003)(4326008)(52116002)(97736004)(36756003)(107886003)(81166006)(8936002)(25786009)(26005)(51416003)(76176011)(3846002)(6116002)(1076002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3469; H:localhost.localdomain; 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; MWHPR07MB3469; 23:ZpWmKGqVyo0uCcrMep1zoSnnyjpV7Ksqdf6ppCLbM?= =?us-ascii?Q?+nYyi9utUHjjdHa2TB9Th8Xw4uXbpm8tV7pkhM/X3DBciW9DcpZWInFc6oaL?= =?us-ascii?Q?b5tvmud9/uPu/Reh3nsE4TgVhUTZICGhP33ZGcDijWwK3P671truKfOBWJnF?= =?us-ascii?Q?HsWSO2VweSs++wG4IUA9wG2dWKMyVofrcqWzkrAhWD2nFb6ODku8iiRZdGFj?= =?us-ascii?Q?Xq8gZt/vnxLLWU/e+J7VYqfeRzIuP/kjMgWKTzxgzNYj/NspYusit9jXlo9r?= =?us-ascii?Q?dCVsPjtOx3lw482u0RFOHzulbVE03mhvVXrg4p5nPfZgd99/dSCR1X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y81bYi1/7bl1Q6A8TQzWoe9++mvsTKOQXXKI3AQtRsSDESOcYqAugfHK0XrmyFFrMPs3mUp3NYOzz1lwEYDLDh/0X5Tx0qJMa2+rRd2q66WmVEaU8AbcS0NaS3Xb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Mar 2018 13:13:04.0742 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da972b9e-a7f6-4277-3397-08d58cd1fc98 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3469 Subject: [dpdk-dev] [PATCH 3/4] app/eventdev: add options to configure event timer adapter 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: Sun, 18 Mar 2018 13:13:07 -0000 Add options to configure expiry timeout, max number of timers and number of event timer adapters through command line paramters. Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/evt_options.c | 65 +++++++++++++++++++++++++++++++++++++++++ app/test-eventdev/evt_options.h | 5 ++++ 2 files changed, 70 insertions(+) diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c index 05d6de88b..a04ffea8f 100644 --- a/app/test-eventdev/evt_options.c +++ b/app/test-eventdev/evt_options.c @@ -140,6 +140,56 @@ evt_parse_nb_pkts(struct evt_options *opt, const char *arg) return ret; } +static int +evt_parse_nb_timers(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint64(&(opt->nb_timers), arg); + + return ret; +} + +static int +evt_parse_bkt_tck_nsec(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint64(&(opt->bkt_tck_nsec), arg); + + return ret; +} + +static int +evt_parse_max_tmo_nsec(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint64(&(opt->max_tmo_nsec), arg); + + return ret; +} + +static int +evt_parse_nb_bkt_tcks(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint64(&(opt->nb_bkt_tcks), arg); + + return ret; +} + +static int +evt_parse_nb_timer_adptrs(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint8(&(opt->nb_timer_adptrs), arg); + + return ret; +} + static int evt_parse_pool_sz(struct evt_options *opt, const char *arg) { @@ -196,6 +246,11 @@ usage(char *program) "\t in ns.\n" "\t--prod_type_timerdev_burst : use timer device as producer\n" "\t burst mode.\n" + "\t--nb_timers : number of timers to arm.\n" + "\t--nb_timer_adptrs : number of timer adapters to use.\n" + "\t--bkt_tck_nsec : timer bucket tick interval in ns.\n" + "\t--max_tmo_nsec : max timeout interval in ns.\n" + "\t--nb_bkt_tcks : number of bucket ticks for each timer\n" ); printf("available tests:\n"); evt_test_dump_names(); @@ -259,6 +314,11 @@ static struct option lgopts[] = { { EVT_PROD_ETHDEV, 0, 0, 0 }, { EVT_PROD_TIMERDEV, 0, 0, 0 }, { EVT_PROD_TIMERDEV_BURST, 0, 0, 0 }, + { EVT_NB_TIMERS, 1, 0, 0 }, + { EVT_NB_TIMER_ADPTRS, 1, 0, 0 }, + { EVT_BKT_TCK_NSEC, 1, 0, 0 }, + { EVT_MAX_TMO_NSEC, 1, 0, 0 }, + { EVT_NB_BKT_TCKS, 1, 0, 0 }, { EVT_HELP, 0, 0, 0 }, { NULL, 0, 0, 0 } }; @@ -285,6 +345,11 @@ evt_opts_parse_long(int opt_idx, struct evt_options *opt) { 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}, + { EVT_NB_TIMERS, evt_parse_nb_timers}, + { EVT_NB_TIMER_ADPTRS, evt_parse_nb_timer_adptrs}, + { EVT_BKT_TCK_NSEC, evt_parse_bkt_tck_nsec}, + { EVT_MAX_TMO_NSEC, evt_parse_max_tmo_nsec}, + { EVT_NB_BKT_TCKS, evt_parse_nb_bkt_tcks}, }; 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 03078b21b..80a9ebd8f 100644 --- a/app/test-eventdev/evt_options.h +++ b/app/test-eventdev/evt_options.h @@ -33,6 +33,11 @@ #define EVT_PROD_ETHDEV ("prod_type_ethdev") #define EVT_PROD_TIMERDEV ("prod_type_timerdev") #define EVT_PROD_TIMERDEV_BURST ("prod_type_timerdev_burst") +#define EVT_NB_TIMERS ("nb_timers") +#define EVT_NB_TIMER_ADPTRS ("nb_timer_adptrs") +#define EVT_BKT_TCK_NSEC ("bkt_tck_nsec") +#define EVT_MAX_TMO_NSEC ("max_tmo_nsec") +#define EVT_NB_BKT_TCKS ("nb_bkt_tcks") #define EVT_HELP ("help") enum evt_prod_type { -- 2.16.2