diff mbox series

[v3] service: support C++ linkage

Message ID 20200709123216.47707-1-levendsayar@gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series [v3] service: support C++ linkage | expand

Checks

Context Check Description
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Levend Sayar July 9, 2020, 12:32 p.m. UTC
From: Levend Sayar <levendsayar@gmail.com>

"extern C" define is added to rte_service_component.h file
to be able to use in C++ context

Signed-off-by: Levend Sayar <levendsayar@gmail.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/include/rte_service_component.h | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Thomas Monjalon July 9, 2020, 1:21 p.m. UTC | #1
09/07/2020 14:32, levendsayar@gmail.com:
> From: Levend Sayar <levendsayar@gmail.com>
> 
> "extern C" define is added to rte_service_component.h file
> to be able to use in C++ context

It is a bug.
The title should be "service: fix C++ linkage"
And these tags must be added:
Fixes: 21698354c832 ("service: introduce service cores concept")
Cc: stable@dpdk.org

If you agree, I can do the change while merging.
Levend Sayar July 9, 2020, 1:56 p.m. UTC | #2
Sure I agree Thomas.

Thanks in advance.

Best,
Levend

On Thu, Jul 9, 2020 at 4:21 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> 09/07/2020 14:32, levendsayar@gmail.com:
> > From: Levend Sayar <levendsayar@gmail.com>
> >
> > "extern C" define is added to rte_service_component.h file
> > to be able to use in C++ context
>
> It is a bug.
> The title should be "service: fix C++ linkage"
> And these tags must be added:
> Fixes: 21698354c832 ("service: introduce service cores concept")
> Cc: stable@dpdk.org
>
> If you agree, I can do the change while merging.
>
>
>
Thomas Monjalon July 9, 2020, 2:24 p.m. UTC | #3
09/07/2020 15:56, Levend Sayar:
> On Thu, Jul 9, 2020 at 4:21 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > 09/07/2020 14:32, levendsayar@gmail.com:
> > > From: Levend Sayar <levendsayar@gmail.com>
> > >
> > > "extern C" define is added to rte_service_component.h file
> > > to be able to use in C++ context
> >
> > It is a bug.
> > The title should be "service: fix C++ linkage"
> > And these tags must be added:
> > Fixes: 21698354c832 ("service: introduce service cores concept")
> > Cc: stable@dpdk.org
> >
> > If you agree, I can do the change while merging.
> 
> Sure I agree Thomas.
> 
> Thanks in advance.

Applied, thanks
diff mbox series

Patch

diff --git a/lib/librte_eal/include/rte_service_component.h b/lib/librte_eal/include/rte_service_component.h
index b75aba11b..9e66ee7e2 100644
--- a/lib/librte_eal/include/rte_service_component.h
+++ b/lib/librte_eal/include/rte_service_component.h
@@ -9,6 +9,11 @@ 
  * Include this file if you are writing a component that requires CPU cycles to
  * operate, and you wish to run the component using service cores
  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <rte_compat.h>
 #include <rte_service.h>
 
@@ -130,4 +135,8 @@  int32_t rte_service_init(void);
  */
 void rte_service_finalize(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _SERVICE_PRIVATE_H_ */