From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0063.outbound.protection.outlook.com [104.47.38.63]) by dpdk.org (Postfix) with ESMTP id B3C6F1B833 for ; Tue, 3 Apr 2018 18:02:01 +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=BwNxcww3nMtRXtD4v5Zd5VAvMXKJNhRgOHL/NOgDeSg=; b=bX9PtFTsAb0wODliZI1HV5HU12Ijg7nkn+8kl7xx07qMQADSmIXxb2nY6k7zfh5yrUohmOWBN1fiKCn7o1HV04emDzllUX05sQ5tw6jROTnP15c9wKQj0vzEUMxQM0laBrLiaYSJjxwv4YRGgkXZnrrSnnfW44FAxcqGRrlw+80= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn.caveonetworks.com (111.93.218.67) by DM5PR07MB3465.namprd07.prod.outlook.com (2603:10b6:4:67::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Tue, 3 Apr 2018 16:01:57 +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: Tue, 3 Apr 2018 21:31:33 +0530 Message-Id: <20180403160134.27355-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180403160134.27355-1-pbhagavatula@caviumnetworks.com> References: <20180318131216.11699-1-pbhagavatula@caviumnetworks.com> <20180403160134.27355-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: CO2PR04CA0090.namprd04.prod.outlook.com (2603:10b6:104:6::16) To DM5PR07MB3465.namprd07.prod.outlook.com (2603:10b6:4:67::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1ec915c-dc52-481b-d915-08d5997c3b85 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:DM5PR07MB3465; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465; 3:vDpvfqdNS6XgEbzHSNXLcOSio78ZZ6Du3UjvwdISB6OctZnKRAoc42jgjuAo/yvwxXgzQrOLJjj5qAJFWU41j6GdZrv0aSqg9DbuNVfRjAPYVHy6j7+80RKmRgVH+k83bS6jfiaYFDIz1beaZPckrpwLzZ9vh7FHkGTKlMVZKvL1xcNYXbNY+D9XLQCNMMpl0F2/GAHqp2qThhGAXsBbseME3RDdrI1M3rz+og+lO9fdrg4nrp5moGRlWPqzNGzP; 25:1E7cp6/3e/Gz2jMa3XG+ahFPc61S27r2bA/1HJSzeU0YNRhFNfUc3mJe8bnVcni4Ko4ZKdRFLzTjGQ8sDUOFrxaEjP0GbhzksJGfvTYrCxT8SaM9KAVHqTsBLcL3hccwZmEToilOzWUFzt219aqlw6YkyUATqG3v2Ut2iNaxdlRZnTpnlhgiiyKcgJvSFgTRHn7t4Mf/xCP5HaWiPqq9ViCjMVRQNiZqMUO2IuL2/DFxeM8tvQECCfUmJe8VsA3jHg7hue4katO/ew2gPnzhvZgWyVAdkJvXVVkrFc9r54g3LFZNkyxH1S/mTVVrG0Vro7ZCvvGZzPVfP+qAR4evew==; 31:vrYPEftWYRjG9o5aucsYK4es9FBKrDERH6awLEVRIxtXuG8CUnG1BkXhGixhOivZfzJ7ioM8sEjBO2UY6Np6NY8XITgCEh+pspe6S6xECNiUI10hacmFWRW1D4WHBDULNyenkHGJTur8dk4OgCAczhLjng6JdrmGccg79vHfL6tz80t1czbfB4Yo1UHN2Tkd5xlKPpfXJ9Wv3Wb0pzojVrvMBgm+SuG0UgcP1RbtjeY= X-MS-TrafficTypeDiagnostic: DM5PR07MB3465: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465; 20:8QFWrJ8Idx2j7+t26UO7r61GkT/vmFXlSemzLdt5fyaqwoRY0UJPNk64VTZlxdNXA5TuJ8Sg6jnQOgmiFPsPYySyKT+vK2u5mXRPmwa9ZWaL6Jxe7jWeoslZFaAMuvqZXFttL+HXdYHXecB0GPq7SZtNvdzZGdurrUINWgdOdeJKrPeSN19bqdQiTtHaYa83tdTUCmHEpSQD/e+u/msC4eCUREdmK3c2oqVzQfLoAvOBV3YOXFKrBgTeSE0MTGwNknckzBy76S9hDhJyTw0psR+Z54Z+ij4AICmvwgP5ZJB0Gphq+EVhplD00lwfh7zGKdVOrbKoayFWwl5M6oByGksXAaVb3THN86mX0kVVLyH2ExRk87JP1Cq12Ge8DMtyD2v3I/1sZZSZ1AKWvCQMAYb9jQ4wSHGvglde2FwTFmeoqsuqcW3DgPeqhfhOdeMZvCsbLY7tU66GYtP69KCdbf5QDB8/Qpo4dlHAf4+p3zUm9Dzxo+zfXuMzCfqd+/1aU8+i6tE9bKVW1ANntd9TQTl7OBtETWegyC12r68bIKhgPh9V2KnNZEUHCHC9H2OpeMeBk8qFqR4JcixMNckH1h+KMuGN4+ApODbVTtIvgPE=; 4:0zG6lb3AU1MFJpcOPljp2yOon5VpmVyFVTFyc9lGyDw9q0mHdmtZyaOEsOLSCc7fDJbTjXRolt2UrciANRJ2Z33IqJ48ghCa+NtrUyYsjEpQNO9Ph3AGvCHIWq0VWNjAD7c9MjCXq4M80gEHs4JJKEkTaa0ng2TJXoRg0BQZjpLUr8bLTNTH9IPSI+jbRCxO83FgPLWCm/pc1+u6fTcOp+wwx0CsN/SPqFO9qrb+tJH/D4Ely3+lxubIEpk+RkVHCYsBf5HZqYRuyc556fIOjg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(3231221)(944501327)(52105095)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR07MB3465; BCL:0; PCL:0; RULEID:; SRVR:DM5PR07MB3465; X-Forefront-PRVS: 0631F0BC3D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(39380400002)(366004)(396003)(346002)(189003)(199004)(52116002)(50466002)(386003)(6506007)(5009440100003)(1076002)(6666003)(42882007)(6486002)(48376002)(2906002)(16526019)(25786009)(69596002)(51416003)(76176011)(446003)(4326008)(81166006)(81156014)(11346002)(106356001)(105586002)(68736007)(7736002)(5660300001)(53936002)(478600001)(6512007)(316002)(66066001)(47776003)(36756003)(97736004)(305945005)(1857600001)(72206003)(476003)(956004)(2616005)(8676002)(486005)(6116002)(3846002)(486005)(8936002)(16586007)(26005)(50226002)(53416004)(107886003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3465; H:ltp-pvn.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3465; 23:eWn+b+VDBOAgJW11KUiVYL3qzfvHCI6KgsDn0/6j0?= =?us-ascii?Q?8R7evyjcY12tY+HxjbFsXj4GwaOYSGcfpT3dRS7su21IZ2wEMPXM+0erTJ7o?= =?us-ascii?Q?U16Uk89pIG6rVcoMWTZZoykXWwjG2Hg/i8QuDegkLQ2xLzw60eQ0XGzQdB3C?= =?us-ascii?Q?+C6X3Hy/NdXv6mAwm09epRyGxJpXKm8RpPRjHWQPWr0tG2eocFCls/25Pi0K?= =?us-ascii?Q?F0ZyeFoEIhonGRldjvNCvWfEOZqK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YLfShyONM/ghD5fF7By9muHAAznYXKCFGTvuCk0UygeUiOLK4SdUzfs?= =?us-ascii?Q?62amYSlF9sSvKNoU+gHjby7XLelx9+wy80cOwjBvWVbGycYG/fvhZz1qiwrW?= =?us-ascii?Q?1gNd+b3FM175QVPmPavyYxNj0g/PKC5uU0YykuWepKT8LVU2FQKWmRmTFalx?= =?us-ascii?Q?RM+S5Bt1EjKCVGT4RLig4XSPZLEdNu5EkIaMyzKKv1J?= X-Microsoft-Antispam-Message-Info: ksJM2/MS3uu6nSKTkJ8VmzjRpeq3rXt/APlSHXgB5tM5WERPP9lXQn8tGij20LC5OKByPss1ko/wJzVoL6wCvSG6Q7whVXYnaMkr+S6HyPTpW4KTWttGx+bfdUARJxVcJKyoQiKNwTWWT39oUNODHYpmULYYR8OA435CHdHXu9MOyoV80ZUQzdgHqK91Snrc X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465; 6:fmm7ha+R6Ob+AyWHBcQaZo7xNxc+UQQOxUNbi/qvwnwA1wyuo1g4Zbay7qn8sRvPPdU4619qrtNGM48SxDuzhA0lN5QCrbOP0oXERn3XXuauU2zM5+6sH8fKXGqh7KM5Mgnff6n8tNp2AedTkc43r3ozo9mZOK4gdTSLfuzsCH81hK26s8DoxJgf1INFMSDJuMOfnWlrpCSSf/1uFQR4BDttjmEQ3SxbdUokJooz4Fr8YrlyvSZKUU5VGBPquZ4fZIKvSQDikzzHLg2SbOVg0+sBg43otj07czxMG3teO3PxhpWIiICr8hXbLA6oSUvVYd9FjpV9GNesgHe4wnhR/EVCcx2FbmnwasSNINg5LUc3YJIT035DGLpyowbAHfFCwWiO+UXNoP71baEsvI7pOxVKKTtnJxcbFb0sJevz2ig0NkA54bFuowRaTOKRwUoiuU0oc5m0os4qk+vjECP2/g==; 5:a2ZM+G+HwmbwNAe7odk70bjbr/brOnG6c2dOW38CtMMZwJSfYtl2v8SpICAIxqA9OLdoQ5Cz21NHdd9SCBFSa/O7BzD4rsNIcoZkuQ+aiKZvHlSNIs7G3sm63booa0LIRFDE65Ob/5OvDA1Ne5HpIa306+eprnaSynIOlXfnZG4=; 24:3k+PLWPGmPOF5+nrn1XI3CIJ0yCBWXv1LSqOe66pEecMmmjwETTFSHT6ZSGCIXTPNsjYid39dKMxJdlqr1aBOXmyMem1ph89G0mL3CjH+LA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465; 7:FSOR4ZhtwnHSZGUhbtLjxilwKGFAJK+TqEyS56R/o7/2OInbWcCFey7NRonwHDN/PGW2liXcoTh7MCXkHVFt3Ts3chDuGS+t4lvBwIrCx3ApR9LMTtsZmCC31c87y1n04HEOxIT2G+hjpIe6Q4td6nQGxdyxOlb9EsZLbsQpQUemimdKJMBLbNUj+l1kQ0MlMycnJcmiG9OkIIRNA+y2fvdQjhi/PfkwFlK/4wvHrJ6SsyWyowTirG7caWCQ3/7J X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2018 16:01:57.6744 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1ec915c-dc52-481b-d915-08d5997c3b85 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3465 Subject: [dpdk-dev] [PATCH v2 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: Tue, 03 Apr 2018 16:02:02 -0000 Add options to configure expiry timeout, max number of timers and number of event timer adapters through command line parameters. 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