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 B5BA441B81; Mon, 30 Jan 2023 14:20:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F63A40FDF; Mon, 30 Jan 2023 14:20:42 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2061.outbound.protection.outlook.com [40.107.93.61]) by mails.dpdk.org (Postfix) with ESMTP id 1B38440EE1 for ; Mon, 30 Jan 2023 14:20:39 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C0sw0X4u/W0vTMva0ZVoQ+cJL+wCc0GCSnT261KrEjy+IFMbkSoh3mASORyco4EOVHwJbuR/jiYx0YUS6heRsd3n3XFHjaQe6XTzoPH8KE0ONzIR0awhGebsEC8f6FjkjAZcodGeGsBuo1QgQLrQTpM1DPanKc7NwaktcrmO5378lUtcbmnK9olioNPBdTwMkPSW06yZNXFgCU2Q4obUfIIwGrypjSamO9u32x5uCgBiP2n0gCz+ZfI9s7bRQFPNu+mUp7jWSNtm+bky3QhGjDRo7qXuOvZ2paMcU0EoF6BPbUGRhToqhTYYWQtGhkgUnOe9QYv92oOtlfCMLhR21A== 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=D20KWOqiA8BS9ogzuKyiIxwWbMTHtBnhIyy38leNODgCilCkwzzMnj4mKkuwG6EsEkY62oGgwU9k/MarignmQ6jF+d2to6VXGz3hJf8PE5fTsyXleeCnF7GNb9w2UmYS6yrd45UOImpzjYkqxR9ybSr4aebC4gidz6DGsKEtI9sgR1E1SVRlZQ8YBy2JuzgOR1D7mq+MWX7PDghNV9C9+55A+g0pRjt0QVwGxl4dbpycW0pGdz/hcWB/35QUh7azNdmeI3fl3MRBIjqczhZyLuKgtFWhakhpnDKmgaq1CNnt7+Cx1bUj8V3x9Kmztr/PUqWAJWLstp7FLbT3knuDrg== 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=R92sgD9fuu6XKyqfcvTbaGf1Z1QOtJOFTYpHXtVkzlE=; b=JyGxX1dO6D/8q30rnU8Uyh+NAJkv64dwghUwfs7fXt5oKnqk6rx9O4ct90nu59QPLXYsmBJfZ0WFacrNjWlylTcGDT5PlxwznnSKDRJ01oRBneJ0g1TPT5K9fXyNddErpGGdNMXZm90SqHAL9KLwmMG9qGtuzgyV/5wf5nvqu9z5eayGsijS3kfpMqQROkGVVf1dRaDB1dhQwlLxYfic3Gntp0hZUNMKKLiUmoaMZtp+xLQ+CYNFHoatxvomyGrTIIbeWQcxUq1WKf8CquT1Bm1kIHPlA1VyWVHlpkydUKdcNt0nI0ZRgasP0hGrLmFq1+5RtNEL13WgOhVRYFw6sA== Received: from BL1P223CA0028.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::33) by DM8PR12MB5495.namprd12.prod.outlook.com (2603:10b6:8:33::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36; Mon, 30 Jan 2023 13:20:37 +0000 Received: from BL02EPF000108EA.namprd05.prod.outlook.com (2603:10b6:208:2c4:cafe::7b) by BL1P223CA0028.outlook.office365.com (2603:10b6:208:2c4::33) 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 13:20:37 +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 BL02EPF000108EA.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.19 via Frontend Transport; Mon, 30 Jan 2023 13:20:37 +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; Mon, 30 Jan 2023 05:20:21 -0800 Received: from nvidia.com (10.126.231.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; Mon, 30 Jan 2023 05:20:18 -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 15:19:51 +0200 Message-ID: <20230130132000.1715473-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230130132000.1715473-1-rongweil@nvidia.com> References: <3ba49f25-52d0-fe07-02e6-22a71e0fbe13@oktetlabs.ru> <20230130132000.1715473-1-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.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: BL02EPF000108EA:EE_|DM8PR12MB5495:EE_ X-MS-Office365-Filtering-Correlation-Id: a675200e-6b83-4188-286f-08db02c4c6ad 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: e/JjxzSRlmFCdq4bqPR2fwEc4hpbB5sMamM8PM+amNiTwJJAiOUeQwoYhrWkgF8BeR9xf1wPgtsnghaz6qL27t6MPpifMECS2LZKhsWwkhP/fov/BK/exdFxUWR5LHTVDu6bRoPKOTGYkQyPWWm2qZDJr6c9Usc2oIU0zR8qeOnzwZ34uD2XFSjQB9RcldtRtCN6xUbIgtrqtUsTbMbOvC+/UtFmKRNyOoa3gABXC30SRdKg9KDGtua+yzFaAk65hFHjzLzFEs5uYfLCoFYP08l4xQOPfBBdz2uanXx4Wc+JA2B3zxVE9Zixz2wne6EGA7tQAhLzpl12gADTMAwAaBtFIlVDtJMHg9eNRu/h9pOFgWEtH42aNryFTo3WXBHK7BLnE5R5QpiqlzKqnS6k56foZxdCXsvVJNcFGpzWwvz/RIl6N8n7BuNJ6Q9Mknoj0iNJTKGTs1KvZ4V7XyjHbWIPjVFSvqHGwL7j6CT8F0228aP03Rz8pdkn181UgX/SIgLJnVGj9E4iNikajMAtf0B5wjsNQ41cxsdPSuxPd/xiKdxwRV5HcvdWHBRjspIQaMpnXJaaEAKlMisNsyyaMONZrjQi10BznGwj0aiZess7dNfMDA66NsflkQ8vG+inurQwyMN+RGc526Znjv8B5cibH4ERNRjxX6BY0RFR0siapA0sX/WWvevncTSvMk0aDlCz1B11FwhBENxXtjNxvQ== 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)(376002)(39850400004)(346002)(396003)(136003)(451199018)(36840700001)(46966006)(40470700004)(36756003)(5660300002)(40480700001)(55016003)(36860700001)(82740400003)(2906002)(40460700003)(426003)(478600001)(2616005)(336012)(16526019)(6286002)(186003)(26005)(7696005)(7636003)(86362001)(82310400005)(356005)(83380400001)(110136005)(54906003)(70586007)(4326008)(70206006)(47076005)(1076003)(107886003)(6666004)(8676002)(316002)(41300700001)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2023 13:20:37.1108 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a675200e-6b83-4188-286f-08db02c4c6ad 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: BL02EPF000108EA.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5495 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