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 5FDDEA034C; Fri, 25 Feb 2022 00:25:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF98F40688; Fri, 25 Feb 2022 00:25:22 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2054.outbound.protection.outlook.com [40.107.96.54]) by mails.dpdk.org (Postfix) with ESMTP id EFFDB40141 for ; Fri, 25 Feb 2022 00:25:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eMJ4xO1mt3j6kkQrkA7RF1cm0armCjA9WhIhWocDWGLkKR0tAjTBT9wS7/i3CjR1hIgJxT1/azBmfcP/7m+Zb3fd0LUJIOJOHp4ywSGPBL9qrrzN17lkmVty8PuupJyILGotjdbaQde/xyjXfAL1gkVpCVCIXA74owVN6h1VZBqdIFAFUnBKPbJ3y88TpmJ47r73BrZkOtPmKnZLyg7bGGfxIX/cLzXIutGq39jY3pCEBkEBhCPG68NksFe9I6S2tXvPTejJQN8pVgw8p57Z1T4gtIBM3seEEZ/7IlofbyjTCI5grIpyGuGbt9e8x6Vwvm5wynvbBDBxP3bRV2XyMQ== 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=nQGMosM9rkrV6qA+gTHpJwi1s5qJbHco6oQoOlkeLRQ=; b=BKq+A6XgHlYi+NScIYqwL9U+EiUuMlRy6aAn/5LHIxy82et1Fch9537ry1FulzLsMI6q9VDJ2WqXy+sC+HEf1RMsSViQW55eABUT50SE6fj8LdhTEA1r9gYO5W2/kYipEwxUSenYbZU/Owdtq9BWRmZKhRjtU4sINLWtHNpqmaBGi+1IpsjvuH4bYYyhp7mm31QYR63Oa0rMFgwqelbO6SlSwfPSS+KyquiP3gJDVHk1BPO4HTsNL8iIcPhMBj/grhHv+C1geSuHcPqi9TAFgNVDTRfmykYVmLn3/rup2iLzJPUhM+0RkCq7e9DzHMYIO8H8O4ykgQz1L5rEPXiITQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=temperror (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=temperror 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=nQGMosM9rkrV6qA+gTHpJwi1s5qJbHco6oQoOlkeLRQ=; b=dLl6VIL3PMbkdfbQlMpNBdCH7oRqAL4gCf3wy/hMyFU0GkyB44OJXukC2/R5jQ/RxKLH36g4RAJ7xTQfKead0LeKpjRRS0ddaPVpSifV2rzj89hZqTtjNx4jlXAhruYZdd/UEyI5NoEEBtecR8b6iHAhbVvageNEytlwRvt4uWvmuOkgB0N3c1DiYW/aMjNTdtlCzm+Q+s0/s+zz8XqecHPk43Jin/wmV1KfWteJ6HE3cR8BDrQxWuQXnFtqCzjJjIzziuox8vHblHAv6TwwYE6TPWqhOvwY7b0p1E2nvj0DQ96TWLnmeqNbm6Glkfr1rW/8415kMR5h+SbwRxAKPg== Received: from BN0PR04CA0039.namprd04.prod.outlook.com (2603:10b6:408:e8::14) by DM5PR12MB1580.namprd12.prod.outlook.com (2603:10b6:4:10::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.24; Thu, 24 Feb 2022 23:25:19 +0000 Received: from BN8NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e8:cafe::33) by BN0PR04CA0039.outlook.office365.com (2603:10b6:408:e8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22 via Frontend Transport; Thu, 24 Feb 2022 23:25:19 +0000 X-MS-Exchange-Authentication-Results: spf=temperror (sender IP is 12.22.5.235) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=temperror action=none header.from=nvidia.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of nvidia.com: DNS Timeout) Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT022.mail.protection.outlook.com (10.13.176.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Thu, 24 Feb 2022 23:25:18 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 24 Feb 2022 23:25:18 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Thu, 24 Feb 2022 15:25:16 -0800 Received: from nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9 via Frontend Transport; Thu, 24 Feb 2022 15:25:15 -0800 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko Subject: [PATCH v3 0/6] mlx5: external RxQ support Date: Fri, 25 Feb 2022 01:25:05 +0200 Message-ID: <20220224232511.3238707-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220223184835.3061161-1-michaelba@nvidia.com> References: <20220223184835.3061161-1-michaelba@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0d285fa3-2351-4371-c43d-08d9f7eceb90 X-MS-TrafficTypeDiagnostic: DM5PR12MB1580:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QXGkkNO57fRy2np6/PwTDJZoHuCQAz1uUOCN2e1iYjwPwDDhadnFoApTpYQP4L//eokDEJDxUhilXvSC1udLlv2I37bzaPdZh6k7XOlOqv0TwUWG4oODZBQPSfVArl9mTriY1Q9Zz5Mfibp1Chr2SqLMb8vtMccHis2oOgMmbP0KaKxJTfoU2qGJc4bKyr0B34WEW0EYBkwGWVN1A2qu6FIAjbcgKKAsRdZ77t55wGgOhuOKl5CmPb5W4to69IzTVklMo/c51I/sre65cmTQhtqwuoNfSTbEClnnPzbUG32rjifc7na4UWcWWJfbaE+01tI3wbjqKqDyQQt5L5qN8oe8s8fnyw6jY5mB4rQOJF1v01LgS8saNfBpphthmppOAL3womWkIcHf7OJXr2iD5jWRWPZx3bMKUKzvzsgQVAl2A8DmwV/lPLvkGnOz2ZFwGAcHngX9Tx8PTgddvnkh84CzB10tDqSZyyDYRn351WEWWcUZ9bfV8JmsKL1U5oat/BR20UfdGwrZXFULhxrQJM0XlzPmRboO+EByYebZKFNqv5qZAHiYFyHBxWGeGvJ3Q506iO7bb2ebERb2ChJ9hR+K7nBi5fHWMcr0ZbklQD6PrnmQy0GMGMWH0LNn3zGC9WG36kGjRKYEhQoA5qk30uA+KlmZzuZgdr9AuVtPIt5ViWU9gwivYSNflr7tfgFdFCZh6ovce6FZ0HFRq2fOmw== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(1076003)(4326008)(70206006)(70586007)(8676002)(63370400001)(63350400001)(40460700003)(86362001)(186003)(6286002)(26005)(7696005)(82310400004)(83380400001)(8936002)(6666004)(5660300002)(336012)(426003)(36756003)(36860700001)(55016003)(6916009)(356005)(54906003)(81166007)(2906002)(316002)(107886003)(508600001)(2616005)(47076005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 23:25:18.3143 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d285fa3-2351-4371-c43d-08d9f7eceb90 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1580 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 These patches add support to external Rx queues. External queue is a queue that is managed by a process external to PMD, but uses PMD process to generate its flow rules. For the hardware to allow the DPDK process to set rules for it, the process needs to use the same PD of the external process. In addition, the indexes of the queues in hardware are represented by 32-bit compared to the rte_flow indexes represented by 16-bit, so the processes need to share some mapping between the indexes. These patches allow the external process to provide devargs which enable importing its context and PD, instead of prepare new ones. In addition, an API is provided for mapping for the indexes of the queues. v1: - initial commits. v2: - Rebase. - Add ABI exception for common/mlx5 library. - Correct DevX flag updating. - Improve explanations in doc and comments. - Remove teatpmd part. v3: - Rebase. - Fix compilation error. - Avoide TOCTOU issue in external RxQ map/unmap functions. - Add check it the queue still referenced in unmapping function. - Improve guide explanations for the new devargs. Michael Baum (6): common/mlx5: consider local functions as internal common/mlx5: glue device and PD importation common/mlx5: add remote PD and CTX support net/mlx5: optimize RxQ/TxQ control structure net/mlx5: add external RxQ mapping API net/mlx5: support queue/RSS action for external RxQ devtools/libabigail.abignore | 4 + doc/guides/nics/mlx5.rst | 1 + doc/guides/platform/mlx5.rst | 37 ++- doc/guides/rel_notes/release_22_03.rst | 1 + drivers/common/mlx5/linux/meson.build | 2 + drivers/common/mlx5/linux/mlx5_common_os.c | 196 ++++++++++++-- drivers/common/mlx5/linux/mlx5_common_os.h | 7 +- drivers/common/mlx5/linux/mlx5_glue.c | 41 +++ drivers/common/mlx5/linux/mlx5_glue.h | 4 + drivers/common/mlx5/mlx5_common.c | 84 ++++-- drivers/common/mlx5/mlx5_common.h | 23 +- drivers/common/mlx5/version.map | 3 + drivers/common/mlx5/windows/mlx5_common_os.c | 37 ++- drivers/common/mlx5/windows/mlx5_common_os.h | 1 - drivers/net/mlx5/linux/mlx5_os.c | 17 ++ drivers/net/mlx5/mlx5.c | 5 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_defs.h | 3 + drivers/net/mlx5/mlx5_devx.c | 52 ++-- drivers/net/mlx5/mlx5_ethdev.c | 18 +- drivers/net/mlx5/mlx5_flow.c | 43 +-- drivers/net/mlx5/mlx5_flow_dv.c | 14 +- drivers/net/mlx5/mlx5_rx.h | 49 +++- drivers/net/mlx5/mlx5_rxq.c | 266 +++++++++++++++++-- drivers/net/mlx5/mlx5_trigger.c | 36 +-- drivers/net/mlx5/mlx5_tx.h | 7 +- drivers/net/mlx5/mlx5_txq.c | 14 +- drivers/net/mlx5/rte_pmd_mlx5.h | 50 +++- drivers/net/mlx5/version.map | 3 + 29 files changed, 838 insertions(+), 181 deletions(-) -- 2.25.1