From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E73A7A0032;
	Tue, 16 Nov 2021 17:35:57 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id D008B411EE;
	Tue, 16 Nov 2021 17:35:57 +0100 (CET)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com
 [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 8A196411AB
 for <dev@dpdk.org>; Tue, 16 Nov 2021 17:35:56 +0100 (CET)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id 3B01A5C025D;
 Tue, 16 Nov 2021 11:35:56 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute5.internal (MEProxy); Tue, 16 Nov 2021 11:35:56 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm2; bh=
 3ggc10wbKokBZkJQRqURnEFRymYAtCwVqtz+HHhhvwc=; b=ZpkHUmuCUtIYqXpe
 8i3f93yHX7mWklJaZHxW6qP67VT92SYvwxB1bf6k+Kz30Q/bhvQ260paXm/zk8sx
 UExNxdPFrcRfPOYs6uAb6hyqQInu6ipKupSSPkoXo0S/PRozNXQW/NR43MHJ4XEb
 9Ab6wwyZPdXR9Ma0diul/TJ30boLI89UQmk1A7sjxSDLjNkchYIhPMDMdIpTZRaa
 DIH6lPuIICLHoam3MnQDRUbN66Pl8f9/gynWyyAOMqdENceAT6ms66BnRELZw7mD
 5L3sNubgv3ZLsjoZII+C1pZjVOBBOa/8ATwzIHxHeRdUK6uY5PXNYBkletb2fE42
 4DW24g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=3ggc10wbKokBZkJQRqURnEFRymYAtCwVqtz+HHhhv
 wc=; b=RY3G4BxrI6vVBJEMm21yYGX6SuzxQfgsIEW2/JzeY0lVB1KAEX4o5wyK9
 WrxRL5uPrjWCl+LHoWpPv8vjuSahssZisYFA/zIUn9FBukPHIKfKdpWoCh/QLsjf
 DARAwUZsfQR9Z1JfusWOYs9ogSyt2Q6ZZghHJiQ1qMKSrjUrvhlHMELwSJwVHyae
 a1xIEzezb+KgB0Fti5nkAyOuEiwdSYPR9SzF+7yFlxT1efBLHLizlOiv6LWa1IdL
 8//CzP85kJZWGGv2TBvNFrB3fETllzaaAPSLJ/t5eEeaNFmY8ORjojyyJ7Rg9IQd
 n08Q+TSyEB8bdZKhsMx5NH4+OpT3Q==
X-ME-Sender: <xms:7N2TYaOAHzKAaSfC-W6mWyYf69kWQqwt4MxlgPjD-ylxFI0cLt0aNQ>
 <xme:7N2TYY9TNt21kWSyrPDvM8MkK5874idBBssjtMU6Nz5-AtP76iUU1NItqHkAZpap5
 o_z-Nl4tFTZfyv5sw>
X-ME-Received: <xmr:7N2TYRRmaAC4ALbROx8wSu5YNW_dXiPcm6fJx6CgZSMvub4ljVNm0-RLdgFuGbYazYALzo225hmWhyG_sG_52bKIYQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfedvgdekkecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf
 frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei
 iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh
 hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:7N2TYavafK-tgHkyXUhSced53LzpLecPcfTmfihkTVp2pJ-rqDY-Pw>
 <xmx:7N2TYSeBhgAmVl7Ma31mKl-dDluoPvWgiCje2HQN7J5NWg8oOsWPVg>
 <xmx:7N2TYe2jKHQQOyyIOJjurswRqKnDV8dD4UH1wYj4u15VxBD4aBYR5Q>
 <xmx:7N2TYWFw9hWum_no6paiqAfDwR2ImoRhuFQMGtMXeKvjRg0O8rOLKg>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 16 Nov 2021 11:35:55 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: eagostini@nvidia.com, Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [PATCH v7 1/1] gpu/cuda: introduce CUDA driver
Date: Tue, 16 Nov 2021 17:35:54 +0100
Message-ID: <3881340.pjHXIknHdc@thomas>
In-Reply-To: <20211116075811.02433921@hermes.local>
References: <20211005224905.13505-1-eagostini@nvidia.com>
 <20211116225018.27411-2-eagostini@nvidia.com>
 <20211116075811.02433921@hermes.local>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

16/11/2021 16:58, Stephen Hemminger:
> 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?

I didn't really push yet, so I can do this fixups now.