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 DAECFA0C41; Wed, 17 Nov 2021 13:23:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78B474114B; Wed, 17 Nov 2021 13:23:21 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2052.outbound.protection.outlook.com [40.107.223.52]) by mails.dpdk.org (Postfix) with ESMTP id 661C3407FF for ; Wed, 17 Nov 2021 13:23:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BuJupD1jHjMczGRP9Ak0o+zn6xsaoI5hInhL6CCn6JTzHTXxYSXA0SK9IiA7E08eC2kiBO5ovA+nyRDMEdOMvcLznZR+4SnqFiNwah4KIUMNvUUyKA+lhY1/SRLQsYaiV3GnmQezmASG9dQDjYOZHcyJwK3uwkGNBar8iRWfSOzR/cJMswADNmttM85yZstLVAG6URBYGI/LuLpZ7aaC6Cd97U0kmLfQss/c906dorw1HQbk51F2RgUN2kQupXqEj9mjUoUCWOOtg/kUnqwTCZv0x21siCQdPqgtk3tHgDpjoCR8fTwVbXvrTV8wrwkd7961ys4nLKXZuAOO0U6nLw== 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=rybm/uxKr3zdQjt7cNyOxPj8n3PMNjsMJCuCn/P1SBQ=; b=L7rE280dWC9bnhFtkPsa4iB333GwXe+DYNIfEuL7Tp7+Y/RfH2w6volzxVIRYzceeP1gcrjqxH9qsFT9NMYpQHl04xWdHij+TIHfgHTMxT+7XOo5BTk0nki/738vgncC4zGW2BrRF6GDXMCE5KZjtJ7DFXc7Ws+Wd/AEr405tBLEzSyCflXOMcOnylgQtFPKaxbpFpnW02JBV5uEaDxbk7rK3iMOs+OLi3lWtonuTdueFcUE4byApSOueWSX22zS6LeF59iL6Cl+6QwbHAKBT0OKMgqcWu+LhImhbuMchXIDYaEIlPj2LEWDtNvxCkT9KfKakkmDv0B5a9yGcunQ9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=rybm/uxKr3zdQjt7cNyOxPj8n3PMNjsMJCuCn/P1SBQ=; b=n7MyJjtQ2tJChSy0jjwK+LrigDlVccuU8mUUW3JPLdw9QGU+IZIkM5bjf1H40jM8Lga609a9cgwAfrMGPlUhEHx/W43wepIEMq6bjhLeV59fOpunTKYutfOTbVRfCZ0pbS+ShCESxQHKXKYMEnUi2oK99NQhdBfSsqZIasZdrd37HGbqkg26XyBPATqIoka/nB4xr5csf1gdXs2xhYvv+Q5mpIG7H5dPnZUfuqoKrO76P4AtmWXCc6SiUGNqgMMM/0bq6uSMBamKGwRXXFQaccXsgpDZ/e+duzQ7l0wmSCcJ3A1ODhcKev+Al1tYk5++ub7HUSvvcahtuM/Oha46Gw== Received: from DM6PR06CA0059.namprd06.prod.outlook.com (2603:10b6:5:54::36) by CY4PR1201MB2471.namprd12.prod.outlook.com (2603:10b6:903:d0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.27; Wed, 17 Nov 2021 12:23:17 +0000 Received: from DM6NAM11FT040.eop-nam11.prod.protection.outlook.com (2603:10b6:5:54:cafe::b2) by DM6PR06CA0059.outlook.office365.com (2603:10b6:5:54::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Wed, 17 Nov 2021 12:23:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT040.mail.protection.outlook.com (10.13.173.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 17 Nov 2021 12:23:17 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 17 Nov 2021 12:23:16 +0000 From: To: CC: Elena Agostini Subject: [PATCH v1] build: make gpudev optional Date: Wed, 17 Nov 2021 20:33:51 +0000 Message-ID: <20211117203351.6087-1-eagostini@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a86c8af-a39e-427e-fdcc-08d9a9c508d3 X-MS-TrafficTypeDiagnostic: CY4PR1201MB2471: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uLe3IT8dQKHj5Jbr7Qb6E27zLuPzu7kduBAtObYR1L0ksP3fHpXT6FpKA+hXTFR5fAIonRs7pE+Qpr6gk7oIyp+owbdReCTNDVm0xAZZBZCHp40NmOslz3OcEaPnX+OycEf1yz1ARRGnEHXL/ovQfBTBTd8R0YRODK4p9WvDr+9Kgck9OXQNhO+GLUU2mqWTZzNnVpaH+HX1lXt4NUpDqFKi8c2oyCZXRLc17tMIEye2qP7w7mGpRK1ZXR//r65O2HZpotMwFBesUSreSGarbJtk8Rrx325QgH2Z5+j3+9iMc3+xNy3sYg4dvXn4yImWzr80PzOShwNtRTzQR3n62mS2UAxpUaygRmOu7F+ooieC7R9Wun1uc3LtYRkwAdF61rsmVwGI+d+4jrzoAdDCTwnXCmV/a52V/eV3bOtG+HjsjCzY1BLzHnqo7a+WXFG3kcIyVb07Br/W/7YoIGUdNKAItBnpIvdX5mPajGxt5b0VB+CDJ/iINkfRKf0cBO+9X3Lkgh4JzYRSAyOzl/pLkY6Z9AGkLn0XQU8W9ZAnnn7jXtnY6XDcIWh4HySyDJAxD/OWDRYxnub+xjHMjBijwEAN++FKTKWcb7EuYowVg8/5oZvnKgbLe53siIK/mAyWWNsh5qgzAEyBOh6Nnvx4P75Lzb7MoFFKj6x6aDUwLjdvLKkbP7zstYTPMw970y6Wim8EpvOOjQ8ES/DzymYTJQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(5660300002)(6916009)(7696005)(70206006)(508600001)(316002)(70586007)(8676002)(47076005)(7636003)(86362001)(26005)(186003)(6286002)(2906002)(55016002)(8936002)(6666004)(1076003)(16526019)(4326008)(2616005)(36756003)(36860700001)(107886003)(83380400001)(2876002)(336012)(82310400003)(426003)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2021 12:23:17.0318 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a86c8af-a39e-427e-fdcc-08d9a9c508d3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT040.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB2471 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 From: Elena Agostini This library can be made optional. drivers/gpu and app/test-gpudev depend on this library, so there is a check for dependencies. Signed-off-by: Elena Agostini --- app/test-gpudev/meson.build | 11 +++++++++-- doc/guides/prog_guide/gpudev.rst | 1 + drivers/gpu/meson.build | 9 ++++++++- lib/meson.build | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/test-gpudev/meson.build b/app/test-gpudev/meson.build index 17bdef3646..7340fe29d6 100644 --- a/app/test-gpudev/meson.build +++ b/app/test-gpudev/meson.build @@ -1,5 +1,12 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2021 NVIDIA Corporation & Affiliates -sources = files('main.c') -deps = ['gpudev', 'ethdev'] +if dpdk_conf.has('RTE_LIB_GPUDEV') + sources = files('main.c') + deps = ['gpudev', 'ethdev'] +else + build = false + reason = 'gpudev library is disabled' + subdir_done() +endif + diff --git a/doc/guides/prog_guide/gpudev.rst b/doc/guides/prog_guide/gpudev.rst index e464109d35..8970c43865 100644 --- a/doc/guides/prog_guide/gpudev.rst +++ b/doc/guides/prog_guide/gpudev.rst @@ -23,6 +23,7 @@ Out of scope of this library is to provide a wrapper for GPU specific libraries on the device or create GPU specific objects (e.g. CUDA Driver context or CUDA Streams in case of NVIDIA GPUs). +This library is set as optional and can be disabled with ``-Ddisable_libs=gpudev``. Features -------- diff --git a/drivers/gpu/meson.build b/drivers/gpu/meson.build index 601bedcd61..f04594e712 100644 --- a/drivers/gpu/meson.build +++ b/drivers/gpu/meson.build @@ -1,4 +1,11 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2021 NVIDIA Corporation & Affiliates -drivers = [ 'cuda' ] +if dpdk_conf.has('RTE_LIB_GPUDEV') + drivers = [ 'cuda' ] +else + build = false + reason = 'gpudev library is disabled' + subdir_done() +endif + diff --git a/lib/meson.build b/lib/meson.build index dad9fce14d..d6e7cac178 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -76,6 +76,7 @@ optional_libs = [ 'pdump', 'power', 'vhost', + 'gpudev', ] disabled_libs = [] -- 2.17.1