From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
David Christensen <drc@linux.vnet.ibm.com>, <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <radhika.chirra@ibm.com>, <stable@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] ethdev: missing typecast causes C++ build error
Date: Tue, 16 Apr 2019 19:39:43 +0300 [thread overview]
Message-ID: <c003e650-c62d-fec6-d886-f643dee35bbd@solarflare.com> (raw)
Message-ID: <20190416163943.Kw_HeSlj6ralnlnAbAXSKn2ZoiYxD3j5-Pbeia0shus@z> (raw)
In-Reply-To: <51c69c8b-9b23-4c48-bf70-2f4881ce873b@intel.com>
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).
next prev parent reply other threads:[~2019-04-16 16:39 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 20:16 [dpdk-dev] [PATCH] ethdev: missing typecast from void in eth_dev_pci_specific_init David Christensen
2019-04-10 20:16 ` David Christensen
2019-04-10 20:29 ` Thomas Monjalon
2019-04-10 20:29 ` Thomas Monjalon
2019-04-10 20:58 ` David Christensen
2019-04-10 20:58 ` David Christensen
2019-04-10 21:14 ` Thomas Monjalon
2019-04-10 21:14 ` Thomas Monjalon
2019-04-12 17:13 ` Ferruh Yigit
2019-04-12 17:13 ` Ferruh Yigit
2019-04-10 21:00 ` Bruce Richardson
2019-04-10 21:00 ` Bruce Richardson
2019-04-10 23:08 ` Stephen Hemminger
2019-04-10 23:08 ` Stephen Hemminger
2019-04-12 17:09 ` Ferruh Yigit
2019-04-12 17:09 ` Ferruh Yigit
2019-04-12 17:15 ` Ananyev, Konstantin
2019-04-12 17:15 ` Ananyev, Konstantin
2019-04-12 17:25 ` Ferruh Yigit
2019-04-12 17:25 ` Ferruh Yigit
2019-04-12 17:29 ` Ferruh Yigit
2019-04-12 17:29 ` Ferruh Yigit
2019-04-12 21:31 ` Stephen Hemminger
2019-04-12 21:31 ` Stephen Hemminger
2019-04-15 16:00 ` Ferruh Yigit
2019-04-15 16:00 ` Ferruh Yigit
2019-04-10 21:36 ` [dpdk-dev] [PATCH v2] ethdev: missing typecast causes C++ build error David Christensen
2019-04-10 21:36 ` David Christensen
2019-04-16 16:31 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2019-04-16 16:31 ` Ferruh Yigit
2019-04-16 16:39 ` Andrew Rybchenko [this message]
2019-04-16 16:39 ` Andrew Rybchenko
2019-04-16 16:46 ` Ananyev, Konstantin
2019-04-16 16:46 ` Ananyev, Konstantin
2019-04-16 21:19 ` Stephen Hemminger
2019-04-16 21:19 ` Stephen Hemminger
2019-04-16 21:50 ` David Christensen
2019-04-16 21:50 ` David Christensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c003e650-c62d-fec6-d886-f643dee35bbd@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=drc@linux.vnet.ibm.com \
--cc=ferruh.yigit@intel.com \
--cc=radhika.chirra@ibm.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).