mbox series

[bpf-next,0/2] compute bpf_skc_to_*() helper socket btf ids at build time

Message ID 20200717184706.3476992-1-yhs@fb.com
Headers show
Series compute bpf_skc_to_*() helper socket btf ids at build time | expand

Message

Yonghong Song July 17, 2020, 6:47 p.m. UTC
Commit af7ec1383361 ("bpf: Add bpf_skc_to_tcp6_sock() helper")
computed btf ids for a list of sockets at runtime when vmlinux_btf
is available. Commit 5a2798ab32ba
("bpf: Add BTF_ID_LIST/BTF_ID/BTF_ID_UNUSED macros") added support
to calculate btf_ids during linux build time. Patch #2
replaced runtime mechanism with new build-time btf_id computation
mechanism. Patch #1 also fixed a minor issue to use "static" instead
of "extern" for variable declaration to conform to actual
variable scope.

Yonghong Song (2):
  bpf: change var type of BTF_ID_LIST to static
  bpf: compute bpf_skc_to_*() helper socket btf ids at build time

 include/linux/bpf.h           |  4 ---
 include/linux/btf_ids.h       |  2 +-
 kernel/bpf/btf.c              |  1 -
 net/core/filter.c             | 49 +++++++++++++----------------------
 tools/include/linux/btf_ids.h |  2 +-
 5 files changed, 20 insertions(+), 38 deletions(-)