DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>,
	dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] eal/windows: explicitly cast void * to type *
Date: Sun, 17 Jan 2021 22:51:16 +0300
Message-ID: <20210117225116.58c58e44@sovereign> (raw)
In-Reply-To: <20210117101039.1dcf7201@hermes.local>

On Sun, 17 Jan 2021 10:10:39 -0800, Stephen Hemminger wrote: 
> > -	*buffer = malloc(size);
> > +	*buffer = (char *)malloc(size);
> >  	if (*buffer == NULL)
> >  		return -1;
> >    
> 
> Why is the compiler enforcing C++ rules on code that is inside "extern C {"?

Code inside extern "C" is not compiled as C; directive only affects linkage.

> Bigger question is why is this code inlined? It is not critical path
> and should be a function.

Absolutely.
There's more: windows/rte_os.h should not expose POSIX symbols at all, I'm
working on a patchset to clean it up and un-inline this code.


      reply	other threads:[~2021-01-17 19:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12  1:18 [dpdk-dev] [PATCH] eal/headers: " Tyler Retzlaff
2021-01-13 17:52 ` Dmitry Kozlyuk
2021-01-14  5:45   ` Tyler Retzlaff
2021-01-14  7:05     ` Dmitry Kozlyuk
2021-01-14 10:55       ` Bruce Richardson
2021-01-14 18:27         ` Dmitry Kozlyuk
2021-01-14 18:49           ` Thomas Monjalon
2021-01-15 19:21         ` Tyler Retzlaff
2021-01-17 17:13           ` Thomas Monjalon
2021-01-15 19:38 ` [dpdk-dev] [PATCH v2] eal/windows: " Tyler Retzlaff
2021-01-17 17:19   ` Thomas Monjalon
2021-01-17 18:10   ` Stephen Hemminger
2021-01-17 19:51     ` Dmitry Kozlyuk [this message]

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=20210117225116.58c58e44@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=roretzla@linux.microsoft.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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