From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08348A0559; Mon, 16 Mar 2020 18:49:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E37121C0C3; Mon, 16 Mar 2020 18:49:49 +0100 (CET) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 4FFC51C0AB for ; Mon, 16 Mar 2020 18:49:48 +0100 (CET) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02GHXc6x031525 for ; Mon, 16 Mar 2020 13:49:47 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 2yrtk6whv2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 16 Mar 2020 13:49:47 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 02GHnLbP028771 for ; Mon, 16 Mar 2020 17:49:46 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma02wdc.us.ibm.com with ESMTP id 2yrpw6hs59-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 16 Mar 2020 17:49:46 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02GHnjHW40894964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 16 Mar 2020 17:49:45 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 126E4C6055 for ; Mon, 16 Mar 2020 17:49:45 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8BE1AC605A for ; Mon, 16 Mar 2020 17:49:44 +0000 (GMT) Received: from Davids-MBP.randomparity.org (unknown [9.211.144.249]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP for ; Mon, 16 Mar 2020 17:49:44 +0000 (GMT) To: dev@dpdk.org References: <20200316112951.35428-1-bruce.richardson@intel.com> From: David Christensen Message-ID: Date: Mon, 16 Mar 2020 10:49:43 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200316112951.35428-1-bruce.richardson@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-16_08:2020-03-12, 2020-03-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 adultscore=0 mlxlogscore=929 phishscore=0 bulkscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 suspectscore=1 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003160078 Subject: Re: [dpdk-dev] [PATCH] pci: fix unneeded includes in public header file 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" > The rte_pci.h file includes more header files than are actually needed, > which means that all users of it also include those headers. This patch > removes the unneeded headers - adding them elsewhere where other components > were requiring them but not including them directly. > > Fixes: c752998b5e2e ("pci: introduce library and driver") > Cc: gaetan.rivet@6wind.com > Cc: stable@dpdk.org > > Signed-off-by: Bruce Richardson > --- > drivers/bus/ifpga/rte_bus_ifpga.h | 1 + > drivers/common/mlx5/mlx5_common.h | 1 + > lib/librte_pci/rte_pci.h | 6 ------ > 3 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h > index 88a628964..a6eeaaf56 100644 > --- a/drivers/bus/ifpga/rte_bus_ifpga.h > +++ b/drivers/bus/ifpga/rte_bus_ifpga.h > @@ -17,6 +17,7 @@ extern "C" { > > #include > #include > +#include > #include > > /** Name of Intel FPGA Bus */ > diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h > index 961c60634..16de1b397 100644 > --- a/drivers/common/mlx5/mlx5_common.h > +++ b/drivers/common/mlx5/mlx5_common.h > @@ -8,6 +8,7 @@ > #include > > #include > +#include > #include > #include > #include > diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h > index c87891405..c591af010 100644 > --- a/lib/librte_pci/rte_pci.h > +++ b/lib/librte_pci/rte_pci.h > @@ -16,17 +16,11 @@ > extern "C" { > #endif > > -#include > #include > #include > -#include > #include > -#include > #include > > -#include > -#include > - > /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */ > #define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 > #define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X") > Patch is generating build errors with meson on my POWER system, though I don't see how they're POWER specific: Patch is generating build errors on my POWER system: [17/964] Compiling C object 'lib/76b5a35@@rte_pci@sta/librte_pci_rte_pci.c.o'. ../lib/librte_pci/rte_pci.c: In function ‘rte_pci_device_name’: ../lib/librte_pci/rte_pci.c:94:2: warning: implicit declaration of function ‘RTE_VERIFY’; did you mean ‘RTE_PRIO’? [-Wimplicit-function-declaration] RTE_VERIFY(size >= PCI_PRI_STR_SIZE); ^~~~~~~~~~ RTE_PRIO ../lib/librte_pci/rte_pci.c:94:2: warning: nested extern declaration of ‘RTE_VERIFY’ [-Wnested-externs] [18/964] Compiling C object 'drivers/a715181@@tmp_rte_bus_ifpga@sta/bus_ifpga_ifpga_bus.c.o'. ../drivers/bus/ifpga/ifpga_bus.c: In function ‘rte_ifpga_driver_register’: ../drivers/bus/ifpga/ifpga_bus.c:50:2: warning: implicit declaration of function ‘RTE_VERIFY’; did you mean ‘RTE_PRIO’? [-Wimplicit-function-declaration] RTE_VERIFY(driver); ^~~~~~~~~~ RTE_PRIO ../drivers/bus/ifpga/ifpga_bus.c:50:2: warning: nested extern declaration of ‘RTE_VERIFY’ [-Wnested-externs] [332/964] Linking target lib/librte_pci.so.20.0.2. FAILED: lib/librte_pci.so.20.0.2 cc -o lib/librte_pci.so.20.0.2 'lib/76b5a35@@rte_pci@sta/librte_pci_rte_pci.c.o' -Wl,--no-undefined -Wl,--as-needed -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,librte_pci.so.20.0 -Wl,--no-as-needed -pthread -lm -ldl -lnuma lib/librte_eal.so.20.0.2 lib/librte_kvargs.so.20.0.2 -Wl,--end-group -Wl,--version-script=/home/drc/src/dpdk/lib/librte_pci/rte_pci_version.map '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/home/drc/src/dpdk/build/lib lib/76b5a35@@rte_pci@sta/librte_pci_rte_pci.c.o: In function `rte_pci_device_name': rte_pci.c:(.text+0x38): undefined reference to `RTE_VERIFY' rte_pci.c:(.text+0x6c): undefined reference to `RTE_VERIFY' collect2: error: ld returned 1 exit status [461/964] Compiling C object 'drivers/a715181@@tmp_rte_pmd_mlx5@sta/net_mlx5_mlx5_rxtx.c.o'. ninja: build stopped: subcommand failed. Added to the affected files resolves the problem. Dave