build: announce requirement for C11
PATCH 1/1 build: announce requirement for C11
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]
--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
@@ -11,6 +11,12 @@ here. Deprecation Notices ------------------- +* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.
Signature · 1 line
2.39.2
Quoted 17 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0
doc/guides/rel_notes/deprecation.rst here. · line 18
Quoted 8 lines
doc/guides/rel_notes/deprecation.rst +5
-0@@ -11,6 +11,12 @@ here. Deprecation Notices ------------------- +* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6
suggest adding an additional qualification that
C11 conformant compiler including support for optional standard atomics
does NOT #define __STDC_NO_ATOMICS__ 1
which requires providing the stdatomic.h header and feature. this shouldn't be contentious since both gcc and clang have support.
Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +1
-0+ * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.Signature · 1 line
2.39.2
Quoted 29 lines · Tyler Retzlaff
Quoted 17 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0doc/guides/rel_notes/deprecation.rst here. · line 18
Quoted 8 lines
doc/guides/rel_notes/deprecation.rst +5
-0@@ -11,6 +11,12 @@ here. Deprecation Notices ------------------- +* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6suggest adding an additional qualification that
Quoted 7 lines
C11 conformant compiler including support for optional standard atomics
does NOT #define
__STDC_NO_ATOMICS__1which requires providing the
stdatomic.hheader and feature. this shouldn't be contentious since both gcc and clang have support.
Agree, that is good to clarify. I'll wait a while for more feedback and then do a V2.
Quoted 8 lines
Acked-by Tyler Retzlaff <[email protected]>Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +1
-0+ * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.Signature · 1 line
2.39.2
Quoted 19 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -11,6 +11,12 @@ here. Deprecation Notices -------------------
doc/guides/rel_notes/deprecation.rst here. · line 22
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.
This only applies to DPDK internals, right?
Application linked with DPDK library won't have this requirement, meaning DPDK public headers won't rely on C99 and C11 features.
Although this is a deprecation notice for DPDK, if above is correct, does it make sense to highlight it to not confuse users?
Quoted 35 lines · Ferruh Yigit
Quoted 19 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -11,6 +11,12 @@ here. Deprecation Notices -------------------doc/guides/rel_notes/deprecation.rst here. · line 22
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.This only applies to DPDK internals, right?
Application linked with DPDK library won't have this requirement, meaning DPDK public headers won't rely on C99 and C11 features.
Quoted 2 lines
Although this is a deprecation notice for DPDK, if above is correct, does it make sense to highlight it to not confuse users?
it applies to applications as well because dpdk exposes integers expected to be atomic via headers and inline functions use atomic functions both internal/external.
Quoted 21 lines · Ferruh Yigit
Quoted 20 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -11,6 +11,12 @@ here. Deprecation Notices -------------------
Quoted 14 lines
doc/guides/rel_notes/deprecation.rst here. · line 22
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.This only applies to DPDK internals, right?
Application linked with DPDK library won't have this requirement, meaning DPDK public headers won't rely on C99 and C11 features.
No, AFAIK, that is not correct. Originally I had thought that that would be the case - hence the special-case tests for the headers in my previous C99 patch - but the consensus at the DPDK techboard was that we won't require all headers to remain C89 compatible.
Originally, I was unsure about this, but now I agree with this position, on the basis that since GCC 5, unless you have been explicitly requesting an older standard, the compiler is using C11 rules. Therefore, everyone using these later GCC versions is already using C11+.
/Bruce
Quoted 36 lines · Bruce Richardson
Quoted 21 lines · Ferruh Yigit
Quoted 20 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -11,6 +11,12 @@ here. Deprecation Notices -------------------Quoted 14 lines
doc/guides/rel_notes/deprecation.rst here. · line 22
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.This only applies to DPDK internals, right?
Application linked with DPDK library won't have this requirement, meaning DPDK public headers won't rely on C99 and C11 features.
Quoted 5 lines
No, AFAIK, that is not correct. Originally I had thought that that would be the case - hence the special-case tests for the headers in my previous C99 patch - but the consensus at the DPDK techboard was that we won't require all headers to remain C89 compatible.
this is my recollection as well, everything is being aligned to C11, which is why we are waiting for 23.11 release before the changes can come in.
Quoted 7 lines
Originally, I was unsure about this, but now I agree with this position, on the basis that since GCC 5, unless you have been explicitly requesting an older standard, the compiler is using C11 rules. Therefore, everyone using these later GCC versions is already using C11+.
/Bruce
Quoted 36 lines · Bruce Richardson
Quoted 21 lines · Ferruh Yigit
Quoted 20 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0@@ -11,6 +11,12 @@ here. Deprecation Notices -------------------Quoted 14 lines
doc/guides/rel_notes/deprecation.rst here. · line 22
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+* C Compiler: From DPDK 23.11 onwards, + building DPDK will require a C compiler which supports the C11 standard, or later. + Please note: + - C11 is supported from GCC version 5 onwards, and is the default language version in that release + - C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.This only applies to DPDK internals, right?
Application linked with DPDK library won't have this requirement, meaning DPDK public headers won't rely on C99 and C11 features.
Quoted 5 lines
No, AFAIK, that is not correct. Originally I had thought that that would be the case - hence the special-case tests for the headers in my previous C99 patch - but the consensus at the DPDK techboard was that we won't require all headers to remain C89 compatible.
Ah, thanks for clarification. The previous patch made me think we are keeping headers C89 compatible, I missed the final decision.
Quoted 5 lines
Originally, I was unsure about this, but now I agree with this position, on the basis that since GCC 5, unless you have been explicitly requesting an older standard, the compiler is using C11 rules. Therefore, everyone using these later GCC versions is already using C11+.
Not just compiler version, application enforcing an old standard also may cause trouble.
But I can see this is simpler from DPDK perspective.
PATCH v2 1/1 build: announce requirement for C11
In reply to Bruce RichardsonAdd 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]
---
V2:
- add requirement for stdatomics
- fix sphinx formatting
--- doc/guides/rel_notes/deprecation.rst | 9 +++++++++ 1 file changed, 9 insertions(+)
doc/guides/rel_notes/deprecation.rst +9 -0
@@ -11,6 +11,15 @@ 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. + + Please note: + + * C11 is supported from GCC version 5 onwards, and is the default language version in that release + * C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.
Signature · 1 line
2.39.2
Quoted 24 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V2:
- add requirement for stdatomics
- fix sphinx formatting--- doc/guides/rel_notes/deprecation.rst | 9 +++++++++ 1 file changed, 9 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0
doc/guides/rel_notes/deprecation.rst here. · line 16
Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +3
-0@@ -11,6 +11,15 @@ 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.
The whole of C11, or just the mandatory parts (+atomics)?
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0+ + Please note: + + * C11 is supported from GCC version 5 onwards, and is the default language version in that release + * C11 is the default compilation mode in Clang from version 3.6 + * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case.
Quoted 20 lines · Mattias Rönnblom
Quoted 19 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V2:
- add requirement for stdatomics
- fix sphinx formatting--- doc/guides/rel_notes/deprecation.rst | 9 +++++++++ 1 file changed, 9 insertions(+)
Quoted 13 lines
doc/guides/rel_notes/deprecation.rst here. · line 15
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +3
-0@@ -11,6 +11,15 @@ 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.The whole of C11, or just the mandatory parts (+atomics)?
I assume we only need mandatory + atomics, however perhaps someone more knowledgable about what the optional parts of the spec are, can correct me on this. Once clarified, I maybe should reword this yet again to call it out even more specificallly.
/Bruce
Quoted 34 lines · Bruce Richardson
Quoted 20 lines · Mattias Rönnblom
Quoted 19 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V2:
- add requirement for stdatomics
- fix sphinx formatting--- doc/guides/rel_notes/deprecation.rst | 9 +++++++++ 1 file changed, 9 insertions(+)Quoted 13 lines
doc/guides/rel_notes/deprecation.rst here. · line 15
Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +3
-0@@ -11,6 +11,15 @@ 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.The whole of C11, or just the mandatory parts (+atomics)?
Quoted 4 lines
I assume we only need mandatory + atomics, however perhaps someone more knowledgable about what the optional parts of the spec are, can correct me on this. Once clarified, I maybe should reword this yet again to call it out even more specificallly.
mandatory + atomics, no more than that.
so -std=c11 and __STDC_NO_ATOMICS__ is not defined, that is all.
Quoted 2 lines
/Bruce
Quoted 8 lines
From: Bruce Richardson [mailto:[email protected]]
Sent: Wednesday, 3 May 2023 17.14Add 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]
Quoted 5 lines
[1]
http://inbox.dpdk.org/dev/DBAPR08MB58148CEC3E1454E8848A938998AB9@DBAPR08
MB5814.eurprd08.prod.outlook.com/Signed-off-by Bruce Richardson <[email protected]>
PATCH v3 1/1 build: announce requirement for C11
In reply to Bruce RichardsonAdd 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]
---
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(+)
doc/guides/rel_notes/deprecation.rst +18 -0
@@ -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.
Signature · 1 line
2.39.2
Resending - this time to the correct list.
Quoted 16 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V3:
- add additional detail following discussion on-list
Quoted 6 lines
V2:
- add requirement for stdatomics
- fix sphinx formatting--- doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
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.
Quoted 26 lines · Aaron Conole
Resending - this time to the correct list.
Quoted 16 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V3:
- add additional detail following discussion on-listQuoted 6 lines
V2:
- add requirement for stdatomics
- fix sphinx formatting--- doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
Quoted 5 lines
Acked-by Aaron Conole <[email protected]>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!
Quoted 15 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V3:
- add additional detail following discussion on-list
Quoted 7 lines
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
Acked-byQuoted 17 lines · Bruce Richardson
Quoted 15 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V3:
- add additional detail following discussion on-list
Quoted 8 lines
Quoted 7 lines
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.
Quoted 6 lines
This deprecation notice really needs to go into 23.07 to allow the C11 requirement to be met in 23.11!
Thanks,
/Bruce
20/07/2023 12:56, Jerin Jacob:
Quoted 26 lines
Quoted 24 lines · Bruce Richardson
Quoted 22 lines · Bruce Richardson
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]
Signed-off-by Bruce Richardson <[email protected]>Acked-by Tyler Retzlaff <[email protected]>---
V3:
- add additional detail following discussion on-listV2:
- add requirement for stdatomics
- fix sphinx formatting--- doc/guides/rel_notes/deprecation.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
Quoted 4 lines
Quoted 1 line
Ping for additional review/acks and merge.
Acked-by Jerin Jacob <[email protected]>
Quoted 2 lines
Quoted 2 lines
This deprecation notice really needs to go into 23.07 to allow the C11 requirement to be met in 23.11!
Applied, thanks.