OSDN Git Service

Merge branch 'bpf_iter-BTF_ID-at-build-time'
authorAlexei Starovoitov <ast@kernel.org>
Tue, 21 Jul 2020 20:15:01 +0000 (13:15 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 21 Jul 2020 20:26:27 +0000 (13:26 -0700)
commit8fca4f98af0bf112b485fff02779b84d3a069eac
tree521419b293f6fd3b2e1d201bbb4ca49f9e9e5ce5
parente4d9c2320716ea0e9ef59f503ddd8f253a642ddd
parent951cf368bcb11d6f817709660cf5cd914072c36f
Merge branch 'bpf_iter-BTF_ID-at-build-time'

Yonghong Song says:

====================
Commit 5a2798ab32ba
("bpf: Add BTF_ID_LIST/BTF_ID/BTF_ID_UNUSED macros")
implemented a mechanism to compute btf_ids at kernel build
time which can simplify kernel implementation and reduce
runtime overhead by removing in-kernel btf_id calculation.

This patch set tried to use this mechanism to compute
btf_ids for bpf_skc_to_*() helpers and for btf_id_or_null ctx
arguments specified during bpf iterator registration.
Please see individual patch for details.

Changelogs:
  v1 -> v2:
    - v1 ([1]) is only for bpf_skc_to_*() helpers. This version
      expanded it to cover ctx btf_id_or_null arguments
    - abandoned the change of "extern u32 name[]" to
      "static u32 name[]" for BPF_ID_LIST local "name" definition.
      gcc 9 incurred a compilation error.

 [1]: https://lore.kernel.org/bpf/20200717184706.3476992-1-yhs@fb.com/T
====================

Signed-off-by: Alexei Starovoitov <ast@kernel.org>