From patchwork Fri Feb 10 15:17:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slava Ovsiienko X-Patchwork-Id: 123685 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 7B15E41C61; Fri, 10 Feb 2023 16:17:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09285410D3; Fri, 10 Feb 2023 16:17:48 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2071.outbound.protection.outlook.com [40.107.92.71]) by mails.dpdk.org (Postfix) with ESMTP id 97DEF410D0 for ; Fri, 10 Feb 2023 16:17:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XNW+/LkO8nSfzpZ9Jg2KqetqI7/qVJ4kqBow2RlII9EkEMZCoan14OYC3Q+YrVLM7BVZ3/yA80Lat1r25QGUNRJm5shsnsc33XUJFT3BtvoGy96fOlJ/EQeJPIWLqAnKXYf9tdPH11dKuXF8bYcWPJ4FwDh6t9HmQIUrEwruhaQzhxxm6/9PYkoHN/zgHS5GyfykpkrPBGcdRK9iqtSAZLsK3lHcRrBy/D4W3+rrffeX/usxKn0Le7aJ/SStQyUmAXryu5EmpMTN7hIE5XX52/QJreY7Sdnqfv64qeXXcEoq0a8ssWG3LwZk25haupY+BUE3QZAFZmemyV5Ryyf/Ug== 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=OH25ry87NE8izPaS0aroUO6wra1IBN55YbKecd90IaA=; b=Dzr+Uk+j9hRuZ7i6kRh9u3zPUgtABXIOJppGLuFdJgDDb2kkz03r1grdPcYfP6lD+lcuBTWmkf4tA2r5pBVlaVYyIlZIilXlnaXCNW8tVZogythW5VCCRQFtbuQDtomt8d/xsAizklv2XkYCtog9iAoy5hL7rUg7Rwq+xfE5DetWHSn0GXQsgTzqq0wKcq1VsERFBLGnuNbI98yHLyuIIPzKKgWKe/R/aXeNd+JsDrb0vbTG9ngCfOoZ5z31Muphc03e9LoSplb+I6carvt07l8gO8fYgf4hnISkvEvs8T7xgU6rNfWCAGecnmFJ8FbpQfbpWOq6qmJHYNcGqujChw== 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 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=OH25ry87NE8izPaS0aroUO6wra1IBN55YbKecd90IaA=; b=cjEGw0srccS2xnm2xtsikJ0RiRgP+4Akou9XZfGbj+JGNlH5sMCJY45eQDY/uB9SCRtW6+ofvQ9hv5eosm3kmav5wmogs7QldXhl/WJFYTTYR8cirv0MtYZVI0A9qxwhF2wGBW3IX3/bQkbj7zMBSmEbPDy9Xg8Q4Nw4JeA6xrplxjUQOxOpdx5RYfcYy9quve7sYcjHf1a0MmgWONdPmQVcmhFkai+zPju+QPfSQ4MR2a3xv88E3U86B1+53v8L4wvfJsuI2kDevUeHa9x5cat1Lewa7mgTNEjWeNPpUPU1uxOPPWB8ytJAWyC8JXhM/4yyYvsSz7a3Vb9pjTw+Uw== Received: from BN8PR03CA0032.namprd03.prod.outlook.com (2603:10b6:408:94::45) by DM4PR12MB5248.namprd12.prod.outlook.com (2603:10b6:5:39c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.21; Fri, 10 Feb 2023 15:17:45 +0000 Received: from BL02EPF0000EE3D.namprd05.prod.outlook.com (2603:10b6:408:94:cafe::98) by BN8PR03CA0032.outlook.office365.com (2603:10b6:408:94::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.21 via Frontend Transport; Fri, 10 Feb 2023 15:17:44 +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 BL02EPF0000EE3D.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.16 via Frontend Transport; Fri, 10 Feb 2023 15:17:44 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 10 Feb 2023 07:17:32 -0800 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Fri, 10 Feb 2023 07:17:29 -0800 From: Viacheslav Ovsiienko To: CC: , , , , Subject: [PATCH v3 0/3] *ethdev: sharing indirect actions between port* Date: Fri, 10 Feb 2023 17:17:06 +0200 Message-ID: <20230210151709.1619-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230206095229.23027-1-viacheslavo@nvidia.com> References: <20230206095229.23027-1-viacheslavo@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0000EE3D:EE_|DM4PR12MB5248:EE_ X-MS-Office365-Filtering-Correlation-Id: b8473328-13ba-4ca3-e302-08db0b79f5c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 544jiuwoddc4vDzH40mBiUPfXPX0vlWqmxMnCXBM+e9FWUyJ98FkoQbmOHtjQiklXKZLUoN/Kyx9xsoKgiag3vbezLbN3McPGxsHBS0h8FPdbBvaZhtw4+pvJQLfk9FI4N8k6H+mpwNdFw5s7ZnljDAnG338+obkbRYB7DqqV7FM9+bc9zANHQjEE9iILDhx/cAnJtk76naXAN3z51NTl3hjwz8qb/nymnCXHOCkiXYyUr4+pM1LHi9hy1gc63UYCBurlnjaHI122qFCtbQ0mrZIS7CaSvl6Pl7g11DrC88eV/IYftsUX0n1C87gVp9FXJOx6dDBrcTjXxSEw3OXF6EX/IsaGZkDCXGBHuzKHmdd/37+rFrRwqiyDvK13gatQgw1q1qi9BtHbzqhzN2x0G0HejlD97O5Bd/nhK2Jbs2MtYuA58x+G8smOc41x0OJI0VbCTF+tvxjQNnf0oelx51sFV/TFvHUsFqArL9KzrjNn6Ko9ANY6R5kf9VIoMg/rBgf65blBjskfEr0xkTyALcAgKDIH+XydL0x6pNAjLSH61iA0VNJoZ94/EZ5Un0ivDR5QmV/7tXaxBxcGSqKGUo39e10ZqU1hbr7GJSHXN21XSFlCqpJaV+ybrSV2ZNFVqhY4aAdVQWbfPYHEao3R8RObfJL4IXHEAVJC+p5aOGhFcorNk1+22wuYEvsVe9VIF67edJeSIENVdSvZ8lQgbullmcdl4YBmuEajg/0WK7whzIZ55g6PrhCEuLzcpNe2GZDx8uNlNdGHlMGpi5rAMdFCUiFyEu+ZQaEoXGf3d8= 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:(13230025)(4636009)(346002)(396003)(39860400002)(136003)(376002)(451199018)(36840700001)(46966006)(40470700004)(40460700003)(83380400001)(70206006)(70586007)(316002)(54906003)(8676002)(8936002)(5660300002)(6916009)(4326008)(41300700001)(6666004)(478600001)(1076003)(6286002)(16526019)(186003)(26005)(426003)(47076005)(336012)(966005)(2616005)(7696005)(356005)(55016003)(40480700001)(36756003)(82310400005)(86362001)(2906002)(36860700001)(7636003)(82740400003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2023 15:17:44.3557 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8473328-13ba-4ca3-e302-08db0b79f5c8 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: BL02EPF0000EE3D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5248 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 The RTE Flow API implements the concept of shared objects, known as indirect actions (RTE_FLOW_ACTION_TYPE_INDIRECT). An application can create the indirect action of desired type and configuration with rte_flow_action_handle_create call and then specify the obtained action handle in multiple flows. The initial concept supposes the action handle has strict attachment to the port it was created on and to be used exclusively in the flows being installed on the port. Nowadays the multipath network topologies are quite common, packets belonging to the same connection might arrive and be sent over multiple ports, and there is the raising demand to handle these "spread" connections. To fulfil this demand it is proposed to extend indirect action sharing across the multiple ports. This kind of sharing would be extremely useful for the meters and counters, allowing to manage the single connection over the multiple ports. This cross-port object sharing is hard to implement in generic way merely with software on the upper layers, but can be provided by the driver over the single hardware instance, where multiple ports reside on the same physical NIC and share the same hardware context. To allow this action sharing application should specify the "host port" during flow configuring to claim the intention to share the indirect actions. All indirect actions reside within "host port" context and can be shared in flows being installed on the host port and on all the ports referencing this one. If sharing between host and port being configured is not supported the configuration should be rejected with error. There might be multiple independent (mutual exclusive) sharing domains with dedicated host and referencing ports. To manage the shared indirect action any port from sharing domain can be specified. To share or not the created action is up to application, no API change is needed. Signed-off-by: Viacheslav Ovsiienko Viacheslav Ovsiienko (3): ethdev: sharing indirect actions between ports app/testpmd: add host port parameter into flow config app/testpmd: add shared indirect action support app/test-pmd/cmdline_flow.c | 63 ++++++++++++++++++++- doc/guides/rel_notes/release_23_03.rst | 6 ++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 +- lib/ethdev/rte_flow.c | 6 ++ lib/ethdev/rte_flow.h | 11 ++++ 5 files changed, 88 insertions(+), 2 deletions(-)