From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0056.outbound.protection.outlook.com [104.47.33.56]) by dpdk.org (Postfix) with ESMTP id E704A1C77C for ; Fri, 6 Apr 2018 16:56:26 +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=CMCMokzGOvDiPNKJU+6T0omv184nSGa/FAofVgZKlVQ=; b=lxvXVSPkWcK+5aJGTXggjcIg5UoZokt8mWKfpssAoSSwfOrIvQcmZZRS0AUfPwxmIucifPVi1hS2ElxFvvwQoG6ggSFiTUxjFeo0tWbBE2dq9jJ/xeISyJ66SigMfYESzYHxlNYXDbGGf4DNgX9vt8+w9MWEiqtv7TczqM905dI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from ltp-pvn.caveonetworks.com (111.93.218.67) by MWHPR07MB3471.namprd07.prod.outlook.com (2603:10b6:301:63::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Fri, 6 Apr 2018 14:56:23 +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:25:21 +0530 Message-Id: <20180406145522.7775-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406145522.7775-1-pbhagavatula@caviumnetworks.com> References: <20180318131216.11699-1-pbhagavatula@caviumnetworks.com> <20180406145522.7775-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0031.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::17) To MWHPR07MB3471.namprd07.prod.outlook.com (2603:10b6:301:63::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: abbc3de8-48b4-404d-ecc5-08d59bce91d2 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:MWHPR07MB3471; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3471; 3:dsRpkJhQR6kI/XV1kZkMLbfIbcCNmbnTgRzNNbvfhQkcXsqw5EKapuKLNIXjrEVVRlQ8Na4e9WIpswNJBfjGHOAHYoqimJH2ak9sxug6jpScRnhgCQ3DE8167KpCO/0r8gxKNY8FEM4EexzWUSm0OUUf8ensw/zNDNitvY67mYv77V52KCGUXZxFzaYzidE7QUK5jvmu6ArPM1F8BriSmE+sFQs5DgAKhSjvJHy7jHtlvpv4q+5in8KU3Ghz0m/h; 25:+ju/Bt9SMprSpSajQICz+a/rIQAzSSFVzEZF2eV2Zc3/p38nbZvbfEuEyaTxFmECPs83xjfL/biMr3LTKNKTPBINkkCqm0M9nlyagREAXj3gRQWfMd8voJyL6KYoYCIFhTpCAcp4CAf/Dih37HRwklgihuGYKuDVXij9TLyUP5xe146uW4chtQ4W29a4VyFBCAzzAZmJYtx0uH1+mn+fyEA88pkN4qtL0XQec6QJtHqExxZYc83htI/WQ8929rGbYdoz6wjFhusVDnI5wenHMwNY90nP2ogV1eYK5ljUVAOke2vi73cF4kzNtCP+eOif5iZGXOAengGZGidqHyEXDg==; 31:tVBJGiuWntYdEFgckFhxw4vezR83Pi2CNbrArjGiI+id7ftRuxx/5Xrbr0zWIlIHtBW/uCyKqKCsqFvb3B3EH6n/BhXuyh0lyFy+syz2ygZC/GlOwH3Zdh/63cqa/zky/AEqPDDio6VAH270pqqQGDvBxE3ooDrp5emhEmr7kWmFYxn5NtEyADC/u1SjkKnQGVIUn5ygsCpLNidUS+Xpo35qr11yDksu2iWAr5BgrZk= X-MS-TrafficTypeDiagnostic: MWHPR07MB3471: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3471; 20:Bvw+k9AAR5G7n23aVY8toPXNwF9IwKR9JjneGwqsfKUQJbGA5Y8b+BkT7JO/nLIBphEvyykdl+s6nNgRceKex777b3KLiVw4JkYxZKOV1BtnaFu7SyfT1AzlLBuFdoFjuFP8KZnE/OXiAM7Upw9S3NmDcyYiN/f3lexjZOCiPUWcppM0LTY4rJxr+OJWJ52Kl3bQ8J3g0gAFrna6tM5uGUruFDb4GT7j6xrCXG3LH+7gZtTyelMA8RsU5d2Wew8KTPyuHTAlzSq5SKDkqGmpUDG7gnQhju7pck2G/OcWI6dKRJQXzYwfdzz0xzKV4IdOIIo+SEMhr4EX7MgQo4ABiTTl3toxHrcekQv8AzjOXCmK779aAItLBs8bdedmqccFBSm6h/ZEkT0BMkOLozhOXWji8mJWjCVwAMkEWJ3hrnEsH1dOpKHPntDVe07/ym28OvvqWRnBko+A1hjOZIfQwsaFLGEVYL3fIUmab/cXQBeujUNrxAEZ3SCuwbofX23BF8dRC9VJoYWzZQckqSkWHlCpoWDgD6aalRzf2r1K46OcDLvoyEUQkvEykNYA4CebEVWgVQ7C4ZdU1PzQ3JTEfpco5ICVBfUM+SBOllS1wnI=; 4:aNBOYJ5jaU8AqjuJ0V88THBVmvYgJ9fpAurOXn+pcblGMW2urxfXznC5fFKkQcGeUnUG4f+S0syCK0mq4SPMRVe2BTpfU9KRXp2zAZS4HDdmiW3io5ZcGV0UkUfHyk1eGYJlQoCUXQUbVgMvlnzMUpvQ38D7FFFh5uFZhhYk//hu/3Wgt9n0Kfgx1sd5VTFvetOGox1fJrOb5GYko36fB5Nkwg4+mYZcqET9M/+eU/6DiYnQ/HADuc0PoETgWB/6aeDqBqTY8TSGG1xBCY0qLg== 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)(3231221)(944501327)(52105095)(3002001)(10201501046)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:MWHPR07MB3471; BCL:0; PCL:0; RULEID:; SRVR:MWHPR07MB3471; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(39380400002)(346002)(396003)(366004)(189003)(199004)(53416004)(106356001)(8676002)(25786009)(68736007)(81166006)(305945005)(48376002)(3846002)(7736002)(6116002)(66066001)(47776003)(478600001)(4326008)(2906002)(8936002)(52116002)(50466002)(105586002)(50226002)(69596002)(1076002)(81156014)(5660300001)(1857600001)(51416003)(16586007)(36756003)(6512007)(76176011)(16526019)(97736004)(107886003)(5009440100003)(42882007)(316002)(6486002)(53936002)(72206003)(6506007)(26005)(476003)(486006)(11346002)(956004)(2616005)(446003)(386003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3471; 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; MWHPR07MB3471; 23:gjzxlxBNAR79Nsc87ohgQSWIwZLciX/0/1rcOhPg6?= =?us-ascii?Q?2OtwrQne1YdrEjpDXAOH8dzpgxsOVc8+fv8sk7EsVKbjy/Jp+vd2tRkHbVSh?= =?us-ascii?Q?XypDDR8Cu5VLoHYqUwlLijC66+B6rHlom+Sus1Z01PPrPXpJvY40Al+fPV54?= =?us-ascii?Q?7ZbfI5O6dRiBFZoPmBH6Gw2x4poTQ8wt0QKOmd8LdAOU+YkReedK3SlRxBhM?= =?us-ascii?Q?elSahN3enLR5QkPLaNqY0c7aC79GA/op3/siN+Ou1lpcmH+llLbsnVjH1P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mg9iHfP0VoUn5bUCwYXq6KfHE=; 24:AlCD9QM1Q5FP2Mky5P0xUVeSncsSIPy7wcuNOHjaKka0TXLvy9xZaLv75qz2mMh1KJFrerwecIuO9f2eyD8HN1byPQ4KLTxOAxELShO9I0Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3471; 7:bzWWAc35sVzRWYFxPqOBvNGoCG2r8v2Qyr/RueXHRb1c4p56ESLopEtNZ5n72AtmKlU79K4VkRJR9s67gHd957p5ZSGQJm5YExthvqeaH2X9W07fyrkvum7hiDYlrDrHtYdXDP+d8xk5P5Pc7ankHB8ZINuwIGvtZPEVxeIY+LRwP5NXLUvCLP8CPL2ZNtnMGh4Y/N7aDeK1spfZREekoBtVEJDXO2ScLuzxbZxxpLyzAwN/fskCh9B+bWu1UJaL X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 14:56:23.7068 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: abbc3de8-48b4-404d-ecc5-08d59bce91d2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3471 Subject: [dpdk-dev] [PATCH v4 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 14:56:27 -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 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