Skip to contentSkip to conversation

doc: announce adoption of C11 atomic operations semantics

PATCH In review Phil Yang 8 participants 11 messages May 7, 2020 – May 24, 2020

lore
Share & tools
lore

Phil Yang

author
#0 lore raw

PATCH 1/1 doc: announce adoption of C11 atomic operations semantics

From: Honnappa Nagarahalli <[email protected]>

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

---
 doc/guides/rel_notes/deprecation.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)
doc/guides/rel_notes/deprecation.rst +12 -0
index 20aa745..208708d 100644
@@ -113,3 +113,15 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
+  not allow for writing optimized code for all the CPU architectures supported
+  in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers
+  using C11 atomic built-ins. These wrappers must be used for patches that
+  need to be merged in 20.08 onwards.
+
+* rte_smp_*mb: These APIs provide full barrier functionality. However, many
+  use cases do not require full barriers. To support such use cases, DPDK will
+  adopt C11 barrier semantics and provide wrappers using C11 atomic built-ins.
+  These wrappers must be used for patches that need to be merged in 20.08
+  onwards.
Signature · 1 line
2.7.4
#1 lore raw
Quoted 10 lines · On Thu, 7 May 2020 15:06:33 +0800 Phil Yang <[email protected]> wrote:

From: Honnappa Nagarahalli <[email protected]>

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

The use of Gcc __sync_ primitives should also be replaced with C11 atomic.

#2 lore raw

<snip>

Quoted 11 lines

Subject: Re: [PATCH] doc: announce adoption of C11 atomic operations semantics

Quoted 5 lines · On Thu, 7 May 2020 15:06:33 +0800 Phil Yang <[email protected]> wrote:

From: Honnappa Nagarahalli <[email protected]>

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

Quoted 7 lines
Quoted 5 lines

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

The use of Gcc __sync_ primitives should also be replaced with C11 atomic.

Agree, not sure if this should be added to the deprecation list. But, will add it to checkpatches.sh

#3 lore raw
In reply to Phil Yang

<snip>

Quoted 8 lines

Subject: [PATCH] doc: announce adoption of C11 atomic operations semantics

From: Honnappa Nagarahalli <[email protected]>

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

As noted in the minutes, this has been approved in the tech-board. Can I get some ACKs for this patch?

Quoted 39 lines
---
 doc/guides/rel_notes/deprecation.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)
doc/guides/rel_notes/deprecation.rst +16 -0
index 20aa745..208708d 100644
@@ -113,3 +113,15 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* rte_atomicNN_xxx: These APIs do not take memory order parameter. This
+does
+  not allow for writing optimized code for all the CPU architectures
+supported
+  in DPDK. DPDK will adopt C11 atomic operations semantics and provide
+wrappers
+  using C11 atomic built-ins. These wrappers must be used for patches
+that
+  need to be merged in 20.08 onwards.
+
+* rte_smp_*mb: These APIs provide full barrier functionality. However,
+many
+  use cases do not require full barriers. To support such use cases,
+DPDK will
+  adopt C11 barrier semantics and provide wrappers using C11 atomic built-

ins.

doc/guides/rel_notes/deprecation.rst +3 -1
+  These wrappers must be used for patches that need to be merged in
+20.08
+  onwards.
--

2.7.4

Acked-by on v1 1/1
#5 lore raw
In reply to Phil Yang
Quoted 11 lines · Phil Yang

From: Honnappa Nagarahalli <[email protected]>

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

Quoted 27 lines
---
 doc/guides/rel_notes/deprecation.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)
doc/guides/rel_notes/deprecation.rst +12 -1
index 20aa745..208708d 100644
@@ -113,3 +113,15 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
+  not allow for writing optimized code for all the CPU architectures supported
+  in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers
+  using C11 atomic built-ins. These wrappers must be used for patches that
+  need to be merged in 20.08 onwards.
+
+* rte_smp_*mb: These APIs provide full barrier functionality. However, many
+  use cases do not require full barriers. To support such use cases, DPDK will
+  adopt C11 barrier semantics and provide wrappers using C11 atomic built-ins.
+  These wrappers must be used for patches that need to be merged in 20.08
+  onwards.
--

2.7.4

#6 lore raw
Quoted 27 lines
Quoted 27 lines

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

---
 doc/guides/rel_notes/deprecation.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)
doc/guides/rel_notes/deprecation.rst +5 -0
index 20aa745..208708d 100644
@@ -113,3 +113,15 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
+  not allow for writing optimized code for all the CPU architectures supported
+  in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers
+  using C11 atomic built-ins. These wrappers must be used for patches that
Quoted 8 lines

doc/guides/rel_notes/deprecation.rst Deprecation Notices

Quoted 8 lines
doc/guides/rel_notes/deprecation.rst +7 -1
+  need to be merged in 20.08 onwards.
+
+* rte_smp_*mb: These APIs provide full barrier functionality. However, many
+  use cases do not require full barriers. To support such use cases, DPDK will
+  adopt C11 barrier semantics and provide wrappers using C11 atomic built-ins.
+  These wrappers must be used for patches that need to be merged in 20.08
+  onwards.
--

Can we probably add a note that new API supposed to not introduce performance degradation comparing to one we are going to deprecate? Thanks
Konstantin

Acked-by on v1 1/1
#7 lore raw
In reply to Phil Yang
Quoted 10 lines · Phil Yang

From: Honnappa Nagarahalli <[email protected]>

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

#8 lore raw

PATCH v2 1/1 doc: announce adoption of C11 atomic operations semantics

In reply to Phil Yang

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

---
 doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
doc/guides/rel_notes/deprecation.rst +13 -0
index 20aa745b7..01f99a0d6 100644
@@ -113,3 +113,16 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
+  not allow for writing optimized code for all the CPU architectures supported
+  in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers
+  using C11 atomic built-ins. These wrappers must be used for patches that
+  need to be merged in 20.08 onwards. This change will not introduce any
+  performance degradation.
+
+* rte_smp_*mb: These APIs provide full barrier functionality. However, many
+  use cases do not require full barriers. To support such use cases, DPDK will
+  adopt C11 barrier semantics and provide wrappers using C11 atomic built-ins.
+  These wrappers must be used for patches that need to be merged in 20.08
+  onwards. This change will not introduce any performance degradation.
Signature · 1 line
2.17.1
Acked-by on v2 1/1
#9 lore raw
Quoted 28 lines

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

---
 doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
doc/guides/rel_notes/deprecation.rst +4 -0
index 20aa745b7..01f99a0d6 100644
@@ -113,3 +113,16 @@ Deprecation Notices
   Python 2 support will be completely removed in 20.11.
   In 20.08, explicit deprecation warnings will be displayed when running
   scripts with Python 2.
+
+* rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
+  not allow for writing optimized code for all the CPU architectures supported
+  in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers

doc/guides/rel_notes/deprecation.rst Deprecation Notices

Quoted 10 lines
doc/guides/rel_notes/deprecation.rst +9 -1
+  using C11 atomic built-ins. These wrappers must be used for patches that
+  need to be merged in 20.08 onwards. This change will not introduce any
+  performance degradation.
+
+* rte_smp_*mb: These APIs provide full barrier functionality. However, many
+  use cases do not require full barriers. To support such use cases, DPDK will
+  adopt C11 barrier semantics and provide wrappers using C11 atomic built-ins.
+  These wrappers must be used for patches that need to be merged in 20.08
+  onwards. This change will not introduce any performance degradation.
--
Quoted 1 line

2.17.1

Acked-by David Christensen Applied
#10 lore raw
Quoted 17 lines
Quoted 17 lines

As agreed in the DPDK tech board [1], after 20.05 release, patches must use C11 atomic operations semantics with the help of wrappers.

[1] http://mails.dpdk.org/archives/dev/2020-April/165143.html

---

doc/guides/rel_notes/deprecation.rst +6 -0
+* rte_atomicNN_xxx: These APIs do not take memory order parameter. This does
+  not allow for writing optimized code for all the CPU architectures supported
+  in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers
+  using C11 atomic built-ins. These wrappers must be used for patches that
+  need to be merged in 20.08 onwards. This change will not introduce any
+  performance degradation.
Quoted 8 lines

doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 128

Quoted 6 lines
doc/guides/rel_notes/deprecation.rst +6 -0
+
+* rte_smp_*mb: These APIs provide full barrier functionality. However, many
+  use cases do not require full barriers. To support such use cases, DPDK will
+  adopt C11 barrier semantics and provide wrappers using C11 atomic built-ins.
+  These wrappers must be used for patches that need to be merged in 20.08
+  onwards. This change will not introduce any performance degradation.

Applied, thanks