public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: "Emil Tsalapatis" <emil@etsalapatis.com>
To: "Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Song Liu" <song@kernel.org>
Cc: "Emil Tsalapatis" <emil@etsalapatis.com>, <bpf@vger.kernel.org>,
	<ast@kernel.org>, <andrii@kernel.org>, <daniel@iogearbox.net>,
	<eddyz87@gmail.com>
Subject: Re: [PATCH bpf-next v5 5/9] selftests/bpf: Add basic libarena scaffolding
Date: Fri, 10 Apr 2026 16:12:15 -0400	[thread overview]
Message-ID: <DHPQZ0PMVOS8.OYBETSS0OQ34@etsalapatis.com> (raw)
In-Reply-To: <CAP01T76gQXua1e+-zQxHcO2W9XHVe23t+QCCT3bWR_UyRWL27Q@mail.gmail.com>

On Fri Apr 10, 2026 at 3:44 PM EDT, Kumar Kartikeya Dwivedi wrote:
> On Fri, 10 Apr 2026 at 20:39, Song Liu <song@kernel.org> wrote:
>>
>> On Fri, Apr 10, 2026 at 9:31 AM Emil Tsalapatis <emil@etsalapatis.com> wrote:
>> [...]
>> > diff --git a/tools/testing/selftests/bpf/libarena/include/common.h b/tools/testing/selftests/bpf/libarena/include/common.h
>> > new file mode 100644
>> > index 000000000000..5acf9b994943
>> > --- /dev/null
>> > +++ b/tools/testing/selftests/bpf/libarena/include/common.h
>> > @@ -0,0 +1,67 @@
>> > +// SPDX-License-Identifier: LGPL-2.1 OR BSD-2-Clause
>> > +/* Copyright (c) 2026 Meta Platforms, Inc. and affiliates. */
>> > +#pragma once
>> > +
>> > +#ifdef __BPF__
>> > +
>> > +#include <vmlinux.h>
>> > +
>> > +#include "bpf_experimental.h"
>>
>> bpf_experimental.h is not needed here.
>>
>> > +#include "bpf_arena_common.h"
>> > +#include "bpf_arena_spin_lock.h"
>>
>> These two headers are indeed needed. However, what's the plan
>> with them? They are not part of libarena at the moment. How should
>> we include them in the future?
>
> I would propose making them part of libarena, and adding libarena's
> header directory to -I for all progs in selftest to simplify
> inclusion.
>

+1 on this. We should have all arena related functionality in a single
directory.

>>
>> Thanks,
>> Song
>>
>> > +#include <asm-generic/errno.h>
>> > +
>> > +#ifndef __BPF_FEATURE_ADDR_SPACE_CAST
>> > +#error "Arena allocators require bpf_addr_space_cast feature"
>> > +#endif
>> > +
>> [...]


  reply	other threads:[~2026-04-10 20:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 16:30 [PATCH bpf-next v5 0/9] Introduce arena library and runtime Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 1/9] bpf: Upgrade scalar to PTR_TO_ARENA on arena pointer addition Emil Tsalapatis
2026-04-10 17:34   ` bot+bpf-ci
2026-04-10 17:55     ` Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 2/9] selftests/bpf: Add test for scalar/arena " Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 3/9] selftests/bpf: Move bpf_arena_spin_lock.h to the top level Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 4/9] selftests/bpf: Deduplicate WRITE_ONCE macro between headers Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 5/9] selftests/bpf: Add basic libarena scaffolding Emil Tsalapatis
2026-04-10 18:39   ` Song Liu
2026-04-10 19:44     ` Kumar Kartikeya Dwivedi
2026-04-10 20:12       ` Emil Tsalapatis [this message]
2026-04-10 22:06         ` Song Liu
2026-04-10 22:50           ` Alexei Starovoitov
2026-04-10 23:06             ` Song Liu
2026-04-10 23:58               ` Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 6/9] selftests/bpf: Add arena ASAN runtime to libarena Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 7/9] selftests/bpf: Add ASAN support for libarena selftests Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 8/9] selftests/bpf: Add buddy allocator for libarena Emil Tsalapatis
2026-04-10 16:30 ` [PATCH bpf-next v5 9/9] selftests/bpf: Add selftests for libarena buddy allocator Emil Tsalapatis

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=DHPQZ0PMVOS8.OYBETSS0OQ34@etsalapatis.com \
    --to=emil@etsalapatis.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    /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