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 283F8A034C; Tue, 22 Feb 2022 22:04:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E940640DF6; Tue, 22 Feb 2022 22:04:30 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2069.outbound.protection.outlook.com [40.107.95.69]) by mails.dpdk.org (Postfix) with ESMTP id 1CFF440DF4 for ; Tue, 22 Feb 2022 22:04:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jGSK3RjENdjXuxwo0hWpsrEObmCJ+YJV1Mco/DgBMDJBY/GUy+bYz5ccrv8XKWE5FK3kif1AI2pRTpt8LyBtQgTSU3Dy1Jdr99S4CHN2nWKceH+1aiP6NQldvUcO/IUO4hhjUD4aFkv0qtsJdbW6GiWFwbHfiYY4h3gfH5CHhKc3/dK94t83hVqltHQ0G2aDWuxwcFt/cdLf4CSw+T0rBIzA9zZUhOIwO/vofpkgDc74DrxpAgJwVERTaHkpVLY9QUgldVIaI83vE3JX2Bgj3+39HYQoA28cZ7MTavT6Rzqr8rz63NODadIFQs73JCRPj4feY/JbUgGx8MivqPxH+Q== 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=amBPghyxxzJO0AS/3N03ZnlYLE6TsRzPMMyN+DfVxPs=; b=Sm5UAJ2pqbjC+CEdHjbrO4NW72ldLY9PgnFtCXDouCK7LT6eLZcqmgTfdA/MYNdX+Wa79zFyFgMQlzsce8du2hG18pFsJjBYvZQYC8k3EH2DEcy1XmfY2D/qJEN3iW6v62JMPfqLzPmz3pj50WvD8uFh2nrSEr2a+ZNeM25hjEHwDxLHRu40IpxIciYa+lZDQwmGk3tMRBTTtzRVEtH3TDUj3nbrC7spUzEISW7qW9qxbtnToTTgwUjNLARiQybStzfGOI7n//A0BU14yvlNjbmNsdVN2gD/cfJpUDtD7p1MCSP+cBdaU4qnrIxhIqKVpYodYuvf+U1sDHny8jSFwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) 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=amBPghyxxzJO0AS/3N03ZnlYLE6TsRzPMMyN+DfVxPs=; b=LW12cNRU/iiGQFduHUccTTzrd76l/Zlm+81WNTv4N4+lP1I348i1O7pAEpYyIYY7YFD9exIoCyWsgwLEzGTVhDR7hkx3r028nwAODtEPd+y3OiA/5ncZd9hUl55Q6Ma5tqlmoio+JiNVo/OzuenFlzW9Oc5B2vpai5hEFWufh5uFI/jO+CRgT0jBcWXuoXWtg/yOEtGisOMugX+hqw6zs6p2PuPL9n9hYwmghRxIzFuB4aqSVNMLRx9L12/jWs2AjvJuyBT2NMWJOz/oZ8mAb+W7Q1gYImx9WFKNFQG5/4HC6WwlV0kqn3Q9RVCV8yG5vr/6kztdgPboq5rm/KB2SQ== Received: from BN0PR04CA0019.namprd04.prod.outlook.com (2603:10b6:408:ee::24) by CY4PR12MB1143.namprd12.prod.outlook.com (2603:10b6:903:38::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.24; Tue, 22 Feb 2022 21:04:26 +0000 Received: from BN8NAM11FT018.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ee:cafe::b9) by BN0PR04CA0019.outlook.office365.com (2603:10b6:408:ee::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.21 via Frontend Transport; Tue, 22 Feb 2022 21:04:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by BN8NAM11FT018.mail.protection.outlook.com (10.13.176.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5017.22 via Frontend Transport; Tue, 22 Feb 2022 21:04:25 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 22 Feb 2022 21:04:24 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) 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; Tue, 22 Feb 2022 13:04:24 -0800 Received: from nvidia.com (10.127.8.13) by mail.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.9 via Frontend Transport; Tue, 22 Feb 2022 13:04:22 -0800 From: Michael Baum To: CC: Matan Azrad , Raslan Darawsheh , Viacheslav Ovsiienko Subject: [PATCH 0/6] mlx5: external RxQ support Date: Tue, 22 Feb 2022 23:04:10 +0200 Message-ID: <20220222210416.2669519-1-michaelba@nvidia.com> X-Mailer: git-send-email 2.25.1 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: d537cadf-4988-4159-1dc9-08d9f646e892 X-MS-TrafficTypeDiagnostic: CY4PR12MB1143: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: tttgHRqJ46RVkgGdBYHRI6ODJaIL6adqdu2aPLKALw09PwIvepllfeyuHfsnw4TVlV2gDIPzqdJ9fMu6d2+3Z8NmrtAqbWjWLH+k9C3/UmlMYPI1/WxdqIe+LIrQY06+arm3oO41Iu4PJbQtoy5DjYl0cq0enMkATkfi2ywEyy1/ulZ+Btvk2cxFdbt180IL7o2ZBte2BMBUvPPt0c555cX+4nqV5bgf45C11FAgWiyBhDTvL4oRFYoccuTbPGTOBCnk/gpqQg2TJaYIei7KuTqSaHUhdoOouAcEfvEpwD/QIXbs5D+wl93RV3bPRvB3GN9ruSHyksuV8yVwBWJtwgDBTVwnduD6wTHXCUJKlYJPTQt/AdZ1RNNJbwB/ViiUACN5ubapGuc2UYDLgV/zz52CL6eotfJ3fAXwRt4zNofU0gm83VKPM2p3PzLg/esxtJJfqbOreTZSsfU8MS0TqcBok5riRdYXBTnX7itCy0PzJ3UtxIuHXyXOBJpN/zWVJKW7kgjVujheOTjg/bzh17mI65zUeOoqzaUVt3cPq04fv9/U6olqW2FS83c/NAUfsSsnS/2gW4DNXlYVeqJxveW6ycHbbyOZlTXec7Khj0ErO+AOqqKNcLcTNAQTTNHSenuxBOinHzlNWXgQq8cPrCZn6XR28vy2wwDTjq3dwLvv5YoDcGQFkISj22jL9V74SCNF0XW6Cft2HsnVl/tddw== X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(54906003)(6916009)(81166007)(356005)(2906002)(55016003)(86362001)(5660300002)(82310400004)(8936002)(316002)(8676002)(4326008)(70206006)(70586007)(36860700001)(26005)(6286002)(186003)(1076003)(336012)(426003)(107886003)(36756003)(83380400001)(47076005)(40460700003)(7696005)(6666004)(508600001)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2022 21:04:25.7794 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d537cadf-4988-4159-1dc9-08d9f646e892 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.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT018.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1143 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. Depends-on: series-21791 ("refactore mlx5 guides") Michael Baum (6): 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 app/testpmd: add test for external RxQ app/test-pmd/cmdline.c | 157 +++++++++++ app/test-pmd/meson.build | 3 + doc/guides/nics/mlx5.rst | 1 + doc/guides/platform/mlx5.rst | 37 ++- doc/guides/rel_notes/release_22_03.rst | 6 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 16 ++ drivers/common/mlx5/linux/meson.build | 2 + drivers/common/mlx5/linux/mlx5_common_os.c | 227 ++++++++++++++-- drivers/common/mlx5/linux/mlx5_common_os.h | 6 - drivers/common/mlx5/linux/mlx5_glue.c | 41 +++ drivers/common/mlx5/linux/mlx5_glue.h | 4 + drivers/common/mlx5/mlx5_common.c | 62 ++++- drivers/common/mlx5/mlx5_common.h | 28 +- drivers/common/mlx5/version.map | 4 + drivers/common/mlx5/windows/mlx5_common_os.c | 52 +++- drivers/common/mlx5/windows/mlx5_common_os.h | 1 - drivers/net/mlx5/linux/mlx5_os.c | 18 ++ drivers/net/mlx5/mlx5.c | 6 + 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 | 258 +++++++++++++++++-- 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 + 31 files changed, 1047 insertions(+), 172 deletions(-) -- 2.25.1