From patchwork Mon Jul 3 08:14:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Alnubani X-Patchwork-Id: 129188 X-Patchwork-Delegate: thomas@monjalon.net 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 386D442DC2; Mon, 3 Jul 2023 10:15:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B96B640ED5; Mon, 3 Jul 2023 10:15:08 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2063.outbound.protection.outlook.com [40.107.102.63]) by mails.dpdk.org (Postfix) with ESMTP id 94B5940156 for ; Mon, 3 Jul 2023 10:15:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mwg/xDmt5PHHKACvxU4cQg4RQ7Ka/AdWIDsWhsaukanevhtd5xS/x7ibb6jyIMbYbM74NKk04DU/0wTShaela/TDXP01wDpfFi001itKSJrc6/V8YNbeGQAXIn+KuWLaHgX7L6f20mfjQ/QnJ5fwmT2EDXzZ1R/B4N4esK9QKXtbCv2Vb4kK4SAw+wq55is+fXhLwWvK9Q9ioqmWYSfBEbbCQ5w6WpJZ1VdY8rpdxb2x7j4OmYwVmO5VI4cCnPFcH9blcK3z7Z5FXLQm8S81NkT5U6RFWaa67bzcwfupLM+pjVaITdCyxeB2NA6i/PLZ/wGJZPg0P8r5bmiyUcL+9w== 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=SnxhCPQj1zBYPFeQAjdlzIPNu0iN8eCqGUbCA3pOTwY=; b=HwiSzypIFzPpWaSd7Ao3lvu+ng5Z0j6LuZippHOvPD5bNxBpVby+DPaTwtX6AlDhdPaR967dVyNvTD2P7aSzUYPlD1uo82KCJu9Hhb0jWee4oxTKA6C8QgDBvtPW4tnbyPWXTJwfMgmU/npMmbXBKNcV8cCOBwB9SZmxRxDXT3w0+FvzjydPK56hJcwG2+F9wsK/DuPHa7TTbWLURyJ3IUSEx4+FOjDdkAhGGHR5nk3f4VQCoiW8AMjWH8iLtR/1Hmeyw9Q+Q/unlqbtaeOyAgZLK6nh0T7HYN+3TuqxmHCnsbG2P5KXqWUmAZDOObJgXpM5XVMTCEQ1TDqx1D3a9g== 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=SnxhCPQj1zBYPFeQAjdlzIPNu0iN8eCqGUbCA3pOTwY=; b=puoMVmqzc6ZSy6KdNiTf1qoiSky6u24sxyVFygrdLQw+AtP30fcAD7jA6BAmgmwFWkEBwN6r55t9M830DHutVYciLFBpDPz695xfxlhIFAg8Tn0CsLMVqynYiTVDIetNvwUREn0XxXuX2GCQVA03A32bJU1UgNTZ6alJ8YiSnMcpeFwzCBM/7VVAhn7P7ctfjHA4I69u5Z+VreFXJUgsDRPQSgc5saCcckH96ngMeW2rZ0ZtMRoL4dEb/RFfBGU45Ps6+cbr1C3f/XfpyEw5NcYucDBZ/0lQIeGcwm9458NHjWPkZ9Hl+UwfD5GCPcB5F9uPvXBPVpM+TxGQtqfsmQ== Received: from BN0PR04CA0196.namprd04.prod.outlook.com (2603:10b6:408:e9::21) by DM4PR12MB6184.namprd12.prod.outlook.com (2603:10b6:8:a6::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Mon, 3 Jul 2023 08:15:05 +0000 Received: from BN8NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e9:cafe::fc) by BN0PR04CA0196.outlook.office365.com (2603:10b6:408:e9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.30 via Frontend Transport; Mon, 3 Jul 2023 08:15:05 +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 BN8NAM11FT031.mail.protection.outlook.com (10.13.177.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.43 via Frontend Transport; Mon, 3 Jul 2023 08:15:05 +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.5; Mon, 3 Jul 2023 01:14:53 -0700 Received: from nvidia.com (10.126.231.35) 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.37; Mon, 3 Jul 2023 01:14:51 -0700 From: Ali Alnubani To: CC: Subject: [PATCH] doc: fix typos and wording of cuda guide Date: Mon, 3 Jul 2023 11:14:23 +0300 Message-ID: <20230703081423.504093-1-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.126.231.35] 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: BN8NAM11FT031:EE_|DM4PR12MB6184:EE_ X-MS-Office365-Filtering-Correlation-Id: 5592addd-9675-473f-4255-08db7b9d9bbe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7uHohyzf9cUtaYGrRNcS8ZFU3Wlkz5m3fbdXl47A4fNPfV7J3y1zsLPPpMQdX13v+k1FpAKcZ/zJMEjiMLChK6m5JeHYS7LI15jjdS7g582DDxYlBwAotXDdOb64shb0/iZabgErwYvexNQn6Z3hg0y3qi8rCrledAGIGnqEbkTOLOvJA7zwzbb29L/c3oYnKNYPtFGezDPmYEUhfVUvhNfnNZzkGyqNk2YB1Fm2I/fWoGFxqWdt4eVEWQ1ECYhy/729bPNHmuDlO0b85TcDmqLmOWaMKeMYos7toRjIb56Uzp1fpuSrx+ffJCPbj7XZrWCo/l4YZLMP6GTsYJFFyjnbnJxmDSgkqkOHay9+Li8/RN7uQuUefkfJQzOCXLRcu+DHN+2BjrcMHW4PopGTnoP2ia6E0FhGXrG+w6cTvzfGbnuDy8RH3FXSM4bo+NIQcliV47MQs//V28LqgtGncfNCr+V1bs5fzYN+/Vr1B0GMb5eXfLU0h6cDAIw/V6Qm7l/iKEd/MHMBXOVedhH2aA/r13l2720pVgwnAlZ9fT1iP42I5c+/R8N/vWoawUASM+A/F2nb3Zj7E03yXA5w47pWbyO4fgQltfbHDoEoGOLiF5VtrIft+HlQ7TnHst5f8S0FWc0bymUO6HgWzkDobQT9Hs+uO+cYOyDfuNHHahNu/XdSYEdpuCULQM3aJcObSbMwvYKbPL0JMIrbBCP+J83gui67Tq/sw+hvcUK+OFvqTZhvmrIjFTwvf0lNmOfX8dpTY98hWU0eljIHnmUxyOCmOTM5q2GrA/3pzK5SIyGrKIvFFjx9hM7Wr8hOZwDg 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:(13230028)(4636009)(396003)(39860400002)(376002)(346002)(136003)(451199021)(36840700001)(40470700004)(46966006)(40460700003)(41300700001)(316002)(36860700001)(426003)(82310400005)(336012)(86362001)(16526019)(26005)(1076003)(2616005)(82740400003)(2906002)(186003)(6286002)(356005)(7636003)(40480700001)(55016003)(47076005)(83380400001)(5660300002)(8676002)(36756003)(8936002)(107886003)(478600001)(70586007)(70206006)(7696005)(6916009)(4326008)(6666004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2023 08:15:05.4045 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5592addd-9675-473f-4255-08db7b9d9bbe 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: BN8NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6184 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 Adds missing punctuation, and improves wording. Additionally, one of the example commands for adding CUDA headers to CFLAGS is removed as it's redundant. Fixes: 24c77594e08f ("gpu/cuda: map GPU memory with GDRCopy") Fixes: 1306a73b1958 ("gpu/cuda: introduce CUDA driver") Cc: eagostini@nvidia.com Signed-off-by: Ali Alnubani --- doc/guides/gpus/cuda.rst | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/guides/gpus/cuda.rst b/doc/guides/gpus/cuda.rst index 114e3bc8cb..6520c17c3e 100644 --- a/doc/guides/gpus/cuda.rst +++ b/doc/guides/gpus/cuda.rst @@ -12,20 +12,19 @@ Information and documentation about these devices can be found on the Build dependencies ------------------ -The CUDA GPU driver library has an header-only dependency on ``cuda.h`` and ``cudaTypedefs.h``. -To get these headers there are two options: +The CUDA GPU driver library has a header-only dependency on ``cuda.h`` and ``cudaTypedefs.h``. +To get these headers, there are two options: - Install `CUDA Toolkit `_ (either regular or stubs installation). - Download these two headers from this `CUDA headers `_ repository. -You need to indicate to meson where CUDA headers files are through the CFLAGS variable. -Three ways: +You can point to CUDA header files either with the ``CFLAGS`` environment variable, +or with the ``c_args`` Meson option. Examples: -- Set ``export CFLAGS=-I/usr/local/cuda/include`` before building -- Add CFLAGS in the meson command line ``CFLAGS=-I/usr/local/cuda/include meson setup build`` -- Add the ``-Dc_args`` in meson command line ``meson setup build -Dc_args=-I/usr/local/cuda/include`` +- ``CFLAGS=-I/usr/local/cuda/include meson setup build`` +- ``meson setup build -Dc_args=-I/usr/local/cuda/include`` If headers are not found, the CUDA GPU driver library is not built. @@ -46,15 +45,15 @@ A quick recipe to download, build and run GDRCopy library and driver: $ # Launch gdrdrv kernel module on the system $ sudo ./insmod.sh -You need to indicate to meson where GDRCopy headers files are as in case of CUDA headers. +You need to indicate to Meson where GDRCopy header files are as in case of CUDA headers. An example would be: .. code-block:: console $ meson setup build -Dc_args="-I/usr/local/cuda/include -I/path/to/gdrcopy/include" -If headers are not found, the CUDA GPU driver library is built without the CPU map capability -and will return error if the application invokes the gpudev ``rte_gpu_mem_cpu_map`` function. +If headers are not found, the CUDA GPU driver library is built without the CPU map capability, +and will return an error if the application invokes the gpudev ``rte_gpu_mem_cpu_map`` function. CUDA Shared Library @@ -143,7 +142,7 @@ if the address is not in the table the CUDA driver library will return an error. Features -------- -- Register new child devices aka new CUDA Driver contexts. +- Register new child devices, aka CUDA driver contexts. - Allocate memory on the GPU. - Register CPU memory to make it visible from GPU. @@ -189,9 +188,10 @@ External references A good example of how to use the GPU CUDA driver library through the gpudev library is the l2fwd-nv application that can be found `here `_. -The application is based on vanilla DPDK example l2fwd -and is enhanced with GPU memory managed through gpudev library -and CUDA to launch the swap of packets MAC addresses workload on the GPU. +The application is based on the DPDK example l2fwd, +with GPU memory managed through gpudev library. +It includes a CUDA workload swapping MAC addresses +of packets received in the GPU. l2fwd-nv is not intended to be used for performance (testpmd is the good candidate for this).