mbox series

[0/4] use C11 atomic builtins for libs

Message ID 1599794967-17500-1-git-send-email-phil.yang@arm.com (mailing list archive)
Headers
Series use C11 atomic builtins for libs |

Message

Phil Yang Sept. 11, 2020, 3:29 a.m. UTC
Since rte_atomicXX APIs are not allowed to be used[1][2], use C11 atomic
builtins instead in eal, bbdev, power, and ethdev libs.

[1] http://code.dpdk.org/dpdk/latest/source/doc/guides/rel_notes/deprecation.rst#L87
[2] http://code.dpdk.org/dpdk/latest/source/devtools/checkpatches.sh#L80

Phil Yang (4):
  eal: use C11 atomic builtins for already initialized check
  bbdev: use C11 atomic builtins for device processing counter
  power: use C11 atomic builtins for power in use state update
  ethdev: use C11 atomic builtins for link status update

 lib/librte_bbdev/rte_bbdev.c            |  5 ++--
 lib/librte_bbdev/rte_bbdev.h            |  4 +--
 lib/librte_eal/freebsd/eal.c            | 18 +++++++------
 lib/librte_eal/linux/eal.c              | 20 ++++++++-------
 lib/librte_ethdev/rte_ethdev_driver.h   | 19 ++++----------
 lib/librte_power/power_acpi_cpufreq.c   | 45 +++++++++++++++++++++++++--------
 lib/librte_power/power_pstate_cpufreq.c | 45 +++++++++++++++++++++++++--------
 7 files changed, 100 insertions(+), 56 deletions(-)
  

Comments

David Marchand Sept. 15, 2020, 3:12 p.m. UTC | #1
On Fri, Sep 11, 2020 at 5:29 AM Phil Yang <phil.yang@arm.com> wrote:
>
> Since rte_atomicXX APIs are not allowed to be used[1][2], use C11 atomic
> builtins instead in eal, bbdev, power, and ethdev libs.
>
> [1] http://code.dpdk.org/dpdk/latest/source/doc/guides/rel_notes/deprecation.rst#L87
> [2] http://code.dpdk.org/dpdk/latest/source/devtools/checkpatches.sh#L80
>
> Phil Yang (4):
>   eal: use C11 atomic builtins for already initialized check
>   bbdev: use C11 atomic builtins for device processing counter
>   power: use C11 atomic builtins for power in use state update
>   ethdev: use C11 atomic builtins for link status update

It breaks build with clang (Travis + FreeBSD vm at UNH).
  
Phil Yang Sept. 16, 2020, 7:32 a.m. UTC | #2
David Marchand <david.marchand@redhat.com> writes:

> Subject: Re: [dpdk-dev] [PATCH 0/4] use C11 atomic builtins for libs
> 
> On Fri, Sep 11, 2020 at 5:29 AM Phil Yang <phil.yang@arm.com> wrote:
> >
> > Since rte_atomicXX APIs are not allowed to be used[1][2], use C11 atomic
> > builtins instead in eal, bbdev, power, and ethdev libs.
> >
> > [1]
> http://code.dpdk.org/dpdk/latest/source/doc/guides/rel_notes/deprecatio
> n.rst#L87
> > [2]
> http://code.dpdk.org/dpdk/latest/source/devtools/checkpatches.sh#L80
> >
> > Phil Yang (4):
> >   eal: use C11 atomic builtins for already initialized check
> >   bbdev: use C11 atomic builtins for device processing counter
> >   power: use C11 atomic builtins for power in use state update
> >   ethdev: use C11 atomic builtins for link status update
> 
> It breaks build with clang (Travis + FreeBSD vm at UNH).

Yes. It is an 'int-conversion' warning in clang.
Problem resolved. Will update the patch soon.

Thanks,
Phil