Subject: pull-request: bpf-next 2019-02-16

From: Alexei Starovoitov <[email-masked]>
Date: Sat, 16 Feb 2019 19:42:33 -0800

Hi David,

The following pull-request contains BPF updates for your *net-next* tree.

The main changes are:

1) numerous libbpf API improvements, from Andrii, Andrey, Yonghong.

2) test all bpf progs in alu32 mode, from Jiong.

3) skb->sk access and bpf_sk_fullsock(), bpf_tcp_sock() helpers, from Martin.

4) support for IP encap in lwt bpf progs, from Peter.

5) remove XDP_QUERY_XSK_UMEM dead code, from Jan.

Please consider pulling these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git

Thanks a lot!

----------------------------------------------------------------

The following changes since commit 71bd106d2567675668e253cba3960e3c4bf2e80e:

  net: fixed-phy: Add fixed_phy_register_with_gpiod() API (2019-02-07 18:11:58 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git 

for you to fetch changes up to 5aab392c55c96f9bb26d9294f965f156a87ee81c:

  tools/libbpf: support bigger BTF data sizes (2019-02-16 18:47:18 -0800)

----------------------------------------------------------------
Alexei Starovoitov (5):
      Merge branch 'btf-api-extensions'
      Merge branch 'skb_sk-sk_fullsock-tcp_sock'
      Merge branch 'bpf-prog-build'
      Merge branch 'lwt_encap_ip'
      Merge branch 'libbpf-cleanup'

Andrey Ignatov (2):
      libbpf: Introduce bpf_map__resize
      libbpf: Introduce bpf_object__btf

Andrii Nakryiko (8):
      tools/bpf: add missing strings.h include
      btf: separate btf creation and loading
      btf: expose API to work with raw btf data
      btf: expose API to work with raw btf_ext data
      tools/bpf: remove btf__get_strings() superseded by raw data API
      tools/bpf: replace bzero with memset
      tools: sync uapi/linux/if_link.h header
      tools/libbpf: support bigger BTF data sizes

Jakub Kicinski (1):
      bpf: offload: add priv field for drivers

Jan Sokolowski (1):
      net: bpf: remove XDP_QUERY_XSK_UMEM enumerator

Jiong Wang (4):
      selftests: bpf: add "alu32" to .gitignore
      selftests: bpf: extend sub-register mode compilation to all bpf object files
      selftests: bpf: centre kernel bpf objects under new subdir "progs"
      selftests: bpf: relax sub-register mode compilation criteria

Martin KaFai Lau (8):
      bpf: Fix narrow load on a bpf_sock returned from sk_lookup()
      bpf: Add a bpf_sock pointer to __sk_buff and a bpf_sk_fullsock helper
      bpf: Add state, dst_ip4, dst_ip6 and dst_port to bpf_sock
      bpf: Refactor sock_ops_convert_ctx_access
      bpf: Add struct bpf_tcp_sock and BPF_FUNC_tcp_sock
      bpf: Sync bpf.h to tools/
      bpf: Add skb->sk, bpf_sk_fullsock and bpf_tcp_sock tests to test_verifer
      bpf: Add test_sock_fields for skb->sk and bpf_tcp_sock

Peter Oskolkov (10):
      bpf: add plumbing for BPF_LWT_ENCAP_IP in bpf_lwt_push_encap
      bpf: implement BPF_LWT_ENCAP_IP mode in bpf_lwt_push_encap
      bpf: handle GSO in bpf_lwt_push_encap
      ipv6_stub: add ipv6_route_input stub/proxy.
      bpf: add handling of BPF_LWT_REROUTE to lwt_bpf.c
      bpf: sync <kdir>/include/.../bpf.h with tools/include/.../bpf.h
      selftests: bpf: add test_lwt_ip_encap selftest
      bpf: fix memory leak in bpf_lwt_xmit_reroute
      bpf: make LWTUNNEL_BPF dependent on INET
      selftests: bpf: test_lwt_ip_encap: add negative tests.

Prashant Bhole (1):
      tools: bpftool: doc, add text about feature-subcommand

Yonghong Song (1):
      tools/bpf: add log_level to bpf_load_program_attr

 drivers/net/ethernet/intel/i40e/i40e_main.c        |   3 -
 drivers/net/ethernet/intel/i40e/i40e_xsk.c         |  28 --
 drivers/net/ethernet/intel/i40e/i40e_xsk.h         |   2 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c      |   3 -
 .../net/ethernet/intel/ixgbe/ixgbe_txrx_common.h   |   2 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c       |  17 -
 drivers/net/ethernet/netronome/nfp/bpf/main.c      |   2 +-
 drivers/net/ethernet/netronome/nfp/bpf/offload.c   |   4 +-
 drivers/net/netdevsim/bpf.c                        |   5 +-
 include/linux/bpf.h                                |  45 +-
 include/linux/netdevice.h                          |   7 +-
 include/net/addrconf.h                             |   1 +
 include/net/lwtunnel.h                             |   2 +
 include/uapi/linux/bpf.h                           |  98 +++-
 kernel/bpf/offload.c                               |  10 +-
 kernel/bpf/verifier.c                              | 168 +++++--
 net/Kconfig                                        |   2 +-
 net/core/filter.c                                  | 544 ++++++++++++++-------
 net/core/lwt_bpf.c                                 | 265 +++++++++-
 net/ipv6/addrconf_core.c                           |   6 +
 net/ipv6/af_inet6.c                                |   7 +
 tools/bpf/bpftool/Documentation/bpftool.rst        |   4 +-
 tools/include/uapi/linux/bpf.h                     |  98 +++-
 tools/include/uapi/linux/if_link.h                 |   1 +
 tools/lib/bpf/bpf.c                                |  69 +--
 tools/lib/bpf/bpf.h                                |   1 +
 tools/lib/bpf/btf.c                                | 182 +++----
 tools/lib/bpf/btf.h                                |   6 +-
 tools/lib/bpf/libbpf.c                             |  25 +-
 tools/lib/bpf/libbpf.h                             |   4 +
 tools/lib/bpf/libbpf.map                           |   6 +-
 tools/testing/selftests/bpf/.gitignore             |   1 +
 tools/testing/selftests/bpf/Makefile               |  52 +-
 tools/testing/selftests/bpf/bpf_helpers.h          |   4 +
 tools/testing/selftests/bpf/bpf_util.h             |   9 +
 tools/testing/selftests/bpf/{ => progs}/bpf_flow.c |   0
 .../selftests/bpf/{ => progs}/connect4_prog.c      |   0
 .../selftests/bpf/{ => progs}/connect6_prog.c      |   0
 .../testing/selftests/bpf/{ => progs}/dev_cgroup.c |   0
 .../selftests/bpf/{ => progs}/get_cgroup_id_kern.c |   0
 .../selftests/bpf/{ => progs}/netcnt_prog.c        |   0
 .../selftests/bpf/{ => progs}/sample_map_ret0.c    |   0
 .../selftests/bpf/{ => progs}/sample_ret0.c        |   0
 .../selftests/bpf/{ => progs}/sendmsg4_prog.c      |   0
 .../selftests/bpf/{ => progs}/sendmsg6_prog.c      |   0
 .../selftests/bpf/{ => progs}/socket_cookie_prog.c |   0
 .../selftests/bpf/{ => progs}/sockmap_parse_prog.c |   0
 .../bpf/{ => progs}/sockmap_tcp_msg_prog.c         |   0
 .../bpf/{ => progs}/sockmap_verdict_prog.c         |   0
 .../selftests/bpf/{ => progs}/test_adjust_tail.c   |   0
 .../selftests/bpf/{ => progs}/test_btf_haskv.c     |   0
 .../selftests/bpf/{ => progs}/test_btf_nokv.c      |   0
 .../bpf/{ => progs}/test_get_stack_rawtp.c         |   0
 .../testing/selftests/bpf/{ => progs}/test_l4lb.c  |   0
 .../selftests/bpf/{ => progs}/test_l4lb_noinline.c |   0
 .../bpf/{ => progs}/test_lirc_mode2_kern.c         |   0
 .../selftests/bpf/progs/test_lwt_ip_encap.c        |  85 ++++
 .../selftests/bpf/{ => progs}/test_lwt_seg6local.c |   0
 .../selftests/bpf/{ => progs}/test_map_in_map.c    |   0
 .../selftests/bpf/{ => progs}/test_map_lock.c      |   0
 .../selftests/bpf/{ => progs}/test_obj_id.c        |   0
 .../selftests/bpf/{ => progs}/test_pkt_access.c    |   0
 .../selftests/bpf/{ => progs}/test_pkt_md_access.c |   0
 .../selftests/bpf/{ => progs}/test_queue_map.c     |   0
 .../bpf/{ => progs}/test_select_reuseport_kern.c   |   0
 .../bpf/{ => progs}/test_sk_lookup_kern.c          |   0
 .../bpf/{ => progs}/test_skb_cgroup_id_kern.c      |   0
 .../selftests/bpf/progs/test_sock_fields_kern.c    | 152 ++++++
 .../selftests/bpf/{ => progs}/test_sockhash_kern.c |   0
 .../selftests/bpf/{ => progs}/test_sockmap_kern.c  |   0
 .../selftests/bpf/{ => progs}/test_spin_lock.c     |   0
 .../selftests/bpf/{ => progs}/test_stack_map.c     |   0
 .../bpf/{ => progs}/test_stacktrace_build_id.c     |   0
 .../bpf/{ => progs}/test_stacktrace_map.c          |   0
 .../selftests/bpf/{ => progs}/test_tcp_estats.c    |   0
 .../selftests/bpf/{ => progs}/test_tcpbpf_kern.c   |   0
 .../bpf/{ => progs}/test_tcpnotify_kern.c          |   0
 .../selftests/bpf/{ => progs}/test_tracepoint.c    |   0
 .../selftests/bpf/{ => progs}/test_tunnel_kern.c   |   0
 tools/testing/selftests/bpf/{ => progs}/test_xdp.c |   0
 .../selftests/bpf/{ => progs}/test_xdp_meta.c      |   0
 .../selftests/bpf/{ => progs}/test_xdp_noinline.c  |   0
 .../selftests/bpf/{ => progs}/test_xdp_redirect.c  |   0
 .../selftests/bpf/{ => progs}/test_xdp_vlan.c      |   0
 .../testing/selftests/bpf/{ => progs}/xdp_dummy.c  |   0
 tools/testing/selftests/bpf/test_btf.c             |  39 +-
 tools/testing/selftests/bpf/test_lwt_ip_encap.sh   | 376 ++++++++++++++
 tools/testing/selftests/bpf/test_sock.c            |   9 +-
 tools/testing/selftests/bpf/test_sock_fields.c     | 327 +++++++++++++
 .../testing/selftests/bpf/verifier/ref_tracking.c  |   4 +-
 tools/testing/selftests/bpf/verifier/sock.c        | 384 +++++++++++++++
 tools/testing/selftests/bpf/verifier/unpriv.c      |   2 +-
 92 files changed, 2576 insertions(+), 485 deletions(-)
 rename tools/testing/selftests/bpf/{ => progs}/bpf_flow.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/connect4_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/connect6_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/dev_cgroup.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/get_cgroup_id_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/netcnt_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/sample_map_ret0.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/sample_ret0.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/sendmsg4_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/sendmsg6_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/socket_cookie_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/sockmap_parse_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/sockmap_tcp_msg_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/sockmap_verdict_prog.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_adjust_tail.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_btf_haskv.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_btf_nokv.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_get_stack_rawtp.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_l4lb.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_l4lb_noinline.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_lirc_mode2_kern.c (100%)
 create mode 100644 tools/testing/selftests/bpf/progs/test_lwt_ip_encap.c
 rename tools/testing/selftests/bpf/{ => progs}/test_lwt_seg6local.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_map_in_map.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_map_lock.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_obj_id.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_pkt_access.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_pkt_md_access.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_queue_map.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_select_reuseport_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_sk_lookup_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_skb_cgroup_id_kern.c (100%)
 create mode 100644 tools/testing/selftests/bpf/progs/test_sock_fields_kern.c
 rename tools/testing/selftests/bpf/{ => progs}/test_sockhash_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_sockmap_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_spin_lock.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_stack_map.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_stacktrace_build_id.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_stacktrace_map.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_tcp_estats.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_tcpbpf_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_tcpnotify_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_tracepoint.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_tunnel_kern.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_xdp.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_xdp_meta.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_xdp_noinline.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_xdp_redirect.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/test_xdp_vlan.c (100%)
 rename tools/testing/selftests/bpf/{ => progs}/xdp_dummy.c (100%)
 create mode 100755 tools/testing/selftests/bpf/test_lwt_ip_encap.sh
 create mode 100644 tools/testing/selftests/bpf/test_sock_fields.c
 create mode 100644 tools/testing/selftests/bpf/verifier/sock.c