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 082E3A034C; Wed, 21 Dec 2022 09:40:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5A9742D20; Wed, 21 Dec 2022 09:40:45 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2055.outbound.protection.outlook.com [40.107.101.55]) by mails.dpdk.org (Postfix) with ESMTP id F09A142D15 for ; Wed, 21 Dec 2022 09:40:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wfv8+T5pAZLaqceZmnRXtBPem6pXYBxLHbRoz8TjVwwELTWO/1R9DAXyfhQS0plK/XrDALsqWy9FMTIvgZ+Iku7iy67eSW0EfCl4rPcrE5PK7CilsjvyAt2l/+xMHOEm/gVD4ajQvYS1fVPqmZTopSpS3jdnNEp7gQUzzz6bsZjylqfyVVAmS+hxllzsQ66XR2ncq7H1YCfxg55zrg3fgFJPevY+sIlCb0CxaqICI9OwryJrGTg4YfbfOBJgqCdYSSFOtyUkNlGTXfvHJpAY/R0JC8C1AfDuM1wPaPEWTKJLc+m5e+5tCaBI5VPi06qWJKccwyYGp2nTp4j4S1gmRw== 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=izWQsvqsYbWbh/KLnvwIRfH7zG3iboKtutQbKAhufPk=; b=FD6oxzgSZr6BACxYInKRocXRlOyGrMwVzaWLv4nGFkZqAZmG2Q6IIBnp0Q9OpW3eR+5Gktcgbl8T0yXu0a3dnSnHAxue/PecQCnfVZ5kMjI1hrNdZjewvfGYQOE3wChgnaoBoWg+xBPnfO/vBOLJdXNDo2er4N/+3pQN17Vx+VVUn8XvdtK/tybqyn0dIVsL2iUP/UvKYN+z4EH52LF5iQR/LH/uS2fPCOiidVh7DbiMI+FdjBbeO+R/O7vv3TnuI4I/BLeen2TBqgTz6QO86gjjmyGMMNiyoTsFa3bwWuOjpp2b8Y8OHXyPg0t/uY8HbsVHhnbw5F1GBKH+SSuvOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=izWQsvqsYbWbh/KLnvwIRfH7zG3iboKtutQbKAhufPk=; b=MMI6UzbvXxTi/52qi5Ilk9U1Aj5jCg0NzbCf4nr8jEakyoJfPxU1Ev/eZsPgLNMOBuLdruj9py7RdtwPTPN7brePi3J9xrBdyWXozMX/gHDftzI4/3SmLPv0RLuh+RL78OOpo6s1m3io4H1wdSLfoqm0RvYW3jig9NEhxBobPepkp+b9nW8DMlpc/IzfMZvWI+PUGDYBjyxl1h+d2/am+hKgJHHzy98/S5xsQtTt3vdKurgRjOwncPdLnOtNtypQWUrT2Y3+hAWa6+ly6D6CyatWSyUaXVu533reZBnfPrBIpD0LPyRoFNS4FQlpwriSowtwJpeqO24uKKba5Hb3Iw== Received: from BL1P221CA0024.NAMP221.PROD.OUTLOOK.COM (2603:10b6:208:2c5::31) by SA0PR12MB7092.namprd12.prod.outlook.com (2603:10b6:806:2d5::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Wed, 21 Dec 2022 08:40:42 +0000 Received: from BL02EPF00010206.namprd05.prod.outlook.com (2603:10b6:208:2c5:cafe::77) by BL1P221CA0024.outlook.office365.com (2603:10b6:208:2c5::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.21 via Frontend Transport; Wed, 21 Dec 2022 08:40:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF00010206.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.8 via Frontend Transport; Wed, 21 Dec 2022 08:40:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Wed, 21 Dec 2022 00:40:25 -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; Wed, 21 Dec 2022 00:40:22 -0800 From: Rongwei Liu To: , , , , Aman Singh , Yuying Zhang CC: , Subject: [RFC 3/9] app/testpmd: pass flex handle into matching mask Date: Wed, 21 Dec 2022 10:39:54 +0200 Message-ID: <20221221084000.3680015-4-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221221084000.3680015-1-rongweil@nvidia.com> References: <20221221084000.3680015-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: 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: BL02EPF00010206:EE_|SA0PR12MB7092:EE_ X-MS-Office365-Filtering-Correlation-Id: df4951e6-3473-4ca6-a31d-08dae32f0b39 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: wP1v+ByPqocB0D8gNUNtut4Gk2Bmc/HMUYLZeqX1VEARBD/swGwMBOPuuvEWZJgbVIXGmkoAcaOfAsFVEs0r+EYmuSKAEY/19F0+gBe0GgI1U1VZTeWDGz/0jrLML/Q5JaLKVY2ahTU31I4bYeNnbOdiADo6JKGU6BBGLCX0CAaTgM7J3T19o3gFpjZrjW0SGDdqSF0jA1Dx9p7zs585oO6o6gMJFZbDxKpm+nhqPCaQD5KcftxxCg5PNXdsIHuipcv40yeWjaB6y7d+RNcInoaxGBO3QGg6jw4uw7zzKA4R4/QUwRzObeYzD6yFn/1rdRP6PbGIRQY3yaOklSENcGqOeIUxWLl0GUbR/HG0S4Xeaxbu8+SfiIFrNuAXXYb7h0s7dwAElruNR1U+MErtmUT7lJTfxx/4MMyhlr+Gqb6rRIGkX4L8H2166VbikUJgQYsCscJ36eLyKTDkWNgreDDot+gG5Ewv4WfuTu452uzQxtdfo7j5GzdJeqqUldi04TZ0+vQpK/TJMAudr96xmOpDdM1bGjzuTlLibcN5QoyaOMbc9YAKZy+SpGbJB9dE3bfF+W6xnVa2w0N20nY/Qu/+3578NLo0sgz73w31+M7F53s2t+yOejRFSw1bIUGY+Xl+zK+kYT9KA3A2O11YBe4FEkj355C+pIW+SlayA22IdLtkcIQUkcbdtJa0364rIMgvUntBjjt/FwtW/4qV8g== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199015)(36840700001)(46966006)(40470700004)(36756003)(110136005)(7636003)(55016003)(356005)(54906003)(316002)(86362001)(82310400005)(40460700003)(4326008)(8676002)(70206006)(41300700001)(83380400001)(36860700001)(40480700001)(70586007)(8936002)(107886003)(7696005)(6666004)(82740400003)(2906002)(16526019)(5660300002)(426003)(478600001)(2616005)(336012)(1076003)(47076005)(6286002)(26005)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2022 08:40:41.5766 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df4951e6-3473-4ca6-a31d-08dae32f0b39 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00010206.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7092 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 --- 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