[RFC,1/3] net/ixgbe: avoid multpile definitions of 'bool'
diff mbox series

Message ID 20190901065810.15137-2-dharmik.thakkar@arm.com
State New
Delegated to: David Marchand
Headers show
Series
  • RCU integration with hash library
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Dharmik Thakkar Sept. 1, 2019, 6:58 a.m. UTC
Compilation issue arises due to multiple definitions of 'bool'
in 'ixgbe_ethdev.h'.
(Please note that this issue showed up when 'rte_rcu_qsbr.h' got included
within 'rte_hash.h', because 'rte_rcu_qsbr.h' includes 'stdbool.h'. This
is a temporary fix. Recommend suggesting better solution.)

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Hemminger Sept. 5, 2019, 3:26 p.m. UTC | #1
On Sun,  1 Sep 2019 06:58:08 +0000
Dharmik Thakkar <dharmik.thakkar@arm.com> wrote:

> Compilation issue arises due to multiple definitions of 'bool'
> in 'ixgbe_ethdev.h'.
> (Please note that this issue showed up when 'rte_rcu_qsbr.h' got included
> within 'rte_hash.h', because 'rte_rcu_qsbr.h' includes 'stdbool.h'. This
> is a temporary fix. Recommend suggesting better solution.)
> 
> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
> index 6e9ed2e10f3c..dd4d6c022545 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.h
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
> @@ -18,6 +18,7 @@
>  #include <rte_flow.h>
>  #include <rte_time.h>
>  #include <rte_hash.h>
> +#undef bool
>  #include <rte_pci.h>
>  #include <rte_bus_pci.h>
>  #include <rte_tm_driver.h>

Just fix ixgbe_ethdev.h to include stdbool itself?

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 6e9ed2e10f3c..cf32b1761acb 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -6,6 +6,7 @@
 #define _IXGBE_ETHDEV_H_
 
 #include <stdint.h>
+#include <stdbool.h>
 
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_dcb.h"
Dharmik Thakkar Sept. 5, 2019, 8:10 p.m. UTC | #2
> On Sep 5, 2019, at 10:26 AM, Stephen Hemminger <stephen@networkplumber.org> wrote:
> 
> On Sun,  1 Sep 2019 06:58:08 +0000
> Dharmik Thakkar <dharmik.thakkar@arm.com> wrote:
> 
>> Compilation issue arises due to multiple definitions of 'bool'
>> in 'ixgbe_ethdev.h'.
>> (Please note that this issue showed up when 'rte_rcu_qsbr.h' got included
>> within 'rte_hash.h', because 'rte_rcu_qsbr.h' includes 'stdbool.h'. This
>> is a temporary fix. Recommend suggesting better solution.)
>> 
>> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
>> ---
>> drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
>> index 6e9ed2e10f3c..dd4d6c022545 100644
>> --- a/drivers/net/ixgbe/ixgbe_ethdev.h
>> +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
>> @@ -18,6 +18,7 @@
>> #include <rte_flow.h>
>> #include <rte_time.h>
>> #include <rte_hash.h>
>> +#undef bool
>> #include <rte_pci.h>
>> #include <rte_bus_pci.h>
>> #include <rte_tm_driver.h>
> 
> Just fix ixgbe_ethdev.h to include stdbool itself?
Conflicts with 'typedef int  bool;’ in ixgbe_osdep.h:86
> 
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
> index 6e9ed2e10f3c..cf32b1761acb 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.h
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
> @@ -6,6 +6,7 @@
> #define _IXGBE_ETHDEV_H_
> 
> #include <stdint.h>
> +#include <stdbool.h>
> 
> #include "base/ixgbe_type.h"
> #include "base/ixgbe_dcb.h"
Stephen Hemminger Sept. 5, 2019, 8:23 p.m. UTC | #3
On Thu, 5 Sep 2019 20:10:05 +0000
Dharmik Thakkar <Dharmik.Thakkar@arm.com> wrote:

> > On Sep 5, 2019, at 10:26 AM, Stephen Hemminger <stephen@networkplumber.org> wrote:
> > 
> > On Sun,  1 Sep 2019 06:58:08 +0000
> > Dharmik Thakkar <dharmik.thakkar@arm.com> wrote:
> >   
> >> Compilation issue arises due to multiple definitions of 'bool'
> >> in 'ixgbe_ethdev.h'.
> >> (Please note that this issue showed up when 'rte_rcu_qsbr.h' got included
> >> within 'rte_hash.h', because 'rte_rcu_qsbr.h' includes 'stdbool.h'. This
> >> is a temporary fix. Recommend suggesting better solution.)
> >> 
> >> Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
> >> ---
> >> drivers/net/ixgbe/ixgbe_ethdev.h | 1 +
> >> 1 file changed, 1 insertion(+)
> >> 
> >> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
> >> index 6e9ed2e10f3c..dd4d6c022545 100644
> >> --- a/drivers/net/ixgbe/ixgbe_ethdev.h
> >> +++ b/drivers/net/ixgbe/ixgbe_ethdev.h
> >> @@ -18,6 +18,7 @@
> >> #include <rte_flow.h>
> >> #include <rte_time.h>
> >> #include <rte_hash.h>
> >> +#undef bool
> >> #include <rte_pci.h>
> >> #include <rte_bus_pci.h>
> >> #include <rte_tm_driver.h>  
> > 
> > Just fix ixgbe_ethdev.h to include stdbool itself?  
> Conflicts with 'typedef int  bool;’ in ixgbe_osdep.h:86

Then fix the ixgbe_osdep.h. It is the problem.

Patch
diff mbox series

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 6e9ed2e10f3c..dd4d6c022545 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -18,6 +18,7 @@ 
 #include <rte_flow.h>
 #include <rte_time.h>
 #include <rte_hash.h>
+#undef bool
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_tm_driver.h>