[v3] build: announce requirement for C11

Message ID 20230517173400.22858-1-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v3] build: announce requirement for C11 |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Bruce Richardson May 17, 2023, 5:34 p.m. UTC
  Add a deprecation notice informing users that we will require a C11
compiler from 23.11 release onwards. This requirement was agreed by
technical board to enable use of newer C language features, e.g.
standard atomics. [1]

[1] http://inbox.dpdk.org/dev/DBAPR08MB58148CEC3E1454E8848A938998AB9@DBAPR08MB5814.eurprd08.prod.outlook.com/

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

---

V3:
- add additional detail following discussion on-list

V2:
- add requirement for stdatomics
- fix sphinx formatting
---
 doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
  

Comments

Aaron Conole May 19, 2023, 12:19 p.m. UTC | #1
Resending - this time to the correct list.

Bruce Richardson <bruce.richardson@intel.com> writes:
> Add a deprecation notice informing users that we will require a C11
> compiler from 23.11 release onwards. This requirement was agreed by
> technical board to enable use of newer C language features, e.g.
> standard atomics. [1]
>
> [1]
> http://inbox.dpdk.org/dev/DBAPR08MB58148CEC3E1454E8848A938998AB9@DBAPR08MB5814.eurprd08.prod.outlook.com/
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
>
> ---
>
> V3:
> - add additional detail following discussion on-list
>
> V2:
> - add requirement for stdatomics
> - fix sphinx formatting
> ---
>  doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)

Acked-by: Aaron Conole <aconole@redhat.com>

Per the meeting, I guess we're still waiting on the patches that
introduce the stdatomic calls, right?  At least, I probably missed it
when looking on the patchwork instance.
  
Tyler Retzlaff May 19, 2023, 8:01 p.m. UTC | #2
On Fri, May 19, 2023 at 08:19:01AM -0400, Aaron Conole wrote:
> Resending - this time to the correct list.
> 
> Bruce Richardson <bruce.richardson@intel.com> writes:
> > Add a deprecation notice informing users that we will require a C11
> > compiler from 23.11 release onwards. This requirement was agreed by
> > technical board to enable use of newer C language features, e.g.
> > standard atomics. [1]
> >
> > [1]
> > http://inbox.dpdk.org/dev/DBAPR08MB58148CEC3E1454E8848A938998AB9@DBAPR08MB5814.eurprd08.prod.outlook.com/
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> >
> > ---
> >
> > V3:
> > - add additional detail following discussion on-list
> >
> > V2:
> > - add requirement for stdatomics
> > - fix sphinx formatting
> > ---
> >  doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> 
> Acked-by: Aaron Conole <aconole@redhat.com>
> 
> Per the meeting, I guess we're still waiting on the patches that
> introduce the stdatomic calls, right?  At least, I probably missed it
> when looking on the patchwork instance.

the following series need merge, they remove some old rte atomics and
normalize the use of gcc builtins to set the tree up to be more easily
converted to stdatomics.

https://patchwork.dpdk.org/project/dpdk/list/?series=27530
https://patchwork.dpdk.org/project/dpdk/list/?series=27552

please review the linked series if you have time, since the impact of
the changes may be broad it would help David and Thomas.

as soon as the above series are merged i will begin submitting the
actual stdatomics series for review.

thanks!
  
Bruce Richardson July 20, 2023, 8:22 a.m. UTC | #3
On Wed, May 17, 2023 at 06:34:00PM +0100, Bruce Richardson wrote:
> Add a deprecation notice informing users that we will require a C11
> compiler from 23.11 release onwards. This requirement was agreed by
> technical board to enable use of newer C language features, e.g.
> standard atomics. [1]
> 
> [1] http://inbox.dpdk.org/dev/DBAPR08MB58148CEC3E1454E8848A938998AB9@DBAPR08MB5814.eurprd08.prod.outlook.com/
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> 
> ---
> 
> V3:
> - add additional detail following discussion on-list
> 
> V2:
> - add requirement for stdatomics
> - fix sphinx formatting
> ---
>  doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
Ping for additional review/acks and merge.

This deprecation notice really needs to go into 23.07 to allow the C11
requirement to be met in 23.11!

Thanks,
/Bruce
  
Jerin Jacob July 20, 2023, 10:56 a.m. UTC | #4
On Thu, Jul 20, 2023 at 1:52 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Wed, May 17, 2023 at 06:34:00PM +0100, Bruce Richardson wrote:
> > Add a deprecation notice informing users that we will require a C11
> > compiler from 23.11 release onwards. This requirement was agreed by
> > technical board to enable use of newer C language features, e.g.
> > standard atomics. [1]
> >
> > [1] http://inbox.dpdk.org/dev/DBAPR08MB58148CEC3E1454E8848A938998AB9@DBAPR08MB5814.eurprd08.prod.outlook.com/
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> >
> > ---
> >
> > V3:
> > - add additional detail following discussion on-list
> >
> > V2:
> > - add requirement for stdatomics
> > - fix sphinx formatting
> > ---
> >  doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> Ping for additional review/acks and merge.


Acked-by: Jerin Jacob <jerinj@marvell.com>


>
> This deprecation notice really needs to go into 23.07 to allow the C11
> requirement to be met in 23.11!
>
> Thanks,
> /Bruce
  
Thomas Monjalon July 28, 2023, 9:34 a.m. UTC | #5
20/07/2023 12:56, Jerin Jacob:
> On Thu, Jul 20, 2023 at 1:52 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Wed, May 17, 2023 at 06:34:00PM +0100, Bruce Richardson wrote:
> > > Add a deprecation notice informing users that we will require a C11
> > > compiler from 23.11 release onwards. This requirement was agreed by
> > > technical board to enable use of newer C language features, e.g.
> > > standard atomics. [1]
> > >
> > > [1] http://inbox.dpdk.org/dev/DBAPR08MB58148CEC3E1454E8848A938998AB9@DBAPR08MB5814.eurprd08.prod.outlook.com/
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > > Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > >
> > > ---
> > >
> > > V3:
> > > - add additional detail following discussion on-list
> > >
> > > V2:
> > > - add requirement for stdatomics
> > > - fix sphinx formatting
> > > ---
> > >  doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++
> > >  1 file changed, 18 insertions(+)
> > >
> > Ping for additional review/acks and merge.
> 
> 
> Acked-by: Jerin Jacob <jerinj@marvell.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>

> > This deprecation notice really needs to go into 23.07 to allow the C11
> > requirement to be met in 23.11!

Applied, thanks.
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index dcc1ca1696..6955f02248 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -11,6 +11,24 @@  here.
 Deprecation Notices
 -------------------
 
+* C Compiler: From DPDK 23.11 onwards,
+  building DPDK will require a C compiler which supports the C11 standard,
+  including support for C11 standard atomics.
+
+  More specifically, the requirements will be:
+
+  * Support for flag "-std=c11" (or similar)
+  * __STDC_NO_ATOMICS__ is *not defined* when using c11 flag
+
+  Please note:
+
+  * C11, including standard atomics, is supported from GCC version 5 onwards,
+    and is the default language version in that release
+    (Ref: https://gcc.gnu.org/gcc-5/changes.html)
+  * C11 is the default compilation mode in Clang from version 3.6,
+    which also added support for standard atomics
+    (Ref: https://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html)
+
 * kvargs: The function ``rte_kvargs_process`` will get a new parameter
   for returning key match count. It will ease handling of no-match case.