<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body dir="auto"><div dir="auto">My answer is at the end.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div id="composer_signature" dir="auto"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><div style="font-size:85%;color:#575757">Sent from a smartphone. Please pardon brevity and spelling.</div></div><div dir="auto"><br></div><div><br></div><div align="left" dir="auto" style="font-size:100%;color:#000000"><div>-------- Oprindelig besked --------</div><div>Fra: Bruce Richardson <bruce.richardson@intel.com> </div><div>Dato: 16/02/2022  11.15  (GMT+01:00) </div><div>Til: Morten Brørup <mb@smartsharesystems.com> </div><div>Cc: Stephen Hemminger <stephen@networkplumber.org>, dev@dpdk.org </div><div>Emne: Re: [RFC 0/2] Eliminate zero length arrays in DPDK </div><div><br></div></div>On Wed, Feb 16, 2022 at 11:05:09AM +0100, Morten Brørup wrote:<br dir="auto">> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]<br dir="auto">> > Sent: Wednesday, 16 February 2022 10.33<br dir="auto">> > <br dir="auto">> > On Tue, Feb 15, 2022 at 03:00:56PM -0800, Stephen Hemminger wrote:<br dir="auto">> > > Yet another case of applying Linux kernel best practices<br dir="auto">> > > to DPDK. Flexible arrays are supported by Clang, GCC and<br dir="auto">> > > Microsoft compilers (part of C99).<br dir="auto">> > ><br dir="auto">> > Do we need to start explicitly stating that DPDK uses C99 features, and<br dir="auto">> > adding -std=c99 to our build flags? Are we also requiring that<br dir="auto">> > applications<br dir="auto">> > are compiled with c99 features to use this (I would hope that they are,<br dir="auto">> > but<br dir="auto">> > I'm not sure we can mandate it).<br dir="auto">> <br dir="auto">> No to -std=c99. It's >= C99 for applications; we should not prevent them from using a newer C standard.<br dir="auto"><br dir="auto">Yes. For build flags, I was referring only to having it in the cflags for the<br dir="auto">build of DPDK itself, not for apps. We definitely need to minimise the<br dir="auto">build flags we expose to apps.<br dir="auto"><br dir="auto">> <br dir="auto">> Adding a note about the C standard version to the DPDK requirements<br dir="auto">> documentation would be very nice. It only mentions a certain compiler<br dir="auto">> version required. But I think that documenting the detailed build and<br dir="auto">> runtime requirements (and why they are that way) is another task.<br dir="auto">> <br dir="auto">Sure, we should do that. I am just wanting to be sure that if we specify a<br dir="auto">minimum of C99, we won't get complaints back from those with legacy<br dir="auto">codebasees which only support C89/C90. I am therefore wondering if we need<br dir="auto">to have our public headers C90-compliant?<br dir="auto"><br dir="auto">/Bruce<br dir="auto"><br dir="auto"><div dir="auto">We are publicly using C11 for atomics [1]. I'm not sure if that also implies that we are requiring C11 generally.</div><div dir="auto"><br></div><div dir="auto">Otherwise,  I agree with your concerns about old code bases.</div><div dir="auto"><br></div><div dir="auto">[1]</div><div dir="auto">https://www.dpdk.org/blog/2021/03/26/dpdk-adopts-the-c11-memory-model/</div><div dir="auto"><br></div><div dir="auto">-Morten</div></body></html>