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 4BD8D41BE4; Mon, 6 Feb 2023 04:39:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67DE942D16; Mon, 6 Feb 2023 04:39:40 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2042.outbound.protection.outlook.com [40.107.223.42]) by mails.dpdk.org (Postfix) with ESMTP id 48AD842D0D for ; Mon, 6 Feb 2023 04:39:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FOFi5FxEdTLA8Fa4UKdTXh8S9yl0Z0fihl1FIDXRw96p2xz12/qy+REa8qdrCL4pC3gt+k1jo0MjxqvRxfKB/NA+Nf3cWHA9Bet2nc2XPQcOp/FJ+4KzKrQQ8Z3N8NqxTmpZuyfEFENUK7rrdmHA5OKSj2rwutd6t0FMFyHqrBHXZHopG6S/sd+EhRNZnNCvAO4RB/xH3MZmIEczy4o4RFCONB7qD7N8UnzLgrHlrkkORUp3XLG3RtqQrWj3h3rwEW0HLpsr8QRVeGGZcgrYxXcIx4MCKt/Oc4FTX0TpdrFFPv9S/FI0OViHMQ6BB2IGlD7zmb1DkNr+RYKtBHpSmg== 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=R92sgD9fuu6XKyqfcvTbaGf1Z1QOtJOFTYpHXtVkzlE=; b=Xzzm5VAxsyHUcwKsVkrWJ3PtrLGdjRSn7VtAiHMp/7IHY5xuz1hxrUZKoiNrnS+XZC88sWFfuEW0Fn/hDk7lZBx6nR6rbbcb99NsqWEMXuZuZyi+T/Cn6k1n7lMqr53mVXP/QZS03uhanXOF1hTAI9IWeIAD+gGe9X0UG3UKUQsmLaA7ssmXqCX6NFOCJly+ZKNxdJZ2v6vGtoyuKAswAOdh70l6wlUN9O0MANG5+qR7CL2dSOikkivRH/Y4RjwaZIPzYQJgHiu3PMqKOrAr26EWwyWpYtVbOcGipZhjRYAHEwhyev/eaThtwVHol/tbrJsuQMT8XQBmSwCZpoWSvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org 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=R92sgD9fuu6XKyqfcvTbaGf1Z1QOtJOFTYpHXtVkzlE=; b=X+tmx9OlUVdd1BRaXVuV0/pVGiy++yqgACud8mgfLxOFU+j8mGEa5RcO1Q+wQrfu2N9T264vq8XnjsoSetUZG+i25Syeyx999KJ6uhiPUuBzAmnrn5VDjQMhHlcwbV+NXW40z2NPrKHchV8Ve1Lx667vx0KFjpapk480glJrA9BcB5xoocze5TL4wNEEmdC3O0hicTjT2mhAVcMO9Byv0jxc+oeNrd0JkG+QqNP0LOb63UKs7gAmVy0hgo8XUnAzGIv9hMGj1mxCEFrI3vMcuA44qq9cz+RQ4JGyBP6RyTICxiVfY1TGCATbJI2/eYREoGnaSWFmHvhhghCHyFFDZA== Received: from MW4PR03CA0244.namprd03.prod.outlook.com (2603:10b6:303:b4::9) by SJ0PR12MB5406.namprd12.prod.outlook.com (2603:10b6:a03:3ae::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Mon, 6 Feb 2023 03:39:35 +0000 Received: from CO1NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b4:cafe::56) by MW4PR03CA0244.outlook.office365.com (2603:10b6:303:b4::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34 via Frontend Transport; Mon, 6 Feb 2023 03:39:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT031.mail.protection.outlook.com (10.13.174.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34 via Frontend Transport; Mon, 6 Feb 2023 03:39:35 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 5 Feb 2023 19:39:31 -0800 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 5 Feb 2023 19:39:28 -0800 From: Rongwei Liu To: , , , , CC: , Aman Singh , Yuying Zhang Subject: [PATCH v4 2/4] app/testpmd: pass flex handle into matching mask Date: Mon, 6 Feb 2023 05:39:06 +0200 Message-ID: <20230206033908.2770135-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230206033908.2770135-1-rongweil@nvidia.com> References: <20230130132000.1715473-2-rongweil@nvidia.com> <20230206033908.2770135-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT031:EE_|SJ0PR12MB5406:EE_ X-MS-Office365-Filtering-Correlation-Id: 04dbcf37-295f-457f-f5ee-08db07f3c446 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FSrLw7V9c1ww348wOXd2XAxHwyr7yePe2cQnTAatOR/RassdPg2RLmtpR7ncr+VgNd06HMnlXpdZb01rYPtNlGBUBHfrtqRvULhL1uG1XgKnzQzx26XB3wNEZDzVg27PfBFNkm4++VC8yGqReYOJ+R3rRz1ay+YdIjeFicJinXbA6eebDBGudtbro4GJx/Gsi9intZDq1OG4TQxvq4jJVfjBkP6ago/VDWd3ebZJqEquU7ucrUa2mKJebVt4ROtTbcyhCXlg6YVcPsSRN8Ofp6nvBz2mIW8O7u5EfwK0s0TLN9CVpDWzLHURO2gFysCsREz9QOFYgzLTrOyAjnmLa2kI/XCUgi1tCi86SBMDoGdfLjrLvKZ0NewclOmq7zaWlkcdi8tCN+s+j+fipozV0tIn790yAoLUbsUHBkoXoiUYNQj92Ef0BQSDC7F+YEFAzgiMaoeknKnclC2KmDnUhhF2A2tGmzEyaGmjLNcxISGroVdRARID20dTeM3NIYyEdlZEWsXoZcrjHRO0KF/9FqFRYOSmkkP5hQlLA8uxhCUlYRTrV12J21bjY6w4275x/sIc3GF88HF9p432iWfmKZ/F+VxULZ9+tdLgar9jmWRL4lBVsTDS796PEqaS5YfyQA3jIBe4YZDFsw4NqtDbwTV/JhZOXdpF6REtLpiy5bEey9zBw6/aqQuGnwmmkz5bAqeKWmg3nUnG+mjGBzzscA== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(396003)(376002)(346002)(136003)(451199018)(40470700004)(36840700001)(46966006)(40460700003)(36756003)(7696005)(54906003)(110136005)(316002)(6666004)(1076003)(8676002)(478600001)(5660300002)(2906002)(4326008)(70586007)(70206006)(41300700001)(8936002)(26005)(82740400003)(7636003)(36860700001)(356005)(55016003)(40480700001)(86362001)(426003)(83380400001)(336012)(6286002)(16526019)(186003)(2616005)(82310400005)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 03:39:35.2926 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 04dbcf37-295f-457f-f5ee-08db07f3c446 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5406 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 In async flow create API, there is only mask information when creating flow table but flex item handle is required to parse the HW sample information. Pass the flex item handle instead of UINT64/32_MAX to mask. Signed-off-by: Rongwei Liu Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 7c12d63cbc..9037432cc8 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -10068,8 +10068,8 @@ parse_flex_handle(struct context *ctx, const struct token *token, } if (offset == offsetof(struct rte_flow_item_flex, handle)) { const struct flex_item *fp; - struct rte_flow_item_flex *item_flex = ctx->object; - handle = (uint16_t)(uintptr_t)item_flex->handle; + spec = ctx->object; + handle = (uint16_t)(uintptr_t)spec->handle; if (handle >= FLEX_MAX_PARSERS_NUM) { printf("Bad flex item handle\n"); return -1; @@ -10079,7 +10079,9 @@ parse_flex_handle(struct context *ctx, const struct token *token, printf("Bad flex item handle\n"); return -1; } - item_flex->handle = fp->flex_handle; + spec->handle = fp->flex_handle; + mask = spec + 2; /* spec, last, mask */ + mask->handle = fp->flex_handle; } else if (offset == offsetof(struct rte_flow_item_flex, pattern)) { handle = (uint16_t)(uintptr_t) ((struct rte_flow_item_flex *)ctx->object)->pattern; -- 2.27.0