[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzZvtHTJFQ1_Qdb+VFpaZmLqX+-Nd9g06qsXRC1cgBA5oA@mail.gmail.com>
Date: Tue, 14 Jan 2020 16:46:00 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Brian Vazquez <brianvv@...gle.com>
Cc: Brian Vazquez <brianvv.kernel@...il.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
"David S . Miller" <davem@...emloft.net>,
Yonghong Song <yhs@...com>,
Stanislav Fomichev <sdf@...gle.com>,
Petar Penkov <ppenkov@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
open list <linux-kernel@...r.kernel.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH v4 bpf-next 9/9] selftests/bpf: add batch ops testing to
array bpf map
On Tue, Jan 14, 2020 at 8:46 AM Brian Vazquez <brianvv@...gle.com> wrote:
>
> Tested bpf_map_lookup_batch() and bpf_map_update_batch()
> functionality.
>
> $ ./test_maps
> ...
> test_array_map_batch_ops:PASS
> ...
>
> Signed-off-by: Brian Vazquez <brianvv@...gle.com>
> Signed-off-by: Yonghong Song <yhs@...com>
> ---
> .../bpf/map_tests/array_map_batch_ops.c | 131 ++++++++++++++++++
> 1 file changed, 131 insertions(+)
> create mode 100644 tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
>
> diff --git a/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c b/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
> new file mode 100644
> index 0000000000000..05b7caea6a444
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
> @@ -0,0 +1,131 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +#include <stdio.h>
> +#include <errno.h>
> +#include <string.h>
> +
> +#include <bpf/bpf.h>
> +#include <bpf/libbpf.h>
> +
> +#include <test_maps.h>
> +
> +static void map_batch_update(int map_fd, __u32 max_entries, int *keys,
> + int *values)
> +{
> + int i, err;
> +
> + DECLARE_LIBBPF_OPTS(bpf_map_batch_opts, opts,
Here, below, and in other patch: DECLARE_LIBBPF_OPTS declares a local
variable, so it shouldn't be separated from all the other variable
declarations.
> + .elem_flags = 0,
> + .flags = 0,
> + );
> +
[...]
Powered by blists - more mailing lists