DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	Jason Messer <jmesser@microsoft.com>
Cc: dev@dpdk.org, Jeff Shaw <jeffrey.b.shaw@intel.com>,
	stephen@networkplumber.org, harini.ramakrishnan@microsoft.com
Subject: Re: [dpdk-dev] [PATCH] eal: remove variable length array
Date: Thu, 20 Dec 2018 11:53:58 +0100	[thread overview]
Message-ID: <be3930f2-3931-e9e8-4311-65479ffc5a9c@ericsson.com> (raw)
In-Reply-To: <27594774.hr4jPcleJC@xps>

On 2018-12-19 22:45, Thomas Monjalon wrote:
> 14/12/2018 21:28, Mattias Rönnblom:
>> On 2018-12-14 20:07, Jeff Shaw wrote:
>>>>> The code prior to this commit produced the following warning when
>>>>> compiled with "-Wvla -std=c90".
>>>>>
>>>>>      warning: ISO C90 forbids variable length array ‘array’ [-Wvla]
>>>>>
>>>>> This commit removes the variable length array from the PMD debug
>>>>> trace function by allocating memory dynamically on the stack using
>>>>> alloca().
>>>>
>>>> Is alloca() even included in *any* C standard? As far as I see, it just
>>>> achieves the same thing in an uglier, less portable way than VLAs.
>>>
>>> I agree that it is much less elegant than a VLA. This is in preparation
>>> for DPDK on Windows, which using the Microsoft Visual C++ (MSVC) compiler.
>>> MSVC does not support variable length arrays. It does, however, support
>>> alloca(), as does GCC/ICC.
>>>
>>> For this particular instance, the point is moot, since the function is
>>> not used anywhere and can just as easily be removed. Though it does not
>>> address the issue for the ~100 other instances where VLAs are used. We
>>> will be submitting patches for those as more common files are ported to
>>> Windows.
>>
>> If Microsoft's C compiler doesn't support C99, some 20 years after its
>> release, maybe it's time to find a new compiler, instead of messing up
>> the DPDK code in a ~100 instances.
> 
> If think there is no reasonnable compiler for Windows.
> Yes I know, it's crazy.
> 
With's wrong with the Windows version of Clang?

  reply	other threads:[~2018-12-20 10:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 16:38 Jeff Shaw
2018-12-14 18:36 ` Stephen Hemminger
2018-12-14 18:59   ` Jeff Shaw
2018-12-14 19:17     ` Jeff Shaw
2018-12-14 18:36 ` Mattias Rönnblom
2018-12-14 19:07   ` Jeff Shaw
2018-12-14 20:28     ` Mattias Rönnblom
2018-12-14 20:50       ` [dpdk-dev] [PATCH] eal: simplify RTE_PMD_DEBUG_TRACE Stephen Hemminger
2018-12-14 21:20         ` Jeff Shaw
2018-12-14 21:57           ` Stephen Hemminger
2018-12-21 16:17           ` Ferruh Yigit
2018-12-21 18:11         ` [dpdk-dev] [PATCH v2] " Jeff Shaw
2018-12-21 18:18           ` [dpdk-dev] [PATCH v3] " Jeff Shaw
2018-12-22  0:37             ` Ferruh Yigit
2018-12-19 21:45       ` [dpdk-dev] [PATCH] eal: remove variable length array Thomas Monjalon
2018-12-20 10:53         ` Mattias Rönnblom [this message]
2018-12-20 11:03           ` Thomas Monjalon
2018-12-14 20:40 ` [dpdk-dev] [PATCH v2] " Jeff Shaw
2018-12-15 14:26   ` Wiles, Keith

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=be3930f2-3931-e9e8-4311-65479ffc5a9c@ericsson.com \
    --to=mattias.ronnblom@ericsson.com \
    --cc=dev@dpdk.org \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=jeffrey.b.shaw@intel.com \
    --cc=jmesser@microsoft.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).