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 0C015A0032; Tue, 16 Nov 2021 16:58:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF22940DF5; Tue, 16 Nov 2021 16:58:15 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 4223040141 for ; Tue, 16 Nov 2021 16:58:15 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id fv9-20020a17090b0e8900b001a6a5ab1392so3286296pjb.1 for ; Tue, 16 Nov 2021 07:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ytn4WX5j24sp7S6IcO34g0r8lqf42kyfHvtTAMBZ7Rw=; b=k0LZv8O9ZK9dURH0sVx69NWZ9t5kXY2RhRn+Pd8w779p0f4Y/8vPXofja2MjxjtK4b J3Adc/GCZ5SZZxH72amYrhN5kDT1xntHprn5Y3+Pd1o9j7dgHCedqdviCv36CCg1q0sC l9WtLxO0Sgq2Fmbhc3cp2sUO3ZESlJDpFO75siK4glT73dAcXgkJ6ghNEO8iweGu+64N ckWfpCYZ6N0kZCzHJH4jjkQ7/+BViJDdUqBxGVw7fWP/CHip/HW0uxGodlxinweRk+Pa JZgYh7Xo68BpqFSVGqIBBLZjWgvkOUB0kYJwx+9zJfaARHm2IoE14aEkTIoKBzDYgfCM kUNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ytn4WX5j24sp7S6IcO34g0r8lqf42kyfHvtTAMBZ7Rw=; b=t9YC5lBH8ILtIr/sbPhOlyo0699p8WzIvcNxelyLqNwt+7uz7dxxv1BQD01Lu2+erc eEgzP3pbop0BhhRpwXdlXUzPf9tSgODSqYqMhf0NN17+nEbUT7DF6EmG3i/3BmcZCt7E qoW0H88R916uNJQ0WPO5z7FpKwp/RRbBEhtVHBQDYDVAqTtEGDlWuIfsNfrcqLhC1cm5 rz9H1RGYwhB2+4p55tbH8hL2cim5Dg70YvJ3GFeKuhu6sjIRQU0m/jwtzEQv2ZpA0+ny W63GlxyHUlIMbkioG+gj9PXOVN8poGesSsNqTg5Ui3/1oioCfbz8pUxpNgkblwodWL75 s+iQ== X-Gm-Message-State: AOAM530ya+9DVbhQzAVv3C/gADOklT6kwwv5nGMN9eEaAO31Eziq6JUT 8xyoZDllS2NCM2fFgl012dZ93A== X-Google-Smtp-Source: ABdhPJypcbzC8Sygt2H6tsOchP0nX83FIDMOFmMctwUnLPXxUpNPmg2MHWJfVdoABgpGsL3ZXc+z7w== X-Received: by 2002:a17:90b:3447:: with SMTP id lj7mr277218pjb.112.1637078294382; Tue, 16 Nov 2021 07:58:14 -0800 (PST) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id na15sm3261477pjb.31.2021.11.16.07.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Nov 2021 07:58:13 -0800 (PST) Date: Tue, 16 Nov 2021 07:58:11 -0800 From: Stephen Hemminger To: Cc: Subject: Re: [PATCH v7 1/1] gpu/cuda: introduce CUDA driver Message-ID: <20211116075811.02433921@hermes.local> In-Reply-To: <20211116225018.27411-2-eagostini@nvidia.com> References: <20211005224905.13505-1-eagostini@nvidia.com> <20211116225018.27411-1-eagostini@nvidia.com> <20211116225018.27411-2-eagostini@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Minor comments, overall looks fine. +/* CUDA Driver functions loaded with dlsym() */ +CUresult CUDAAPI (*sym_cuInit)(unsigned int flags) = NULL; +CUresult CUDAAPI (*sym_cuDriverGetVersion)(int *driverVersion) = NULL; +CUresult CUDAAPI (*sym_cuGetProcAddress)(const char *symbol, + void **pfn, int cudaVersion, uint64_t flags) = NULL; + Can these be local (static) since not prefixed with driver specific name. Also global variables are always loaded as zero so NULL initialization is unnecessary. For other types checkpatch would complain. > +/* NVIDIA GPU address map */ > +static struct rte_pci_id pci_id_cuda_map[] = { Can this be const?