From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 304A4A00E6 for ; Tue, 16 Apr 2019 18:39:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E6531B526; Tue, 16 Apr 2019 18:39:56 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 094991B523; Tue, 16 Apr 2019 18:39:54 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us2.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 23F0870006C; Tue, 16 Apr 2019 16:39:52 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 16 Apr 2019 17:39:46 +0100 To: Ferruh Yigit , David Christensen , CC: , , References: <1554927376-93022-1-git-send-email-drc@linux.vnet.ibm.com> <1554932214-96522-1-git-send-email-drc@linux.vnet.ibm.com> <51c69c8b-9b23-4c48-bf70-2f4881ce873b@intel.com> From: Andrew Rybchenko Message-ID: Date: Tue, 16 Apr 2019 19:39:43 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <51c69c8b-9b23-4c48-bf70-2f4881ce873b@intel.com> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24554.003 X-TM-AS-Result: No-10.917500-8.000000-10 X-TMASE-MatchedRID: QW5G6BKkLTroSitJVour/Sa1MaKuob8PC/ExpXrHizwGW3hFnC9N1VUn QAOplXiGVag3/BNY4spvnY3iEV4idHZNCOqTu0ccEroQVzSW9XS/yN2q8U674ofAYSb4KlgZJDk GkQuDnwN7DX94OzUETPGfPVYXb16AGY3jQI0kXUeXXOyNnX/prHzIY7d2+Tz9AnW+Tu2Fi4ZR18 QpzXStTi9BUTTI4YWlioFl5UK3cJ/SduMc6RnI+T5bo3ZLMFMHB+dff70WbjnZhqPLU/1bVd0pR IFbsjfbb7mJ6HbhlhFftuJwrFEhTbew1twePJJBrSFs54Y4wbW1VfZrX9mxWCaWVXQ7V/oBUc0K 47zsSVz6cKU4Z1E8xWbcfzqCTfSjZIbicOM6rh1a5ZcCRB+K/royEyYlJvYo2rA37UhDcVWyBHv 1vLf5Zw== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--10.917500-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24554.003 X-MDID: 1555432794-zzJU1d7_Ot9b Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] ethdev: missing typecast causes C++ build error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190416163943.Kw_HeSlj6ralnlnAbAXSKn2ZoiYxD3j5-Pbeia0shus@z> On 4/16/19 7:31 PM, Ferruh Yigit wrote: > On 4/10/2019 10:36 PM, David Christensen wrote: >> The function eth_dev_pci_specific_init is missing a typecast to >> (struct rte_pci_device *) for the input argument bus_device. >> This causes build issues in the GNU C++ compiler. >> >> [CXX] g++ -o utils/pcap_handle.o -c utils/pcap_handle.cc -g3· >> -ggdb3 -mcpu=native -mtune=native -isystem· >> /home/rchirra/gen/io/ppc64include -std=gnu++11 -flax-vector-conversions· >> -Werror -isystem /home/rchirra/gen/io >> >> In file included from drivers/pmd.cc:7:0: >> /home/rchirra/gen/io/deps/dpdk/build/include/rte_ethdev_pci.h: >> In function ‘int eth_dev_pci_specific_init(rte_eth_dev*, void*)’: >> /home/rchirra/gen/io/deps/dpdk/build/include/rte_ethdev_pci.h:75:35:· >> error: invalid conversion from ‘void*’ to ‘rte_pci_device*’ >> [-fpermissive] >> struct rte_pci_device *pci_dev = bus_device; >> ^~~~~~~~~~ >> make[1]: *** [drivers/pmd.o] Error 1 >> >> $ g++ --version >> g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 > This problem is while building a driver with c++ compiler, but since the > solution is a simple casting, which doesn't have any side affect, I am for > getting the patch, any objection? It should be a decision that we support PMDs in C++ (if I understand the usage correctly) and it will require all headers to be compatible and ideally it should be checked by build automation (otherwise we will break and fix it pretty often).