From: Tejun Heo <tj@kernel.org>
To: Amery Hung <ameryhung@gmail.com>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
alexei.starovoitov@gmail.com, andrii@kernel.org,
daniel@iogearbox.net, martin.lau@kernel.org,
kernel-team@meta.com
Subject: Re: [PATCH RFC v3 2/2] selftests/bpf: Test basic workflow of task local data
Date: Fri, 25 Apr 2025 12:12:46 -1000 [thread overview]
Message-ID: <aAwI3k4FeJHmHFKv@slm.duckdns.org> (raw)
In-Reply-To: <20250425214039.2919818-3-ameryhung@gmail.com>
Hello,
On Fri, Apr 25, 2025 at 02:40:34PM -0700, Amery Hung wrote:
...
> +bpf_tld_key_type_var("test_basic_value3", int, value3);
> +bpf_tld_key_type_var("test_basic_value4", struct test_struct, value4);
I think it'd be fine to always require key string.
> diff --git a/tools/testing/selftests/bpf/progs/test_task_local_data_basic.c b/tools/testing/selftests/bpf/progs/test_task_local_data_basic.c
> new file mode 100644
> index 000000000000..345d7c6e37de
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/progs/test_task_local_data_basic.c
...
> + bpf_tld_init_var(&tld, test_basic_value3);
> + bpf_tld_init_var(&tld, test_basic_value4);
Would it make more sense to make the second parameter to be a string? The
key names may contain tokens that are special to C and it becomes odd to
escape naked strings.
Thanks.
--
tejun
next prev parent reply other threads:[~2025-04-25 22:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 21:40 [PATCH RFC v3 0/2] Task local data API Amery Hung
2025-04-25 21:40 ` [PATCH RFC v3 1/2] selftests/bpf: Introduce task local data Amery Hung
2025-04-30 1:44 ` Alexei Starovoitov
2025-05-02 15:00 ` Amery Hung
2025-05-01 20:38 ` Andrii Nakryiko
2025-04-25 21:40 ` [PATCH RFC v3 2/2] selftests/bpf: Test basic workflow of " Amery Hung
2025-04-25 22:12 ` Tejun Heo [this message]
2025-04-25 22:51 ` Amery Hung
2025-05-01 20:37 ` [PATCH RFC v3 0/2] Task local data API Andrii Nakryiko
2025-05-01 23:26 ` Alexei Starovoitov
2025-05-02 2:22 ` Andrii Nakryiko
2025-05-02 17:55 ` Alexei Starovoitov
2025-05-02 4:26 ` Amery Hung
2025-05-02 16:14 ` Andrii Nakryiko
2025-05-02 18:36 ` Tejun Heo
2025-05-02 20:10 ` Andrii Nakryiko
2025-05-02 21:23 ` Amery Hung
2025-05-02 22:25 ` Andrii Nakryiko
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=aAwI3k4FeJHmHFKv@slm.duckdns.org \
--to=tj@kernel.org \
--cc=alexei.starovoitov@gmail.com \
--cc=ameryhung@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
--cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).