From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id CC73A1B54F for ; Tue, 16 Apr 2019 23:19:25 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id 9so10990556pfj.13 for ; Tue, 16 Apr 2019 14:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZzP+isM6+BMRPlBGrU4YJDq0e8Ro7q0hcXFzJBWl19w=; b=StO3sENoagTT5M3DskwKD6eRh7QNgeI6i6bkoAdX1P2V2QD+g5i5wLbIV1DxT0ZLwM FfkkKio1HwTaPYRRMGpdm89a0yGPAlixeL3PdxYffMG33ruE0/VHrdKX5qlz1W/lLPhV lOFt1hVGReqPofWu1Yg80qFb8ZBlHjiJoDw55adxU0viJDokOBOISuB/c/y6Jo9BtCJn 2h7+dyM3YspTX5WPnXx1+ucb/Kfx7vps/6P6AKDO3jF1OTBFpBkx/bHV4WKgcr8oNPSE cTDhrNUD9ZeyHrsHh0IyLOcpaH8lpC3y9o3EYZqCtHPzMd1ue2cGqMS/QjP1GNOpUJus biyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZzP+isM6+BMRPlBGrU4YJDq0e8Ro7q0hcXFzJBWl19w=; b=dcikkkvxYRcSY4cJMJN2nB1ERAKib8UrF+Vr+5de4pg6gfMsnhcFLwzPbmYtdS4xDS wTChh7Yc+STA9mrB9l939cFdZQQ+tIVoxHDNlEi/u6ImmjzS/ptrHgt9jHz6MVgoK2Sk 42fk5jzLasdNBKm1HztZ661RdwSJP06tJC2QGIele5ZB9IqM0q7mkOzE580LLOoZpos3 EnnTX7YFOSeihjSZXowfwzyxiv8kgyoL8/UsMtWo4b/tF0Pucy1JaKSQ4NlYQNSQK725 AsyUFOrbNbmagtggTocaPr3/sW1UVJSz+TktXYMvPcAW1Ll0EHCCDqOmQipWTvmdJMeO holQ== X-Gm-Message-State: APjAAAVZKGyR13S1f3zO8QKxcAi2nOtZWUta19wE1vTepVwVM9WbtH+d 4qc56bW5vx+8LBMQJeGgbMjOwA== X-Google-Smtp-Source: APXvYqw8OzTdQiwan34NzvZhB1WoZeDWFxyC/J/B3+8gngwVT2ZVlug7dkyPvDNSTleYCEGqtNNRsQ== X-Received: by 2002:a65:5184:: with SMTP id h4mr56607pgq.109.1555449564848; Tue, 16 Apr 2019 14:19:24 -0700 (PDT) Received: from xps13.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b13sm52053163pfd.12.2019.04.16.14.19.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 14:19:24 -0700 (PDT) Date: Tue, 16 Apr 2019 14:19:19 -0700 From: Stephen Hemminger To: "Ananyev, Konstantin" Cc: Andrew Rybchenko , "Yigit, Ferruh" , David Christensen , "thomas@monjalon.net" , "dev@dpdk.org" , "radhika.chirra@ibm.com" , "stable@dpdk.org" Message-ID: <20190416141919.523b4c8b@xps13.lan> In-Reply-To: <2601191342CEEE43887BDE71AB9772580148A98822@irsmsx105.ger.corp.intel.com> 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> <2601191342CEEE43887BDE71AB9772580148A98822@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: , X-List-Received-Date: Tue, 16 Apr 2019 21:19:26 -0000 On Tue, 16 Apr 2019 16:46:14 +0000 "Ananyev, Konstantin" wrote: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andrew Rybchenko > > Sent: Tuesday, April 16, 2019 5:40 PM > > To: Yigit, Ferruh ; David Christensen ; thomas@monjalon.net > > Cc: dev@dpdk.org; radhika.chirra@ibm.com; stable@dpdk.org > > Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] ethdev: missing typeca= st causes C++ build error > >=20 > > On 4/16/19 7:31 PM, Ferruh Yigit wrote: =20 > > > On 4/10/2019 10:36 PM, David Christensen wrote: =20 > > >> 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= =C2=B7 > > >> -ggdb3 -mcpu=3Dnative -mtune=3Dnative -isystem=C2=B7 > > >> /home/rchirra/gen/io/ppc64include -std=3Dgnu++11 -flax-vector-conver= sions=C2=B7 > > >> -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 =E2=80=98int eth_dev_pci_specific_init(rte_eth_dev*, voi= d*)=E2=80=99: > > >> /home/rchirra/gen/io/deps/dpdk/build/include/rte_ethdev_pci.h:75:35:= =C2=B7 > > >> error: invalid conversion from =E2=80=98void*=E2=80=99 to =E2=80=98r= te_pci_device*=E2=80=99 > > >> [-fpermissive] > > >> struct rte_pci_device *pci_dev =3D bus_device; > > >> ^~~~~~~~~~ > > >> make[1]: *** [drivers/pmd.o] Error 1 > > >> > > >> $ g++ --version > > >> g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 =20 > > > 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 a= m for > > > getting the patch, any objection? =20 > >=20 > > 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 a= nd > > ideally it should be checked by build automation (otherwise we will bre= ak > > and fix it pretty often). =20 >=20 > Or as alternative, we probably can claim that PMDs in C++ are not support= ed, > and if people like to do that - they have to deal with it on their own > (create a C wrapper file, or so). > Konstantin >=20 +1 no drivers or other parts of EAL in C++ 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 C72A4A00E6 for ; Tue, 16 Apr 2019 23:19:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C624B1B561; Tue, 16 Apr 2019 23:19:27 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id CC73A1B54F for ; Tue, 16 Apr 2019 23:19:25 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id 9so10990556pfj.13 for ; Tue, 16 Apr 2019 14:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZzP+isM6+BMRPlBGrU4YJDq0e8Ro7q0hcXFzJBWl19w=; b=StO3sENoagTT5M3DskwKD6eRh7QNgeI6i6bkoAdX1P2V2QD+g5i5wLbIV1DxT0ZLwM FfkkKio1HwTaPYRRMGpdm89a0yGPAlixeL3PdxYffMG33ruE0/VHrdKX5qlz1W/lLPhV lOFt1hVGReqPofWu1Yg80qFb8ZBlHjiJoDw55adxU0viJDokOBOISuB/c/y6Jo9BtCJn 2h7+dyM3YspTX5WPnXx1+ucb/Kfx7vps/6P6AKDO3jF1OTBFpBkx/bHV4WKgcr8oNPSE cTDhrNUD9ZeyHrsHh0IyLOcpaH8lpC3y9o3EYZqCtHPzMd1ue2cGqMS/QjP1GNOpUJus biyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZzP+isM6+BMRPlBGrU4YJDq0e8Ro7q0hcXFzJBWl19w=; b=dcikkkvxYRcSY4cJMJN2nB1ERAKib8UrF+Vr+5de4pg6gfMsnhcFLwzPbmYtdS4xDS wTChh7Yc+STA9mrB9l939cFdZQQ+tIVoxHDNlEi/u6ImmjzS/ptrHgt9jHz6MVgoK2Sk 42fk5jzLasdNBKm1HztZ661RdwSJP06tJC2QGIele5ZB9IqM0q7mkOzE580LLOoZpos3 EnnTX7YFOSeihjSZXowfwzyxiv8kgyoL8/UsMtWo4b/tF0Pucy1JaKSQ4NlYQNSQK725 AsyUFOrbNbmagtggTocaPr3/sW1UVJSz+TktXYMvPcAW1Ll0EHCCDqOmQipWTvmdJMeO holQ== X-Gm-Message-State: APjAAAVZKGyR13S1f3zO8QKxcAi2nOtZWUta19wE1vTepVwVM9WbtH+d 4qc56bW5vx+8LBMQJeGgbMjOwA== X-Google-Smtp-Source: APXvYqw8OzTdQiwan34NzvZhB1WoZeDWFxyC/J/B3+8gngwVT2ZVlug7dkyPvDNSTleYCEGqtNNRsQ== X-Received: by 2002:a65:5184:: with SMTP id h4mr56607pgq.109.1555449564848; Tue, 16 Apr 2019 14:19:24 -0700 (PDT) Received: from xps13.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b13sm52053163pfd.12.2019.04.16.14.19.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 14:19:24 -0700 (PDT) Date: Tue, 16 Apr 2019 14:19:19 -0700 From: Stephen Hemminger To: "Ananyev, Konstantin" Cc: Andrew Rybchenko , "Yigit, Ferruh" , David Christensen , "thomas@monjalon.net" , "dev@dpdk.org" , "radhika.chirra@ibm.com" , "stable@dpdk.org" Message-ID: <20190416141919.523b4c8b@xps13.lan> In-Reply-To: <2601191342CEEE43887BDE71AB9772580148A98822@irsmsx105.ger.corp.intel.com> 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> <2601191342CEEE43887BDE71AB9772580148A98822@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: <20190416211919.zGONMV7yduNH2iLjzc-ZbZNo-W4IBuAP3s6-n3Tiw58@z> On Tue, 16 Apr 2019 16:46:14 +0000 "Ananyev, Konstantin" wrote: > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Andrew Rybchenko > > Sent: Tuesday, April 16, 2019 5:40 PM > > To: Yigit, Ferruh ; David Christensen ; thomas@monjalon.net > > Cc: dev@dpdk.org; radhika.chirra@ibm.com; stable@dpdk.org > > Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] ethdev: missing typeca= st causes C++ build error > >=20 > > On 4/16/19 7:31 PM, Ferruh Yigit wrote: =20 > > > On 4/10/2019 10:36 PM, David Christensen wrote: =20 > > >> 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= =C2=B7 > > >> -ggdb3 -mcpu=3Dnative -mtune=3Dnative -isystem=C2=B7 > > >> /home/rchirra/gen/io/ppc64include -std=3Dgnu++11 -flax-vector-conver= sions=C2=B7 > > >> -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 =E2=80=98int eth_dev_pci_specific_init(rte_eth_dev*, voi= d*)=E2=80=99: > > >> /home/rchirra/gen/io/deps/dpdk/build/include/rte_ethdev_pci.h:75:35:= =C2=B7 > > >> error: invalid conversion from =E2=80=98void*=E2=80=99 to =E2=80=98r= te_pci_device*=E2=80=99 > > >> [-fpermissive] > > >> struct rte_pci_device *pci_dev =3D bus_device; > > >> ^~~~~~~~~~ > > >> make[1]: *** [drivers/pmd.o] Error 1 > > >> > > >> $ g++ --version > > >> g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 =20 > > > 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 a= m for > > > getting the patch, any objection? =20 > >=20 > > 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 a= nd > > ideally it should be checked by build automation (otherwise we will bre= ak > > and fix it pretty often). =20 >=20 > Or as alternative, we probably can claim that PMDs in C++ are not support= ed, > and if people like to do that - they have to deal with it on their own > (create a C wrapper file, or so). > Konstantin >=20 +1 no drivers or other parts of EAL in C++