DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pawel Wodkowski <pawelwod@gmail.com>
To: dev@dpdk.org
Cc: Pawel Wodkowski <pawelwod@gmail.com>,
	david.marchand@redhat.com, Jerin Jacob <jerinj@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>
Subject: [dpdk-dev] [PATCH v2] tracepoint: fix compilation with C++
Date: Mon, 10 Aug 2020 22:36:10 +0200
Message-ID: <20200810203610.29470-1-pawelwod@gmail.com> (raw)
In-Reply-To: <20200804175138.18543-1-pawelwod@gmail.com>

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 *'.

Signed-off-by: Pawel Wodkowski <pawelwod@gmail.com>
Fixes: ebaee6409702 ("trace: simplify trace point headers")
Cc: david.marchand@redhat.com
---
 lib/librte_eal/include/rte_trace_point.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h
index b45171275..875de195a 100644
--- a/lib/librte_eal/include/rte_trace_point.h
+++ b/lib/librte_eal/include/rte_trace_point.h
@@ -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


  parent reply	other threads:[~2020-08-10 20:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 17:51 [dpdk-dev] [PATCH] " Pawel Wodkowski
2020-08-05  8:00 ` David Marchand
2020-08-05  9:26   ` Pawel Wodkowski
2020-08-06  6:44   ` [dpdk-dev] [EXT] " Sunil Kumar Kori
2020-08-06 18:44     ` Pawel Wodkowski
2020-08-07  5:54       ` Sunil Kumar Kori
2020-08-10 20:36 ` Pawel Wodkowski [this message]
2020-08-11  9:29   ` [dpdk-dev] [EXT] [PATCH v2] " Sunil Kumar Kori
2020-08-11 13:34     ` Pawel Wodkowski
2020-08-12  6:51       ` Sunil Kumar Kori
2020-08-12  9:51   ` [dpdk-dev] [PATCH v3] trace: " skori
2020-09-11 20:33     ` Chautru, Nicolas
2020-09-17  8:16     ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200810203610.29470-1-pawelwod@gmail.com \
    --to=pawelwod@gmail.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=skori@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git