From patchwork Wed Sep 25 18:05:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 144433 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4238C45A2C; Wed, 25 Sep 2024 20:06:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85D7E4025D; Wed, 25 Sep 2024 20:06:22 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060.outbound.protection.outlook.com [40.107.92.60]) by mails.dpdk.org (Postfix) with ESMTP id 2F553400EF for ; Wed, 25 Sep 2024 20:06:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h+WZjbeyxyfkzo8nqGR5oLQ1W0FceNX7X+R8NH2PkeOy/7RvFc0cLfuTW1e6ZNc2BdaDTKZd6J1blXQuyE8YYLJBArFpEshLHHt/ozQ940uBEV2ObK4g3FeEIKrMUwU0H0NlUilJfgo7SF4vZPFsKhHyXgAmRj8kvX4ZJVYgr3bMsmMXO6WGHumC4UdVs8S3GxhiQ0UDapyiuXGNMuQa0SFV54xBwHnAWPC/eftZCub8p8h0LbhfWdBaPvuY9fUokodfnPCGtn6L35oXNdSzj++NBvEAJDYTDnzYvxabz4EGOraj32RKum8TNKupLKm8Br6hJzJzjWZuVxIdoRpUwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=cjV8j+b4r3lmSrCn4B3aPckj2q9FObfQMcrC3yPhKUc=; b=uM2lPWuVRfg3qNbvz2km7V3R8eEXXtuGqfQSuPueO0WAqi5rlF8jDDELq2x81WGX3mifiHpv28Y3Ew0C8rUE0co2rZ6CLOs+6iGphxTa886/u9wQ5h/HNOYSDpRzol9KRsTGyHae459/6q4qqZk/qbAkRYdVnxh5F0lCGxpuE91zZSX5xa3jChMrLC0Vvn0uWpY8qyRmuLeaH/WRQOYWXMP/91Som6b2r0bWQZ6rp3FCclOk6iNfdHh5vq4jvjDZX0UlRjm5613OGnPxMiPZ8GVxsfoyWbRC9B95hO4x2LGDPYqPyFsZbCFaXWH/p8HASbAXK0fiHjG27wJJ6RB0JQ== 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 (0) 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=cjV8j+b4r3lmSrCn4B3aPckj2q9FObfQMcrC3yPhKUc=; b=hYA9XtXhhHDGJk5ORNWTyjd++1f6wiZbAsjFL4dUSQnYXBXRC/J3cWWIyMw7lJjMnv+ntvNQaP7YAWCETrT1mOwwxOj5W+vIhZHucNBUiLoY2xujR3bQPsxhlChBhgMctghzr7clU5E6zYiibPVEKH1xzxI4osDzhCTW2UcfiLrxlJjrlBkUCrqndTOxUB3ee676NgKqY6a9j4xv0H3LDih3cQa6q1oXPUxvmt3EloEzCLzs+5QNwFhkFtCpFJZMZVWwKu5xrnIVQ7TErBX3t5p+ySVN0dIqSzVylg7+60ppU2BXG8k5CRcoKCer2g32A8uuv9hS3+eMDZ6IV6VXCw== Received: from PH2PEPF00003851.namprd17.prod.outlook.com (2603:10b6:518:1::76) by MN0PR12MB5882.namprd12.prod.outlook.com (2603:10b6:208:37a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.28; Wed, 25 Sep 2024 18:06:14 +0000 Received: from SN1PEPF0002529E.namprd05.prod.outlook.com (2a01:111:f403:f90e::4) by PH2PEPF00003851.outlook.office365.com (2603:1036:903:48::3) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24 via Frontend Transport; Wed, 25 Sep 2024 18:06:14 +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 SN1PEPF0002529E.mail.protection.outlook.com (10.167.242.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:13 +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.1544.4; Wed, 25 Sep 2024 11:05:53 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) 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.1544.4; Wed, 25 Sep 2024 11:05:51 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 1/7] ethdev: add insertion by index with pattern Date: Wed, 25 Sep 2024 21:05:26 +0300 Message-ID: <20240925180532.3958656-2-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002529E:EE_|MN0PR12MB5882:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b48aadf-c379-4c5b-61c0-08dcdd8cbe62 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; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: pjinCMdj4fXjK42mL+G74UVPWiOcZep27QpOgSJT7FjYR/LP1UxT4Avox4r9UW3pbBF25Ayh2PJSuketmuyMHe2GhTg11eHsQcc7DrCQqYn+cziuHaViV1h9tAf9Y1bZ62B61cmvSqch3E3ddLKouwHP9t0sJnj6JrvfbxpQUgfAH+KHbISLwFvE/+TgLHgy9SjvXX8PWDot1lJ+QnNZaE1fFOKCUVDy4s0TfF96iBTHh8ViM1aMoKlloVD6MUdyvGEc5c+wunQlDk2VR3T8VNlp2K4gk2QNoEVsEQ4E0YguyKSNLiCfYwBSAaOmhe9woaSbkxY9vAvk+3HEIWGi/WbXLuTLYRoCN5Yr4lOKCUo0Sp926TPfFB4V7n9zk2i1RSlwgTWTauxtkXVyBalreT92OoWMxNgM9YN8Y0wBek+mVrvZyAR+CuXmoHa6r2qfq1Izi2KIUhjtk/gKjSbdXW0zpv4IYxf/EarknebO1PvZdGfixuMT+72OD2Sd3AI3B2KXwajCeAUVr8PDs19x4CO7ctJrJjfAmVGHnBnMX7UoBQYJmnJesr6lTPo5gZlOEEFiiJJddsEG6eC+KRKxYMQbjksbaEQmLR+gfjoYQkrX47nSILXOysJ7kBLcNMaTN6ZAMJ6RvLuDa9vqz5wEPjXMSAzdpscAeNvs6w6VbqJMhiYA7R/YaJhP5rpu2B5o2yZYr2LzdIpt1DNNElfxecBZjRnmIRYi17RGqoRlH1NC0W5BS+belpr71a6LT+K8TEfnCp8sIYL59fGe3agFrATaiNDqvZdbHZvPtR3+P8ANwGItxwRkOoT2p6XlcUEpfadeterTFa1z5dzqi6+j4M6d/Oq6n26gJ4+dS5QGj8RI24B+P8LJOivyKXQdocR7nKCNV9x/F0Cp6Gt9DhySN8fgmPLgwwO4Rji+q7JBdsBChF93Scg8QXE4tCgXTMs2JKl1TGMhgEPx1KSjEiLheDHrZvhsIIeAxcFtf47hHWhWx8q1OTCrUCfaP7qeuywz9J0w5BJAMIjNO8I2nMcyeOYkpmJL2kz3r4aVW83HONebKVydJpBbqWlD8jTyodPtn2l61dSV0FdABsej5X5WJyTAKAaDHM1GhJ5t/3eN50s1q4+ZAZ5Akhqwsorznkh+zoz6ImhmrljBM3gY7Vfntc3Z6AH4hJDtyWABcG5iJY7TUXV1hJYnheFGtZpsNZHTHaD3Wh0aJp2EXcHc5XUErEGwsTxY4N3w91H6InwKl7EdUvKks66kYMWkWZbF+0UqsP2zpi94Opp+m6ljTAlK05k8QOALS+6mTAnDPa8klkN/WK1W/vZIuDxchuor9GrfUzcYCXFbqo7I7rUr50WZrfX9fHZ8gvirdXkM27zMsKsruzU5AeoH4pP749UVzhF2 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:(13230040)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:13.7796 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b48aadf-c379-4c5b-61c0-08dcdd8cbe62 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: SN1PEPF0002529E.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5882 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 There are two flow table rules insertion type today: pattern-based insertion when packets match on the pattern and index-based insertion when packets always hit at the index. We need another mode that allows to match on the pattern at the index: insertion by index with pattern. Signed-off-by: Alexander Kozyrev Acked-by: Ori Kam --- doc/guides/rel_notes/release_24_11.rst | 4 ++++ lib/ethdev/rte_flow.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index ef0124a9e6..8d311aead2 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -55,6 +55,10 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added a new insertion by index with pattern table insertion type.** + + Extended rte_flow_table_insertion_type enum with new + RTE_FLOW_TABLE_INSERTION_TYPE_INDEX_WITH_PATTERN type. Removed Items ------------- diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index f864578f80..6f30dd7ae9 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -5898,6 +5898,10 @@ enum rte_flow_table_insertion_type { * Index-based insertion. */ RTE_FLOW_TABLE_INSERTION_TYPE_INDEX, + /** + * Index-based insertion with pattern. + */ + RTE_FLOW_TABLE_INSERTION_TYPE_INDEX_WITH_PATTERN, }; /** From patchwork Wed Sep 25 18:05:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 144434 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8247A45A2C; Wed, 25 Sep 2024 20:06:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F22ED4042C; Wed, 25 Sep 2024 20:06:23 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2054.outbound.protection.outlook.com [40.107.237.54]) by mails.dpdk.org (Postfix) with ESMTP id 4C75A402D5 for ; Wed, 25 Sep 2024 20:06:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nAYrVNX9swZ71P70HVb7v2HkKMQKhaMfTGElD8qR6kdtqcFC2YHEYFzQGkc4xJFzYZbfTpyozO2hj2k7zrsKuuPUACMZPC2nc4W/yelVDA0EEVd+lefXa8aM8Cwu2mD5tRTbegGef+VZ+stn0+fyJdC4JAEN2NoUwoYLGmeC6ICO7OU1BQzzp/3JfzP8eAgLe70DypjOJUlX7hn9gdbFMdtLr+UFSGdFcAox0QiiVTUNBhnW5WpBCBgJ4BQyiTB/kTbJDK2ByTj7+Lg+/Td/TmR1YZuvgGAsCIjG5vkrmyDee/HeBWtQRniSIC1WQOSNxCNhX3CXpuwzL3Rtd4YhpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ODQwjjCDyu+c2NGYnIZXj1q4kNGH8Qygy95kZBiiA4I=; b=ff14tX2qeKwYZIXpLyhVrapjI/BXZhbRRvXMWUOWoL3hW6csLl8GzeOAg/rgLUxWmaHLoDeZhBXgjPQ3UhFlbz4ZduTiWsQq9h0rVi+wFfCUvV+wYRQqTSXlijR5WNiJyo4ZnillTInPiZ6Gsbm3zPh6nmDg+/dY2QvRTDa0N+qHKY8nG8j8RIm7RMDd7y2JngDe8UAe5JTOqZMaf48csnruLn1wDkl1gt/iF7+xph8WD/krkVYfRta3huGWeq4uu/8hcoOE0dU36wsl3DMCtpvH7uqYAQ/uQSdEIGa6dFR8injwmUsJW+3h/2/WsbDx2MQHdXysRV6XlgbGAqXGfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=ODQwjjCDyu+c2NGYnIZXj1q4kNGH8Qygy95kZBiiA4I=; b=Nk8TatNTkm2s0HkyzlLi+iFqiGx237cYokZwjiAPYMUmGnB/B3ZuXxdSt57FxcIykh4yCRsiLH3OPnADEpraSWpS47zKYWDPd+HCyabnU87a1crSImZGdYjiiOl9SPNumvDazflJlIj/bQhVNmAIa3GVwTYmBZAQs4z40FgMUOpMXa5Ups9TDFIZpbhririmsQvgxtr+Df2FmEwDXaKz40m4n5xqGlbbBnl2NLAFoMTMq9Wtu1UM5wk3BN0T8XAbHDfxivkdNSiX6DavIpMIAtnfGd5Jg4YOR55MCeTA7ig6Xb5YeNCfGt6HHLNJm8j2erL+j4P/iJk4LbvVrJJN7A== Received: from MW4PR03CA0290.namprd03.prod.outlook.com (2603:10b6:303:b5::25) by BY5PR12MB4051.namprd12.prod.outlook.com (2603:10b6:a03:20c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Wed, 25 Sep 2024 18:06:12 +0000 Received: from CO1PEPF000075F3.namprd03.prod.outlook.com (2603:10b6:303:b5:cafe::9d) by MW4PR03CA0290.outlook.office365.com (2603:10b6:303:b5::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27 via Frontend Transport; Wed, 25 Sep 2024 18:06:12 +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 CO1PEPF000075F3.mail.protection.outlook.com (10.167.249.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:12 +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.1544.4; Wed, 25 Sep 2024 11:05:55 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) 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.1544.4; Wed, 25 Sep 2024 11:05:53 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 2/7] app/testpmd: add index with pattern insertion type Date: Wed, 25 Sep 2024 21:05:27 +0300 Message-ID: <20240925180532.3958656-3-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075F3:EE_|BY5PR12MB4051:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c6148d5-fae9-46f1-bf49-08dcdd8cbd5e 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; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: X3SbqxtqG1T1iJn0Q3Ee/65EtHGoaDugviYyYxk1OeSGIg/Np+hSPifsjJhmY9Kd1jd0my0zQwn9MtTqzTHBk7ECasPTjc/d9obQoNPMKa3HgOLEsFDpE53LcqRfBVF0w6CyafLMaLUkrKzxSOc3fkPQm4jnJmWm3csEWE6WXdCPP66JFeCi6ml94rGICBNytZEZ+RUECPfl0xqDw4ycrGQVduCBOxgiYUfDcFv+Q0WBQeThaawAA8N1yFTO/kJp/NSWRVvidCQ9K3vJiTItNGIRA4LDKX55XpivmBdizs3jPYLC7hnX4drHw7mQwj9uC/7oQXGNLE3uYQBAgyMn5Qejms0v/QYovYLj00rUjbyfgnxz/aoG2sEbyzsnAZpy5+THR+I2OgooU8lyujQ+89PBTHpo3r3E1sRQooP2p12Byfg+o4aQGqTmdlQWt+DZBu07aMvGqIA/PuxmOzLAF+cHhBuHDkQqC/RHA7gp9RQiels85YO2HG5sFYgngt3aaUpcj/iYWjTHEWHwRUTLmxXUzA5mUGDsDpooyPoNxPqEpzUYmrcF5cqEsPechKgRuyheLoZyZKDwhG2t9PhTlGH/G8i5g2/LMNboiZAmdq414WrG2QIh0lAUQplW8oh43CzC3d7z8PjLXTYDbic3E9oGPc3u3Fu0wq9L5LBfwMbyUpqpvG7fLGXHu5cLEsMpGWtXN1hUsZhVcer9k37EPDvQ4OP554QZYCgvpMHghQe3odwhQ922h1lBp2o2C7fclhOcCEwBiP7f5y5hvt1+BVBt/+ILSyX9Nv1Q9Yvu+l5Jf/Ocyl9L5BRxFfa0wZTUfMTDBfjgpETUdgi/Xyk/TczrmRygbUWb/kCYkl35B6fl4siPVaS8pjAcMKizzxHgw2h/Orn58RYgzmd/ViMeB9Uvi9lHOSyVywx2nNcpOLjMoMWEyLpL/ip2hiaPsl6H6B/YZHeX4sqod0FXEA977tKRE2BaDaiMpt16oICIXSSX3AHEHIV7DJp/yHQ87FA9V2mI/MLNG4ZZapaFJ1OO0eRfdE+nYLCdm/lWTJd2enbBbDNmWT7E9E4gYK0dE/n/2Bbnng8XNjY9o/0Tsi/HC5+iv71316u4fPOFEDonFdZOrSuog+97xuKOpodvpGE1RetKOtD2bcb+yXQs0c47NKa19RgfUoGhzpy5PZQIKezKb1vOY+NHG9G8fDMJoi475xtmyEbjqrISCIern7ky4lMZ+4oTm8QiUI4jTXC48kd80T1iIUhn8wTpK6JHlAas63GgrC3pdWPgaXy3CdonyWZ5sl2i1rI09qErPelszwQN++4CjnRBcV1JL8LVZlsaPqMhxQYhhIP3D/YcH8QITp6dKIj3+wkZ40zB2jCbYI6gmENfrx770fA1CoCrpwXYUDs6tYz6OHGv2qeFNq5RBjHFdAQJjXoJIyTa2QJFgPIRxQPCfE1jCT9jBY1ojg8P 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:(13230040)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:12.1249 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6c6148d5-fae9-46f1-bf49-08dcdd8cbd5e 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: CO1PEPF000075F3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4051 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 Provide index_with_pattern command line option for the template table insertion type. flow template_table 0 create table_id 2 group 13 priority 0 insertion_type index_with_pattern ingress rules_number 64 pattern_template 2 actions_template 2 Signed-off-by: Alexander Kozyrev Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 858f4077bd..b048821e85 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -1029,7 +1029,7 @@ static const char *const meter_colors[] = { }; static const char *const table_insertion_types[] = { - "pattern", "index", NULL + "pattern", "index", "index_with_pattern", NULL }; static const char *const table_hash_funcs[] = { From patchwork Wed Sep 25 18:05:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 144436 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB60F45A2C; Wed, 25 Sep 2024 20:06:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC0E740651; Wed, 25 Sep 2024 20:06:26 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2044.outbound.protection.outlook.com [40.107.243.44]) by mails.dpdk.org (Postfix) with ESMTP id 6235E402D5 for ; Wed, 25 Sep 2024 20:06:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d8CqkMPTK8yS+S4TSTkgI8g7bAkDvHdk+Ld1gCmliyD5HMX1g6hvBTnwpp9bq/5wjY4O7o+3SJrsxPxnyLd9J4YbjF3o7pdlnR5+hQcaHq85T+TPRKXRuOFsSracEWWPEbbP4Uk7toDoTeTqIsRYtJYuFo/6xq1WQYC9vU7EMuXybrOfVjTIMzm0wBVmPEEYp1LguvZIhg9ACwe4kXjjXbjjm0wN/3/5ildaMHR2XeCxnGHe3o7AfEsXZ/RVk/T93/g8DcgruRKPeA9VOiYVJQeOJV+1Z2Dzv4I+EcqJikfDNUV+woJN7T0CcqJ71u2pOVXvOTDtABQIhCzAyRLBGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nI0xERp4yNtvgflKafsLoFz/vULT9tacI4LjZmCkYDk=; b=qoGEY+Jg8gxF6Gf3HVYsDi8aD/qc9M/A4hywjsO7w5OvgXd465TTVWoNtNtbKypRLceBCJZwLcrjrU4M5U71g1jn3HGjiT7ZfcNBDd0oF/pxW/MjLdMXNWeWH6JSc9j9w+RgysCx1FE07vF1U3ah3l3iVx+nIE3ExmTewvS6FPefKooWqbVMY+H2eLlbNtO5KtFkJJiqwqdSkQXWjo/PfKYA6tTISsDzOtvY34v4rjarq4v2kGhDcCH7UinJTZQG8GF6O2xaac+GxUbRuSrP6UV09CetNmFgdHAH2xEBzFx3V7WdukpBi5tZ1ZAktDgbdm0gROqjpd0C0XJDuQEP0Q== 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 (0) 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=nI0xERp4yNtvgflKafsLoFz/vULT9tacI4LjZmCkYDk=; b=KHdbckmW1CqRF93CK/rjxutn9qDYLmhjaYuvxTulfM3kSCY0InCRk5D0dGJ5lGSs6nIZZM+3Zyzh2YT1nWASNhkTA43gRaU8ejD9E0JCWQOah+LXIXq+M8ncofSCUcMjWS3saTeNgsa7d91U9HH9Ahb6VBKqnjETQYoxIHI/7n8p2dBrvOYQ+GiJo88Xez5ZH7Ii173GqrB/QH5lMrFkHs8mKo/J1JCLvN8PD/IoHoU63iwFP6FHyeEjUHCaYbv1QV6TChF1lMZ3K/p2pL8aE0aWNT3AHm0eNA+2CuSYfJrnb9kqyQUsaZyIaFe+NIi3iGzLdRqhvgu42G2up+JWuQ== Received: from PH7P221CA0079.NAMP221.PROD.OUTLOOK.COM (2603:10b6:510:328::14) by SN7PR12MB8002.namprd12.prod.outlook.com (2603:10b6:806:34b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Wed, 25 Sep 2024 18:06:17 +0000 Received: from SN1PEPF000252A0.namprd05.prod.outlook.com (2603:10b6:510:328:cafe::80) by PH7P221CA0079.outlook.office365.com (2603:10b6:510:328::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.17 via Frontend Transport; Wed, 25 Sep 2024 18:06:16 +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 SN1PEPF000252A0.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:16 +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.1544.4; Wed, 25 Sep 2024 11:05:58 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) 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.1544.4; Wed, 25 Sep 2024 11:05:55 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 3/7] ethdev: add flow rule insertion by index with pattern Date: Wed, 25 Sep 2024 21:05:28 +0300 Message-ID: <20240925180532.3958656-4-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF000252A0:EE_|SN7PR12MB8002:EE_ X-MS-Office365-Filtering-Correlation-Id: d9c0d71a-83d5-40b5-6a8b-08dcdd8cbfec 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; ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: icbb8zSX4L98UXWnQzyjQXDzlkHpNVExAPjBO7j6HvdFPALJmCEEMSxIqVZcqf7zTJ0LfeO1y4v+Rb8H4Q8B0YHnmUAAAvf1TyJ5m112agE04KX+g0eMCmsUGvVhiIUfO6pPxgeY6raizNYiv0rQsx9qbK5/wLf3TUcW9TKkDbvYT/PIllmxi00oQ/KyCIgH9ndi77Umpe0AkUkvHAR9Yssu5IGQXArgybRWXXc2I1ytpVqAYBPWgXW4TiRP7cC9CMqL8i/dVBrayBNiGEEfTgiy4r6wVb0D5cfrAd/r512mhnUu0m0NxO5uIJgOMbDlbT9TTPRQyOdELhel1w0W+N1OJkaJTk/UaKbEWC9DDeRqNWShnowiE8+gQspoEh5IooprmcNN0uD7HKss3L7nbVFo562ldo+CTTTNvJ14BZ6tpnPncio4XM8/YST6TWflQ/TZ8ZA6HQGwAo7aJr8yoMn5u58tP7yBjh7Th+1mY8X35yf8DVXrFIWKBsIckIAal8Zl0HqN4wXzm+MHpmG/uTA7tzam3QXDDb0afWnFXgx/1Itc2h0c+6em1yGD5ORazkG1HXaWrKA+ZEPRsR+qkfbkfjjybhlm+QfWiTKZ9OvFXohWfV2RGqqO84pLrs9nqk6Dv7ihzLn3lsJKs2KYqrzDQgE1ZD5Pgg5teFcrnInckKyeWzCczWJtuQ3Abn/99dYd98mvYl80y0De9Uh+bBWb4dMkFV6tNo9fLyUo+dlR352tcUPLilRffYIvdLexz+VjKjRAZv2PjEqMrfPa9del2SDnl8DzWwVV4deS6wAuYmbay+UxwTVJdviIcIGqVHTvDH/9b+4eT6sbuOpe2PPAFy+Z1MLGmuPtt4CykYIpGqfYmYUHKDr+Lf/BLbLNpBpIaOrGEvYLSxnimmZHRXTEM2YXQvZYFGKLwSVXUVHYa6DcB2bnt+FZuXxATIQnBb1rgNq4PxSUsBU1XBtq7A0bGeWQPT16sfWMzUQTQJ5KO8F1/9U2gn65xLkxHDpgnd+isEVS3qJt1duvTIfjHpCMVgeJO3rNb/TSeQ6OjSUhyZuy3tJs+Jk0RQGMX91YfqbiDqjcMW7Ho8+8KugCNeJ4TmnwJa/U12IjavhsfQ6HFjHMXXf1pHiKdjBINBjB8U95BslAP/5jw/U+gsDxo5IlqWD68syok5uLjuZ9nJusbheVlWEnQ75X4gCyXD95GgIOCET3dWtav7mAr6VS0d3CHvi8g5WF6Np76mXpuV8v1T6Ta9iJOMlMYPHc3vJhSMPWJaZmXyNgAFlQwnsLNvMMY5bhZQ6NgfsWhQymVmkhq2z6kT3vlmbCmgeqVIL4sYuVIbsoBvJsiWRnG5ZXghSqz5Dk4n3ec1nDluAS3jBCZrn30xmC49UC3MF10VmdtHXrwwXr4U+hWN9QV++XjZSr7SCUHCiQJr5xAcrP+cpvEeHkAKzGspSL187Cezmw 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:(13230040)(36860700013)(1800799024)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:16.3463 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9c0d71a-83d5-40b5-6a8b-08dcdd8cbfec 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: SN1PEPF000252A0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8002 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 Add a new API to enqueue flow rule creation by index with pattern. The new template table rules insertion type, index-based insertion with pattern, requires a new flow rule creation function with both rule index and pattern provided. Packets will match on the provided pattern at the provided index. Signed-off-by: Alexander Kozyrev Acked-by: Ori Kam --- doc/guides/prog_guide/rte_flow.rst | 20 ++++++++++ doc/guides/rel_notes/release_24_11.rst | 5 +++ lib/ethdev/rte_flow.c | 55 ++++++++++++++++++++++++++ lib/ethdev/rte_flow.h | 54 +++++++++++++++++++++++++ lib/ethdev/rte_flow_driver.h | 14 +++++++ lib/ethdev/version.map | 1 + 6 files changed, 149 insertions(+) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index dad588763f..adbd9b1c20 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -4156,6 +4156,26 @@ Enqueueing a flow rule creation operation to insert a rule at a table index. A valid handle in case of success is returned. It must be destroyed later by calling ``rte_flow_async_destroy()`` even if the rule is rejected by HW. +Enqueue creation by index with pattern +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Enqueueing a flow rule creation operation to insert a rule at a table index with pattern. + +.. code-block:: c + + struct rte_flow * + rte_flow_async_create_by_index_with_pattern(uint16_t port_id, + uint32_t queue_id, + const struct rte_flow_op_attr *op_attr, + struct rte_flow_template_table *template_table, + uint32_t rule_index, + const struct rte_flow_item pattern[], + uint8_t pattern_template_index, + const struct rte_flow_action actions[], + uint8_t actions_template_index, + void *user_data, + struct rte_flow_error *error); + Enqueue destruction operation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index 8d311aead2..fd461128ee 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -60,6 +60,11 @@ New Features Extended rte_flow_table_insertion_type enum with new RTE_FLOW_TABLE_INSERTION_TYPE_INDEX_WITH_PATTERN type. +* **Added flow rule insertion by index with pattern to the Flow API.** + + Added API for inserting the rule by index with pattern. + Introduced rte_flow_async_create_by_index_with_pattern() function. + Removed Items ------------- diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index 4076ae4ee1..f6259343e8 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -2109,6 +2109,42 @@ rte_flow_async_create_by_index(uint16_t port_id, user_data, error); } +struct rte_flow * +rte_flow_async_create_by_index_with_pattern(uint16_t port_id, + uint32_t queue_id, + const struct rte_flow_op_attr *op_attr, + struct rte_flow_template_table *template_table, + uint32_t rule_index, + const struct rte_flow_item pattern[], + uint8_t pattern_template_index, + const struct rte_flow_action actions[], + uint8_t actions_template_index, + void *user_data, + struct rte_flow_error *error) +{ + struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + +#ifdef RTE_FLOW_DEBUG + if (!rte_eth_dev_is_valid_port(port_id)) { + rte_flow_error_set(error, ENODEV, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, + rte_strerror(ENODEV)); + return NULL; + } + if (dev->flow_fp_ops == NULL || + dev->flow_fp_ops->async_create_by_index_with_pattern == NULL) { + rte_flow_error_set(error, ENOSYS, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, + rte_strerror(ENOSYS)); + return NULL; + } +#endif + + return dev->flow_fp_ops->async_create_by_index_with_pattern(dev, queue_id, op_attr, + template_table, rule_index, + pattern, pattern_template_index, + actions, actions_template_index, + user_data, error); +} + int rte_flow_async_destroy(uint16_t port_id, uint32_t queue_id, @@ -2733,6 +2769,24 @@ rte_flow_dummy_async_create_by_index(struct rte_eth_dev *dev __rte_unused, return NULL; } +static struct rte_flow * +rte_flow_dummy_async_create_by_index_with_pattern(struct rte_eth_dev *dev __rte_unused, + uint32_t queue __rte_unused, + const struct rte_flow_op_attr *attr __rte_unused, + struct rte_flow_template_table *table __rte_unused, + uint32_t rule_index __rte_unused, + const struct rte_flow_item items[] __rte_unused, + uint8_t pattern_template_index __rte_unused, + const struct rte_flow_action actions[] __rte_unused, + uint8_t action_template_index __rte_unused, + void *user_data __rte_unused, + struct rte_flow_error *error) +{ + rte_flow_error_set(error, ENOSYS, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, + rte_strerror(ENOSYS)); + return NULL; +} + static int rte_flow_dummy_async_actions_update(struct rte_eth_dev *dev __rte_unused, uint32_t queue_id __rte_unused, @@ -2899,6 +2953,7 @@ struct rte_flow_fp_ops rte_flow_fp_default_ops = { .async_create = rte_flow_dummy_async_create, .async_create_by_index = rte_flow_dummy_async_create_by_index, .async_actions_update = rte_flow_dummy_async_actions_update, + .async_create_by_index_with_pattern = rte_flow_dummy_async_create_by_index_with_pattern, .async_destroy = rte_flow_dummy_async_destroy, .push = rte_flow_dummy_push, .pull = rte_flow_dummy_pull, diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index 6f30dd7ae9..84473241fb 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -6187,6 +6187,60 @@ rte_flow_async_create_by_index(uint16_t port_id, void *user_data, struct rte_flow_error *error); +/** + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. + * + * Enqueue rule creation by index with pattern operation. + * Packets are only matched if there is a rule inserted at the index. + * + * @param port_id + * Port identifier of Ethernet device. + * @param queue_id + * Flow queue used to insert the rule. + * @param[in] op_attr + * Rule creation operation attributes. + * @param[in] template_table + * Template table to select templates from. + * @param[in] rule_index + * Rule index in the table. + * Inserting a rule to already occupied index results in undefined behavior. + * @param[in] pattern + * List of pattern items to be used. + * The list order should match the order in the pattern template. + * The spec is the only relevant member of the item that is being used. + * @param[in] pattern_template_index + * Pattern template index in the table. + * @param[in] actions + * List of actions to be used. + * The list order should match the order in the actions template. + * @param[in] actions_template_index + * Actions template index in the table. + * @param[in] user_data + * The user data that will be returned on the completion events. + * @param[out] error + * Perform verbose error reporting if not NULL. + * PMDs initialize this structure in case of error only. + * + * @return + * Handle on success, NULL otherwise and rte_errno is set. + * The rule handle doesn't mean that the rule has been populated. + * Only completion result indicates that if there was success or failure. + */ +__rte_experimental +struct rte_flow * +rte_flow_async_create_by_index_with_pattern(uint16_t port_id, + uint32_t queue_id, + const struct rte_flow_op_attr *op_attr, + struct rte_flow_template_table *template_table, + uint32_t rule_index, + const struct rte_flow_item pattern[], + uint8_t pattern_template_index, + const struct rte_flow_action actions[], + uint8_t actions_template_index, + void *user_data, + struct rte_flow_error *error); + /** * @warning * @b EXPERIMENTAL: this API may change without prior notice. diff --git a/lib/ethdev/rte_flow_driver.h b/lib/ethdev/rte_flow_driver.h index 506d1262ab..e00a5d7f7e 100644 --- a/lib/ethdev/rte_flow_driver.h +++ b/lib/ethdev/rte_flow_driver.h @@ -319,6 +319,19 @@ typedef struct rte_flow *(*rte_flow_async_create_by_index_t)(struct rte_eth_dev void *user_data, struct rte_flow_error *error); +/** @internal Enqueue rule creation by index with pattern operation. */ +typedef struct rte_flow *(*rte_flow_async_create_by_index_with_pattern_t)(struct rte_eth_dev *dev, + uint32_t queue, + const struct rte_flow_op_attr *attr, + struct rte_flow_template_table *table, + uint32_t rule_index, + const struct rte_flow_item *items, + uint8_t pattern_template_index, + const struct rte_flow_action *actions, + uint8_t action_template_index, + void *user_data, + struct rte_flow_error *error); + /** @internal Enqueue rule update operation. */ typedef int (*rte_flow_async_actions_update_t)(struct rte_eth_dev *dev, uint32_t queue_id, @@ -436,6 +449,7 @@ struct __rte_cache_aligned rte_flow_fp_ops { rte_flow_async_create_t async_create; rte_flow_async_create_by_index_t async_create_by_index; rte_flow_async_actions_update_t async_actions_update; + rte_flow_async_create_by_index_with_pattern_t async_create_by_index_with_pattern; rte_flow_async_destroy_t async_destroy; rte_flow_push_t push; rte_flow_pull_t pull; diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map index f6aca95069..37cc18c139 100644 --- a/lib/ethdev/version.map +++ b/lib/ethdev/version.map @@ -330,6 +330,7 @@ EXPERIMENTAL { __rte_ethdev_trace_rx_burst_nonempty; __rte_eth_trace_call_rx_callbacks_empty; __rte_eth_trace_call_rx_callbacks_nonempty; + rte_flow_async_create_by_index_with_pattern; }; INTERNAL { From patchwork Wed Sep 25 18:05:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 144435 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A0C945A2C; Wed, 25 Sep 2024 20:06:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25E3D4060F; Wed, 25 Sep 2024 20:06:25 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2067.outbound.protection.outlook.com [40.107.92.67]) by mails.dpdk.org (Postfix) with ESMTP id 97ADF402D8 for ; Wed, 25 Sep 2024 20:06:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=T0h5ENwjYwsC4gMPnKthP7OoLKm1frmGX1D1nMbpeJJbNvQDEdA3cVZyxnImQkmXvDqXuXg/F1mMdTjqKM16p/mo3fZXvB9MPcC9DOl0ILcIYjANbvAq0VH1kmc/C24s1e3WkzACGP+GI8VdluGOBM/AY8t++UDwbCcb+bpkkZryDDLO0p35k3pHpfUps/bKwk6o/Swmn3rAX0ckDydUsUWgrktENJBux32Y5tDNKKGVWR3bXECNsU3Uy0hrN85G7HldSFwaOZyVBeshd253tM9AJNqPUh7fMT0o+lXei2jbl4ueMa1vgvXaCc8Hlkulrn93ubi5twPlS/aciGD0Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=8ykIRkPCQZynXdU0U1+pMQT4Ypdtt2oMvMkCLoGWZbc=; b=UK9pHhACia2PVgUAagA9Rq+852ukzsLUfCjnjEOGO4btwMRqZzT4AuInOv+y7yiGnbZNN2VRlCJptjA6cuQhAdL3A3oh0FTrXacEt+a+kA6McDs6126leUKQHR+7kz3UBdc59ZRXqMkgOb1NE/pRYgAuKUe4HNGozc6aS9c7YnkDOIzPHeswTpNAZN5WS3ECBxZoDBWs0+8If6UN4wqOuH+W0mNG82nODit5TaPDmNNFe3q1CUt6N2xcRlbYM5ZggN1Uw87o1GyPpREgX+0AJRgvEUblseVPd4+FThZGOXvB4SIOxHEnhbkoNo1ZsuVtGgqhaNUPSw5HTiUHu4J3Kg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=8ykIRkPCQZynXdU0U1+pMQT4Ypdtt2oMvMkCLoGWZbc=; b=g74aquHTcL6cFnOIpcXg2wlx16/tHHLCOyc/hw7hNTss6jVJRlE0MteVjw2RdDcHQij4YaYODiHPuw3I5wAQp0V6uhlaGyrunrfwLelfa+WXRFQftzF9U2oQCfAPEt6IVpAWvHp6zhPcXRdODonzZYgET9NdsXpBXyTxQlcPLP4IkduLYW+HgDZGEBomHE1yHrgc4Q0YcoYd6rxdzy4zJIZAQsiU1MHKIqmSz6R+qpdZmcW5HIkVv/PTtVaTUycmYEDfJbzKErTish0ferESbsYDc6D4+BcqAsOQhoozq0Azmp0kO1a521ZYUPGakKmAns3Ptj1lImg4WLunf5MxVQ== Received: from BYAPR02CA0044.namprd02.prod.outlook.com (2603:10b6:a03:54::21) by SA1PR12MB8697.namprd12.prod.outlook.com (2603:10b6:806:385::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.28; Wed, 25 Sep 2024 18:06:17 +0000 Received: from CO1PEPF000075F4.namprd03.prod.outlook.com (2603:10b6:a03:54:cafe::fd) by BYAPR02CA0044.outlook.office365.com (2603:10b6:a03:54::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.17 via Frontend Transport; Wed, 25 Sep 2024 18:06:17 +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 CO1PEPF000075F4.mail.protection.outlook.com (10.167.249.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:16 +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.1544.4; Wed, 25 Sep 2024 11:06:00 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) 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.1544.4; Wed, 25 Sep 2024 11:05:58 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 4/7] app/testpmd: add insertion by index with pattern option Date: Wed, 25 Sep 2024 21:05:29 +0300 Message-ID: <20240925180532.3958656-5-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075F4:EE_|SA1PR12MB8697:EE_ X-MS-Office365-Filtering-Correlation-Id: 26755a83-e1f8-4b13-e30d-08dcdd8cc010 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; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: 5PrhzKad37xoT9NCizGexmOzfCcCOTCuq4skuuwykAJfTfG1umP+GRTVLhBW9x8KzQOuL9/HvCs8EVaQiMUwTE4hRbCxVvTrkk1FzpXyvqV9BmRN49aBLj+W+s7VMh6HIIZ4Hq0tSXlJE9jewnSQ67qKPmNZrr34crJQ9mbqKbFWgC1UPkWEn5yOHBELtXwqt6kIG5w6zoq31FtXv4PXrDQBLz/JnT34OdVvaDnhOnC+zWNW2mg3dy4Kuli9ImPpiNtWZZV9Eq1+26vNNAcmkeHRFhN826FGFsgxyi9O/NKnHNCpSYGq7d4xtGOZf1mykKvonl2IeanNkA9UOe9mflv1JUXFAuuGw02gLqzNqaTH5gMGi+Ual99rJRB0ptT8UIEdH9Sv2yqztnncUyX5xlRJBXRg/c4rlH6yUQlYKjwPrxOuoJrEc+fDy1ymIMPS/EoiQtfZl9vO76xVMTsQ6LhwI6DUD/VTMZHaeDtVLZ2rLBCrk8VxEmzKM6IDJ8F63bMgtXOGlmWgo2poxvULEGl/45OhBhqBJKr/FrmKBMv4BcKVQqXkfjMtkaIcwuWQZk4aGZG+fTEAUWeJZ3AlY445GhLVrdCd7+pkz55Hwr5wB6qFDFnc+8GfxJevXjf9rJZqFTpPdurBzOmshCwau30Pe4+2hzHmslUYjvQNm2Zz57u6aLCIVbMXl1evvD3FQF8EuVgrChcUrkLJojgjifwQGsffwjrmSzxWf1NF3ACD/tp4mVl+emXIa4dVokxHDWSPdCLM/Eq0fvvWxJvOB//wu69Tlu67svFvhQmZN2qPsC0gdJEoy9zIAGsEfcfCGGacJW1r2v+ZiTNnct+HJbUcP45k/jQPJ9eJgvW7Xf4J46pEaSosV602bJNa8M8X/7tO0r7Tfy92qlIqZ3UVHoOYgjjKJ6o4tb36M9Rfu/uJenGAPxr0nXjWof7wuo0nMGi2ErDY8igkkXuiKyjQmuH0/KeSDXxatAJYlGhAeTM1zcAc9GbSYGBa8ljmtIhJpurd2Eago3EmkRXGLiOQgpQqZgz51afoWNxLfkUBDmDrYdehuhgrxq4iw0bSUp22GYtLY/haJIb9LmR3YBx9bcC3UIksOVuDV4ceZ6ws5ko/vAN+jdtEoizO1XwAUG2R8/xgImCEz1F0v/Sts0dYcrlOtmDfSFgPB374cltWVcC4J6FkiaWyPOU9mZw1AliuKtyB3MPO8KY3B9FaBCmRFXMxwgS+mbyzzATspf9Czn/Xt83+2HH0uQXtz7r7bOHYfXvbJt+sd/nr5fdKTAiulDil4ktlZ50uMi5XaAHBv9GeEgVpAvD4xO5bFvpmGvak1LMeIUQK+hCnR20nhEsfe9XT6VLS0tVRkGDjcZagTRm3JXOXOyOECSIQuwRyxPzh 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:(13230040)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:16.6478 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 26755a83-e1f8-4b13-e30d-08dcdd8cc010 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: CO1PEPF000075F4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8697 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 Allow to specify both the rule index and the pattern in the flow rule creation command line parameters. Both are needed for rte_flow_async_create_by_index_with_pattern(). flow queue 0 create 0 template_table 2 rule_index 5 pattern_template 0 actions_template 0 postpone no pattern eth / end actions count / queue index 1 / end Signed-off-by: Alexander Kozyrev Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 8 +++++++- app/test-pmd/config.c | 22 ++++++++++++++++------ app/test-pmd/testpmd.h | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index b048821e85..65030936d2 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -1583,6 +1583,12 @@ static const enum index next_async_insert_subcmd[] = { ZERO, }; +static const enum index next_async_pattern_subcmd[] = { + QUEUE_PATTERN_TEMPLATE, + QUEUE_ACTIONS_TEMPLATE, + ZERO, +}; + static const enum index item_param[] = { ITEM_PARAM_IS, ITEM_PARAM_SPEC, @@ -3786,7 +3792,7 @@ static const struct token token_list[] = { [QUEUE_RULE_ID] = { .name = "rule_index", .help = "specify flow rule index", - .next = NEXT(NEXT_ENTRY(QUEUE_ACTIONS_TEMPLATE), + .next = NEXT(next_async_pattern_subcmd, NEXT_ENTRY(COMMON_UNSIGNED)), .args = ARGS(ARGS_ENTRY(struct buffer, args.vc.rule_id)), diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 6f0beafa27..39924d8da9 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2636,8 +2636,8 @@ port_flow_template_table_create(portid_t port_id, uint32_t id, } pt->nb_pattern_templates = nb_pattern_templates; pt->nb_actions_templates = nb_actions_templates; - rte_memcpy(&pt->flow_attr, &table_attr->flow_attr, - sizeof(struct rte_flow_attr)); + rte_memcpy(&pt->attr, table_attr, + sizeof(struct rte_flow_template_table_attr)); printf("Template table #%u created\n", pt->id); return 0; } @@ -2835,7 +2835,7 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id, } job->type = QUEUE_JOB_TYPE_FLOW_CREATE; - pf = port_flow_new(&pt->flow_attr, pattern, actions, &error); + pf = port_flow_new(&pt->attr.flow_attr, pattern, actions, &error); if (!pf) { free(job); return port_flow_complain(&error); @@ -2846,12 +2846,22 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id, } /* Poisoning to make sure PMDs update it in case of error. */ memset(&error, 0x11, sizeof(error)); - if (rule_idx == UINT32_MAX) + if (pt->attr.insertion_type == RTE_FLOW_TABLE_INSERTION_TYPE_PATTERN) flow = rte_flow_async_create(port_id, queue_id, &op_attr, pt->table, pattern, pattern_idx, actions, actions_idx, job, &error); - else + else if (pt->attr.insertion_type == RTE_FLOW_TABLE_INSERTION_TYPE_INDEX) flow = rte_flow_async_create_by_index(port_id, queue_id, &op_attr, pt->table, rule_idx, actions, actions_idx, job, &error); + else if (pt->attr.insertion_type == RTE_FLOW_TABLE_INSERTION_TYPE_INDEX_WITH_PATTERN) + flow = rte_flow_async_create_by_index_with_pattern(port_id, queue_id, &op_attr, + pt->table, rule_idx, pattern, pattern_idx, actions, actions_idx, job, + &error); + else { + free(pf); + free(job); + printf("Insertion type %d is invalid\n", pt->attr.insertion_type); + return -EINVAL; + } if (!flow) { free(pf); free(job); @@ -3060,7 +3070,7 @@ port_queue_flow_update(portid_t port_id, queueid_t queue_id, } job->type = QUEUE_JOB_TYPE_FLOW_UPDATE; - uf = port_flow_new(&pt->flow_attr, pf->rule.pattern_ro, actions, &error); + uf = port_flow_new(&pt->attr.flow_attr, pf->rule.pattern_ro, actions, &error); if (!uf) { free(job); return port_flow_complain(&error); diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 9facd7f281..f9ab88d667 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -220,7 +220,7 @@ struct port_table { uint32_t id; /**< Table ID. */ uint32_t nb_pattern_templates; /**< Number of pattern templates. */ uint32_t nb_actions_templates; /**< Number of actions templates. */ - struct rte_flow_attr flow_attr; /**< Flow attributes. */ + struct rte_flow_template_table_attr attr; /**< Table attributes. */ struct rte_flow_template_table *table; /**< PMD opaque template object */ }; From patchwork Wed Sep 25 18:05:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 144437 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3251345A2C; Wed, 25 Sep 2024 20:06:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E91EA40657; Wed, 25 Sep 2024 20:06:27 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2047.outbound.protection.outlook.com [40.107.243.47]) by mails.dpdk.org (Postfix) with ESMTP id B8B2C402EC for ; Wed, 25 Sep 2024 20:06:22 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XYjzlhneTLOKhzjyHb62hDZm+0ISBsnQKMrplf/OAfTAJTtS38m/OH2sHL7P50fnqqFqeYeq4ATQztnNMgcxqwHMmCZT8Sj6L7/KAeruSemJepUXySko5e9ZOlqToXVr5yUhDt2e3bOgT9u5jG/xaJNjcjZw1b2HCyj/YOrbHFXU36bbAtIsd4g0p7hLOpU2nqK+jUH1aM077d3gqNM0/LtwziPjlaAAvOg6WEs73fumNWXxZZ0TnjAtC5ANT+Wr/jh8pY860XMSoaVd3Xw2FjZ3ZqH/6JHK8dIp1HWI19AxWmAubE0hWZ+RsZQ00sBPwgG3FMcVzkYSujsb6LH0Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=VY2Sft2Eb0kpGfiM45ONygo8HUYejv30pDifONDyDCk=; b=CqLk6CSPRhfn8yasilbtjypnKE80KsG08LnHyEF1YHU3l/k+0RzUnLpV2lA3mlkMIuoByXHmaTJanCv6jJx/BLMzOhlChphRKd+xELMZqP/qHrGIVoz/sTwIH7Oet+IJJ6E34Wz4qe0d+gbgQbDgBvLHyMHhouyIAtsfDDzRdiXNtXXNORxi848/gB9jUIoU1iXZ2fuUwrJHOIvxEvkZcoHfV53PHAM+TM1ofbPu9i1+mTaPm0RzFeEIG3FvViddQ1mfRNsLJ+YQq5I3pd1NLcZ73QvjZQIQF6ge98grKYGbbLnZlFjzTkeyzn4lYpAJFzRXHGbxQpsnBiv+B6ZQow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=VY2Sft2Eb0kpGfiM45ONygo8HUYejv30pDifONDyDCk=; b=JE9oaZ548r2F5oLX9FCzfvdTI2lsFJ+9x6z8KCqj7TXs5i13kzHWRg8Ej3Jo0Vv51Zwe1tZCPAl7/qkh3oj/3dd0hs0wQ1zS3mhNSJLmNe319V4NAPJlABM1RWpExBymCGMd8F5HZFFJnNXMVAQcfLvsuVL+trmol/qxaqhz2kiTULNxh41oSVq616w1/1o7uOSxgRbUmcPUBbBoIqnlZK272pjLJ6Kae82LjA22N4OzIaricWtgQqWQsQR7aKRNyEeYB8KzlPY3J4g7aRMGPsMVuJt31HeMusiOxErOZA6L6wh8NPIWnV/hUCkeqyoR7grgmav5pPlUxT6DHDyh3Q== Received: from BYAPR02CA0070.namprd02.prod.outlook.com (2603:10b6:a03:54::47) by DS0PR12MB8041.namprd12.prod.outlook.com (2603:10b6:8:147::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Wed, 25 Sep 2024 18:06:19 +0000 Received: from CO1PEPF000075F2.namprd03.prod.outlook.com (2603:10b6:a03:54:cafe::a5) by BYAPR02CA0070.outlook.office365.com (2603:10b6:a03:54::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.17 via Frontend Transport; Wed, 25 Sep 2024 18:06:18 +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 CO1PEPF000075F2.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:18 +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.1544.4; Wed, 25 Sep 2024 11:06:02 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) 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.1544.4; Wed, 25 Sep 2024 11:06:00 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 5/7] ethdev: add jump to table index action Date: Wed, 25 Sep 2024 21:05:30 +0300 Message-ID: <20240925180532.3958656-6-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075F2:EE_|DS0PR12MB8041:EE_ X-MS-Office365-Filtering-Correlation-Id: c5650805-d37f-46a1-654b-08dcdd8cc152 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; ARA:13230040|82310400026|36860700013|1800799024|376014; X-Microsoft-Antispam-Message-Info: gdl7qt1I+771+s0DTypjLCIR7km2HDKJsjKeYaTjieaDsS520ikJ7qr7G/+cjaYi7T70h8MOhVGz3LKjT2piHYewoeCe5rnxcdXc92TaEknO3uOKcoTzISQbMgNGFis/mrI1AotFYDHJ/Hzk4j8pu030Sq470t3wFN4Ju5m2SJVrmF2wcKk5rW1ohyYR1jdEUpqKFm3FVn0cj3hvEIe8zgo3kczmaFtHKGz6RfPEo4hI6RrWJW8V2LG4h3eMVRn3mZm7OcDpQXFYURSc7EqW58IUkh5ea07KIhVB6GTEmnIaVZafUmwYxZaViQ8SkQuVa+0VL9vaDJIdHCNELjawS3M8njNV3Q558ENaAq8WlCE0jbiHx03/njEH3NXYOJ0rbAeLLpyYHh9YCbtfB12J29nGpMH8tOMsEvHy9uFztd4offgxCD9ZZ7SVlsfm8oevBmxld+TWmxSdKVvvyg1S4EvcG8fB2Ic/Dy4oujNXpBba1SmolnOsIBCqCCx35l2uDrqdhHoZHvt5zTYiojefOWj/i5+BYnLP6J0e+fwi2T/LS3EShPOizuJ/VuU0VmBZ6TWl9xLMKFi790QEBtz2td21Ou06o6PgdxI0zZQ1cXEm8BCK9/+0IHBU5dG6+0qwpACmj88FkCm//CHBvamAj7yNffJW8N8gSTBRHPfASb8+wAQFp89meAvN+38obfV1nySIretP/fJ/tngHCRZL4VSh4i6djONhJBlpLxuQ4dBdXgRNnsFMMxxMhdwYTENZJGi3cMuxBirWQ+GnfFKU3MuKRzOtBEKMuum64bbC0bYaoN/Y8KEYnm5RyKcqewyx2dI6ttpBs1XtjEVRywjkJ/iLQdzAWGS9ejInDyKm1bMS+xOww2Hb2m5Si3zb1wSc6M1mdL7Ckv3tJWTwNXSCmz8ARiqgvyL32WL3pNleJis5ooCYcT9Vib+F4ALB9zJytoSzIypmAatfBWEw3ni+59caRk+dWFErEWRWj07V+UlcCB6NBH5inTb+CvA+W/pE/5q0r6AFrDsuuimYlTaiJX8EgoAqI4v4FoMmae0qHtZGLrqP1MiajiYhKQ25Mit0GjI7aj+2Mgw6fzqyV2d/2W+N9p27nMh+J4zFExXKdqvuuNocKouaGlIEe+Sm+ncc5zhhaq7mabsxUabwGHx9Z73y5yEjlET5LxD+055MfSo3qMdDJJwaP0y5JKF5np+yTh2WIVXDr37rLL7RnaPJtJlli/tb/gTaN+RwmOzwbY1i4T3QSkGVFg5d16o9eSwA477aHh++EoD+V01SgcUFnezrOIyfuRYYKUebreGA4fDSFC58pcRK2I7M4sNDv2uTvN1AGezAY54dVOWdRTB1yf6Se/W84yQkrWFEVu/q9uTcl3pcbIVLM5FKayH1s6CpW7aygU7OD2pPTtA2NugnFwF4Wq6zFLbrPYlEcGaghFm0kLkfs1+mWP02Afb41d7c 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:(13230040)(82310400026)(36860700013)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:18.7392 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c5650805-d37f-46a1-654b-08dcdd8cc152 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: CO1PEPF000075F2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8041 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 Introduce the RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action. It redirects packets to a particular index in a flow table. Signed-off-by: Alexander Kozyrev Acked-by: Ori Kam --- doc/guides/rel_notes/release_24_11.rst | 4 ++++ lib/ethdev/rte_flow.c | 1 + lib/ethdev/rte_flow.h | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index fd461128ee..67196c099a 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -65,6 +65,10 @@ New Features Added API for inserting the rule by index with pattern. Introduced rte_flow_async_create_by_index_with_pattern() function. +* **Added the action to redirect packets to a particular index in a flow table.** + + Introduced RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action type. + Removed Items ------------- diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index f6259343e8..a56391b156 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -275,6 +275,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = { MK_FLOW_ACTION(PROG, sizeof(struct rte_flow_action_prog)), MK_FLOW_ACTION(NAT64, sizeof(struct rte_flow_action_nat64)), + MK_FLOW_ACTION(JUMP_TO_TABLE_INDEX, sizeof(struct rte_flow_action_jump_to_table_index)), }; int diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index 84473241fb..a2929438bf 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -3262,6 +3262,15 @@ enum rte_flow_action_type { * @see struct rte_flow_action_nat64 */ RTE_FLOW_ACTION_TYPE_NAT64, + + /** + * RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX, + * + * Redirects packets to a particular index in a flow table. + * + * @see struct rte_flow_action_jump_to_table_index. + */ + RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX, }; /** @@ -4266,6 +4275,20 @@ rte_flow_dynf_metadata_set(struct rte_mbuf *m, uint32_t v) *RTE_FLOW_DYNF_METADATA(m) = v; } +/** + * @warning + * @b EXPERIMENTAL: this structure may change without prior notice + * + * RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX + * + * Redirects packets to a particular index in a flow table. + * + */ +struct rte_flow_action_jump_to_table_index { + struct rte_flow_template_table *table; + uint32_t index; +}; + /** * Definition of a single action. * From patchwork Wed Sep 25 18:05:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 144439 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 68E9345A2C; Wed, 25 Sep 2024 20:07:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDC0740669; Wed, 25 Sep 2024 20:06:30 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2081.outbound.protection.outlook.com [40.107.223.81]) by mails.dpdk.org (Postfix) with ESMTP id 6338540647 for ; Wed, 25 Sep 2024 20:06:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ys9tmLRftfvrPs9fuspY10jIbqvaG1GUd3TcvsDqJEt14WSOCzoFhqwnS0UizIIknn08DZ8JMvzXI1rn/WKdulyMcgvCp751LFwVr3/h4wZOcdig3Nsw+DInPZH9sDtBbVctewI9ydorcRT1GkHcviQUxlVDbvInm33bCoZwYt4k7kOkn2OpvWvcr2KPApjAHflJvWY5pqy4H2cjpvTbVRgCEBTMAfUrB3E21LQ39AKLyg03zqiuj8MBMtheo+76LBm9wdrPd1gFEZ66Ll9qbFCuPdNUL18vlsGRPo6Zv1fByJHnhquD6JDoC/2EHceXU7pILHZDDeiAlFwjKJYFVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wUuMvU/1RLbkVRZP4ht+sXLs/I5jWOIWsLmxcaI63YI=; b=rCsbnal/4e0d3E7fGTfzOsWA8ZTbg7zYwl8tF7I95yrnQNqrSPH0OP6ZEZgDSu+IU4SKHZO0ft5krbeuuGzJnH4Oto/dYdNewCV7OY5Gq9Ohj2WNWaBYviOmqQ9jH3PpkF9FOcvTc5bttJdQwGvlDCM1ivVpKJ+n9yAE9MMqo6Jk0uTFbDCKw5J1n3hId+DnnM6z1cZbAySSxYWZ2W8tpbPUtGwlWsN0nwF+rk0A2+0BpNABnzQ4XuER7Gwd3eBG+ArkUGI1o/k0mA8IQxiUWJLSYRVXF3TP/VsnM558dv04or/LgBu6aTM0NKge7KUSgdZLWDMqw8PEZWD++8/v7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=wUuMvU/1RLbkVRZP4ht+sXLs/I5jWOIWsLmxcaI63YI=; b=dg+ZfDIB+qAITtsR4/1LFCdrd0E8BkCok/eM48U0HBky2iHc1PfRGbQ8zwhQfBMt4tDi5aCLI6snUzkxUyBXeT+Wu8QjBQ1mh58/RRHYOSfv2obVnGFFwawYmyhq7tFfMhlaym/lUr4YZdKH7wBXJyHuH8FkA0qAN5yfFVgs3dfu5NCAP02BTQrZYWg1pU7zOeOZdxbYmTuPjpwML5GPJMyGvda80DTcgs79tv7J6ISzHs3IEq4Eqfo2Ggl1Z+WLxgisfUU44daWJffwQpubW8O79TRcojjKfaoxPS7wcoPt2ldelxzGury0OejmV/m62oV8ipd8xzLY5qLY+QQgoQ== Received: from BYAPR02CA0043.namprd02.prod.outlook.com (2603:10b6:a03:54::20) by SN7PR12MB7299.namprd12.prod.outlook.com (2603:10b6:806:2af::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Wed, 25 Sep 2024 18:06:21 +0000 Received: from CO1PEPF000075F2.namprd03.prod.outlook.com (2603:10b6:a03:54:cafe::14) by BYAPR02CA0043.outlook.office365.com (2603:10b6:a03:54::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.17 via Frontend Transport; Wed, 25 Sep 2024 18:06:21 +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 CO1PEPF000075F2.mail.protection.outlook.com (10.167.249.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:21 +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.1544.4; Wed, 25 Sep 2024 11:06:05 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) 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.1544.4; Wed, 25 Sep 2024 11:06:03 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 6/7] app/testpmd: add jump to table index action Date: Wed, 25 Sep 2024 21:05:31 +0300 Message-ID: <20240925180532.3958656-7-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075F2:EE_|SN7PR12MB7299:EE_ X-MS-Office365-Filtering-Correlation-Id: 7466f566-da1f-4fd2-2bd0-08dcdd8cc2de 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; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: bpGfrmB6DeTqKVDXGkkVEnCCzqDvhRVfo+0WdI3aKMrwX8GeEXGIgI27/XEUAYayK9XDl0clrowAxKz+sNq1MIO/PSMgUI1ibDCbLJObOWsnyoGKktTDZdfJ0YiDes3m28SnKtGbpWiaujEdf7D/1Kt1cxvAWZ6BnZ42fFXKR+hBDRGMcSuCl9Uwk9RtO+qyof8vfGYjuStR5tO/aDIuNvvjzRu9btjl1Yde09O4onGD1Bp9xPs3M0rsa6Pvxk5WyDzuLmtO2Wj8MIYMltl4wRL+kLT+1lwG7BXbZuy6TtDZOn/mav/ApvOVR5OUxOweAe11y0cNHBJEvi642PXcGFlM/Ywp5rClYuaVZt6x3qZm9vw2pSvWxNfVmYjzRvyT5NmikAdA1+6AwqfncBRE4KW6yV9N+raKot3yQSBGGjliJeP9PvoL2uQO4ikqM735/QHzPL3MND6D+uGZPgjciVGHgmOfgd7z8hS5meLPFHdKMrCO7N3AAAXEsyI31VPGny9s2kR3DesB6HnECMSk+S5g7IiAO1Tyj4/+GEQEnHh+TYNwca49zT+LJW77ZGY5nzux5xewYnQ9ebSzfSrIl13zEqqXYcvWDI2BTNVq93+SVt724voNKBYydNWXdCGvaz7n1UFfViw0fBS3neVTXCTCQBgLJ/8oTh7qP7K/8B3y6tCk71lYkIUadqdyQQVLEn7ICrBto0x4hiIsoXulpaBBRysNPgoLL7Bw2SSCFK6ZxYn2Is45g1UUigHUV1ndOo3cASmW57bWWhmzhNAC/UQkEncZVblJOOaXsAf085q/YpUDMghjCuQzvyBPdn78aVfu+hOTpSTEiZ5KCH3oOxDx+GkK2xyNS4NinkAdEpMUhKFGmFT/qWg5gn6MSMolXLJJ1VxS+u+bZrI31ibG1A9cmzn1SKGRf+IQCUqSpTWbNrFK1KFl8VzwUloH50C8ia+wtSP+NX4/LtZ2qW+ayowS1AdSnXYjYp/s8i/c7TEz8x/khfjhmq9q1iThOFvKLzPssYXD9d4VE5hjyy1KbcEk35KLeubS3BV6W20VBSO1sv+0XdY7O3p7weR74bwUA7BICePxlNgIbBiVZhr9ZXfaf0F8Wk60n2mZCm/98KW8J1Pwk2uDTDVetBXfm8K4PAvfFmCD38Sm4+GhnzIgbSKCPtqALMMEdXj9TQdY2sn/iS6cRs+o4+0SMiHC9cAHxLhpig48+5eZC7Groo6xo7/RPQfgZHPrCLSmpPF2i9EGE49KQtZQ1Vx6/lJEThdJ40+2J5/Cf+Pam9rO0502e/iWuQcRAB1KOAkmML38WWUMykxSClJeJnSCLp4G3A8Tvl+jMs9w95lEfLd4p+GLxVWSiJ4C/VW2wzmou9/wkr/H3nFNrTpXfaEtv6bINd0KlZVEs8uwROIGWNgQ5cxpQXkREcUNpf6cl396QeYxfzVsJiWUCgQaHgcAFFKqReEO 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:(13230040)(82310400026)(1800799024)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:21.3330 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7466f566-da1f-4fd2-2bd0-08dcdd8cc2de 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: CO1PEPF000075F2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7299 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 Add a new command line options to create the RTE_FLOW_ACTION_TYPE_JUMP_TO_TABLE_INDEX action from the testpmd command line. flow queue 0 create 0 template_table 0 pattern_template 0 actions_template 0 postpone no pattern eth / end actions jump_to_table_index table 0x166f9ce00 index 5 / end Signed-off-by: Alexander Kozyrev Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 65030936d2..d150f6cca8 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -784,6 +784,9 @@ enum index { ACTION_IPV6_EXT_PUSH_INDEX_VALUE, ACTION_NAT64, ACTION_NAT64_MODE, + ACTION_JUMP_TO_TABLE_INDEX, + ACTION_JUMP_TO_TABLE_INDEX_TABLE, + ACTION_JUMP_TO_TABLE_INDEX_INDEX, }; /** Maximum size for pattern in struct rte_flow_item_raw. */ @@ -2326,6 +2329,7 @@ static const enum index next_action[] = { ACTION_IPV6_EXT_REMOVE, ACTION_IPV6_EXT_PUSH, ACTION_NAT64, + ACTION_JUMP_TO_TABLE_INDEX, ZERO, }; @@ -2686,6 +2690,13 @@ static const enum index next_hash_encap_dest_subcmd[] = { ZERO, }; +static const enum index action_jump_to_table_index[] = { + ACTION_JUMP_TO_TABLE_INDEX_TABLE, + ACTION_JUMP_TO_TABLE_INDEX_INDEX, + ACTION_NEXT, + ZERO, +}; + static int parse_set_raw_encap_decap(struct context *, const struct token *, const char *, unsigned int, void *, unsigned int); @@ -7597,6 +7608,29 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY(struct rte_flow_action_nat64, type)), .call = parse_vc_conf, }, + [ACTION_JUMP_TO_TABLE_INDEX] = { + .name = "jump_to_table_index", + .help = "Jump to table index", + .priv = PRIV_ACTION(JUMP_TO_TABLE_INDEX, + sizeof(struct rte_flow_action_jump_to_table_index)), + .next = NEXT(action_jump_to_table_index), + .call = parse_vc, + }, + [ACTION_JUMP_TO_TABLE_INDEX_TABLE] = { + .name = "table", + .help = "table to redirect traffic to", + .next = NEXT(action_jump_to_table_index, NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump_to_table_index, table)), + .call = parse_vc_conf, + }, + [ACTION_JUMP_TO_TABLE_INDEX_INDEX] = { + .name = "index", + .help = "rule index to redirect traffic to", + .next = NEXT(action_jump_to_table_index, NEXT_ENTRY(COMMON_UNSIGNED)), + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump_to_table_index, index)), + .call = parse_vc_conf, + }, + /* Top level command. */ [SET] = { .name = "set", From patchwork Wed Sep 25 18:05:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kozyrev X-Patchwork-Id: 144438 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 010A945A2C; Wed, 25 Sep 2024 20:07:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A88BA40664; Wed, 25 Sep 2024 20:06:29 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2041.outbound.protection.outlook.com [40.107.220.41]) by mails.dpdk.org (Postfix) with ESMTP id F0B6B40653 for ; Wed, 25 Sep 2024 20:06:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XHRcuoY9Sn5a2ym97HH+gpiPnvThRee2cEJNK9qM+Q/2MwP62ac5tn7vt9p/V63OV1ecj079acmo7NTPrrYF57/vd8k71eFkc+a5tRYaHXsy1f+OPlgR7rcvWnhwfWiCYF2FGNu7PEPnysQhQVfJE2KW+jsemiw9VzOJWGylQW359aZcY0Fk1hsNZ8K7SttGzhiyO+vHMKRHmHPntyyivSi5BvwZjCxaORW+eEot6jxnxkKaE/vU00vhFMORqAVKmt6OUxiSxH0kuglkV5OoKOB7AAwdRYB0LIIJFz20wR+VrIQCifrM7UzEetx1IKAQSAla6Vb82ZEyTz0nopofag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=/6OiznI4p4/XPvsYVEHqLOmQZxF9f3B4pIHtKMbMCX8=; b=NdfNUTax+AOsrMdJsmjJutI2G3aonXK1AUkWvJtKhXf1q3oDI/rSJvlpbyoA5cDJhCCJ+r8qOUeNU+fsHFcvULZkrSBF+T3CDgmoaaWbrDSCES+xN2TFREes6k/ztKJhrjLcYqgwPNp6TPLzQyZ6/DSfHQ3Wzg6bRDPuPRA6dFmKaFHIuQxo6DjNdrXl/1fbqtqdmxRyg/L0RBjW04cV+5FNTVOJv6WWLAeBwXbqBmALj7rFEe4biM0FTH1TjxuRix3zTcA+yt9uc2n9jSCx1Ui6Y/XZm+/XvgS3rQQGIsr3SQ4tWtJmgWnSEoF1Lq91tbOfhza/VbEDyY2opCkKDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 (0) 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=/6OiznI4p4/XPvsYVEHqLOmQZxF9f3B4pIHtKMbMCX8=; b=NZ05T8EMdty7N/aB69ICw5GVMPY6kKq2ktTkuXq2CJGDDuY64HcS0JKG3pL/v5LlB3s7IxNor6pUbytLbCzkt7jr/OUcPa3ArRKrh187XLswtjXSGMNtI4lft6KvBHrsr8MZZly8/lOV8jR2zYc5bin4mc9LjS1UjSy8WoZeJBPrr6MjR+A9EZpdP29TDGCoFXjHetKVajSjoHfShj93uQiM5jfVGui3qSnXCFV2dxmyntt0T/8pvOs1DkT4JzXHyD6Eoui8qhV9CssSvEWZQ9pGuVfbEfj2PwZ+7gyGwScwyUz9d4QeiJ9wq06Q/97tIgIpmkDVhxh/QhJT53wwnw== Received: from BYAPR08CA0051.namprd08.prod.outlook.com (2603:10b6:a03:117::28) by SN7PR12MB7249.namprd12.prod.outlook.com (2603:10b6:806:2a9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.28; Wed, 25 Sep 2024 18:06:23 +0000 Received: from CO1PEPF000075EE.namprd03.prod.outlook.com (2603:10b6:a03:117:cafe::8a) by BYAPR08CA0051.outlook.office365.com (2603:10b6:a03:117::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.28 via Frontend Transport; Wed, 25 Sep 2024 18:06:23 +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 CO1PEPF000075EE.mail.protection.outlook.com (10.167.249.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Wed, 25 Sep 2024 18:06:23 +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.1544.4; Wed, 25 Sep 2024 11:06:07 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.230.35) 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.1544.4; Wed, 25 Sep 2024 11:06:05 -0700 From: Alexander Kozyrev To: CC: , , , , , Subject: [PATCH v2 7/7] ethdev: add trace points to flow insertion by index Date: Wed, 25 Sep 2024 21:05:32 +0300 Message-ID: <20240925180532.3958656-8-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20240925180532.3958656-1-akozyrev@nvidia.com> References: <20240919004813.3158356-1-akozyrev@nvidia.com> <20240925180532.3958656-1-akozyrev@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075EE:EE_|SN7PR12MB7249:EE_ X-MS-Office365-Filtering-Correlation-Id: a2c705cd-94c8-43a0-b8e0-08dcdd8cc3e3 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; ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: 1p4Yc2mFSBQ0mB6Mzl9MPKah+CJTgchq8qTNn1iqJCFVvGoNuDnqwYkWZ66xj/6RTGcGQwOEbg9KUZf/wn9k2oRbRl0Igkgzrl7FQlNZtRdSM/RwrGrLap58j+dZpHjEV6GMpAJQx0WbBjhXfrsYGutOwo2oCIYiN2kxidvsa5dx8tDB9h2TXRacUfTL6dh6xaCblcKCnT1CdcNkWokVjtQiwvk4unmJZqsWqaPZqrWXQYF49L6k7yI5br/t2UunIsgK4yEC5Y5WXLkFEJ/yI+v46q559U7Maru2xMZn3elkehJQWZJEluxrswDHs4/gciS6FaUg2R86P11prlogcdX0K3uCLbKF19JRYSm8ZSTBkGNVdNq5/FI7Qqc5NZMcz/g0xXDW3WxYcdbZMSeh+gj/fUq7csIgEQSXn0cZdFi125kNyUVsvGD8PJXwoh0sv2gWojhRlF+Oo19nmu7zGJn6pB/ChnAvaUiGxy1jDDIIH354sXeI6nzY176g5PReieeioWV9Xu1zbkhymY/ui8MJ+uWF9+rpeqb3zZWi2DOwFHTDM9fy1Oy0B7GgRp1Pk2QomFhW9eE/Sy8Ryq9w3n7XY+9hQbMsgvPOXuQxLC+zAHVzS/jbs5mAfYfGsUTu3vNmgeNvjFasB5zAcyZZk3rgRMZfU8cJtXzqsntLPPas2lPorzhr+kRoi3sjoloF80gbI1gGzmKVtIJIblPjYjWeJRlSc/MssTgCEmkqjOuk8Scw/X1tbYx6hSCozmBtlJEpb36z8flOzWKh/fgCCFwJJcdKxQcbezDgRiohJQWPzMKgC4nMMkseEHi71mHJ60Em+fW8luO8Iq8Or9FcP/PSa6Y+4X7SpGuljUhBb121p1rDaSMt7rQqDBSABwU4u1A2soLjtZKm6VHPQRYIUoYCk51hyb3oMsSDoOlI5X4/YRAmmoXp+uLj7GSRuz8ZeKss9viORMLp9iDirA+dwtBXS/kIvTGVtJ0i52h+oP7dmbxKYrPMJ8ykhbwph2MyGRvQMX8wSKVv6tDDZ5hNLHKH2MLJ3FKvq4O/pGuENCTeygKRmS5x/PvCeVxDaltkvY5pAVvj9/CQz4Cc4sf6uS7PRJr82v3oFlXYk67jaA4N8YM2jWLu0VUVtcmQXB1SBEmSqyZdtVW4XUQqcCe8u5SsyLQoP1SUfmLGU/QgLcjiYh2BwpIi7oPn1SaLl09lPPjvdaszcyx6pIKjaKt795nO/HOrixaCl6RqT78DVf6xrAxNsYUzZvmRJcM/HuskyTxnmzMDkZpjYaySEwdTNQyPrvQUXDVVVdiPZgq3IiwHgtFRsCpL/W5W6HBhUT5ZedHiXzYtpUHBhpywDTaT7wEsVrOgt7lxRsmT/rnbEkL8zA25DNGRRMY+2INv4aF8a5/5bUCuZRICbxy53jfVrPqN10oxUnNozGRgs7Xh1UsHm0TKCDH9kMv0MuaHbc29 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:(13230040)(1800799024)(376014)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 18:06:23.0627 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2c705cd-94c8-43a0-b8e0-08dcdd8cc3e3 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: CO1PEPF000075EE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7249 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 Adds trace points for rte_flow rule insertion by index functions: rte_flow_async_create_by_index and rte_flow_async_create_by_index_with_pattern. Signed-off-by: Alexander Kozyrev Acked-by: Ori Kam --- lib/ethdev/ethdev_trace.h | 44 ++++++++++++++++++++++++++++++++ lib/ethdev/ethdev_trace_points.c | 6 +++++ lib/ethdev/rte_flow.c | 18 +++++++++++-- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/lib/ethdev/ethdev_trace.h b/lib/ethdev/ethdev_trace.h index 3bec87bfdb..910bedbebd 100644 --- a/lib/ethdev/ethdev_trace.h +++ b/lib/ethdev/ethdev_trace.h @@ -2343,6 +2343,50 @@ RTE_TRACE_POINT_FP( rte_trace_point_emit_ptr(flow); ) +RTE_TRACE_POINT_FP( + rte_flow_trace_async_create_by_index, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t queue_id, + const struct rte_flow_op_attr *op_attr, + const struct rte_flow_template_table *template_table, + uint32_t rule_index, + const struct rte_flow_action *actions, + uint8_t actions_template_index, + const void *user_data, const struct rte_flow *flow), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(queue_id); + rte_trace_point_emit_ptr(op_attr); + rte_trace_point_emit_ptr(template_table); + rte_trace_point_emit_u32(rule_index); + rte_trace_point_emit_ptr(actions); + rte_trace_point_emit_u8(actions_template_index); + rte_trace_point_emit_ptr(user_data); + rte_trace_point_emit_ptr(flow); +) + +RTE_TRACE_POINT_FP( + rte_flow_trace_async_create_by_index_with_pattern, + RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t queue_id, + const struct rte_flow_op_attr *op_attr, + const struct rte_flow_template_table *template_table, + uint32_t rule_index, + const struct rte_flow_item *pattern, + uint8_t pattern_template_index, + const struct rte_flow_action *actions, + uint8_t actions_template_index, + const void *user_data, const struct rte_flow *flow), + rte_trace_point_emit_u16(port_id); + rte_trace_point_emit_u32(queue_id); + rte_trace_point_emit_ptr(op_attr); + rte_trace_point_emit_ptr(template_table); + rte_trace_point_emit_u32(rule_index); + rte_trace_point_emit_ptr(pattern); + rte_trace_point_emit_u8(pattern_template_index); + rte_trace_point_emit_ptr(actions); + rte_trace_point_emit_u8(actions_template_index); + rte_trace_point_emit_ptr(user_data); + rte_trace_point_emit_ptr(flow); +) + RTE_TRACE_POINT_FP( rte_flow_trace_async_destroy, RTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t queue_id, diff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c index 6ecbee289b..902e4f7533 100644 --- a/lib/ethdev/ethdev_trace_points.c +++ b/lib/ethdev/ethdev_trace_points.c @@ -589,6 +589,12 @@ RTE_TRACE_POINT_REGISTER(rte_flow_trace_template_table_destroy, RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_create, lib.ethdev.flow.async_create) +RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_create_by_index, + lib.ethdev.flow.async_create_by_index) + +RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_create_by_index_with_pattern, + lib.ethdev.flow.async_create_by_index_with_pattern) + RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_destroy, lib.ethdev.flow.async_destroy) diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index a56391b156..4a7735b5ab 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -2090,6 +2090,7 @@ rte_flow_async_create_by_index(uint16_t port_id, struct rte_flow_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + struct rte_flow *flow; #ifdef RTE_FLOW_DEBUG if (!rte_eth_dev_is_valid_port(port_id)) { @@ -2104,10 +2105,15 @@ rte_flow_async_create_by_index(uint16_t port_id, } #endif - return dev->flow_fp_ops->async_create_by_index(dev, queue_id, + flow = dev->flow_fp_ops->async_create_by_index(dev, queue_id, op_attr, template_table, rule_index, actions, actions_template_index, user_data, error); + + rte_flow_trace_async_create_by_index(port_id, queue_id, op_attr, template_table, rule_index, + actions, actions_template_index, user_data, flow); + + return flow; } struct rte_flow * @@ -2124,6 +2130,7 @@ rte_flow_async_create_by_index_with_pattern(uint16_t port_id, struct rte_flow_error *error) { struct rte_eth_dev *dev = &rte_eth_devices[port_id]; + struct rte_flow *flow; #ifdef RTE_FLOW_DEBUG if (!rte_eth_dev_is_valid_port(port_id)) { @@ -2139,11 +2146,18 @@ rte_flow_async_create_by_index_with_pattern(uint16_t port_id, } #endif - return dev->flow_fp_ops->async_create_by_index_with_pattern(dev, queue_id, op_attr, + flow = dev->flow_fp_ops->async_create_by_index_with_pattern(dev, queue_id, op_attr, template_table, rule_index, pattern, pattern_template_index, actions, actions_template_index, user_data, error); + + rte_flow_trace_async_create_by_index_with_pattern(port_id, queue_id, op_attr, + template_table, rule_index, pattern, + pattern_template_index, actions, + actions_template_index, user_data, flow); + + return flow; } int