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 8AFFAA0032; Tue, 16 Nov 2021 17:40:28 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2845941C27; Tue, 16 Nov 2021 17:40:28 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mails.dpdk.org (Postfix) with ESMTP id 3184B4115C for ; Tue, 16 Nov 2021 17:40:26 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CFB9A5C01D5; Tue, 16 Nov 2021 11:40:25 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 16 Nov 2021 11:40:25 -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= jKee/OkiHftcJ0zgK4AcsMJl8iNMCYU4oLhHPqdopt0=; b=Fz1XZykJiXiJE35t h9lGwAaBhsIvJl/rkihn3lb/3aZ+EpFDz50/gHpw8QKK7OVUfuyMsSAxcnLhpFh/ KSLq+M5aQksMxLTk7nL3LsI/5Sod0xdpgoyJuQ7fC8fxIt3rSZbCXKnHqTmok82+ VOaing9C11LAB4zeNBq9WpCwcM9Jpx8j6aJEGrtbV9WEKrFhSHcmfHqRjknJE8CL 4hfclUB7n8QKg0jlc2zaeccod/uXJ0s1AGy0acGFbm6Jl0gy0QHpTly1WvHC63c8 w5L4RhXpUe9mQ2HgIUhWHXmU2IwugriTcV57ZC0jR1jPXmP6SCLgDC/4pNp7w4JX OTIx4A== 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=jKee/OkiHftcJ0zgK4AcsMJl8iNMCYU4oLhHPqdop t0=; b=W0R0BsLhIW2TJwn1BB6RNdKW+WMD2f2RE15ln4eSJDhChdYwczQcqdv3Q hONUlEBVWEKqxpCefEkgfUrFxvR29A+4Sux8dZ7lfhBYoT8QI/R6k1UrbpPZgkEN VtVZ8VzqA/QxvGlrlJUH5hB6d96UB2QVGIK/eeD6bR1Ey2w49Uwk1I4NeyJv0zPi y5YUjWzRFc723W/57PJQH3y6xcIL2a4k4M2Pj5W6vtwBkYzreGaFWN49MI9gT4dm n5ydokf8x/38UplRW7RjpMvgj7Qx9RuH57oHzeMdS1OrZjuC1eSxHSkWGKW7h7GW qaBkZuAjdMB8Bh8KQekoQbOZmqsbg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfedvgdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Nov 2021 11:40:24 -0500 (EST) From: Thomas Monjalon To: eagostini@nvidia.com, Stephen Hemminger Cc: dev@dpdk.org, david.marchand@redhat.com Subject: Re: [PATCH v7 1/1] gpu/cuda: introduce CUDA driver Date: Tue, 16 Nov 2021 17:40:24 +0100 Message-ID: <4706258.s6B8IiG2J6@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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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? On a separate note, Elena did what you suggested for the logtype variable: static RTE_LOG_REGISTER_DEFAULT(cuda_logtype, NOTICE); So cuda_logtype is static. I think we should do the same for all DPDK logtypes. Volunteer for a patch?