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 18EAD42403; Thu, 19 Jan 2023 05:59:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 454A04161A; Thu, 19 Jan 2023 05:59:02 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2069.outbound.protection.outlook.com [40.107.94.69]) by mails.dpdk.org (Postfix) with ESMTP id 87E2F42D73 for ; Thu, 19 Jan 2023 05:58:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hDxIouIGSz2XHA42/EB0K68ZXcywJEbOJ/9A+IrIDtzlqJfm2PuDZOLr/ybnOTIOsW5YIHAYi4rTb/2mm2LQiAuIKUoppAGlYP6/PfFrpjroxLQGQXTPjiH0UkWcieIfNQO0u1pLnbAZ45qHrErN7LQqODkov2t8meCUXRs9w1wyVw4oywfap7wsmks3hYnhv39rsmmuIK1EuKj1Vv0hnp846CaebK6oVYblDeMvoE59IQJTf1vN5s+mKk/RY0RZRphX+/0Xqn3g61UhG5mh7m5I59R7NFBjYgqJY6e5vSfOkx/JLsxwjhJUi+zIxDGujgOl3ZN4xANdJclbSdIyRg== 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=GeibnpBFo379Y04NLABL0XsxXpeEe9atlNgr/VjZQQ1zJViDqPHI7IcqNjDU/fLfEf2ke9k/UOz4+5DFx46FbjqGkvXR1iL7N/7aVjfuU9wcJZBaoKaiHth+45cAZWYYi1ZnzvNSP1WrLi97aJ2gV4okgjVTE4pN3JZB58km2M8VyUzGg0WsT1sk9Ixb5rG9l1X74n0FHTI5f2WUP8S4rf5vLK+1HHMq9CkV/Qh3Sn64xF7/yOY6HnDhctKMOtk29HW/bbtaH2E17DT4DY7mseQ+6kR2FcJM6lDe3uGShgI413c0LR7bLaiyEIqdnPQtdD3ye3Mdp2/PZg0tceWQtQ== 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=1ToJR9kNy3RFIPhQnSpbKbtrvt/oTKSyW0jf9lQHlgU=; b=OptgdZWzLGjuJJ40FftO3q27fTIkyov35efb06KTM+KvG2FdgMgNRHclJu8Phw1f2bsLVlx67fIR17K3dplPF8Yl5DohfnlZrQ/sf07VeDM7FniZtZu0GSWWAiIvWXStiO07QEv5/iSD4METj3a39rJyd7mrl94edcIKiBXNMuKzfs/pNbe0OQBXipVw4RQGyYhOfmCXbq6wl7zcgAoPD+WYSD4KuVThf4NO/C4E76pI39LY22dekBL3Y5BkJrCcVZ6bjD/gPlolGtElx4Bc3c08PedwCZktZThyi38fs6zvKMNzOyhemYpOkFyRtR+xbXPuyuB2Io9yp10UizSyCg== Received: from MW4PR02CA0028.namprd02.prod.outlook.com (2603:10b6:303:16d::7) by DM4PR12MB7599.namprd12.prod.outlook.com (2603:10b6:8:109::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Thu, 19 Jan 2023 04:58:57 +0000 Received: from CO1NAM11FT106.eop-nam11.prod.protection.outlook.com (2603:10b6:303:16d:cafe::c4) by MW4PR02CA0028.outlook.office365.com (2603:10b6:303:16d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Thu, 19 Jan 2023 04:58:57 +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 CO1NAM11FT106.mail.protection.outlook.com (10.13.175.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.16 via Frontend Transport; Thu, 19 Jan 2023 04:58:56 +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, 18 Jan 2023 20:58:45 -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, 18 Jan 2023 20:58:42 -0800 From: Rongwei Liu To: , , , , Aman Singh , Yuying Zhang CC: , Subject: [PATCH v2 02/11] app/testpmd: pass flex handle into matching mask Date: Thu, 19 Jan 2023 06:58:15 +0200 Message-ID: <20230119045824.665663-3-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20230119045824.665663-1-rongweil@nvidia.com> References: <20221221084000.3680015-2-rongweil@nvidia.com> <20230119045824.665663-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: CO1NAM11FT106:EE_|DM4PR12MB7599:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ff5b982-5e08-4a2d-252c-08daf9d9def1 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: tiWVFxcVqzKI0XjTwqcKDNlinO9+10VEuAC1ihTaq45Toaslb3yPDsU8Juag7cH8zKpDezS4UHKvLdoGO0oAe+p1vI0hJ/K8IjNtbHqKJYs4KTZFzbTjk85bjEmQpoKgiae+D6wYfLMK7xeIzjCIbrhZCXs+EHE3HFaULmmchMhqhmMSxPSAXF4apIa82YDgtKZdx432IgBI8pJH+0CXDHOKBzeiKcn5QRgqWd1kIYm4+3HVdKzYaEVUdF6WLEYli9/FJRJL9r9+wPkNPD47L5qcDM8G/kqkThObu8CLpM8X5cjP2T3M6n0m73IIWZfXJjAs4QdwGfV/SF9+Amic4Mcd79Zzm4xNaE3LLoY+VdHySPCUQgrBE1bw77TpcNKdj+4OzQT0nFBGZd8RxGDlKyhwwiGgCyTsdBd18YEaIcHNgbK8MPvHemj8CyF600UBZfeoT8fyvC4BSQvIteKF4eR19IGJ19J3qSN4Mv3BKAh0kWglOu0YvIiKT09WGzO+zz7YiQ34XOJ7+RRN3BB1Gzx87AIzlcDjF8t5n6nYFZDFM0U6p8x9ShHg9sYC9rSuaZxgtSgWlbw7UM90mkLQ/zX3m3qRj/EcTeDeYNDFbFe6ZsLA14yCKMn22HGTVbNhhCMreXU9IvMp/gYmmMzxfvYP7IFyb5FwyPFJiLN1PJM72goHklRWQUFmELdb2QzAyLBTM6ljINPO1RPmivGwhQ== 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)(376002)(396003)(136003)(39860400002)(346002)(451199015)(36840700001)(40470700004)(46966006)(36756003)(8936002)(8676002)(356005)(55016003)(86362001)(70586007)(478600001)(70206006)(2906002)(4326008)(107886003)(5660300002)(83380400001)(82740400003)(36860700001)(7636003)(7696005)(6666004)(316002)(40460700003)(47076005)(54906003)(110136005)(82310400005)(41300700001)(40480700001)(336012)(426003)(1076003)(2616005)(26005)(6286002)(16526019)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 04:58:56.8974 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ff5b982-5e08-4a2d-252c-08daf9d9def1 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: CO1NAM11FT106.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7599 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