netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] libbpf: support more map options
@ 2017-10-02 16:41 Craig Gallek
  2017-10-02 16:41 ` [PATCH net-next v2 1/2] libbpf: parse maps sections of varying size Craig Gallek
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Craig Gallek @ 2017-10-02 16:41 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
	David S . Miller
  Cc: Chonggang Li, netdev

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

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

end of thread, other threads:[~2017-10-04 19:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 16:41 [PATCH net-next v2 0/2] libbpf: support more map options Craig Gallek
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

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