Netdev List
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Andrii Nakryiko <andriin@fb.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Alexei Starovoitov <ast@fb.com>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	Kernel Team <Kernel-team@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH bpf-next 0/3] capture integers in BTF type info for map defs
Date: Thu, 27 Jun 2019 17:22:18 +0000	[thread overview]
Message-ID: <10E7849F-0DF3-4AA6-9C08-97DAF0697750@fb.com> (raw)
In-Reply-To: <20190626232133.3800637-1-andriin@fb.com>



> On Jun 26, 2019, at 4:21 PM, Andrii Nakryiko <andriin@fb.com> wrote:
> 
> This patch set implements an update to how BTF-defined maps are specified. The
> change is in how integer attributes, e.g., type, max_entries, map_flags, are
> specified: now they are captured as part of map definition struct's BTF type
> information (using array dimension), eliminating the need for compile-time
> data initialization and keeping all the metadata in one place.

Using array dimension is hacky. But I guess this work.



> 
> All existing selftests that were using BTF-defined maps are updated, along
> with some other selftests, that were switched to new syntax.
> 
> Andrii Nakryiko (3):
>  libbpf: capture value in BTF type info for BTF-defined map defs
>  selftests/bpf: convert selftests using BTF-defined maps to new syntax
>  selftests/bpf: convert legacy BPF maps to BTF-defined ones
> 
> tools/lib/bpf/libbpf.c                        |  58 +++++----
> tools/testing/selftests/bpf/bpf_helpers.h     |   3 +
> tools/testing/selftests/bpf/progs/bpf_flow.c  |  28 ++---
> .../selftests/bpf/progs/get_cgroup_id_kern.c  |  26 ++---
> .../testing/selftests/bpf/progs/netcnt_prog.c |  20 ++--
> tools/testing/selftests/bpf/progs/pyperf.h    |  90 +++++++-------
> .../selftests/bpf/progs/sample_map_ret0.c     |  24 ++--
> .../selftests/bpf/progs/socket_cookie_prog.c  |  13 +--
> .../bpf/progs/sockmap_verdict_prog.c          |  48 ++++----
> .../testing/selftests/bpf/progs/strobemeta.h  |  68 +++++------
> .../selftests/bpf/progs/test_btf_newkv.c      |  13 +--
> .../bpf/progs/test_get_stack_rawtp.c          |  39 +++----
> .../selftests/bpf/progs/test_global_data.c    |  37 +++---
> tools/testing/selftests/bpf/progs/test_l4lb.c |  65 ++++-------
> .../selftests/bpf/progs/test_l4lb_noinline.c  |  65 ++++-------
> .../selftests/bpf/progs/test_map_in_map.c     |  30 ++---
> .../selftests/bpf/progs/test_map_lock.c       |  26 ++---
> .../testing/selftests/bpf/progs/test_obj_id.c |  12 +-
> .../bpf/progs/test_select_reuseport_kern.c    |  67 ++++-------
> .../bpf/progs/test_send_signal_kern.c         |  26 ++---
> .../bpf/progs/test_sock_fields_kern.c         |  78 +++++--------
> .../selftests/bpf/progs/test_spin_lock.c      |  36 +++---
> .../bpf/progs/test_stacktrace_build_id.c      |  55 ++++-----
> .../selftests/bpf/progs/test_stacktrace_map.c |  52 +++------
> .../selftests/bpf/progs/test_tcp_estats.c     |  13 +--
> .../selftests/bpf/progs/test_tcpbpf_kern.c    |  26 ++---
> .../selftests/bpf/progs/test_tcpnotify_kern.c |  28 ++---
> tools/testing/selftests/bpf/progs/test_xdp.c  |  26 ++---
> .../selftests/bpf/progs/test_xdp_loop.c       |  26 ++---
> .../selftests/bpf/progs/test_xdp_noinline.c   |  81 +++++--------
> .../selftests/bpf/progs/xdp_redirect_map.c    |  12 +-
> .../testing/selftests/bpf/progs/xdping_kern.c |  12 +-
> .../selftests/bpf/test_queue_stack_map.h      |  30 ++---
> .../testing/selftests/bpf/test_sockmap_kern.h | 110 +++++++++---------
> 34 files changed, 571 insertions(+), 772 deletions(-)
> 
> -- 
> 2.17.1
> 


      parent reply	other threads:[~2019-06-27 17:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 23:21 [PATCH bpf-next 0/3] capture integers in BTF type info for map defs Andrii Nakryiko
2019-06-26 23:21 ` [PATCH bpf-next 1/3] libbpf: capture value in BTF type info for BTF-defined " Andrii Nakryiko
2019-06-27 17:27   ` Song Liu
2019-06-27 17:47     ` Andrii Nakryiko
2019-06-27 17:55       ` Song Liu
2019-06-27 20:19         ` Andrii Nakryiko
2019-06-26 23:21 ` [PATCH bpf-next 2/3] selftests/bpf: convert selftests using BTF-defined maps to new syntax Andrii Nakryiko
2019-06-26 23:21 ` [PATCH bpf-next 3/3] selftests/bpf: convert legacy BPF maps to BTF-defined ones Andrii Nakryiko
2019-06-27 17:22 ` Song Liu [this message]

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=10E7849F-0DF3-4AA6-9C08-97DAF0697750@fb.com \
    --to=songliubraving@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.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