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 E2354A0093; Thu, 10 Mar 2022 07:01:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD364410FC; Thu, 10 Mar 2022 07:01:04 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2070.outbound.protection.outlook.com [40.107.243.70]) by mails.dpdk.org (Postfix) with ESMTP id 4B3AE410DD; Thu, 10 Mar 2022 07:01:03 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dmu0KE5Dx6+sXgK/nzRE8XzNlS3iOf8WlVT30Ykn50O1IYSPuQ4YWFDqRIkQIjVz9fPgskLjesvUTRtvSaHOI45iHr6rEMcFsJrFmffDyVq/bFCLJSsmqaSPrYZoAWMDmNgv/lrBFBTh8wmmmlhjAas+JPi/QkCLDoUEvj/q6ru7rlzT97pirx1cWjQ7iCiofUEOuca8+yXrexPF8aUT1yAJmREjNlnKUaFj+8GbLGAGGzpAaC4fMeUC1GnyS8cocpC7G94AJYg/oaR86IkVR8vrf64S3CwmIALykiYsNw0rHTH7R5Np0EHhzSQm3JJZQqYqwnALmBQuh/OXPSIEhg== 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=3GbIEbwk9czYUT1TbIY2YK1RZqE+apt3RhSfMxfecCc=; b=fRKMBRDWp25xoFhr/ZaEhaDobhzciyHvmV/9+aC7hLz+tis7J6bIiGjaiB1xq029ecOLiAPQul+bzVwXMW2FKKHaWnYZkVemZufvOXYsNB/FxQPGcZf+bqckaxoy3RcQTKL0Uz5gLyUatLwyBnqLcufuxAyoRPGqv09YlhHT6OPzcJxYC9ED67TJy86QGbGPRcwxgJJArxnpnr6yXctvmV8oJ4pE7L5IZgQZnTiuKSuoAJUNqoxqb9B19ujsokMGvtb/s08AGbkZyaculUrm+0PmPNtaXhIvXKfWr05NqSBtuMT4bONfyxB3T+5WNpSge6PNz+hUDUJvsowMaBZIFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject 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=3GbIEbwk9czYUT1TbIY2YK1RZqE+apt3RhSfMxfecCc=; b=o/jn4davO6odUMKLvznX140Q8A3rWXPOIS2pcZrse25gAyMrIFfktwushff4ZvLk/ZRBVh18NouCsrR6JXQrGpYSm+YYmT67WAm7OEDKYd2DiftgyQxya/mMIJJFpXer+MOQ6s9VM8WxrJAz36k2MXrWZNfdTw0kFlqjQf/COIF7hfFEVUWSkFcnxEHyc5PQ0+52yoNOdVA1snIf0VoX/ctU+vpSZ2CuWh0efmcZUjWr2R6Ff/h9h6zEc/5v7SE7g9f5Stq9CBZqvnthTuziNfYmBwM9VJgZzDG2wj7ay6oeFzBZ6/WBzdjZQyZB8cFt3WJS73xZZuMULTesG6p7uA== Received: from MWHPR1201CA0023.namprd12.prod.outlook.com (2603:10b6:301:4a::33) by MN2PR12MB4846.namprd12.prod.outlook.com (2603:10b6:208:186::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 10 Mar 2022 06:01:00 +0000 Received: from CO1NAM11FT056.eop-nam11.prod.protection.outlook.com (2603:10b6:301:4a:cafe::72) by MWHPR1201CA0023.outlook.office365.com (2603:10b6:301:4a::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.29 via Frontend Transport; Thu, 10 Mar 2022 06:01:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) 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 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by CO1NAM11FT056.mail.protection.outlook.com (10.13.175.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5038.14 via Frontend Transport; Thu, 10 Mar 2022 06:00:59 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 10 Mar 2022 06:00:09 +0000 Received: from nvidia.com (10.126.231.35) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 9 Mar 2022 22:00:05 -0800 From: Gregory Etelson To: CC: , , , , Xiaoyun Li , Aman Singh , Yuying Zhang , Viacheslav Ovsiienko Subject: [PATCH] app/testpmd: fix flex item input link parsing Date: Thu, 10 Mar 2022 07:59:53 +0200 Message-ID: <20220310055953.32380-1-getelson@nvidia.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To drhqmail201.nvidia.com (10.126.190.180) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9e2216b-2475-4b6a-434f-08da025b59f3 X-MS-TrafficTypeDiagnostic: MN2PR12MB4846:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aWG3Sc5tzgevqBCHRbsdueOQ4IioH33HdK/9lasH4Agdp0ZaaIJQ03MavQazaz1MVZ+pqmLVXasIJipSa0PUiX8FocEN53hJ0yN7QfzF+m5tXDp0fGKKbzpM78LopdrHfIYliGOV3M/G/CUlfkh9WrvmQQTSesc8luiU+ntVNEnL6zy8W0AWmI9m1r3H9I1msJmnFYsGsoOS2Qq95lzRr74rOoDO8eMoqVpqdIzW+1kLJ6yfWiKCumCGv+DA5V7A8DwMEv+CyFsDhnfAikhiceOWV4y3egPHYFydHDUWAP1F43MnDe6MijQHinpRNPO3MFFgloCL/j8pE2gfDk7zYUmNnsGPhan0aowXfBUzY4Zg0trYJkBjRxPCN6VCrgaN37BJhaLuJYuoi/F+DmyTqjTbWZacReAPOPJ0HrS76gO60044qKNlVEIOnyRCyPVdl7Y28WxF2aWiIFhw//+8+ciSkLK0eeLHfzIvySZjKkHL6nvuPPHG1Ft96j2/1Q8NTCUxlTwpUo2duyWGLSmTitEt/l8bUcikCjj5eNysajgZsBlRRulh8PDOr65YzYgrPTP10xO6c61/bHt+83us+d5WxxrM1Tokp0OqH+Wst+XUS30yrbUzPoUncl8UagqnK5CvM3B2KeP7/f8Nv/GW5YFy/tywSoAm4ci3P/NTmAILVCG0wER0OXrsWQVUFsWHRu3j35lG6aIsEjSRWIcC+w== X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(2616005)(81166007)(356005)(36860700001)(55016003)(47076005)(36756003)(54906003)(6916009)(336012)(426003)(316002)(6666004)(5660300002)(508600001)(7696005)(70586007)(86362001)(8936002)(16526019)(186003)(26005)(107886003)(2906002)(1076003)(82310400004)(8676002)(40460700003)(4326008)(6286002)(70206006)(83380400001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 06:00:59.9647 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b9e2216b-2475-4b6a-434f-08da025b59f3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT056.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4846 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 Testpmd reads flex item configuration from a JSON file. Flex item input link description is stored in testpmd flow item format. For example, `eth type is 0x0800`. The item description is placed into a general testpmd CLI flow rule command template and parsed to convert string into flow item object. The patch adds the `actions` section to the flow rule template. Cc: stable@dpdk.org Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands") Signed-off-by: Gregory Etelson --- app/test-pmd/cmd_flex_item.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmd_flex_item.c b/app/test-pmd/cmd_flex_item.c index 9050825a81..78a89c0f8a 100644 --- a/app/test-pmd/cmd_flex_item.c +++ b/app/test-pmd/cmd_flex_item.c @@ -133,7 +133,8 @@ flex_link_item_parse(const char *src, struct rte_flow_item *item) struct rte_flow_item *pattern; struct rte_flow_action *actions; - sprintf(flow_rule, "flow create 0 pattern %s / end", src); + sprintf(flow_rule, + "flow create 0 pattern %s / end actions drop / end", src); src = flow_rule; ret = flow_parse(src, (void *)data, sizeof(data), &attr, &pattern, &actions); -- 2.35.1