BPF List
 help / color / mirror / Atom feed
From: Kui-Feng Lee <sinquersw@gmail.com>
To: Quentin Monnet <quentin@isovalent.com>,
	thinker.li@gmail.com, bpf@vger.kernel.org, ast@kernel.org,
	martin.lau@linux.dev, song@kernel.org, kernel-team@meta.com,
	andrii@kernel.org
Cc: kuifeng@meta.com
Subject: Re: [PATCH bpf-next v3 1/5] libbpf: expose resolve_func_ptr() through libbpf_internal.h.
Date: Wed, 21 Feb 2024 08:32:17 -0800	[thread overview]
Message-ID: <923db0bc-cd9c-4c67-a477-cb9b12a58eb2@gmail.com> (raw)
In-Reply-To: <fc37d1cd-6fbe-4507-b496-2a2dd622934f@isovalent.com>



On 2/21/24 03:49, Quentin Monnet wrote:
> 2024-02-21 01:23 UTC+0000 ~ thinker.li@gmail.com
>> From: Kui-Feng Lee <thinker.li@gmail.com>
>>
>> bpftool is going to reuse this helper function to support shadow types of
>> struct_ops maps.
>>
>> Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
>> ---
>>   tools/lib/bpf/libbpf.c          | 2 +-
>>   tools/lib/bpf/libbpf_internal.h | 1 +
>>   2 files changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
>> index 01f407591a92..ef8fd20f33ca 100644
>> --- a/tools/lib/bpf/libbpf.c
>> +++ b/tools/lib/bpf/libbpf.c
>> @@ -2145,7 +2145,7 @@ skip_mods_and_typedefs(const struct btf *btf, __u32 id, __u32 *res_id)
>>   	return t;
>>   }
>>   
>> -static const struct btf_type *
>> +const struct btf_type *
>>   resolve_func_ptr(const struct btf *btf, __u32 id, __u32 *res_id)
>>   {
>>   	const struct btf_type *t;
>> diff --git a/tools/lib/bpf/libbpf_internal.h b/tools/lib/bpf/libbpf_internal.h
>> index ad936ac5e639..aec6d57fe5d1 100644
>> --- a/tools/lib/bpf/libbpf_internal.h
>> +++ b/tools/lib/bpf/libbpf_internal.h
>> @@ -234,6 +234,7 @@ struct btf_type;
>>   struct btf_type *btf_type_by_id(const struct btf *btf, __u32 type_id);
>>   const char *btf_kind_str(const struct btf_type *t);
>>   const struct btf_type *skip_mods_and_typedefs(const struct btf *btf, __u32 id, __u32 *res_id);
>> +const struct btf_type *resolve_func_ptr(const struct btf *btf, __u32 id, __u32 *res_id);
> 
> If you respin, please add a comment to mention we expose it to bpftool
> (see bpf_core_add_cands() in the same file), to avoid people trying to
> remove it from the header file in a clean-up attempt.

No problem

> 
> Quentin

  reply	other threads:[~2024-02-21 16:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  1:23 [PATCH bpf-next v3 0/5] Create shadow types for struct_ops maps in skeletons thinker.li
2024-02-21  1:23 ` [PATCH bpf-next v3 1/5] libbpf: expose resolve_func_ptr() through libbpf_internal.h thinker.li
2024-02-21 11:49   ` Quentin Monnet
2024-02-21 16:32     ` Kui-Feng Lee [this message]
2024-02-21  1:23 ` [PATCH bpf-next v3 2/5] libbpf: set btf_value_type_id of struct bpf_map for struct_ops thinker.li
2024-02-21  1:23 ` [PATCH bpf-next v3 3/5] libbpf: Convert st_ops->data to shadow type thinker.li
2024-02-21  1:23 ` [PATCH bpf-next v3 4/5] bpftool: generated shadow variables for struct_ops maps thinker.li
2024-02-21 11:49   ` Quentin Monnet
2024-02-21 17:47     ` Kui-Feng Lee
2024-02-21  1:23 ` [PATCH bpf-next v3 5/5] selftests/bpf: Test if shadow types work correctly thinker.li

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=923db0bc-cd9c-4c67-a477-cb9b12a58eb2@gmail.com \
    --to=sinquersw@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuifeng@meta.com \
    --cc=martin.lau@linux.dev \
    --cc=quentin@isovalent.com \
    --cc=song@kernel.org \
    --cc=thinker.li@gmail.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