* Bugs in newest patches @ 2014-11-06 20:21 Keunhong Lee [not found] ` <CAKBXKmBUgTBWvMnQEfE_nms7p9v32edwa2V2oVuwZrx+ZRhPrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Keunhong Lee @ 2014-11-06 20:21 UTC (permalink / raw) To: dev-VfR2kkLFssw@public.gmane.org Hi. I just pulled new patches from the master branch, and found that it doesn't work with C++. in lib/librte_eal/common/include/generic/rte_cycles.h missing opening extern "C" in commit fa4001c30ee9d9ecfb3ca5d93d68ef0394e9950a here is the fix. ----- * Simple Time Reference Functions (Cycles and HPET). */ +#ifdef __cplusplus +extern "C" { +#endif + #include <stdint.h> #include <rte_debug.h> #include <rte_atomic.h> ---- Keunhong. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAKBXKmBUgTBWvMnQEfE_nms7p9v32edwa2V2oVuwZrx+ZRhPrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Bugs in newest patches [not found] ` <CAKBXKmBUgTBWvMnQEfE_nms7p9v32edwa2V2oVuwZrx+ZRhPrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-11-06 21:05 ` Thomas Monjalon 2014-11-07 1:26 ` Keunhong Lee 2014-11-07 6:26 ` [PATCH] eal: fix C++ compilation issue after headers rework David Marchand 1 sibling, 1 reply; 6+ messages in thread From: Thomas Monjalon @ 2014-11-06 21:05 UTC (permalink / raw) To: Keunhong Lee; +Cc: dev-VfR2kkLFssw Hi, 2014-11-07 05:21, Keunhong Lee: > I just pulled new patches from the master branch, and found that it doesn't > work with C++. > > in lib/librte_eal/common/include/generic/rte_cycles.h > +#ifdef __cplusplus > +extern "C" { > +#endif It's already included in lib/librte_eal/common/include/arch/x86/rte_cycles.h which includes lib/librte_eal/common/include/generic/rte_cycles.h. You shouldn't include the generic header directly. -- Thomas ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Bugs in newest patches 2014-11-06 21:05 ` Thomas Monjalon @ 2014-11-07 1:26 ` Keunhong Lee [not found] ` <CAKBXKmD7qRTHU-VmdNMAvpTnAAMuD5ZxTqoj5VUr3v4FKa6XTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Keunhong Lee @ 2014-11-07 1:26 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev-VfR2kkLFssw@public.gmane.org I did not included the generic header directly. I thought that this nested "extern C" is intended, however, according to your reply, this might be removed at all. There is a remaining """ #ifdef _cplusplus } #endif """ at the end of "generic/rte_cycles.h". I think this should be removed. This causes compile error on C++. Keunhong. 2014-11-07 6:05 GMT+09:00 Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>: > Hi, > > 2014-11-07 05:21, Keunhong Lee: > > I just pulled new patches from the master branch, and found that it > doesn't > > work with C++. > > > > in lib/librte_eal/common/include/generic/rte_cycles.h > > +#ifdef __cplusplus > > +extern "C" { > > +#endif > > It's already included in > lib/librte_eal/common/include/arch/x86/rte_cycles.h > which includes lib/librte_eal/common/include/generic/rte_cycles.h. > > You shouldn't include the generic header directly. > > -- > Thomas > ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAKBXKmD7qRTHU-VmdNMAvpTnAAMuD5ZxTqoj5VUr3v4FKa6XTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Bugs in newest patches [not found] ` <CAKBXKmD7qRTHU-VmdNMAvpTnAAMuD5ZxTqoj5VUr3v4FKa6XTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-11-07 6:14 ` David Marchand 0 siblings, 0 replies; 6+ messages in thread From: David Marchand @ 2014-11-07 6:14 UTC (permalink / raw) To: Keunhong Lee; +Cc: dev-VfR2kkLFssw@public.gmane.org Hello, On Fri, Nov 7, 2014 at 2:26 AM, Keunhong Lee <dlrmsghd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I did not included the generic header directly. > I thought that this nested "extern C" is intended, > however, according to your reply, this might be removed at all. > > There is a remaining > """ > #ifdef _cplusplus > } > #endif > """ > at the end of "generic/rte_cycles.h". > I think this should be removed. This causes compile error on C++. > Argh, good catch. I will send a fix (it looks to be the only one remaining). -- David Marchand ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] eal: fix C++ compilation issue after headers rework [not found] ` <CAKBXKmBUgTBWvMnQEfE_nms7p9v32edwa2V2oVuwZrx+ZRhPrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-11-06 21:05 ` Thomas Monjalon @ 2014-11-07 6:26 ` David Marchand [not found] ` <1415341580-28210-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: David Marchand @ 2014-11-07 6:26 UTC (permalink / raw) To: dev-VfR2kkLFssw Following the big headers rework, all C++ stuff has moved to arch-specific headers. The generic headers should not contain this so that this is done only once. There was a remaining #ifdef __cplusplus in "eal: split CPU cycle operation to architecture specific" (fa4001c30ee9). Reported-by: Keunhong Lee <dlrmsghd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Signed-off-by: David Marchand <david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> --- lib/librte_eal/common/include/generic/rte_cycles.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h index c42b90b..7700f41 100644 --- a/lib/librte_eal/common/include/generic/rte_cycles.h +++ b/lib/librte_eal/common/include/generic/rte_cycles.h @@ -202,8 +202,4 @@ rte_delay_ms(unsigned ms) rte_delay_us(ms * 1000); } -#ifdef __cplusplus -} -#endif - #endif /* _RTE_CYCLES_H_ */ -- 2.1.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1415341580-28210-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] eal: fix C++ compilation issue after headers rework [not found] ` <1415341580-28210-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> @ 2014-11-07 11:21 ` Thomas Monjalon 0 siblings, 0 replies; 6+ messages in thread From: Thomas Monjalon @ 2014-11-07 11:21 UTC (permalink / raw) To: David Marchand, Keunhong Lee; +Cc: dev-VfR2kkLFssw > Following the big headers rework, all C++ stuff has moved to arch-specific > headers. The generic headers should not contain this so that this is done only > once. > There was a remaining #ifdef __cplusplus in "eal: split CPU cycle operation to > architecture specific" (fa4001c30ee9). > > Reported-by: Keunhong Lee <dlrmsghd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Signed-off-by: David Marchand <david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> Acked-by: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> Applied Thanks -- Thomas ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-07 11:21 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-06 20:21 Bugs in newest patches Keunhong Lee [not found] ` <CAKBXKmBUgTBWvMnQEfE_nms7p9v32edwa2V2oVuwZrx+ZRhPrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-11-06 21:05 ` Thomas Monjalon 2014-11-07 1:26 ` Keunhong Lee [not found] ` <CAKBXKmD7qRTHU-VmdNMAvpTnAAMuD5ZxTqoj5VUr3v4FKa6XTw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-11-07 6:14 ` David Marchand 2014-11-07 6:26 ` [PATCH] eal: fix C++ compilation issue after headers rework David Marchand [not found] ` <1415341580-28210-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> 2014-11-07 11:21 ` 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).