Skip to contentSkip to conversation

tracepoint: fix compilation with C++

PATCH Superseded Pawel Wodkowski 4 participants 13 messages Aug 4, 2020 – Sep 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracepoint: fix compilation with C++

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by changing void to struct __rte_trace_header

---
 lib/librte_eal/common/eal_common_trace.c | 2 +-
 lib/librte_eal/include/rte_trace_point.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
lib/librte_eal/common/eal_common_trace.c +1 -1
index 875553d7e..18e5e64be 100644
@@ -16,7 +16,7 @@
 #include "eal_trace.h"
 
 RTE_DEFINE_PER_LCORE(volatile int, trace_point_sz);
-RTE_DEFINE_PER_LCORE(void *, trace_mem);
+RTE_DEFINE_PER_LCORE(struct __rte_trace_header *, trace_mem);
 static RTE_DEFINE_PER_LCORE(char, ctf_field[TRACE_CTF_FIELD_SIZE]);
 static RTE_DEFINE_PER_LCORE(int, ctf_count);
 
lib/librte_eal/include/rte_trace_point.h +1 -1
index b45171275..587f600ec 100644
@@ -295,7 +295,7 @@ struct __rte_trace_header {
 	uint8_t mem[];
 };
 
-RTE_DECLARE_PER_LCORE(void *, trace_mem);
+RTE_DECLARE_PER_LCORE(struct __rte_trace_header *, trace_mem);
 
 static __rte_always_inline void *
 __rte_trace_mem_get(uint64_t in)
Signature · 1 line
2.17.1
#1 lore raw

Hello Pawel,

Thanks for contributing to DPDK.

Quoted 6 lines · Pawel Wodkowski

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by changing void to struct __rte_trace_header

I Cc'd trace maintainers.
For subsequent revisions, you can do directly Cc them by calling the get-maintainer.sh script like this:

$ git send-email --to [email protected] --cc-cmd devtools/get-maintainer.sh $patch

On the form of the patch, this patch is missing a signed-off tag, please have a look at the contribution guidelines:
https://doc.dpdk.org/guides/contributing/patches.html
Do not forget to chain replies using the --in-reply-to option for git send-email.

This is a fix, so we expect a Fixes: tag in the commitlog. This tag should point at the original commit that introduced the issue.

Looking at the CI report
http://mails.dpdk.org/archives/test-report/2020-August/147927.html,
you will see that the windows part is missing an update.

$ git grep -wl trace_mem
lib/librte_eal/common/eal_common_trace.c
lib/librte_eal/include/rte_trace_point.h
lib/librte_eal/windows/eal.c
Signature · 1 line
David Marchand
#2 lore raw
Quoted 5 lines · David Marchand

Hello Pawel,

Thanks for contributing to DPDK.

Thank for all tips. I will do that and resend V2.

Paweł

#3 lore raw
In reply to David Marchand

Hello Pawel,

See answers inline.

Regards
Sunil Kumar Kori

Quoted 10 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Wednesday, August 5, 2020 1:30 PM
To: Pawel Wodkowski <[email protected]>
Cc: dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Sunil Kumar Kori <[email protected]>
Subject: [EXT] Re: [dpdk-dev] [PATCH] tracepoint: fix compilation with C++

External Email

Quoted 14 lines

----------------------------------------------------------------------
Hello Pawel,

Thanks for contributing to DPDK.

Quoted 6 lines · Pawel Wodkowski

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by changing void to struct __rte_trace_header

trace_mem is intentionally kept as void * so that it can not be accessed by application directly as it part of global header. If I understood the problem correctly, it is because of using trace_mem without typecasting and GCC does not report it as error due to implicit typecast and G++ reports it as error as it does not do implicit typecasting.

If this is the case then, I think it is better to typecast the trace_mem where ever it is being used. Anyways that will be safe for both GCC and G++. @Jerin Jacob Kollanukkaran Please suggest. If you have some thing mind.

[snippet]
--

#4 lore raw
Quoted 23 lines · Sunil Kumar Kori

Hello Pawel,

See answers inline.

Regards
Sunil Kumar Kori

Quoted 16 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Wednesday, August 5, 2020 1:30 PM
To: Pawel Wodkowski <[email protected]>
Cc: dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Sunil Kumar Kori <[email protected]>
Subject: [EXT] Re: [dpdk-dev] [PATCH] tracepoint: fix compilation with C++

External Email

----------------------------------------------------------------------
Hello Pawel,

Thanks for contributing to DPDK.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines · Pawel Wodkowski

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by changing void to struct __rte_trace_header

trace_mem is intentionally kept as void * so that it can not be accessed by application directly as it part of global header.

But this structure is well defined in this file anyway. It can be casted to 'struct __rte_trace_header *' and used. Isn't the double underscore prefix good enough warning that it is internal datatype?

But anyway, I'm not here to discuss the architecture of DPDK so lets go to the next point.

Quoted 2 lines

If I understood the problem correctly, it is because of using trace_mem without typecasting and GCC does not report it as error due to implicit typecast and G++ reports it as error as it does not do implicit typecasting.

Actually it is because in C++ implicit cast from void pointer is not allowed. So when it is used like this

     struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);

it triggers this type of error:

include/rte_trace_point.h: In function ‘void* __rte_trace_mem_get(uint64_t)’:
include/rte_per_lcore.h:44:46: error: invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive] #define RTE_PER_LCORE(name) (per_lcore_##name)
                                        ^
nclude/rte_trace_point.h:303:37: note: in expansion of macro ‘RTE_PER_LCORE’
  struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);
                                                          ^

One can add '-fpermisive' to allow this type of casting but it is only a workaround in C++ code. As you mentioned, other solution is typecast to __rte_trace_header but this is not needed in C and it have "__" prefix this why I decided to change 'void *' into 'struct __rte_trace_header *'.

Quoted 4 lines

If this is the case then, I think it is better to typecast the trace_mem where ever it is being used. Anyways that will be safe for both GCC and G++. @Jerin Jacob Kollanukkaran Please suggest. If you have some thing mind.

I'm fine any solution that make this code compile with C++. Please let me know what is the decision then I can make V2.

Paweł

Quoted 5 lines

[snippet]
--

#5 lore raw

Answers inline.

Regards
Sunil Kumar Kori

Quoted 74 lines

-----Original Message-----
From: Pawel Wodkowski <[email protected]>
Sent: Friday, August 7, 2020 12:14 AM
To: Sunil Kumar Kori <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>
Cc: dev <[email protected]>; David Marchand <[email protected]>
Subject: Re: [EXT] Re: [dpdk-dev] [PATCH] tracepoint: fix compilation with C++

Quoted 26 lines · Sunil Kumar Kori

Hello Pawel,

See answers inline.

Regards
Sunil Kumar Kori

Quoted 19 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Wednesday, August 5, 2020 1:30 PM
To: Pawel Wodkowski <[email protected]>
Cc: dev <[email protected]>; Jerin Jacob Kollanukkaran <[email protected]>; Sunil Kumar Kori <[email protected]>
Subject: [EXT] Re: [dpdk-dev] [PATCH] tracepoint: fix compilation with C++

External Email

---------------------------------------------------------------------
-
Hello Pawel,

Thanks for contributing to DPDK.

On Tue, Aug 4, 2020 at 7:52 PM Pawel Wodkowski

<[email protected]>

Quoted 7 lines
Quoted 6 lines
Quoted 5 lines · wrote:

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by changing void to struct __rte_trace_header

trace_mem is intentionally kept as void * so that it can not be accessed by

application directly as it part of global header.
But this structure is well defined in this file anyway. It can be casted to 'struct __rte_trace_header *' and used.
Isn't the double underscore prefix good enough warning that it is internal datatype?

But anyway, I'm not here to discuss the architecture of DPDK so lets go to the next point.

Quoted 2 lines

If I understood the problem correctly, it is because of using trace_mem without typecasting and GCC does not report it as error due to

implicit typecast and G++ reports it as error as it does not do implicit typecasting.
Actually it is because in C++ implicit cast from void pointer is not allowed. So when it is used like this

     struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);

it triggers this type of error:

include/rte_trace_point.h: In function ‘void* __rte_trace_mem_get(uint64_t)’:
include/rte_per_lcore.h:44:46: error: invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]
 #define RTE_PER_LCORE(name) (per_lcore_##name)
                                        ^ nclude/rte_trace_point.h:303:37: note: in expansion of macro ‘RTE_PER_LCORE’
  struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem); ^

Quoted 5 lines

One can add '-fpermisive' to allow this type of casting but it is only a workaround in C++ code. As you mentioned, other solution is typecast to __rte_trace_header but this is not needed in C and it have "__" prefix this why I decided to change 'void *' into 'struct __rte_trace_header *'.

But changing 'void *' to 'struct __rte_trace_header *' will change the interpretation of trace_mem from user perspective which is against the design. I would request you to go for the proposed solution. Although there is no need of this for GCC but if there is no harm.

Also consider a use case where system is designed like 'structure is exposed to application as opaque pointer(void *) and typecasted by the underlying implementation before using it'. Then changing opaque pointer to structure type is not expected.

Quoted 15 lines
Quoted 3 lines

If this is the case then, I think it is better to typecast the trace_mem where

ever it is being used. Anyways that will be safe for both GCC and G++.

Quoted 1 line

@Jerin Jacob Kollanukkaran Please suggest. If you have some thing mind.

I'm fine any solution that make this code compile with C++. Please let me know what is the decision then I can make V2.

Paweł

Quoted 5 lines

[snippet]
--

#6 lore raw

PATCH v2 1/1 tracepoint: fix compilation with C++

In reply to Pawel Wodkowski

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by adding proper typecast to 'struct __rte_trace_header *'.

Fixes ebaee6409702 ("trace: simplify trace point headers")
---
 lib/librte_eal/include/rte_trace_point.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_eal/include/rte_trace_point.h +2 -2
index b45171275..875de195a 100644
@@ -300,13 +300,13 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem);
 static __rte_always_inline void *
 __rte_trace_mem_get(uint64_t in)
 {
-	struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);
+	struct __rte_trace_header *trace = (struct __rte_trace_header *)RTE_PER_LCORE(trace_mem);
 	const uint16_t sz = in & __RTE_TRACE_FIELD_SIZE_MASK;
 
 	/* Trace memory is not initialized for this thread */
 	if (unlikely(trace == NULL)) {
 		__rte_trace_mem_per_thread_alloc();
-		trace = RTE_PER_LCORE(trace_mem);
+		trace = (struct __rte_trace_header *) RTE_PER_LCORE(trace_mem);
 		if (unlikely(trace == NULL))
 			return NULL;
 	}
Signature · 1 line
2.17.1
#7 lore raw

Hello Pawel,

Few suggestions:
1. use 'trace' instead of 'tracepoint' in subject line. i.e. "trace: fix compilation with C++"
1. Update change history.
2. Add Fixes tag.
3. Superseed the previous version of this fix.

Reference: http://patches.dpdk.org/patch/66396/
Rest Looks okay. Please submit next version with above update.

Regards
Sunil Kumar Kori

Quoted 48 lines

-----Original Message-----
From: Pawel Wodkowski <[email protected]>
Sent: Tuesday, August 11, 2020 2:06 AM
To: [email protected]
Cc: Pawel Wodkowski <[email protected]>; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Sunil Kumar Kori <[email protected]>
Subject: [EXT] [PATCH v2] tracepoint: fix compilation with C++

External Email

----------------------------------------------------------------------
trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by adding proper typecast to 'struct __rte_trace_header *'.

Fixes ebaee6409702 ("trace: simplify trace point headers")

---
lib/librte_eal/include/rte_trace_point.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_eal/include/rte_trace_point.h +3 -3
index b45171275..875de195a 100644
@@ -300,13 +300,13 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem);
 static __rte_always_inline void *  __rte_trace_mem_get(uint64_t in)  {
-	struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);
+	struct __rte_trace_header *trace = (struct __rte_trace_header
+*)RTE_PER_LCORE(trace_mem);
 	const uint16_t sz = in & __RTE_TRACE_FIELD_SIZE_MASK;
 
 	/* Trace memory is not initialized for this thread */
 	if (unlikely(trace == NULL)) {
 		__rte_trace_mem_per_thread_alloc();
-		trace = RTE_PER_LCORE(trace_mem);
+		trace = (struct __rte_trace_header *)
 RTE_PER_LCORE(trace_mem);
 		if (unlikely(trace == NULL))
 			return NULL;
 	}
--

2.17.1

#8 lore raw

Hi Sunil,

I finished porting app to DPDK 20.05 and I'm afraid that I can't do anything more here as I don't have proper development environment anymore nor the time for setting it up again. If you find this change useful please take over it. Otherwise there will be long time before I can send next version. Also, as DPDK is deprecating Makefile build system, 20.05 might be last version we are using.

Anyway, thanks for guidelines and wish you best.

Paweł

Quoted 62 lines · Sunil Kumar Kori

Hello Pawel,

Few suggestions:
1. use 'trace' instead of 'tracepoint' in subject line. i.e. "trace: fix compilation with C++"
1. Update change history.
2. Add Fixes tag.
3. Superseed the previous version of this fix.

Reference: http://patches.dpdk.org/patch/66396/
Rest Looks okay. Please submit next version with above update.

Regards
Sunil Kumar Kori

Quoted 48 lines

-----Original Message-----
From: Pawel Wodkowski <[email protected]>
Sent: Tuesday, August 11, 2020 2:06 AM
To: [email protected]
Cc: Pawel Wodkowski <[email protected]>; [email protected]; Jerin Jacob Kollanukkaran <[email protected]>; Sunil Kumar Kori <[email protected]>
Subject: [EXT] [PATCH v2] tracepoint: fix compilation with C++

External Email

----------------------------------------------------------------------
trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by adding proper typecast to 'struct __rte_trace_header *'.

Fixes ebaee6409702 ("trace: simplify trace point headers")

---
lib/librte_eal/include/rte_trace_point.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_eal/include/rte_trace_point.h +3 -3
index b45171275..875de195a 100644
@@ -300,13 +300,13 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem);
 static __rte_always_inline void *  __rte_trace_mem_get(uint64_t in)  {
-	struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);
+	struct __rte_trace_header *trace = (struct __rte_trace_header
+*)RTE_PER_LCORE(trace_mem);
 	const uint16_t sz = in & __RTE_TRACE_FIELD_SIZE_MASK;
 
 	/* Trace memory is not initialized for this thread */
 	if (unlikely(trace == NULL)) {
 		__rte_trace_mem_per_thread_alloc();
-		trace = RTE_PER_LCORE(trace_mem);
+		trace = (struct __rte_trace_header *)
 RTE_PER_LCORE(trace_mem);
 		if (unlikely(trace == NULL))
 			return NULL;
 	}
--

2.17.1

#9 lore raw

Hello Pawel,

No problem. I will take care of this and send next version with updated information.

Regards
Sunil Kumar Kori

Quoted 94 lines

-----Original Message-----
From: Pawel Wodkowski <[email protected]>
Sent: Tuesday, August 11, 2020 7:04 PM
To: Sunil Kumar Kori <[email protected]>; [email protected]
Cc: [email protected]; Jerin Jacob Kollanukkaran <[email protected]>
Subject: Re: [EXT] [PATCH v2] tracepoint: fix compilation with C++

Hi Sunil,

I finished porting app to DPDK 20.05 and I'm afraid that I can't do anything more here as I don't have proper development environment anymore nor the time for setting it up again. If you find this change useful please take over it. Otherwise there will be long time before I can send next version. Also, as DPDK is deprecating Makefile build system, 20.05 might be last version we are using.

Anyway, thanks for guidelines and wish you best.

Paweł

Quoted 4 lines · Sunil Kumar Kori

Hello Pawel,

Few suggestions:
1. use 'trace' instead of 'tracepoint' in subject line. i.e. "trace: fix compilation

with C++"

Quoted 7 lines

1. Update change history.
2. Add Fixes tag.
3. Superseed the previous version of this fix.

Reference:
https://urldefense.proofpoint.com/v2/url?u=http-3A__patches.dpdk.org_p

atch_66396_&d=DwIDaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=dXeXaAMkP5COg n1zxHMyaF

Quoted 1 line

1_d9IIuq6vHQO6NrIPjaE&m=jmriYGtutfDqnB0UfW9ali2yisBvQVKQXWkNkDGx vgE&s=

Quoted 11 lines

teGvP5nM7eaYsOm69KvpblaGF5ct--schiCF74Mab_k&e=
Rest Looks okay. Please submit next version with above update.

Regards
Sunil Kumar Kori

Quoted 5 lines

-----Original Message-----
From: Pawel Wodkowski <[email protected]>
Sent: Tuesday, August 11, 2020 2:06 AM
To: [email protected]
Cc: Pawel Wodkowski <[email protected]>;

[email protected];

Quoted 43 lines
Quoted 43 lines

Jerin Jacob Kollanukkaran <[email protected]>; Sunil Kumar Kori <[email protected]>
Subject: [EXT] [PATCH v2] tracepoint: fix compilation with C++

External Email

---------------------------------------------------------------------
- trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by adding proper typecast to 'struct __rte_trace_header *'.

Fixes ebaee6409702 ("trace: simplify trace point headers")

---
lib/librte_eal/include/rte_trace_point.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_eal/include/rte_trace_point.h +3 -3
index b45171275..875de195a 100644
@@ -300,13 +300,13 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem);
 static __rte_always_inline void *  __rte_trace_mem_get(uint64_t in)  {
-	struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);
+	struct __rte_trace_header *trace = (struct __rte_trace_header
+*)RTE_PER_LCORE(trace_mem);
 	const uint16_t sz = in & __RTE_TRACE_FIELD_SIZE_MASK;
 
 	/* Trace memory is not initialized for this thread */
 	if (unlikely(trace == NULL)) {
 		__rte_trace_mem_per_thread_alloc();
-		trace = RTE_PER_LCORE(trace_mem);
+		trace = (struct __rte_trace_header *)
 RTE_PER_LCORE(trace_mem);
 		if (unlikely(trace == NULL))
 			return NULL;
 	}
--

2.17.1

#10 lore raw

PATCH v3 1/1 trace: fix compilation with C++

In reply to Pawel Wodkowski

From: Pawel Wodkowski <[email protected]>

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by adding proper typecast to 'struct __rte_trace_header *'.

Fixes ebaee6409702 ("trace: simplify trace point headers")

---
v3:
- fix subject.
v2:
- Update proper typecasting.

 lib/librte_eal/include/rte_trace_point.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
lib/librte_eal/include/rte_trace_point.h +3 -2
index b03960277..6446f2f0f 100644
@@ -298,13 +298,14 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem);
 static __rte_always_inline void *
 __rte_trace_mem_get(uint64_t in)
 {
-	struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);
+	struct __rte_trace_header *trace =
+			(struct __rte_trace_header *)(RTE_PER_LCORE(trace_mem));
 	const uint16_t sz = in & __RTE_TRACE_FIELD_SIZE_MASK;
 
 	/* Trace memory is not initialized for this thread */
 	if (unlikely(trace == NULL)) {
 		__rte_trace_mem_per_thread_alloc();
-		trace = RTE_PER_LCORE(trace_mem);
+		trace = (struct __rte_trace_header *)(RTE_PER_LCORE(trace_mem));
 		if (unlikely(trace == NULL))
 			return NULL;
 	}
Signature · 1 line
2.25.1
Acked-by on v3 1/1
#11 lore raw

Re: [dpdk-dev] [PATCH v3] trace: fix compilation with C++

Hi,

Quoted 44 lines

-----Original Message-----
From: [email protected]

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Fix this by adding proper typecast to 'struct __rte_trace_header *'.

Fixes ebaee6409702 ("trace: simplify trace point headers")

---
v3:
- fix subject.
v2:
- Update proper typecasting.

 lib/librte_eal/include/rte_trace_point.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
lib/librte_eal/include/rte_trace_point.h +3 -3
index b03960277..6446f2f0f 100644
@@ -298,13 +298,14 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem);
 static __rte_always_inline void *  __rte_trace_mem_get(uint64_t in)  {
-	struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem);
+	struct __rte_trace_header *trace =
+			(struct __rte_trace_header
 *)(RTE_PER_LCORE(trace_mem));
 	const uint16_t sz = in & __RTE_TRACE_FIELD_SIZE_MASK;
 
 	/* Trace memory is not initialized for this thread */
 	if (unlikely(trace == NULL)) {
 		__rte_trace_mem_per_thread_alloc();
-		trace = RTE_PER_LCORE(trace_mem);
+		trace = (struct __rte_trace_header
 *)(RTE_PER_LCORE(trace_mem));
 		if (unlikely(trace == NULL))
 			return NULL;
 	}
--
Quoted 1 line

2.25.1

We have to do the same fix on our end to build properly.

Acked-by Nicolas Chautru on v3 1/1 Applied
#12 lore raw

Re: [dpdk-dev] [PATCH v3] trace: fix compilation with C++

In reply to [email protected]
Quoted 7 lines · On Wed, Aug 12, 2020 at 11:52 AM <[email protected]> wrote:

From: Pawel Wodkowski <[email protected]>

trace_mem is declared as 'void *' which triggers following error:
'...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...'

Quoted 5 lines

Fix this by adding proper typecast to 'struct __rte_trace_header *'.

Fixes ebaee6409702 ("trace: simplify trace point headers")

Applied, thanks.

Signature · 1 line
David Marchand