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 4C04141C35; Wed, 8 Feb 2023 03:48:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D188A4282D; Wed, 8 Feb 2023 03:48:33 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2074.outbound.protection.outlook.com [40.107.237.74]) by mails.dpdk.org (Postfix) with ESMTP id 133B141153 for ; Wed, 8 Feb 2023 03:48:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=euckXn00mxiZhWcDbbmW7S5nwltyHlzZTOF1dkWRgVQBfpOQOJHNR3VNBNQ3ZdpuXSWbK4v4/sjvPtZeroND8gABV23o7PPUxlAIzBWM1lBGRpdR68G57M65DNCLzC9yVbuHb76R4tWuCCfaKvpnjLGIIWGCbxwHVC+f0j7TmYET7tasTjV295A+cAMSGSmC5p9AkxhgNzd5kycniQ+IiX8X4tetOVRFyEGIJveWtvmdVoye7PXX8JaTwTTzYJfcJNPN1wWe4fnMt4nhGqW7yUKbLFZJAU4gotZMGzxskGZUM0dFngDAHAt42ZEtuqjImzb/c7fUmBMNeD2g7NHKSQ== 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=/I/To9W16iajHWEdPBFfE97aGb/mQ5U/D5HLFsCTvGg=; b=kfaftY7t0AqdRCjAEONtW9vR8exIzgXzWw2Z9Ulr4g/HvxpXQjSLiXj1x2u5mTukxZhi3YgAyQP4I8T/QJfTONt9QTfB/VJaALGbvPMIJyA3t+tp50KonJsGr+fxLanJT3VObU2HIQ/tZY4zn0hx5Rhb2KGuLUrFqL34Ax34gKyvFKqB5h4YrVgoAPVlCSL6H43FV/WbdFOaLqbLxo2dPLpm86Y7PkcvNo/0HHjIK6Y9HVHqK3XcPCNIJzI5xnJ7JwYcZ10FH57wXFTeeziu5Hh/FtHQ0aP7OvlOiBGp5Del0JQD5o11x97u/LaAn4i4GuoQHxeUN7UMlMJpijgksQ== 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 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=/I/To9W16iajHWEdPBFfE97aGb/mQ5U/D5HLFsCTvGg=; b=Ru3XV/2u/2HiLDdqn+US8nuVXr9gYFUMU+uE5/Uw6ycobRC4OIVQMdU32+6g/lGh9KMsJiQm7QxjpsgGsrirvK9dd+WdQGjS7f7KX9BVBX6+w2k4IhfFpdlf58lD/5kKQFdgffJFwwjaL+45I0Y17TFP+dIRIXBoQSQKLW2WOz5jAq+PT8CC/anxSQ9q97wwxp6YXfquZZE94LbqyEXTuZE+/liUJcTGRFc0lXceN3I8hZFvoZKqJhfrx9aSRKrxHOomzeEIrqov2e6VjHVhgKzTdXKYwAjUMVOqJinMNkhlHNqzOXHQuQoE/6F8XQTiwS6MqSevsU6/k7c7OeIrhQ== Received: from BN9PR03CA0159.namprd03.prod.outlook.com (2603:10b6:408:f4::14) by MW4PR12MB5604.namprd12.prod.outlook.com (2603:10b6:303:18d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34; Wed, 8 Feb 2023 02:48:22 +0000 Received: from BN8NAM11FT107.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f4:cafe::2) by BN9PR03CA0159.outlook.office365.com (2603:10b6:408:f4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17 via Frontend Transport; Wed, 8 Feb 2023 02:48:22 +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 BN8NAM11FT107.mail.protection.outlook.com (10.13.176.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17 via Frontend Transport; Wed, 8 Feb 2023 02:48:21 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 7 Feb 2023 18:48:11 -0800 Received: from pegasus01.mtr.labs.mlnx (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 7 Feb 2023 18:48:09 -0800 From: Alexander Kozyrev To: CC: , , , Subject: [PATCH v3 0/4] ethdev: add template table insertion and matching types Date: Wed, 8 Feb 2023 04:47:51 +0200 Message-ID: <20230208024755.72743-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20230126232802.3960109-1-akozyrev@nvidia.com> References: <20230126232802.3960109-1-akozyrev@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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: BN8NAM11FT107:EE_|MW4PR12MB5604:EE_ X-MS-Office365-Filtering-Correlation-Id: 1842d057-755c-4894-5071-08db097ef12d 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: 2p0Yvfz5baXJKhjTaBKlJ7qqZEhBbLRurOoNIUIzxkHBmUKXecP8SJg5FfuxjRI5rOmv8vdLkoYuqdQAZgC1uXPPWuIof2cIkhK4lpPHL3JF/HE+4FeeLfJFWK8YLWOpF0UfHiVtlqaNisPXpiKg2bH0lAd5a14bES/CX0kUW+m5Bmla5ogMOXX8z8DuQL1xG3tiFQ3A8Y6nx52xQN4EhwRHytveZiPb6OYKp8Tjx/gUjYfcCvtz0tzyz65Prk7SGGPkIujLufPFYovQIKSvdKDjl8LR1j2T7GbQ9E4O33iEjIcH05bnIybnQwNREHX/LimLnkWuzs10/bh2zsoaPkHv0h8LoN0dgukrpmyo0qI4oLiZcdtfcGiRPtDMeudJdS502ZeMQRorol1htu+efE+uRj9whj+Di0z1Mqifrb4oXO9Rnzd/Pjxj5cQybVYUObkCK2D9ImkLLb5phpWmMeZFPzN9YaQVVfzv5gxcDXXCRA26Ykrk9kvwj8K9TqBDdLeGbrIWtMqdblXa5L7P3Q8uYqX11lYhb3O8dx2XI8X7RflPTgskk3vMAzauFr9q89MnjBzwzruac9Tz+WEbEUjc9gwCF+Kz2JtJAx3gvaz9vi1pcoQH465pd+GfiOFdKux7cXDVwZq372a9vZv7MEP9X/UIcCdoIEZmdR+GC8Dh3iY1GjuU9CiMPaDR1woTV11IfxT52RRZYKOW4ttTAP5F903781mhzp9nt21UxVUS51bNYPCtHbP1CrN00Dbu7hIUF5ael4S53ue8i+Rf+rBMEXyDoHqM76lgQqhqs0w= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(136003)(376002)(346002)(396003)(451199018)(46966006)(40470700004)(36840700001)(1076003)(2906002)(356005)(107886003)(6666004)(16526019)(26005)(186003)(966005)(2616005)(478600001)(7636003)(40460700003)(83380400001)(54906003)(86362001)(6916009)(4326008)(316002)(82310400005)(41300700001)(82740400003)(47076005)(426003)(8936002)(36756003)(8676002)(40480700001)(70586007)(70206006)(5660300002)(36860700001)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2023 02:48:21.7834 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1842d057-755c-4894-5071-08db097ef12d 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: BN8NAM11FT107.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB5604 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 Bring more flexibility and control over both flow rule insertion and packet matching mechanisms. Introduce 2 new flow table types: 1. Allow a user to specify the insertion type used in template tables. The insertion type is responsible for choosing the appropriate key value used to map inserted flow rules into a template table. Flow rules can be inserted by calculating the hash value for the pattern or inserted by index via the new create_by_index() API. The idea of the index-based insertion is to avoid additional matches and simply execute predefined actions after jumping to the index. The insertion into an already occupied index results in an error. The old rule must be destroyed first. An index cannot be bigger than the size of the table, otherwise, the rule is rejected as well. 2. Allow a user to specify the hash calculation function used in template tables. The hash calculation type is responsible for the calculation of the flow rule index a packet would hit upon arrival at the table. Control over this is useful for applications with custom RSS algorithms, for example. An application can select various packet fields to serve as a hash calculation source and jump to the appropriate flow rule location. The RSS hash result will be used as the index in the table. For the linear hash function, the mapping is one-to-one and the hash result is the index. For other hash functions, the index is the hash result module table size. The RSS hash result can be retrieved via modify_field API: HASH_RESULT. RFC: https://patchwork.dpdk.org/project/dpdk/patch/20221214022110.393410-1-akozyrev@nvidia.com/ v2: changed the behavior in case of insertion into the same index. v3: refined commit message to highlight index-based table advantage. Series-acked-by: Ori Kam Alexander Kozyrev (4): ethdev: add template table insertion type ethdev: add template table hash calculation function app/testpmd: add template table insertion type app/testpmd: add template table hash calculation function app/test-pmd/cmdline_flow.c | 166 +++++++++++++++++++++++-- app/test-pmd/config.c | 10 +- app/test-pmd/testpmd.h | 2 +- doc/guides/prog_guide/rte_flow.rst | 20 +++ doc/guides/rel_notes/release_23_03.rst | 9 ++ lib/ethdev/rte_flow.c | 24 ++++ lib/ethdev/rte_flow.h | 95 ++++++++++++++ lib/ethdev/rte_flow_driver.h | 11 ++ lib/ethdev/version.map | 3 + 9 files changed, 329 insertions(+), 11 deletions(-) -- 2.18.2