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 A3228424B9; Mon, 30 Jan 2023 05:53:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0112440EE7; Mon, 30 Jan 2023 05:53:49 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2085.outbound.protection.outlook.com [40.107.223.85]) by mails.dpdk.org (Postfix) with ESMTP id E114340A8A for ; Mon, 30 Jan 2023 05:53:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UrBKrrv77J0LN3CabBoxdOPJqrXZGWVn6WyDwQdeN4TwiSRoDloKo+myxN2zOL4klwlXf4WaERMM4mDc+/1ezw9q1dyCZVXzTCP3KU0PerYB3UbKsVd6oUlUvyJbkq3Qmzf0s/soq/OW9I2ugibj709GIk1VA5jhze/7CpVaZqRBkxbIX/EohffafmZq7zHN1VVngaPkfCHAVsPfru/I7yutL3zrlldwl71QKs6OAvi+IYw0ODfRe+aY0sg1JYqcwaYaoJlZ+oWNW1+YOXMecuw8lIARsjZf6y/24FrtEenEMatkHKr7rnkuS+5cdbl1nq4mk3kkOEVpbOCJDjJNBw== 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=1ToJR9kNy3RFIPhQnSpbKbtrvt/oTKSyW0jf9lQHlgU=; b=Vx2TeQYwz2FM7vGlskXp2+qQgwRE6TegKlhzukuc+bFJhjoYbWcmlwCev+SiPJ+Db7wdx9rgbrpML0Bk5clXHteL0hFQCsskogQnKm8HGdzLbr3JlGqNdeE2PzrVfO17nxXaR/Q6k0caXF2vImek+3aKyxAgsLDXXfVBUXeYyDlOx90uTT5bya4+eudOpJBD6JFWUC3aYwOJ8ofM8LxE+CSD+sGU9vpTmxfnhDuudw6xKrce3MXheN30IVSXBQ+O6ah4RC0SiYV1BikBv0amo5Gw83YWhTQJ8CH0r7uw4CbJjJwXHQHtaLReyYnGDsLH8nuuyvKFQUGt0fVPHzdb3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=monjalon.net 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=1ToJR9kNy3RFIPhQnSpbKbtrvt/oTKSyW0jf9lQHlgU=; b=b/ZZsalZN95D/H8NgZox2gcnHmqtbYJnryREbnjZVIypwsjnMWpZfqoQP0di0QTdWnZ1u6UFGaQz4s1CyT0l3S6DmOrbNF2kZbgjZUdck1xczFIWy9C5zen/3U28hLcvswJmUIgYENeW+iyvM7QOpknWwPCjp4WFxIgQ+3YyYFPJpFXu4m1PfTXn71rI7/NRo1xbMydy9JiyV6obzBtfQnZL9oUM/HxoHoVjcUtwPqoLE6i4YWTUOq+HVZG2bh01+KCA2434PtEj6XQSg66Ny72tTjg6nsA3y5alldpxek7tIjDuo6I8fdsgTb9plyadbmSZmEVHQNtUiDFNVbWGDg== Received: from MW4P222CA0008.NAMP222.PROD.OUTLOOK.COM (2603:10b6:303:114::13) by SA0PR12MB7464.namprd12.prod.outlook.com (2603:10b6:806:24b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.33; Mon, 30 Jan 2023 04:53:43 +0000 Received: from CO1NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:303:114:cafe::21) by MW4P222CA0008.outlook.office365.com (2603:10b6:303:114::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36 via Frontend Transport; Mon, 30 Jan 2023 04:53:43 +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 CO1NAM11FT012.mail.protection.outlook.com (10.13.175.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.21 via Frontend Transport; Mon, 30 Jan 2023 04:53:43 +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, 29 Jan 2023 20:53:29 -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, 29 Jan 2023 20:53:26 -0800 From: Rongwei Liu To: , , , , Aman Singh , Yuying Zhang CC: , Subject: [PATCH v3 02/11] app/testpmd: pass flex handle into matching mask Date: Mon, 30 Jan 2023 06:52:53 +0200 Message-ID: <20230130045302.1560006-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230130045302.1560006-1-rongweil@nvidia.com> References: <3ba49f25-52d0-fe07-02e6-22a71e0fbe13@oktetlabs.ru> <20230130045302.1560006-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: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT012:EE_|SA0PR12MB7464:EE_ X-MS-Office365-Filtering-Correlation-Id: 062f31a0-c714-48c9-5bf7-08db027df690 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: ZEU0ickdfGJrbPMf1NPt5M+D1Mind2Hg/IUiGN7sEc/nvUR3Pitw2F3/gaKZrBfrGVvU1/V1JnlF319iKEya8k6JJDNusGlIJswu7xq43PwyPpu2phSUKsjNc+XEa37E/lDgofeJ5PPPKIrxFV6RnuXNWXV0R0JX6vDCDT4dm3Kzkq+e9KAFOjG2SNsdIeoJ5P2i7uVns5+5CKMwUDNBewIZ5l11nXytDPcFcsTdLh79FX9LSGbQsnYd3RBLcPJ6WsUj61F0iERHSVsLFqcoWz4yEFXUuSMCwykPs/oVuwAQVkljypG4eRRpLbe3O0jzkbP9bkxbUxGw6kNWgdpSFc7K9dMT6UrKKtgzsOmemfNEbfj6s8BQNP/BB8I0yu3pd/nGtJ+MCekQi2CoFAuUg2gyIGPrCVB4qaGA0wrADSTzhbrrZE22GjcOZY5pA8ujWfnnqhO2xLHV28d8Qiw/zrtpTUlt0Rha+lKhbUWfgEqFk8I9YrlmH6uWckgvtH6fp5sxrJm38JiOaFQVM9XWEZvhOPtAJghDAXs1UfW665BNBqJdetSXU9yXaNivpYn2HsZmcRbG46TpcZg+D07WBfknJRTJjyDd1VdxgLOx5+68I1XA5r3E26P7/t6hw7Zi7sM0UTq/RJsC2eAsmBhOT66/JW4jODc7iwjmwD2Gk34rRlw/BXuS6DmfJqMcSBElM8LZK4J3+NeHvH0AzGMjSA== 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)(136003)(396003)(376002)(346002)(39860400002)(451199018)(36840700001)(40470700004)(46966006)(86362001)(356005)(82740400003)(36860700001)(7636003)(36756003)(4326008)(8676002)(70586007)(70206006)(41300700001)(55016003)(8936002)(54906003)(316002)(110136005)(82310400005)(40480700001)(5660300002)(2906002)(47076005)(426003)(83380400001)(336012)(2616005)(478600001)(7696005)(26005)(6286002)(16526019)(186003)(107886003)(1076003)(40460700003)(6666004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 04:53:43.2318 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 062f31a0-c714-48c9-5bf7-08db027df690 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: CO1NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7464 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 323c07253d..f5d7a67def 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