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 9365BA0A02 for ; Thu, 14 Jan 2021 11:56:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C0F1141132; Thu, 14 Jan 2021 11:56:02 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 2B66C141121; Thu, 14 Jan 2021 11:56:00 +0100 (CET) IronPort-SDR: bpv6BQ48UC64d+66EeNzP8s5z1ajRxq4QtQKgi1omLT39CfC1FjacAn4cC5qQOA8h9D+H4mU4z OjrP3cUcTniA== X-IronPort-AV: E=McAfee;i="6000,8403,9863"; a="178497359" X-IronPort-AV: E=Sophos;i="5.79,347,1602572400"; d="scan'208";a="178497359" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2021 02:55:58 -0800 IronPort-SDR: ZuqAnn42X4U6Bzs1eJoD/G834IICwR3GanPUXKZP7LDe+PWa/RZwK63tpQS2PAnUALTsYfhaJz TLPdfMbTgVNQ== X-IronPort-AV: E=Sophos;i="5.79,347,1602572400"; d="scan'208";a="424911633" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.16.206]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 14 Jan 2021 02:55:57 -0800 Date: Thu, 14 Jan 2021 10:55:54 +0000 From: Bruce Richardson To: Dmitry Kozlyuk Cc: Tyler Retzlaff , dev@dpdk.org, navasile@linux.microsoft.com, stable@dpdk.org Message-ID: <20210114105554.GA1959@bricha3-MOBL.ger.corp.intel.com> References: <1610414325-9104-1-git-send-email-roretzla@linux.microsoft.com> <20210113205255.6e865a04@sovereign> <20210114054549.GA27612@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <20210114100557.3ec44961@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210114100557.3ec44961@sovereign> Subject: Re: [dpdk-stable] [PATCH] eal/headers: explicitly cast void * to type * X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Thu, Jan 14, 2021 at 10:05:57AM +0300, Dmitry Kozlyuk wrote: > On Wed, 13 Jan 2021 21:45:49 -0800, Tyler Retzlaff wrote: > > On Wed, Jan 13, 2021 at 08:52:55PM +0300, Dmitry Kozlyuk wrote: > > > On Mon, 11 Jan 2021 17:18:45 -0800, Tyler Retzlaff wrote: > > > > Explicitly cast void * to type * so that eal headers may be > > > > compiled as C or C++. > > > > > > Topic should probably be "eal/windows". > > > > i'll submit a new rev that changes this, it's not really windows > > specific but i guess windows is the only people crazy enough to use > > c++. > > 1. Topic usually describe area of changes, rte_os.h is in windows > directory. > > 2. It's a perfectly valid concern that public headers must be usable from > C++. > > > > > > diff --git a/lib/librte_ethdev/rte_ethdev_pci.h > > > > b/lib/librte_ethdev/rte_ethdev_pci.h index bf715896a..c20be29b1 > > > > 100644 --- a/lib/librte_ethdev/rte_ethdev_pci.h +++ > > > > b/lib/librte_ethdev/rte_ethdev_pci.h @@ -47,7 +47,7 @@ > > > > rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev, > > > > > > > > static inline int eth_dev_pci_specific_init(struct rte_eth_dev > > > > *eth_dev, void *bus_device) { - struct rte_pci_device > > > > *pci_dev = bus_device; + struct rte_pci_device *pci_dev = > > > > (struct rte_pci_device *)bus_device; > > > > > > > > if (!pci_dev) return -ENODEV; > > > > > > This is a private header, it's never exposed---why the change is > > > needed (not that I have a strong opinion, though)? > > > > interesting, i'll look into why/how it is being included and confirm. i > > suppose the question in the back of my mind is if it is private then > > why is the header being installed at all? > > + Bruce > > If it's a public header then maybe it's missing a @file? > My 2c on this in general... The use of public vs private headers is not always clear, sadly, in DPDK, for historical reasons. With the make builds, libraries picked up headers from other libraries via the "include" folder for all of DPDK, meaning that if a particular header was internal only but used by multiple other libs, it was placed in "include" for simplicity, rather than having each library using it having to have separate "-I/path/to/header" cflags specified. With the switch to meson, this common folder use is no longer be the case, but because of the old way of doing things it may be that in the transition some private headers were inadvertently kept as public (and possibly vice versa, though that is more likely to be spotted by now). /Bruce