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 7E85C42436; Sat, 21 Jan 2023 06:22:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1CEC140DDB; Sat, 21 Jan 2023 06:22:26 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2068.outbound.protection.outlook.com [40.107.223.68]) by mails.dpdk.org (Postfix) with ESMTP id A48A44067E for ; Sat, 21 Jan 2023 06:22:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZC4qmeAOdkC3Jq4R+NJpEgz71ZLVbIhWVNBeIk4/n7wDEHnPntd7u7dXaNxU8LlhNYjN59AHbBLcxAImka3KdeZf/01zQQKuOBKl0bedXh8Fz0keBZVhhjuuTZ+X82imZJfndKi46i65y8XzqbUnbv3bN6oUplpaFCX1gxlK5cgEo6+OXHyboHRpRYAeNO0P6Dj20ZBfnhhxaszrxmHFfyCIMt1WVDz0LJS6RjOtqNj+oOU/n6fkdMvzZX+DpUubxJpjedV25/+G7agqeKABPvfns1AW44LtCecw1INLhaZLT4BX3i+1+Tv6/EK3Mt6ww+FWLh7imS3oVMu//b2VLA== 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=Zo0noBZVwDJfFMgRPvPRrxv3M+bSgWyZ05Mmfr/6p4M=; b=BfClUc8j40c7NGf/CCWNmBmniSjNkUfkjxDBhMQJdiyXWcNG+uaznGnLl1J123v5uc6phSwO7VQM73WFvvTkeB1HDvNUhNzBi+3bEpEa568ZMcqzYvyv33pLqE+UgUGXj5R8VFcGi+X/4hJiQ5Bwo8TAvetoPu7dqcz9FObIGEXeOi8Ukz5oJWJJMgm7SQpnb5vgt4bMMzAFRzFoLPWOYEPubnmFcwV/4xUidBpQHaPAi6uAJo3hGB6MsgcxgtlKIEeMuM+qSNjE65MJxlb//eB2MiY4sTxZiu7NgfUGvlUL/w74kcW4LhjOQkV5xnn9u6hvHX+lMBUQhvk2UWALcg== 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=Zo0noBZVwDJfFMgRPvPRrxv3M+bSgWyZ05Mmfr/6p4M=; b=CuGoc+W5isThPF0IC63UKkBfPm84Zt/D+EEsYYdJ+jkv4JbKR7GoZlEfhQclCa7asGB3inT+YLlZb7f6IgdNb6u5uu0eKzl0/WrrrOoXzOQmBS+WIZ3jaB0SfwiZ4HhKKR0DTe7LKZ4Y4Rua80Jn3EF9fDomJgIniXcLsQrRivB5m2sGd12lrXV5bqaX8bTYghE28UiMEBkijFswKHcEkwdmG0X1G5V6Xjnq5HP7moIqfDsS935/h6dcQrnZd0Ar1CvURsYzjaS1D5VM84wPcJMWnLtuRfyK2s27S0GHkPZsYwOEKYZgI9dI4UtVeGgim1qeNQ7TH/oDLSDEDaxfbA== Received: from BN9PR03CA0525.namprd03.prod.outlook.com (2603:10b6:408:131::20) by PH7PR12MB5654.namprd12.prod.outlook.com (2603:10b6:510:137::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28; Sat, 21 Jan 2023 05:22:22 +0000 Received: from BN8NAM11FT050.eop-nam11.prod.protection.outlook.com (2603:10b6:408:131:cafe::52) by BN9PR03CA0525.outlook.office365.com (2603:10b6:408:131::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.27 via Frontend Transport; Sat, 21 Jan 2023 05:22: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 BN8NAM11FT050.mail.protection.outlook.com (10.13.177.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6023.16 via Frontend Transport; Sat, 21 Jan 2023 05:22: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; Fri, 20 Jan 2023 21:22:20 -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; Fri, 20 Jan 2023 21:22:18 -0800 From: Alexander Kozyrev To: CC: , , , Subject: [PATCH 0/4] ethdev: add template table insertion and matching types Date: Sat, 21 Jan 2023 07:21:54 +0200 Message-ID: <20230121052158.2928238-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 In-Reply-To: <20221214022110.393410-1-akozyrev@nvidia.com> References: <20221214022110.393410-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: BN8NAM11FT050:EE_|PH7PR12MB5654:EE_ X-MS-Office365-Filtering-Correlation-Id: c2036fd7-630c-4e6e-2c70-08dafb6f7912 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: zJPcTd9UjxI5DMDJ9Byc7yx+QVUXFjxk0XWKao4PQaolR2taeYC0wIbF9MHJQiq5Pc/E2kyc7GJ7n7HegzpsW5O5ZJRrUDqZ+WS9Mv5n3OoGq51Tqjl0ohVsMoDHF15EiAJdP8Rjvl7WTEDEe91KD6i1fuhdCIf4gPrmzPVHiUY1Qx3mVjnm8PfiWSM/lb5mJQyNzM17i403Q6qiA2EYW7cwL/C+8P+sX3XB2/pvQxq0Wk8WV/GmWaADfcjfFvNGTRxfJAohZpGY6M4Xv1vB4X1ohIpjMtzkxLM2/hgI4Eu+xVsrkyPjyyURLwG2RWkaDJ+R+dkeik73d2L2AgM62d5w3OHtinbyAOn6UhXCqWTQbQuKSPusmYtRPHN4JyDk2ZgYLuKVbFbZnsANCaFC6/WEjMvIcMF9NT4ynr+Old2qBc1HGF24NMFrTzQHyhG5rhGGbTxBg1d7/0TN79+lLR9qkho5A6/qPKomfyQCHxXxB9Rsb17uQdZul+MasK37tK0a+uQ1zmjRghcym+cCMTquup9at++MgeLfQRHcBJr7zIvaO2FhTI3hOOmdtRqPMKzkFIRBhTPDnbt7Y3pTXrFoDrgDNpBEyeujAqP0pAiitYQh4OKKeLE5duZbbkEixFhtExOyJM9Rw/ZJGL4YscPjnlb5QZOG1YV1Ims52mi7yVglakiFj82VdHAmmJX+MCz6F98gPJ1DjnhFdQtmfX6mnsunkMXOalBJP1pBXp1XBCFAjzRGUVod0q3WdmBppc76r7d6LxCIN7n0WnL26/xN8ELuUiFXmToErj338hc= 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:(13230022)(4636009)(396003)(136003)(39860400002)(346002)(376002)(451199015)(36840700001)(46966006)(40470700004)(82310400005)(36756003)(70586007)(4326008)(6916009)(8676002)(478600001)(1076003)(47076005)(2616005)(426003)(70206006)(336012)(41300700001)(16526019)(26005)(186003)(2906002)(86362001)(40480700001)(36860700001)(83380400001)(82740400003)(54906003)(107886003)(6666004)(40460700003)(316002)(966005)(5660300002)(7636003)(356005)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2023 05:22:21.5491 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2036fd7-630c-4e6e-2c70-08dafb6f7912 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: BN8NAM11FT050.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5654 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 to an already existing index is undefined and depends on PMD implementation. An old rule must be destroyed first. The index cannot be bigger than the size of the table. 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/ PMD implementation will follow shortly. 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 | 11 ++ lib/ethdev/rte_flow.c | 24 ++++ lib/ethdev/rte_flow.h | 96 ++++++++++++++ lib/ethdev/rte_flow_driver.h | 11 ++ lib/ethdev/version.map | 3 + 9 files changed, 332 insertions(+), 11 deletions(-) -- 2.18.2