DPDK patches and discussions
 help / color / mirror / Atom feed
From: Sunil Kumar Kori <skori@marvell.com>
To: Pawel Wodkowski <pawelwod@gmail.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Cc: dev <dev@dpdk.org>, David Marchand <david.marchand@redhat.com>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] tracepoint: fix compilation with C++
Date: Thu, 6 Aug 2020 06:44:01 +0000	[thread overview]
Message-ID: <CY4PR18MB1622618EB69CB1B0DE54A270B4480@CY4PR18MB1622.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CAJFAV8x6TS9rgOLtYz4Ph0mEO7pY9HFkB5rUB9m699Zw45+G6g@mail.gmail.com>

Hello Pawel, 

See answers inline.

Regards
Sunil Kumar Kori

>-----Original Message-----
>From: David Marchand <david.marchand@redhat.com>
>Sent: Wednesday, August 5, 2020 1:30 PM
>To: Pawel Wodkowski <pawelwod@gmail.com>
>Cc: dev <dev@dpdk.org>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>;
>Sunil Kumar Kori <skori@marvell.com>
>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 <pawelwod@gmail.com>
>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.
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]
--


  parent reply	other threads:[~2020-08-06  8:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04 17:51 [dpdk-dev] " Pawel Wodkowski
2020-08-05  8:00 ` David Marchand
2020-08-05  9:26   ` Pawel Wodkowski
2020-08-06  6:44   ` Sunil Kumar Kori [this message]
2020-08-06 18:44     ` [dpdk-dev] [EXT] " Pawel Wodkowski
2020-08-07  5:54       ` Sunil Kumar Kori
2020-08-10 20:36 ` [dpdk-dev] [PATCH v2] " Pawel Wodkowski
2020-08-11  9:29   ` [dpdk-dev] [EXT] " 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=CY4PR18MB1622618EB69CB1B0DE54A270B4480@CY4PR18MB1622.namprd18.prod.outlook.com \
    --to=skori@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=pawelwod@gmail.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).