From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0047.outbound.protection.outlook.com [104.47.41.47]) by dpdk.org (Postfix) with ESMTP id 8497E1D254 for ; Fri, 6 Apr 2018 17:14:00 +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=EqI06Ft/FarPLDuSmUDrusCYExxECf0ejtOvl4LZcRc=; b=cBO+wJlMigqkHRF6ycnCChAsCYDw9F1w+R1YfPlBBci1y2vQhVpeIbYb3gGQfHAopqjxirYE6gu+hHcJUn55Rj+4g7CCqtx53zBrMKZNTLKqeISf5L0DXqIJFvBaJOLVHnnqgc133aofSYpaKxgjJ/oNncfePb2vS0UbWxrTnaY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn.caveonetworks.com (111.93.218.67) by BN6PR07MB3457.namprd07.prod.outlook.com (2603:10b6:405:64::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Fri, 6 Apr 2018 15:13: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: Fri, 6 Apr 2018 20:43:23 +0530 Message-Id: <20180406151324.9135-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406151324.9135-1-pbhagavatula@caviumnetworks.com> References: <20180318131216.11699-1-pbhagavatula@caviumnetworks.com> <20180406151324.9135-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR0101CA0007.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::17) To BN6PR07MB3457.namprd07.prod.outlook.com (2603:10b6:405:64::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5c4a3aa-b825-4db4-d930-08d59bd1060a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:BN6PR07MB3457; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 3:x4e396nVOiyTKbKo1m6QYck1eVcdE/pQAVkJd5w8Z1DGcWmismYb1qIYwyfaGHW1D5l624sdxQ0AeQeOq3oCpbHFOQfrg9smcHF8P4FPU77vNTOj1bTkBf5MOTovbhI/gKO+4IhKcBIFLu1UFBlElfccRmzBLMlHj1+B2l/eLU4JsDq0p5eoOZcjWxSUe9uBfvB1giyVkzrXtSEV4tU5zZDslx0jTMVLB1uGp72HBnvU4BRqCo9uJOaqThmMWZG6; 25:Hz9/bEKIV6XqgysmMb8GF+PdGquHvjmqYBNcm/kOrOhWZsOChHcmrek+qFp+1WkWc3BISUEDH9cAyfLVvNMEVVOhBSf3ccemvJ7l5xHbYOirWYPcrhvwIBeHMgNIkuwob5SXmuz8RVvNJpA61utYWnlh5d+YDanrsxVMXKO9x2xqjhTJfcGuU2KYU3X4Zzpo7SuHpsZssnCPk+u49ziVW4KFOenN0LHOF0uoLm15gkrL3OZ8y9f/6b52mIFuyzOJmOUVZ1EcXVR42HMtFqsoRwYzcCERsTGHoi7f3lWYhVagggHrlo7107tzQHOCDmNjMWT6FdiU83AkPxQftPRfhQ==; 31:KCyLUTEKLLAS0t/SFf56bQCRTd285LqiEELHtVGdo+xt2ithikPPbix2g/2Rj4zVL9xyM/VdGa5ameJQMf18lALeZZqgOhx7rN1/+/dEJM56R7hYJ31xZwdoSLwNaBtutjp/cVXFT9FpAhyuGp+eBPNPUQkEodIYXmx3YXo0iSg2vYG/Ci6O7HNY9Yztd3BO2yemOWDKAEcEHOPcd1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Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231221)(944501327)(52105095)(10201501046)(93006095)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BN6PR07MB3457; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3457; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(376002)(366004)(396003)(39850400004)(189003)(199004)(51416003)(446003)(47776003)(81166006)(2616005)(16526019)(5660300001)(305945005)(11346002)(956004)(16586007)(8936002)(1076002)(72206003)(69596002)(107886003)(81156014)(106356001)(3846002)(476003)(486006)(6512007)(7736002)(4326008)(8676002)(76176011)(1857600001)(48376002)(68736007)(66066001)(97736004)(53416004)(6666003)(52116002)(105586002)(50466002)(316002)(26005)(6506007)(50226002)(53936002)(42882007)(25786009)(5009440100003)(478600001)(36756003)(6486002)(6116002)(386003)(2906002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3457; 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; BN6PR07MB3457; 23:6rawHT2fzbToC4vKk59arEDNe9lrQMdDxwMBm4op8?= =?us-ascii?Q?Z9T9YoD5+y5UVMDICeiZ1ZnOS4bWwzuPHAZ8GLVHpnzI66Tq7W7/mOlOXTnX?= =?us-ascii?Q?Pj2WVINx/BAK8/1xaZN7hs1YmEfXzmPfEWtuAPMSOkmD5Iv8z8xnZmi1RDWa?= =?us-ascii?Q?Ai5cpym14/qcunyNm+hKuHSpiSnt5Vwq6XCF7umkOHGUM2YC+oMK9jsdNKTk?= =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/+4EiWsOFCHz1kPAxiY99I63HLYysD6RrRDnQLR7mngafj32zwin6ltCqBhXXzoP4WthoWIVOVd9cAdzjwwWQSmu/rJg/PZtaIUZah3+iWPkIVcHPsPPtPgF2PM88g=; 24:2gYJx2/aMiOF7GpmlDro1X8uDYk3kLM09tlp1jb7fUgrUsEpJ1n5R2rIaqqTDp2BddFiLz3rm440z04CPqc/Jzr5emn16KQZ6Bp1UJjpAjw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3457; 7:PN3cW9HE+4l90ktDNPxlnXpsTaTGmxCQvdf6Gz0S52OKx1nTSnkO0lqd9DRGcMu0KSBBNldFZCnwF/m9BTFYUdcckK4V4CrAkIFuUOCPuL6XUYB5vKvPEdQtiochzSLuizrYeXfBA1upgWSx7b+GDLnI5uWey4uccxoWw3cW5HFbessnVybowRo1A4pNkfP+aCSfMV7uKmc9igL59d9vDJekO/538j99y6r46aFSFdCS4k6oE72Iu5oF6X2cMuYj X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 15:13:57.8700 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5c4a3aa-b825-4db4-d930-08d59bd1060a X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3457 Subject: [dpdk-dev] [PATCH v5 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: Fri, 06 Apr 2018 15:14:01 -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 Acked-by: Erik Gabriel Carrillo Acked-by: Jerin Jacob --- 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 1b60eb2ef..5f311a570 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_timer_tick_nsec(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint64(&(opt->timer_tick_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_expiry_nsec(struct evt_options *opt, const char *arg) +{ + int ret; + + ret = parser_read_uint64(&(opt->expiry_nsec), 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--timer_tick_nsec : timer tick interval in ns.\n" + "\t--max_tmo_nsec : max timeout interval in ns.\n" + "\t--expiry_ns : event timer expiry ns.\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_TIMER_TICK_NSEC, 1, 0, 0 }, + { EVT_MAX_TMO_NSEC, 1, 0, 0 }, + { EVT_EXPIRY_NSEC, 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_TIMER_TICK_NSEC, evt_parse_timer_tick_nsec}, + { EVT_MAX_TMO_NSEC, evt_parse_max_tmo_nsec}, + { EVT_EXPIRY_NSEC, evt_parse_expiry_nsec}, }; 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 e5e632783..c059f7084 100644 --- a/app/test-eventdev/evt_options.h +++ b/app/test-eventdev/evt_options.h @@ -34,6 +34,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_TIMER_TICK_NSEC ("timer_tick_ns") +#define EVT_MAX_TMO_NSEC ("max_tmo_nsec") +#define EVT_EXPIRY_NSEC ("expiry_ns") #define EVT_HELP ("help") enum evt_prod_type { -- 2.17.0