[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAwI3k4FeJHmHFKv@slm.duckdns.org>
Date: Fri, 25 Apr 2025 12:12:46 -1000
From: Tejun Heo <tj@...nel.org>
To: Amery Hung <ameryhung@...il.com>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
alexei.starovoitov@...il.com, andrii@...nel.org,
daniel@...earbox.net, martin.lau@...nel.org, kernel-team@...a.com
Subject: Re: [PATCH RFC v3 2/2] selftests/bpf: Test basic workflow of task
local data
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
Powered by blists - more mailing lists