bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hou Tao <houtao1@huawei.com>
To: Alexei Starovoitov <ast@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>, Yonghong Song <yhs@fb.com>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>, <netdev@vger.kernel.org>,
	<bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v4 0/4] introduce dummy BPF STRUCT_OPS
Date: Fri, 29 Oct 2021 18:55:31 +0800	[thread overview]
Message-ID: <d89d987d-18e1-cd2a-0f29-efd2ff0449bb@huawei.com> (raw)
In-Reply-To: <20211025064025.2567443-1-houtao1@huawei.com>

Hi Alexei,

Could you please consider the patch set for 5.16 ? The whole patch set has
already been Acked by Martin.

Thanks.

On 10/25/2021 2:40 PM, Hou Tao wrote:
> Hi,
>
> Currently the test of BPF STRUCT_OPS depends on the specific bpf
> implementation (e.g, tcp_congestion_ops), but it can not cover all
> basic functionalities (e.g, return value handling), so introduce
> a dummy BPF STRUCT_OPS for test purpose.
>
> Instead of loading a userspace-implemeted bpf_dummy_ops map into
> kernel and calling the specific function by writing to sysfs provided
> by bpf_testmode.ko, only loading bpf_dummy_ops related prog into
> kernel and calling these prog by bpf_prog_test_run(). The latter
> is more flexible and has no dependency on extra kernel module.
>
> Now the return value handling is supported by test_1(...) ops,
> and passing multiple arguments is supported by test_2(...) ops.
> If more is needed, test_x(...) ops can be added afterwards.
>
> Comments are always welcome.
> Regards,
> Hou
>
> Change Log:
> v4:
>  * add Acked-by tags in patch 1~4
>  * patch 2: remove unncessary comments and update commit message
>             accordingly
>  * patch 4: remove unnecessary nr checking in dummy_ops_init_args()
>
> v3: https://www.spinics.net/lists/bpf/msg48303.html
>  * rebase on bpf-next
>  * address comments for Martin, mainly include: merge patch 3 &
>    patch 4 in v2, fix names of btf ctx access check helpers,
>    handle CONFIG_NET, fix leak in dummy_ops_init_args(), and
>    simplify bpf_dummy_init()
>  * patch 4: use a loop to check args in test_dummy_multiple_args()
>
> v2: https://www.spinics.net/lists/bpf/msg47948.html
>  * rebase on bpf-next
>  * add test_2(...) ops to test the passing of multiple arguments
>  * a new patch (patch #2) is added to factor out ctx access helpers
>  * address comments from Martin & Andrii
>
> v1: https://www.spinics.net/lists/bpf/msg46787.html
>
> RFC: https://www.spinics.net/lists/bpf/msg46117.html
>
>
> Hou Tao (4):
>   bpf: factor out a helper to prepare trampoline for struct_ops prog
>   bpf: factor out helpers for ctx access checking
>   bpf: add dummy BPF STRUCT_OPS for test purpose
>   selftests/bpf: add test cases for struct_ops prog
>
>  include/linux/bpf.h                           |  43 ++++
>  kernel/bpf/bpf_struct_ops.c                   |  32 ++-
>  kernel/bpf/bpf_struct_ops_types.h             |   3 +
>  kernel/trace/bpf_trace.c                      |  16 +-
>  net/bpf/Makefile                              |   3 +
>  net/bpf/bpf_dummy_struct_ops.c                | 200 ++++++++++++++++++
>  net/ipv4/bpf_tcp_ca.c                         |   9 +-
>  .../selftests/bpf/prog_tests/dummy_st_ops.c   | 115 ++++++++++
>  .../selftests/bpf/progs/dummy_st_ops.c        |  50 +++++
>  9 files changed, 439 insertions(+), 32 deletions(-)
>  create mode 100644 net/bpf/bpf_dummy_struct_ops.c
>  create mode 100644 tools/testing/selftests/bpf/prog_tests/dummy_st_ops.c
>  create mode 100644 tools/testing/selftests/bpf/progs/dummy_st_ops.c
>


      parent reply	other threads:[~2021-10-29 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  6:40 [PATCH bpf-next v4 0/4] introduce dummy BPF STRUCT_OPS Hou Tao
2021-10-25  6:40 ` [PATCH bpf-next v4 1/4] bpf: factor out a helper to prepare trampoline for struct_ops prog Hou Tao
2021-10-25  6:40 ` [PATCH bpf-next v4 2/4] bpf: factor out helpers for ctx access checking Hou Tao
2021-10-25  6:40 ` [PATCH bpf-next v4 3/4] bpf: add dummy BPF STRUCT_OPS for test purpose Hou Tao
2021-10-25  6:40 ` [PATCH bpf-next v4 4/4] selftests/bpf: add test cases for struct_ops prog Hou Tao
2021-10-29 10:55 ` Hou Tao [this message]

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=d89d987d-18e1-cd2a-0f29-efd2ff0449bb@huawei.com \
    --to=houtao1@huawei.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.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;
as well as URLs for NNTP newsgroup(s).