From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0067.outbound.protection.outlook.com [104.47.37.67]) by dpdk.org (Postfix) with ESMTP id 8B1D51CB6B for ; Thu, 5 Apr 2018 13:54:04 +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=QQLk1gVZp6xDZ2E7O2TMvrm65KkSyMj/6P9GJilD7is=; b=RCaxqpxkKvw+auFTKOL1is4S+3o4aiIJuMcNjREk6PnHWli1cqG9HlHUU+uT0xg238CcOgu/ZVcDmu25DuK98Vhftz1gDkfTFsgQ4EHwc5HR3lnRm94DSfMY35ta0k3galS806jjX8YS25lThe8At9HJOzTMlOIHqAQB2gXQMSk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn.caveonetworks.com (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (2603:10b6:405:64::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Thu, 5 Apr 2018 11:54:01 +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: Thu, 5 Apr 2018 17:23:28 +0530 Message-Id: <20180405115329.22372-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405115329.22372-1-pbhagavatula@caviumnetworks.com> References: <20180318131216.11699-1-pbhagavatula@caviumnetworks.com> <20180405115329.22372-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR0101CA0053.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::15) To BN6PR07MB3458.namprd07.prod.outlook.com (2603:10b6:405:64::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7e17768-4d0f-476f-04cb-08d59aebed2e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:aOunS/JinFMLd3P8Fh1T/y3t9t38HOEkD4pWQSK5hIeAUP0yPwK0EZZ0gELyTbm1HJFjcx1DvmSWIAkTF70pbzAmEFtc0Kr6LkL7dvYUGGA3YvkXyujRa47HYPK92gInZWRNprqcduk9NAe8CpR8dYybM+2jPH8vDZFR0JVyQ8ywve/r7oDJFtoUua0iMPaHUj85/7eYOMVT62JYDaDpRQ7yVHHrwHk90hvcBh2fz/X0U959pzS7GOeplvXM+FHy; 25:uXcFiLErPguu8j5RXa3LePuPUHEw/6TS5jMh/uQhosyp6KAi6uZfCGAyAEZLxKklgg1/nMNOR3ZbQ0RdxGexBBUjIbAIKvpB7thKmQ3/pAIzk/bK+PNJgyaWoTS7ecizt/hHmRN3bi+i48RjJw3ysG3KdzFItkLvefkpEzkAmnCeWosm57zxjsybpeYRIF6VKktxzcHnAjw93GDwIHj2LiVtgDaK61kuLm3rAMRNRq6qRStEjHGVEvWsRDcWCrbicLa20W+Y+7Z7jylrhU6Sh1FasNUo7JHBz6gBs84PMhKBOvzBmWrVgPTpigNckFdN6txdOEE49SfuDS7CuKmqFQ==; 31:qLyytRcobyyNkAADPTU79QQWLWgiQ1L6qpJbMGDYidjdCYGFxrTVPEcWP+u0KV92U+LgCwj5tI16Xhow02z2yzVICV+Y5aOBbFxo0t3mlzaAstL808oVGHKkZYs9m1lEZJwaI7V3WTCj2tfBsQyVHRJAXwAwulzLQoLN5uPO+iD0p4oFm/MB7ujqASgTaKTKyvQNy7FsJ7PRwVHSY3TKSUwRvJc2JVBQf5TT6G3B9Ig= X-MS-TrafficTypeDiagnostic: BN6PR07MB3458: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 20:7G0DmN3gT1WbjC4y+97AXlqccBNYv4AUm7y3WRZdJ+KoCWySSLkMTFb/8f2t4h1tkBbpAOPvdnyWHqzACnuDDpMo6bUC3+neSlTb3GAi9wPZG+gKqSrbXV0BYRX7qjYn9BkSvCBdEE/TRflJhcU5/XOqUoUDcuiWK/dHSIgXt1tXt8BYPq4bf3zoO7cbi4eZf5726NJqwTirri1hyb7PDd46NmiTDADCzumCgtpvnb0/FZ1OZ72dnGw7fG5lAn8yY7uClwgPMjQqIeTXtx0jGtCFAeSycS4XMmT0VbPJxGFWyTl4FHyMFS/dCemy5yh4HZjOtI/dfXCOdgBjBS0Tq62Dyt0zT1SbJaTw+RHe1ppDWtCq6ykuCtPSvO3JKdrqlI7No7xgAHqLxxcpJlAoqCjezZZhxWuMO/JdfSwmdgNwp9FEUUss2OeM7J98nMo8ffsNF7VocifNKb2+8NRd7McFuPgQYuRIFnTysqvXYxVMIjjEsc2E0xtK27iIZNLok1yaYE/qDj9O/bO/JT3JugbWsd6S9ETCnC4lnm+LwLQ8mgPs21kPAiqSN7tk/1wNN+Ceec+0t69E9EI/eK12tMz/XfU8jV/iYNRzlIwvFqc=; 4:kBRyghWABtX9MxfNImZlwZStiiZOw/cHsSt1CJTbQrSWX0BrEDVWJNDSW8hkxQHB516fv/geanYO0U03XdYpPSmwwVjPIUYg+vtE3nU3AmWRvYhTkEFqxlWP6CPmKNvuvLzs08L3QAoZfUiSAqBBHxSPNLDguPdpOtM0a05Lf1ggremhc54LvagzioSqKlqO3Lh4xXTnFljnmBenxHGDoEODfIBVg/t9cLL/Qd2iAi82L0kcqdaO9qMYwlO95GDuif3rtaXGWnbVDyGniqK5Ng== 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)(10201501046)(3002001)(3231221)(944501327)(52105095)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:; SRVR:BN6PR07MB3458; X-Forefront-PRVS: 06339BAE63 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(366004)(39380400002)(376002)(396003)(39860400002)(189003)(199004)(956004)(72206003)(42882007)(575784001)(476003)(53936002)(2616005)(50226002)(2906002)(486006)(68736007)(4326008)(52116002)(6486002)(76176011)(107886003)(11346002)(25786009)(6512007)(51416003)(6506007)(81166006)(81156014)(446003)(69596002)(8676002)(386003)(8936002)(316002)(3846002)(16586007)(1857600001)(7736002)(106356001)(1076002)(26005)(6116002)(97736004)(50466002)(48376002)(36756003)(5660300001)(66066001)(6666003)(105586002)(53416004)(47776003)(5009440100003)(305945005)(478600001)(16526019)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; 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; BN6PR07MB3458; 23:Uu81VBc3B5V8zClrz7rnBFgzvWFO6pYH+vt91CRIZ?= =?us-ascii?Q?6kxMMKRg6jrngq2UrJ4pKH7Ie7rE0wL3Pn+hnfws6Higmp1JpoDBqEndjxDf?= =?us-ascii?Q?lwPMZ5Hl+lDc2WyZvAmJ6zMwzD8ria3mzozDUkjtZtBaEPooru+c4pFkxXEJ?= =?us-ascii?Q?JgpvCof18rC6RCH3YKi7CCK5VUpwqlHlGnAn1iuwVM/8njmsqkaMsM6ssFxe?= =?us-ascii?Q?XJUYvxdEoryQdAAfOnieNiW7N2hu0e/bQ3cLz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GVX/3y5qTA/ncEI5QtJf1t/jnfc/D4XU5k0uobImZlb7nVAlKPN/VfdgejBI5C8gYDVYkUQWdqW0MGlBiaa7NN1I7jM+1Ch01aiBOxrLVVShBgEUEKeB3kH3LTrc42keSGBE6IIRcGo=; 24:9BbiccWwwZ3tJHBPzacfdHgT3BSvpvxBNztVQtKQoZhQqSwN/XT3L51Ze9BqB/hbjo8n7XVSfE3zcHOjVE1yD1xJEO3cMUZIZNzU6qYyrAY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 7:tb5Mq22V8WWMR3bVO2Ym7GrmUM2l6rELIgJwC98yd/8nZ/SrY+1Q2+whZAb2LRoyXnIOKU8COqDNHhvNQhrLoy0hVIIdzONkDLbmYqfcd/gPWz1Pb36HinJ4xOKH0r7Og8z5Ns9UZHaKkek3uowrLLsBGERSWSNixwyD+WVzQbEqL02VNLqms1A1GV1+vVqVWHZZDXBAuU+Yg8YtoyABF/37rm8Nt6FFD9Q8VLL7j9bO7V8x/7+kld3guxZcImA7 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2018 11:54:01.3899 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e7e17768-4d0f-476f-04cb-08d59aebed2e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: [dpdk-dev] [PATCH v3 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: Thu, 05 Apr 2018 11:54:05 -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 2884e0d91..2429b0471 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_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