From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A67D6A0032; Tue, 16 Nov 2021 15:12:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 692E240141; Tue, 16 Nov 2021 15:12:48 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2040.outbound.protection.outlook.com [40.107.93.40]) by mails.dpdk.org (Postfix) with ESMTP id 5653C40040; Tue, 16 Nov 2021 15:12:47 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gUEqFbMMbhwckHmC4dnpTDgom4dc1z+MVOtNgY159MuwSSdnDbdA7TawNb8VMrXtw4vLDXypqrNehizQ7zGszKrySz8RkAGqZKedW1XqvJNtGTm0Lm6cCcokFgc32yv6J4O5H7URYYxWxgvkvG5WI8Dr0Cn/PkWy9rTcT4kno1pgIbqEMsjRP6bOUozPcyjiAMWDBXVLFshj38QC/+Yu6phTGx/bByuO+VpOEYaFs35WOccO62n7Qb8mjYY1YuT2eEKC+QVMVxledOeOH8ZG+NXN51vJi9NXSghHf7NZ7UBI1XdZlxuvEb6MUr48kjPMHLQEIX8ThiSeqV1i+zz3FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1cHTxP93hs8bWInwmS7RxIDWD6zEI2aMdOyeo9eHxbk=; b=S6Jyr+5UrK2+kX3TlEXio6ComGw0q2nzckG/jPyPKRzfsttB4aDuWJYw1t+flQYPiRUAOClA/wV7gtJVmqD4LGjEj6NYOJhKL4uH9RqJAZvkVBs8+hkIqIhftisBeD61vb4D+9z9tCZ685/G54c1BU7CyachefgXyh61L3BOwrlGBJpThS25fp9GGyALhM4JVkKJok78qKPoTPJx3kJUEWMz29phnZvRkabAl0bJVJ2wWE3vCNLn9r7b1yDQkljikGHIcmw3LEDHwl9DCIx2WEPWjsnBaRPKWKUOkAVQCJ422x7RoLPyiF7ovYGAfWXlOfvq9X7mor3A85/sk/8lbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1cHTxP93hs8bWInwmS7RxIDWD6zEI2aMdOyeo9eHxbk=; b=i9ltSI3+56H4nEoFzDL/Q1cP+1//xVoZ7Vzn8QFz6rAnFXxIf3xn8THbON9YpTeEUfFyLyoAd9UYaXLeKWTVBIKiMW7G4hqWRG/oyt24ItHM6ShulaBp34SWzF6WZwHQkHm7OAp9y8+zA16djsEzbuztIOp0E7BWfsppxpWAVcNVFXvhOyH6AWtuy3bP98MY6ea2bfgN+5fRm2KU1VNBejlhEnQ9dPMj7RRF3oQGlZnXDPlpDPAVXX1pLHkrTNf0m3Yr/cYlHBBnnuyk7cXsE3p+gj5km7sLtVh7sYdEfJExGUMh4ZVHgFIIzY+w/JNJY3PYa8WxKD2KzLqYEA+62A== Received: from MW4PR04CA0183.namprd04.prod.outlook.com (2603:10b6:303:86::8) by DM6PR12MB3212.namprd12.prod.outlook.com (2603:10b6:5:186::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26; Tue, 16 Nov 2021 14:12:45 +0000 Received: from CO1NAM11FT014.eop-nam11.prod.protection.outlook.com (2603:10b6:303:86:cafe::75) by MW4PR04CA0183.outlook.office365.com (2603:10b6:303:86::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.26 via Frontend Transport; Tue, 16 Nov 2021 14:12:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT014.mail.protection.outlook.com (10.13.175.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Tue, 16 Nov 2021 14:12:45 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 16 Nov 2021 14:12:43 +0000 From: Raslan Darawsheh To: CC: , Subject: [PATCH v2] app/flow-perf: add missing default option Date: Tue, 16 Nov 2021 16:12:26 +0200 Message-ID: <20211116141228.14755-1-rasland@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211111125032.29087-1-rasland@nvidia.com> References: <20211111125032.29087-1-rasland@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 930f7dbb-1579-4ed1-aaa5-08d9a90b299a X-MS-TrafficTypeDiagnostic: DM6PR12MB3212: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3826; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pYtxHyi3nRjlmDIYCRwFKFqc33HxNslu9nNCAdfIf+Q/lqcQwpB8yXDan8DTlBeW/KVoPHx2pYQymOgbOQeppCDmLOKAFqXPGGTHaO97uuw+nW0G7so9tLlHHFJqsCr+K39/I4OaOuhtYlmf5WMnb/pJagCTXRgamnjlwsZ7fxNq8f4eWB70wq6DbI+NrGA8Q/4eiTyGPfJGp+XSsFiOnv5y25k6ESXoHktWV93szslXY6b0z19p3qIih6QPXgb8vQG3b7dEuM1E5vEOOluMZpm010cZSdV2NQSDaDT9U0moWWKg7qXVOeLjGBRGkXLFHZPil8sUX3ZbSr7qSPIZBPryyAOC++YlUHIIc+9JjPXp4dHypxBtCuIwnjhL7hVyafsQQYlVV041sMOHpMIbdBjszilFzEB3cgU11mlG6VtWN+KG5U4/E4cfVxrxcCXLvKZ+tjMaHFggwY/hLKT0g/dcuUp5SQRtOov5ZHYeqcb0deMzVnm/iOdTzbY7dVB1Y2BdWnpEmJyiXoPHIjDjc8sc/my8Ndcx+ZSWhQHCOacDrBjAKz++YJtKy5YWXvCFaOXUFVKsFduY0vmXcCEXk22ushNfUlgCypH+ivIyMNEqC6yxTjLuzTrAigb6sHikGtIvQAmHJXrgAEnR8wRPatsuxucFCVysB/7OsYi0ZrYNI+EstlsI3hSbPz6A8558+Gvbwv8fSEK/CQT7K7vTMQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(7696005)(2616005)(47076005)(6286002)(1076003)(83380400001)(508600001)(82310400003)(55016002)(8936002)(36756003)(70206006)(70586007)(36860700001)(336012)(426003)(356005)(450100002)(5660300002)(2906002)(7636003)(54906003)(26005)(6666004)(4326008)(36906005)(316002)(16526019)(186003)(86362001)(8676002)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2021 14:12:45.6023 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 930f7dbb-1579-4ed1-aaa5-08d9a90b299a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT014.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3212 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Currently, if an invalid parameter is passed to the application it will cause a crash due to missing default in options. For example: ./dpdk-test-flow-perf -a 01:00.0 -- --invalid This adds missing default for options, and prints the invalid option. Fixes: 3344cf2e3001 ("app/flow-perf: add flow performance skeleton") Cc: wisamm@nvidia.com Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh --- app/test-flow-perf/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index 2b612aa32c..11f1ee0e1e 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -715,6 +715,7 @@ args_parse(int argc, char **argv) { "policy-mtr", 1, 0, 0 }, { "meter-profile", 1, 0, 0 }, { "packet-mode", 0, 0, 0 }, + { 0, 0, 0, 0 }, }; RTE_ETH_FOREACH_DEV(i) @@ -951,7 +952,7 @@ args_parse(int argc, char **argv) default: usage(argv[0]); rte_exit(EXIT_FAILURE, "Invalid option: %s\n", - argv[optind]); + argv[optind - 1]); break; } } -- 2.25.1