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 9F855A0352; Mon, 14 Feb 2022 18:49:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7905240DDA; Mon, 14 Feb 2022 18:49:56 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 83A3A4067E for ; Mon, 14 Feb 2022 18:49:55 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1B92B5C0252; Mon, 14 Feb 2022 12:49:53 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 14 Feb 2022 12:49:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=8c13nfG8JMtzuO OlavOwzHPxE30EeedobR3sEOcY9Mw=; b=bWSNTDEqC1RSWs6B95PXQjq3xMAhrg zc2u5SK0YlDAfMqOjpf/k8k5Y7OyowtOcGIA2P5DCE9MGiKvJ99ygSUN32a8w15o x2ud7mnRVdksI6E5FtOOnpQTNPtELz8qmfNC8l+FL+TbDiT8+bXErcKp/TzO3am6 19YGXsmaUNI3RvSqNhG4Zul19WbBHAeZ+0UuUFxQu2jiyeKWxN0Vz4MVC2ydAE8K 2jmktq5thJ3L5x287cIvqtLMvgjD+KYszLcXMxLA0m33+P6Ptp1AHy1qfJtoFWRF BNA78zgKhuu7HuRjkIC4lAUFaHLM/Jpb6U7DaPZgiAaFlwFfMxc1d9Qg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=8c13nfG8JMtzuOOlavOwzHPxE30EeedobR3sEOcY9 Mw=; b=eOCAThpC5buIBAzC7IQCwoeS6u1DfuHMriLkYckjbbyTpZ0vLBOCv18OT K0MInkNkOnQx+YpZwQoK6/phNaQIWnCWyiJOBMqYzxFRab5RSWvY9WAqRH/2pV3r ZRJWCNg2hUHvPJXd+5V2p7S+MLdvJdBQ5xr5RsxAdmhLZLa4aARNPULfEzxeIemP HrZVYtycj7nSKN2so+wuXoXoyFMe8ebuidgHibeD4CXk0+GwFh3mQi2ovtDP88P9 +YsDSAcWSaDH+M5xMFGw/rSxNDM0yEZhwYUS452rc/F/HcF30Iz9Ok7j6uL7T8U8 /BClBZfbfFCFKcazSaZBc0UJ39whA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjedvgddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepffdvffejueetleefieeludduuefgteejleevfeekjeefieegheet ffdvkeefgedunecuffhomhgrihhnpeguphgukhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhn rdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Feb 2022 12:49:51 -0500 (EST) From: Thomas Monjalon To: Stephen Hemminger Cc: Bruce Richardson , dev@dpdk.org, Tyler Retzlaff , ocardona@microsoft.com, roretzla@microsoft.com, david.marchand@redhat.com, ferruh.yigit@intel.com Subject: Re: out of tree driver builds broken with C++ Date: Mon, 14 Feb 2022 18:49:48 +0100 Message-ID: <58747087.matp6XCIr4@thomas> In-Reply-To: <20220214092435.6fb6964e@hermes.local> References: <20220214091350.GA2793@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20220214092435.6fb6964e@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 14/02/2022 18:t24, Stephen Hemminger: > On Mon, 14 Feb 2022 15:03:43 +0000 > Bruce Richardson wrote: > > > On Mon, Feb 14, 2022 at 11:43:35AM +0000, Bruce Richardson wrote: > > > On Mon, Feb 14, 2022 at 12:19:24PM +0100, Thomas Monjalon wrote: > > > > 14/02/2022 11:45, Bruce Richardson: > > > > > On Mon, Feb 14, 2022 at 10:22:08AM +0100, Thomas Monjalon wrote: > > > > > > 14/02/2022 10:13, Tyler Retzlaff: > > > > > > > while the driver api is "internal" we agreed some time ago that drivers > > > > > > > could be built external to the dpdk tree. by enabling the meson setup > > > > > > > option -Denable_driver_sdk=true. > > > > > > > > > > > > > > it was agreed that the driver api was internal and would attract no > > > > > > > binary compatibility support which was fine. this change has now > > > > > > > imposed a further restriction that out of tree drivers have to be > > > > > > > authored in C only as non-C++ compatible code will invariably leak into > > > > > > > the internal structures. > > > > > > > > > > > > > > you won't allow us to build C++ drivers in the dpdk tree and it seems > > > > > > > now you are preventing building of C++ drivers outside of the tree too. > > > > > > > > > > > > That's the problem of non-written assumptions, they are unknown or forgotten. > > > > > > Did we agree to support out-of-tree drivers in C++? > > > > > > > > > > > > We really need to make things clear and written in documentation. > > > > > > > > > > > > > could we please re-evaluate this. > > > > > > > > > > > > Yes we can re-evaluate. > > > > > > What is the list of impacted files? > > > > > > > > > > > Hacking meson files a bit, the list of SDK header files is reported as below. > > > > > > > > > > /Bruce > > > > > > > > > > Message: SDK headers: > > > > > Message: ethdev_driver.h > > > > > Message: ethdev_pci.h > > > > > Message: ethdev_vdev.h > > > > > Message: cryptodev_pmd.h > > > > > Message: eventdev_pmd.h > > > > > Message: eventdev_pmd_pci.h > > > > > Message: eventdev_pmd_vdev.h > > > > > Message: eventdev_trace.h > > > > > Message: event_timer_adapter_pmd.h > > > > > Message: rte_dmadev_pmd.h > > > > > Message: vdpa_driver.h > > > > > > > > I see no harm in supporting C++ include of these headers. > > > > Any objection? > > > > > > > > Could we have a test in chkincs for the SDK headers? > > > > > > > Yes. It may make things a little more complicated, though, as it seems > > > these headers also have a tendency to rely on some driver headers - > > > specifically bus driver headers. > > > > > > > Working on a patch to add these to checks. However, just running a c++ > > compile does not check for valid 'extern "C"' blocks. Adding the following > > to chkincs/meson.build as a basic sanity check throws up a larger list of > > files to be looked at. > > > > Diff: > > > > +# check for extern C in files, since this is not detected as an error by the compiler > > +grep = find_program('grep', required: false) > > +if grep.found() > > + errlist = run_command([grep, '--files-without-match', '^extern "C"', dpdk_chkinc_headers], > > + check: true, capture: true).stdout().split() > > + if errlist != [] > > + error('Files missing C++ \'extern "C"\' guards:\n- ' + '\n- '.join(errlist)) > > + endif > > +endif > > + > > > > Output: > > ../buildtools/chkincs/meson.build:45:8: ERROR: Problem encountered: Files missing C++ 'extern "C"' guards: > > - /home/bruce/dpdk.org/lib/telemetry/rte_telemetry.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_bitops.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_branch_prediction.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_compat.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_hypervisor.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_keepalive.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_pci_dev_feature_defs.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_pci_dev_features.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_time.h > > - /home/bruce/dpdk.org/lib/eal/include/rte_trace_point_register.h > > - /home/bruce/dpdk.org/lib/eal/linux/include/rte_os.h > > - /home/bruce/dpdk.org/lib/ethdev/rte_dev_info.h > > - /home/bruce/dpdk.org/lib/ethdev/ethdev_driver.h > > - /home/bruce/dpdk.org/lib/ethdev/ethdev_pci.h > > - /home/bruce/dpdk.org/lib/ethdev/ethdev_vdev.h > > - /home/bruce/dpdk.org/lib/metrics/rte_metrics_telemetry.h > > - /home/bruce/dpdk.org/lib/acl/rte_acl_osdep.h > > - /home/bruce/dpdk.org/lib/bpf/bpf_def.h > > - /home/bruce/dpdk.org/lib/compressdev/rte_compressdev_internal.h > > - /home/bruce/dpdk.org/lib/cryptodev/cryptodev_pmd.h > > - /home/bruce/dpdk.org/lib/eventdev/rte_event_ring.h > > - /home/bruce/dpdk.org/lib/eventdev/eventdev_pmd.h > > - /home/bruce/dpdk.org/lib/eventdev/eventdev_pmd_pci.h > > - /home/bruce/dpdk.org/lib/eventdev/eventdev_pmd_vdev.h > > - /home/bruce/dpdk.org/lib/kni/rte_kni_common.h > > - /home/bruce/dpdk.org/lib/vhost/rte_vdpa.h > > - /home/bruce/dpdk.org/lib/vhost/rte_vhost_async.h > > - /home/bruce/dpdk.org/lib/vhost/rte_vhost_crypto.h > > - /home/bruce/dpdk.org/lib/vhost/vdpa_driver.h > > > > Regards, > > /Bruce > > The actual C++ guards are small and have no impact therefore we > should accept patches as needed. Having more guards than needed is > just noise. > > But the responsibility of telling DPDK project where they are required > should fall to any out-of-tree users who care. Sorry Stephen I don't understand. Please could you rephrase your comment?