linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libbpf: Remove the duplicate checking of function storage
@ 2018-08-21 16:12 Taeung Song
  2018-08-21 16:46 ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Taeung Song @ 2018-08-21 16:12 UTC (permalink / raw)
  To: Daniel Borkmann, Alexei Starovoitov; +Cc: netdev, linux-kernel, Jakub Kicinski

After the commit eac7d84519a3 ("tools: libbpf: don't return '.text'
as a program for multi-function programs"), bpf_program__next()
in bpf_object__for_each_program skips the function storage such as .text,
so eliminate the duplicate checking.

Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 tools/lib/bpf/libbpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 2abd0f112627..8476da7f2720 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -2336,7 +2336,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
 		bpf_program__set_expected_attach_type(prog,
 						      expected_attach_type);
 
-		if (!bpf_program__is_function_storage(prog, obj) && !first_prog)
+		if (!first_prog)
 			first_prog = prog;
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] libbpf: Remove the duplicate checking of function storage
  2018-08-21 16:12 [PATCH] libbpf: Remove the duplicate checking of function storage Taeung Song
@ 2018-08-21 16:46 ` Jakub Kicinski
  2018-08-21 20:11   ` Daniel Borkmann
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2018-08-21 16:46 UTC (permalink / raw)
  To: Taeung Song; +Cc: Daniel Borkmann, Alexei Starovoitov, Linux Netdev List, LKML

On Tue, Aug 21, 2018 at 6:12 PM, Taeung Song <treeze.taeung@gmail.com> wrote:
> After the commit eac7d84519a3 ("tools: libbpf: don't return '.text'
> as a program for multi-function programs"), bpf_program__next()
> in bpf_object__for_each_program skips the function storage such as .text,
> so eliminate the duplicate checking.
>
> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>

Looks reasonable, but you may need to repost once bpf-next is open:

https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

> diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> index 2abd0f112627..8476da7f2720 100644
> --- a/tools/lib/bpf/libbpf.c
> +++ b/tools/lib/bpf/libbpf.c
> @@ -2336,7 +2336,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
>                 bpf_program__set_expected_attach_type(prog,
>                                                       expected_attach_type);
>
> -               if (!bpf_program__is_function_storage(prog, obj) && !first_prog)
> +               if (!first_prog)
>                         first_prog = prog;
>         }
>
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libbpf: Remove the duplicate checking of function storage
  2018-08-21 16:46 ` Jakub Kicinski
@ 2018-08-21 20:11   ` Daniel Borkmann
  2018-08-22  2:54     ` Taeung Song
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Borkmann @ 2018-08-21 20:11 UTC (permalink / raw)
  To: Jakub Kicinski, Taeung Song; +Cc: Alexei Starovoitov, Linux Netdev List, LKML

On 08/21/2018 06:46 PM, Jakub Kicinski wrote:
> On Tue, Aug 21, 2018 at 6:12 PM, Taeung Song <treeze.taeung@gmail.com> wrote:
>> After the commit eac7d84519a3 ("tools: libbpf: don't return '.text'
>> as a program for multi-function programs"), bpf_program__next()
>> in bpf_object__for_each_program skips the function storage such as .text,
>> so eliminate the duplicate checking.
>>
>> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
>> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
> 
> Looks reasonable, but you may need to repost once bpf-next is open:
> 
> https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt
> 
> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

Agree, please resubmit once bpf-next opens up again. Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libbpf: Remove the duplicate checking of function storage
  2018-08-21 20:11   ` Daniel Borkmann
@ 2018-08-22  2:54     ` Taeung Song
  0 siblings, 0 replies; 4+ messages in thread
From: Taeung Song @ 2018-08-22  2:54 UTC (permalink / raw)
  To: Daniel Borkmann, Jakub Kicinski
  Cc: Alexei Starovoitov, Linux Netdev List, LKML



On 08/22/2018 05:11 AM, Daniel Borkmann wrote:
> On 08/21/2018 06:46 PM, Jakub Kicinski wrote:
>> On Tue, Aug 21, 2018 at 6:12 PM, Taeung Song <treeze.taeung@gmail.com> wrote:
>>> After the commit eac7d84519a3 ("tools: libbpf: don't return '.text'
>>> as a program for multi-function programs"), bpf_program__next()
>>> in bpf_object__for_each_program skips the function storage such as .text,
>>> so eliminate the duplicate checking.
>>>
>>> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
>>> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
>>
>> Looks reasonable, but you may need to repost once bpf-next is open:
>>
>> https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt
>>
>> Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> 
> Agree, please resubmit once bpf-next opens up again. Thanks!
> 

OK ! I will.

Thanks,
Taeung

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-22  2:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21 16:12 [PATCH] libbpf: Remove the duplicate checking of function storage Taeung Song
2018-08-21 16:46 ` Jakub Kicinski
2018-08-21 20:11   ` Daniel Borkmann
2018-08-22  2:54     ` Taeung Song

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).