[dpdk-dev] [PATCH 7/8] bpf/arm64: add atomic-exchange-and-add operation
David Marchand
david.marchand at redhat.com
Fri Oct 18 15:16:51 CEST 2019
On Tue, Sep 3, 2019 at 1:00 PM <jerinj at marvell.com> wrote:
>
> From: Jerin Jacob <jerinj at marvell.com>
>
> Implement XADD eBPF instruction using STADD arm64 instruction.
> If the given platform does not have atomics support,
> use LDXR and STXR pair for critical section instead of STADD.
For the record, this patch had a missed dependency on the 128-bits
atomic for arm64 patch because of RTE_ARM_FEATURE_ATOMICS.
This will be resolved once the latter is merged.
> ---
> lib/librte_bpf/bpf_jit_arm64.c | 85 +++++++++++++++++++++++++++++++++-
> 1 file changed, 84 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_bpf/bpf_jit_arm64.c b/lib/librte_bpf/bpf_jit_arm64.c
> index c797c9c62..62fa6a505 100644
> --- a/lib/librte_bpf/bpf_jit_arm64.c
> +++ b/lib/librte_bpf/bpf_jit_arm64.c
[snip]
> +static int
> +has_atomics(void)
> +{
> + int rc = 0;
> +
> +#if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS)
> + rc = 1;
> +#endif
> + return rc;
> +}
[snip]
--
David Marchand
More information about the dev
mailing list