netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Jiong Wang <jiong.wang@netronome.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: alexei.starovoitov@gmail.com, kafai@fb.com,
	oss-drivers@netronome.com, netdev@vger.kernel.org,
	francois.theron@netronome.com
Subject: Re: [RFC bpf-next] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info
Date: Mon, 15 Jan 2018 15:07:25 +0100	[thread overview]
Message-ID: <5b51a90e-3b47-23db-2653-f66c5a99026a@iogearbox.net> (raw)
In-Reply-To: <baad0eb0-0d53-6bc2-6836-1b4e1b3fdd90@netronome.com>

On 01/15/2018 01:27 PM, Jiong Wang wrote:
>> On Fri, 12 Jan 2018 12:31:15 +0100, Daniel Borkmann wrote:
[...]
>>> Given we know when ifindex is 0, then its always host JITed and the
>>> current approach with bfd_openr() works fine, and if ifindex is non-0
>>> it is /always/ device offloaded to the one bound in the ifindex so
>>> JIT dump will be specific to that device only and never host one. Not
>>> at all opposed to extending uapi, just a question on my side to get a
>>> better understanding first wrt arch string (maybe rough but complete
>>> patch with nfp + bpftool bits might help too).
>> I was advocating for full separate set of fields, Jiong was trying for
>> a reuse, and we sort of met in the middle :)  Depends on how one looks
>> at the definition of the jited_prog_insn field, old user space is not
>> guaranteed to pay attention to ifindex.  We will drop the arch and reuse
>> host fields if that's the direction you're leaning in.
> 
> I also want to make sure adding new "jited_image" and "jited_len" is the
> correct approach.

I think it's fine.

> Was thinking to reusing exsiting fields for host jit, i.e
> bpf_prog->jited_len and bpf_prog->aux->jited_data, but different offload
> targets might have different structure for "jited_data" that we need new
> call back to parse it, also I feel keep host fields clean for host JIT
> only might help preventing code logic for host and offload interleaving
> with each other, so had gone with adding new fields.

Agree, one thing less to worry since this also ties into kallsyms, etc.

Ok, lets stick with the current RFC, they seem to be the cleanest approach
overall with having offload_arch_name[] in the uapi and only filled by
driver JITs (and not host JITs).

Thanks,
Daniel

  reply	other threads:[~2018-01-15 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12  0:47 [RFC bpf-next] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info Jakub Kicinski
2018-01-12  2:17 ` Jakub Kicinski
2018-01-12 11:31   ` Daniel Borkmann
2018-01-12 22:06     ` [RFC bpf-next 1/2] nfp: bpf: set new jit info fields Jakub Kicinski
2018-01-12 22:06       ` [RFC bpf-next 2/2] tools: bpftool: improve architecture detection by using offload arch info Jakub Kicinski
2018-01-12 22:17     ` [RFC bpf-next] bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info Jakub Kicinski
2018-01-15 12:27       ` Jiong Wang
2018-01-15 14:07         ` Daniel Borkmann [this message]
2018-01-15 17:13           ` Alexei Starovoitov

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=5b51a90e-3b47-23db-2653-f66c5a99026a@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=francois.theron@netronome.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiong.wang@netronome.com \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.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;
as well as URLs for NNTP newsgroup(s).