netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Craig Gallek <kraigatgoog@gmail.com>
To: Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: Chonggang Li <chonggangli@google.com>, netdev@vger.kernel.org
Subject: [PATCH net-next v2 0/2] libbpf: support more map options
Date: Mon,  2 Oct 2017 12:41:27 -0400	[thread overview]
Message-ID: <20171002164129.47986-1-kraigatgoog@gmail.com> (raw)

From: Craig Gallek <kraig@google.com>

The functional change to this series is the ability to use flags when
creating maps from object files loaded by libbpf.  In order to do this,
the first patch updates the library to handle map definitions that
differ in size from libbpf's struct bpf_map_def.

For object files with a larger map definition, libbpf will continue to load
if the unknown fields are all zero, otherwise the map is rejected.  If the
map definition in the object file is smaller than expected, libbpf will use
zero as a default value in the missing fields.

Craig Gallek (2):
  libbpf: parse maps sections of varying size
  libbpf: use map_flags when creating maps

 tools/lib/bpf/libbpf.c | 56 ++++++++++++++++++++++++++++++++++++++++++--------
 tools/lib/bpf/libbpf.h |  1 +
 2 files changed, 48 insertions(+), 9 deletions(-)

-- 
2.14.2.822.g60be5d43e6-goog

             reply	other threads:[~2017-10-02 16:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-02 16:41 Craig Gallek [this message]
2017-10-02 16:41 ` [PATCH net-next v2 1/2] libbpf: parse maps sections of varying size Craig Gallek
2017-10-02 23:07   ` Alexei Starovoitov
2017-10-03 14:39     ` Daniel Borkmann
2017-10-04 13:59       ` Craig Gallek
2017-10-04 19:27         ` Daniel Borkmann
2017-10-04 19:54           ` Alexei Starovoitov
2017-10-03 14:03   ` Jesper Dangaard Brouer
2017-10-04 13:58     ` Craig Gallek
2017-10-04 14:12       ` David Laight
2017-10-03 14:11   ` Jesper Dangaard Brouer
2017-10-04 13:58     ` Craig Gallek
2017-10-04 13:58     ` Craig Gallek
2017-10-02 16:41 ` [PATCH net-next v2 2/2] libbpf: use map_flags when creating maps Craig Gallek
2017-10-04  4:26 ` [PATCH net-next v2 0/2] libbpf: support more map options David Miller

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=20171002164129.47986-1-kraigatgoog@gmail.com \
    --to=kraigatgoog@gmail.com \
    --cc=ast@fb.com \
    --cc=brouer@redhat.com \
    --cc=chonggangli@google.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).