Skip to contentSkip to conversation

build: C++ linkage support is added to rte_service_component.h file

PATCH Superseded [email protected] 3 participants 8 messages Jul 7, 2020 – Jul 9, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: C++ linkage support is added to rte_service_component.h file

From: Levend Sayar <[email protected]>

---
 lib/librte_eal/include/rte_service_component.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
lib/librte_eal/include/rte_service_component.h +10 -1
index b75aba11b..c1eefae41 100644
@@ -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);
 
-#endif /* _SERVICE_PRIVATE_H_ */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_SERVICE_PRIVATE_H_ */
Signature · 1 line
2.27.0
#1 lore raw

07/07/2020 14:25, [email protected]:

Quoted 1 line

From: Levend Sayar <[email protected]>

Would be good to have a short explanation, even if obvious.

Quoted 4 lines
---
 lib/librte_eal/include/rte_service_component.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Is it the only file missing such C++ guard?

Quoted 25 lines
lib/librte_eal/include/rte_service_component.h +10 -1
@@ -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);
 
-#endif /* _SERVICE_PRIVATE_H_ */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_SERVICE_PRIVATE_H_ */
#2 lore raw
Quoted 9 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, July 7, 2020 3:19 PM
To: [email protected]
Cc: [email protected]; Van Haaren, Harry <[email protected]>; [email protected]
Subject: Re: [PATCH] build: C++ linkage support is added to rte_service_component.h file

Quoted 4 lines

07/07/2020 14:25, [email protected]:

Quoted 1 line

From: Levend Sayar <[email protected]>

Would be good to have a short explanation, even if obvious.

+1

Quoted 1 line
Quoted 1 line

With a short description in the commit message, you can include ack in v2

<snip patch>

#3 lore raw

Sorry.
I thought that it does not need to have any explanation since it is obvious as you said.
But will add an explanation right now and push again.

Thanks for your attention.

Best,
Levend

Quoted 23 lines · Harry
Quoted 9 lines

-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Tuesday, July 7, 2020 3:19 PM
To: [email protected]
Cc: [email protected]; Van Haaren, Harry <[email protected]>; [email protected]
Subject: Re: [PATCH] build: C++ linkage support is added to rte_service_component.h file

Quoted 4 lines

07/07/2020 14:25, [email protected]:

Quoted 1 line

From: Levend Sayar <[email protected]>

Would be good to have a short explanation, even if obvious.

+1

Quoted 1 line
Quoted 1 line

With a short description in the commit message, you can include ack in v2

<snip patch>

#4 lore raw

PATCH v3 1/1 service: support C++ linkage

In reply to [email protected]

From: Levend Sayar <[email protected]>

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

---
 lib/librte_eal/include/rte_service_component.h | 9 +++++++++
 1 file changed, 9 insertions(+)
lib/librte_eal/include/rte_service_component.h +9 -0
index b75aba11b..9e66ee7e2 100644
@@ -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_ */
Signature · 1 line
2.27.0
#5 lore raw

Re: [dpdk-dev] [PATCH v3] service: support C++ linkage

09/07/2020 14:32, [email protected]:

Quoted 4 lines

From: Levend Sayar <[email protected]>

"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")

If you agree, I can do the change while merging.

#6 lore raw

Re: [dpdk-dev] [PATCH v3] service: support C++ linkage

Sure I agree Thomas.

Thanks in advance.

Best,
Levend

Quoted 16 lines · Thomas Monjalon

09/07/2020 14:32, [email protected]:

Quoted 4 lines

From: Levend Sayar <[email protected]>

"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")

If you agree, I can do the change while merging.

#7 lore raw

Re: [dpdk-dev] [PATCH v3] service: support C++ linkage

09/07/2020 15:56, Levend Sayar:

Quoted 13 lines · Thomas Monjalon
Quoted 12 lines

09/07/2020 14:32, [email protected]:

Quoted 4 lines

From: Levend Sayar <[email protected]>

"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")
Quoted 5 lines
Quoted 1 line

If you agree, I can do the change while merging.

Sure I agree Thomas.

Thanks in advance.

Applied, thanks