All of lore.kernel.org
 help / color / mirror / Atom feed
From: jakub.kicinski at netronome.com (Jakub Kicinski)
Subject: [PATCH bpf-next 3/3] bpftool: support loading flow dissector
Date: Wed, 7 Nov 2018 15:41:55 -0800	[thread overview]
Message-ID: <20181107154155.4e7ca3b3@cakuba.netronome.com> (raw)
In-Reply-To: <20181107233448.r7vcnxtdzfnzegas@mini-arch>

On Wed, 7 Nov 2018 15:34:48 -0800, Stanislav Fomichev wrote:
> On 11/07, Jakub Kicinski wrote:
> > On Wed, 7 Nov 2018 15:13:33 -0800, Stanislav Fomichev wrote:  
> > > On 11/07, Jakub Kicinski wrote:  
> > > > On Wed,  7 Nov 2018 14:43:56 -0800, Stanislav Fomichev wrote:    
> > > > > bpftool map update pinned /sys/fs/bpf/flow/jmp_table \
> > > > >         key 0 0 0 0 \
> > > > >         value pinned /sys/fs/bpf/flow/IP/0    
> > > > 
> > > > Where is that /0 coming from ?  Is that in source code?  I don't see
> > > > libbpf adding it, maybe I'm missing something.    
> > > libbpf adds that, that's a program instance:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c#n1744  
> > 
> > Ugh, I was looking at bpf_object__pin() which uses names :(
> > 
> > We never use this multi-instance thing, and I don't think bpftool ever
> > will, so IMHO it'd be good if we just re-did the pinning loop in
> > bpftool.  
> I wonder whether I should just add special case to bpf_program__pin: don't
> create a subdir when instances.nr == 1 (and just create a file pin for
> single instance)? In that case I can continue to use libbpf and don't reinvent
> the wheel. Any objections?

Mm.. I'm afraid libbpf needs to keep backward compatibility.  We'd have
to add some way for the user (bpftool code) to request the instance ID
does not appear, but (potential) existing users should keep seeing them.
Perhaps others disagree.

WARNING: multiple messages have this Message-ID (diff)
From: jakub.kicinski@netronome.com (Jakub Kicinski)
Subject: [PATCH bpf-next 3/3] bpftool: support loading flow dissector
Date: Wed, 7 Nov 2018 15:41:55 -0800	[thread overview]
Message-ID: <20181107154155.4e7ca3b3@cakuba.netronome.com> (raw)
Message-ID: <20181107234155.VSDeMQsDAtGvLOXJcpADMrILF_9vn5r2oiZhmeZBsXw@z> (raw)
In-Reply-To: <20181107233448.r7vcnxtdzfnzegas@mini-arch>

On Wed, 7 Nov 2018 15:34:48 -0800, Stanislav Fomichev wrote:
> On 11/07, Jakub Kicinski wrote:
> > On Wed, 7 Nov 2018 15:13:33 -0800, Stanislav Fomichev wrote:  
> > > On 11/07, Jakub Kicinski wrote:  
> > > > On Wed,  7 Nov 2018 14:43:56 -0800, Stanislav Fomichev wrote:    
> > > > > bpftool map update pinned /sys/fs/bpf/flow/jmp_table \
> > > > >         key 0 0 0 0 \
> > > > >         value pinned /sys/fs/bpf/flow/IP/0    
> > > > 
> > > > Where is that /0 coming from ?  Is that in source code?  I don't see
> > > > libbpf adding it, maybe I'm missing something.    
> > > libbpf adds that, that's a program instance:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c#n1744  
> > 
> > Ugh, I was looking at bpf_object__pin() which uses names :(
> > 
> > We never use this multi-instance thing, and I don't think bpftool ever
> > will, so IMHO it'd be good if we just re-did the pinning loop in
> > bpftool.  
> I wonder whether I should just add special case to bpf_program__pin: don't
> create a subdir when instances.nr == 1 (and just create a file pin for
> single instance)? In that case I can continue to use libbpf and don't reinvent
> the wheel. Any objections?

Mm.. I'm afraid libbpf needs to keep backward compatibility.  We'd have
to add some way for the user (bpftool code) to request the instance ID
does not appear, but (potential) existing users should keep seeing them.
Perhaps others disagree.

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Stanislav Fomichev <sdf@fomichev.me>
Cc: Stanislav Fomichev <sdf@google.com>,
	netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
	ast@kernel.org, daniel@iogearbox.net, shuah@kernel.org,
	quentin.monnet@netronome.com, guro@fb.com,
	jiong.wang@netronome.com, bhole_prashant_q7@lab.ntt.co.jp,
	john.fastabend@gmail.com, jbenc@redhat.com,
	treeze.taeung@gmail.com, yhs@fb.com, osk@fb.com,
	sandipan@linux.vnet.ibm.com
Subject: Re: [PATCH bpf-next 3/3] bpftool: support loading flow dissector
Date: Wed, 7 Nov 2018 15:41:55 -0800	[thread overview]
Message-ID: <20181107154155.4e7ca3b3@cakuba.netronome.com> (raw)
In-Reply-To: <20181107233448.r7vcnxtdzfnzegas@mini-arch>

On Wed, 7 Nov 2018 15:34:48 -0800, Stanislav Fomichev wrote:
> On 11/07, Jakub Kicinski wrote:
> > On Wed, 7 Nov 2018 15:13:33 -0800, Stanislav Fomichev wrote:  
> > > On 11/07, Jakub Kicinski wrote:  
> > > > On Wed,  7 Nov 2018 14:43:56 -0800, Stanislav Fomichev wrote:    
> > > > > bpftool map update pinned /sys/fs/bpf/flow/jmp_table \
> > > > >         key 0 0 0 0 \
> > > > >         value pinned /sys/fs/bpf/flow/IP/0    
> > > > 
> > > > Where is that /0 coming from ?  Is that in source code?  I don't see
> > > > libbpf adding it, maybe I'm missing something.    
> > > libbpf adds that, that's a program instance:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/lib/bpf/libbpf.c#n1744  
> > 
> > Ugh, I was looking at bpf_object__pin() which uses names :(
> > 
> > We never use this multi-instance thing, and I don't think bpftool ever
> > will, so IMHO it'd be good if we just re-did the pinning loop in
> > bpftool.  
> I wonder whether I should just add special case to bpf_program__pin: don't
> create a subdir when instances.nr == 1 (and just create a file pin for
> single instance)? In that case I can continue to use libbpf and don't reinvent
> the wheel. Any objections?

Mm.. I'm afraid libbpf needs to keep backward compatibility.  We'd have
to add some way for the user (bpftool code) to request the instance ID
does not appear, but (potential) existing users should keep seeing them.
Perhaps others disagree.

  reply	other threads:[~2018-11-07 23:41 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 22:43 [PATCH v2 bpf-next 0/3] bpftool: support loading flow dissector sdf
2018-11-07 22:43 ` Stanislav Fomichev
2018-11-07 22:43 ` Stanislav Fomichev
2018-11-07 22:43 ` [PATCH bpf-next 1/3] selftests/bpf: rename flow dissector section to flow_dissector sdf
2018-11-07 22:43   ` Stanislav Fomichev
2018-11-07 22:43   ` Stanislav Fomichev
2018-11-07 22:43 ` [PATCH bpf-next 2/3] libbpf: cleanup after partial failure in bpf_object__pin sdf
2018-11-07 22:43   ` Stanislav Fomichev
2018-11-07 22:43   ` Stanislav Fomichev
2018-11-07 22:56   ` jakub.kicinski
2018-11-07 22:56     ` Jakub Kicinski
2018-11-07 22:56     ` Jakub Kicinski
2018-11-07 23:00     ` sdf
2018-11-07 23:00       ` Stanislav Fomichev
2018-11-07 23:00       ` Stanislav Fomichev
2018-11-07 23:06       ` jakub.kicinski
2018-11-07 23:06         ` Jakub Kicinski
2018-11-07 23:06         ` Jakub Kicinski
2018-11-07 23:25         ` sdf
2018-11-07 23:25           ` Stanislav Fomichev
2018-11-07 23:25           ` Stanislav Fomichev
2018-11-07 23:38           ` jakub.kicinski
2018-11-07 23:38             ` Jakub Kicinski
2018-11-07 23:38             ` Jakub Kicinski
2018-11-07 22:43 ` [PATCH bpf-next 3/3] bpftool: support loading flow dissector sdf
2018-11-07 22:43   ` Stanislav Fomichev
2018-11-07 22:43   ` Stanislav Fomichev
2018-11-07 23:09   ` jakub.kicinski
2018-11-07 23:09     ` Jakub Kicinski
2018-11-07 23:09     ` Jakub Kicinski
2018-11-07 23:13     ` sdf
2018-11-07 23:13       ` Stanislav Fomichev
2018-11-07 23:13       ` Stanislav Fomichev
2018-11-07 23:29       ` jakub.kicinski
2018-11-07 23:29         ` Jakub Kicinski
2018-11-07 23:29         ` Jakub Kicinski
2018-11-07 23:34         ` sdf
2018-11-07 23:34           ` Stanislav Fomichev
2018-11-07 23:34           ` Stanislav Fomichev
2018-11-07 23:41           ` jakub.kicinski [this message]
2018-11-07 23:41             ` Jakub Kicinski
2018-11-07 23:41             ` Jakub Kicinski
2018-11-08  0:40             ` sdf
2018-11-08  0:40               ` Stanislav Fomichev
2018-11-08  0:40               ` Stanislav Fomichev

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=20181107154155.4e7ca3b3@cakuba.netronome.com \
    --to=unknown@example.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.