All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@kernel.org>
To: Daniel Borkmann <daniel@iogearbox.net>,
	"Daniel T. Lee" <danieltimlee@gmail.com>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Yonghong Song <yhs@fb.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>, Andrii Nakryiko <andrii@kernel.org>,
	bpf <bpf@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>
Subject: Re: [bpf-next 00/10] samples/bpf: modernize BPF functionality test programs
Date: Mon, 16 Jan 2023 23:48:22 +0100	[thread overview]
Message-ID: <87a62idrk9.fsf@toke.dk> (raw)
In-Reply-To: <ccc12280-4e00-ab23-d948-05c7db8b8da1@iogearbox.net>

Daniel Borkmann <daniel@iogearbox.net> writes:

> On 1/16/23 2:35 PM, Toke Høiland-Jørgensen wrote:
>> "Daniel T. Lee" <danieltimlee@gmail.com> writes:
>>> On Mon, Jan 16, 2023 at 6:38 AM Alexei Starovoitov
>>> <alexei.starovoitov@gmail.com> wrote:
>>>> On Sat, Jan 14, 2023 at 11:16 PM Daniel T. Lee <danieltimlee@gmail.com> wrote:
>>>>>
>>>>> Currently, there are many programs under samples/bpf to test the
>>>>> various functionality of BPF that have been developed for a long time.
>>>>> However, the kernel (BPF) has changed a lot compared to the 2016 when
>>>>> some of these test programs were first introduced.
>>>>>
>>>>> Therefore, some of these programs use the deprecated function of BPF,
>>>>> and some programs no longer work normally due to changes in the API.
>>>>>
>>>>> To list some of the kernel changes that this patch set is focusing on,
>>>>> - legacy BPF map declaration syntax support had been dropped [1]
>>>>> - bpf_trace_printk() always append newline at the end [2]
>>>>> - deprecated styled BPF section header (bpf_load style) [3]
>>>>> - urandom_read tracepoint is removed (used for testing overhead) [4]
>>>>> - ping sends packet with SOCK_DGRAM instead of SOCK_RAW [5]*
>>>>> - use "vmlinux.h" instead of including individual headers
>>>>>
>>>>> In addition to this, this patchset tries to modernize the existing
>>>>> testing scripts a bit. And for network-related testing programs,
>>>>> a separate header file was created and applied. (To use the
>>>>> Endianness conversion function from xdp_sample and bunch of constants)
>>>>
>>>> Nice set of cleanups. Applied.
>>>> As a follow up could you convert some of them to proper selftests/bpf ?
>>>> Unfortunately samples/bpf will keep bit rotting despite your herculean efforts.
>>>
>>> I really appreciate for your compliment!
>>> I'll try to convert the existing sample to selftest in the next patch.
>
> This would be awesome, thanks a lot Daniel!
>
>> Maybe this is a good time to mention that we recently ported some of the
>> XDP utilities from samples/bpf to xdp-tools, in the form of the
>> 'xdp-bench' utility:
>> https://github.com/xdp-project/xdp-tools/tree/master/xdp-bench
>> 
>> It's basically a combination of all the xdp_redirect* samples, but also
>> includes the functionality from the xdp_rxq_info sample program (i.e.,
>> the ability to monitor RXQs and use other return codes).
>> 
>> I'm planning to submit a patch to remove those utilities from
>> samples/bpf after we tag the next release of xdp-tools (have one or two
>> outstanding issues to clear before we do that), but wanted to give you a
>> head's up so you don't spend any time on those particular utilities when
>> you're cleaning up samples :)
>
> Nice! Once we're through with most relevant ones from samples/bpf, it would
> be great to only have a readme in that dir (and that's really all) with pointers
> for developers on how to get started.. including BPF selftests, xdp tools, links
> to ebpf.io/applications and ebpf.io/infrastructure, etc where more resources
> can be found, essentially a small getting started doc for BPF devs.

Yeah, good point! Will keep that in mind :)

-Toke

      reply	other threads:[~2023-01-16 22:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15  7:16 [bpf-next 00/10] samples/bpf: modernize BPF functionality test programs Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 01/10] samples/bpf: ensure ipv6 is enabled before running tests Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 02/10] samples/bpf: refactor BPF functionality testing scripts Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 03/10] samples/bpf: fix broken lightweight tunnel testing Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 04/10] samples/bpf: fix broken cgroup socket testing Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 05/10] samples/bpf: replace broken overhead microbenchmark with fib_table_lookup Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 06/10] samples/bpf: replace legacy map with the BTF-defined map Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 07/10] samples/bpf: split common macros to net_shared.h Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 08/10] samples/bpf: replace BPF programs header with net_shared.h Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 09/10] samples/bpf: use vmlinux.h instead of implicit headers in BPF test program Daniel T. Lee
2023-01-15  7:16 ` [bpf-next 10/10] samples/bpf: change _kern suffix to .bpf with BPF test programs Daniel T. Lee
2023-01-15 21:38 ` [bpf-next 00/10] samples/bpf: modernize BPF functionality " Alexei Starovoitov
2023-01-16 13:01   ` Daniel T. Lee
2023-01-16 13:35     ` Toke Høiland-Jørgensen
2023-01-16 15:23       ` Daniel Borkmann
2023-01-16 22:48         ` Toke Høiland-Jørgensen [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=87a62idrk9.fsf@toke.dk \
    --to=toke@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=danieltimlee@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    --cc=song@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.