* [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ [not found] <20160718133630.58012-1-ibarnea@cisco.com> @ 2016-07-18 13:39 ` Ido Barnea (ibarnea) 2016-07-18 13:54 ` Thomas Monjalon 2016-07-21 23:23 ` Thomas Monjalon 0 siblings, 2 replies; 5+ messages in thread From: Ido Barnea (ibarnea) @ 2016-07-18 13:39 UTC (permalink / raw) To: dev Signed-off-by: Ido Barnea <ibarnea@cisco.com> --- drivers/net/ixgbe/base/ixgbe_osdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ixgbe/base/ixgbe_osdep.h b/drivers/net/ixgbe/base/ixgbe_osdep.h index 31cc1be..06d1ee1 100644 --- a/drivers/net/ixgbe/base/ixgbe_osdep.h +++ b/drivers/net/ixgbe/base/ixgbe_osdep.h @@ -108,7 +108,9 @@ typedef int16_t s16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; +#ifndef __cplusplus typedef int bool; +#endif #define mb() rte_mb() #define wmb() rte_wmb() -- 2.8.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ 2016-07-18 13:39 ` [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ Ido Barnea (ibarnea) @ 2016-07-18 13:54 ` Thomas Monjalon 2016-07-18 14:12 ` Ido Barnea (ibarnea) 2016-07-21 23:23 ` Thomas Monjalon 1 sibling, 1 reply; 5+ messages in thread From: Thomas Monjalon @ 2016-07-18 13:54 UTC (permalink / raw) To: Ido Barnea (ibarnea); +Cc: dev Hi, DPDK is a C code and do not support C++ compilation. Only the exposed headers have some C++ support requirements. > drivers/net/ixgbe/base/ixgbe_osdep.h | 2 ++ Patching this file for C++ will be probably rejected, sorry. I'm interested to understand what is your need? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ 2016-07-18 13:54 ` Thomas Monjalon @ 2016-07-18 14:12 ` Ido Barnea (ibarnea) 2016-07-18 15:13 ` Thomas Monjalon 0 siblings, 1 reply; 5+ messages in thread From: Ido Barnea (ibarnea) @ 2016-07-18 14:12 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev Actually, dozens of h files contain this code: #ifdef __cplusplus extern "C" { #endif Less common in drivers, but also exists. In Trex, we do include ixgbe_type.h from c++ code because we do some register writes ourselves to support some functionality not exposed in the DPDK API. We can continue making this change in our copy of the code only. Just trying to align our code with the official version as much as possible, and thought it might benefit others as well to make this c++ compatible. Apart from this small change, c++ compilation is supported. On 18/07/2016, 4:54 PM, "Thomas Monjalon" <thomas.monjalon@6wind.com> wrote: >Hi, > >DPDK is a C code and do not support C++ compilation. >Only the exposed headers have some C++ support requirements. > >> drivers/net/ixgbe/base/ixgbe_osdep.h | 2 ++ > >Patching this file for C++ will be probably rejected, sorry. > >I'm interested to understand what is your need? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ 2016-07-18 14:12 ` Ido Barnea (ibarnea) @ 2016-07-18 15:13 ` Thomas Monjalon 0 siblings, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2016-07-18 15:13 UTC (permalink / raw) To: Ido Barnea (ibarnea); +Cc: dev, Helin Zhang, Konstantin Ananyev 2016-07-18 14:12, Ido Barnea: > In Trex, we do include ixgbe_type.h from c++ code because we do some > register writes ourselves to support some functionality not exposed in > the DPDK API. I agree we should find a way to expose some driver-specific headers for very specific features which will never be implemented elsewhere. But ideally, we should try to fix the DPDK API. > We can continue making this change in our copy of the code only. Just > trying to align our code with the official version as much as possible, > and thought it might benefit others as well to make this c++ compatible. > Apart from this small change, c++ compilation is supported. OK. Other comment from the maintainers (cc) of this driver? PS: please avoid top-post. > On 18/07/2016, 4:54 PM, "Thomas Monjalon" <thomas.monjalon@6wind.com> wrote: > > >Hi, > > > >DPDK is a C code and do not support C++ compilation. > >Only the exposed headers have some C++ support requirements. > > > >> drivers/net/ixgbe/base/ixgbe_osdep.h | 2 ++ > > > >Patching this file for C++ will be probably rejected, sorry. > > > >I'm interested to understand what is your need? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ 2016-07-18 13:39 ` [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ Ido Barnea (ibarnea) 2016-07-18 13:54 ` Thomas Monjalon @ 2016-07-21 23:23 ` Thomas Monjalon 1 sibling, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2016-07-21 23:23 UTC (permalink / raw) To: Ido Barnea (ibarnea); +Cc: dev 2016-07-18 13:39, Ido Barnea: > Signed-off-by: Ido Barnea <ibarnea@cisco.com> Patch reconstructed (format was not applicable), and applied, thanks ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-21 23:23 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20160718133630.58012-1-ibarnea@cisco.com> 2016-07-18 13:39 ` [dpdk-dev] [PATCH] ixgbe:Prevent redefinition of bool if compiling using c++ Ido Barnea (ibarnea) 2016-07-18 13:54 ` Thomas Monjalon 2016-07-18 14:12 ` Ido Barnea (ibarnea) 2016-07-18 15:13 ` Thomas Monjalon 2016-07-21 23:23 ` Thomas Monjalon
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).