From: Daniel Borkmann <daniel@iogearbox.net>
To: "Mickaël Salaün" <mic@digikod.net>, linux-kernel@vger.kernel.org
Cc: Alexei Starovoitov <ast@fb.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
"David S . Miller" <davem@davemloft.net>,
Wang Nan <wangnan0@huawei.com>,
netdev@vger.kernel.org, Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH net-next v4 04/11] bpf: Use bpf_load_program() from the library
Date: Thu, 09 Feb 2017 22:05:39 +0100 [thread overview]
Message-ID: <589CD9A3.9030206@iogearbox.net> (raw)
In-Reply-To: <20170208204940.26023-5-mic@digikod.net>
On 02/08/2017 09:49 PM, Mickaël Salaün wrote:
> Replace bpf_prog_load() with bpf_load_program() calls.
>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
> Cc: Alexei Starovoitov <ast@fb.com>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Shuah Khan <shuah@kernel.org>
[...]
> diff --git a/tools/testing/selftests/bpf/test_tag.c b/tools/testing/selftests/bpf/test_tag.c
> index 5f7c602f47d1..b77dc4b03e77 100644
> --- a/tools/testing/selftests/bpf/test_tag.c
> +++ b/tools/testing/selftests/bpf/test_tag.c
> @@ -16,6 +16,8 @@
> #include <linux/bpf.h>
> #include <linux/if_alg.h>
>
> +#include <bpf/bpf.h>
> +
> #include "../../../include/linux/filter.h"
>
> #include "bpf_sys.h"
> @@ -55,8 +57,8 @@ static int bpf_try_load_prog(int insns, int fd_map,
> int fd_prog;
>
> bpf_filler(insns, fd_map);
> - fd_prog = bpf_prog_load(BPF_PROG_TYPE_SCHED_CLS, prog, insns *
> - sizeof(struct bpf_insn), "", NULL, 0);
> + fd_prog = bpf_load_program(BPF_PROG_TYPE_SCHED_CLS, prog, insns, "", 0,
> + NULL, 0);
Went over the set and generally looks good. Please make sure though,
like in above case that you properly fix aligning next line to the
opening '('. I've noticed this multiple times in this and in the next
patch at least. Please double check the rest of your series as well.
Thanks,
Daniel
next prev parent reply other threads:[~2017-02-09 21:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 20:49 [PATCH net-next v4 00/11] Improve BPF selftests and use the library (net-next tree) Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 01/11] tools: Sync {,tools/}include/uapi/linux/bpf.h Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 02/11] bpf: Change the include directory for selftest Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 03/11] bpf: Always test unprivileged programs Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 04/11] bpf: Use bpf_load_program() from the library Mickaël Salaün
2017-02-09 21:05 ` Daniel Borkmann [this message]
2017-02-08 20:49 ` [PATCH net-next v4 05/11] bpf: Use bpf_map_update_elem() " Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 06/11] bpf: Use bpf_map_lookup_elem() " Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 07/11] bpf: Use bpf_map_delete_elem() " Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 08/11] bpf: Use bpf_map_get_next_key() " Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 09/11] bpf: Use bpf_create_map() " Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 10/11] bpf: Remove bpf_sys.h from selftests Mickaël Salaün
2017-02-08 20:49 ` [PATCH net-next v4 11/11] bpf: Add test_tag to .gitignore Mickaël Salaün
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=589CD9A3.9030206@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=acme@redhat.com \
--cc=ast@fb.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mic@digikod.net \
--cc=netdev@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox