mbox series

[v4,bpf-next,0/7] BPF sk local storage

Message ID 20190426233938.1330361-1-kafai@fb.com
Headers show
Series BPF sk local storage | expand

Message

Martin KaFai Lau April 26, 2019, 11:39 p.m. UTC
v4:
- Move checks to map_alloc_check in patch 1 (Stanislav Fomichev)
- Refactor BTF encoding macros to test_btf.h at
  a new patch 4 (Stanislav Fomichev)
- Refactor getenv and add print PASS message at the
  end of the test in patch 6 (Yonghong Song)

v3:
- Replace spinlock_types.h with spinlock.h in patch 1
  (kbuild test robot <lkp@intel.com>)

v2:
- Add the "test_maps.h" file in patch 5

This series introduces the BPF sk local storage.  The
details is in the patch 1 commit message.

Martin KaFai Lau (7):
  bpf: Introduce bpf sk local storage
  bpf: Sync bpf.h to tools
  bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing
  bpf: Refactor BTF encoding macro to test_btf.h
  bpf: Add verifier tests for the bpf_sk_storage
  bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps
  bpf: Add ene-to-end test for bpf_sk_storage_* helpers

 include/linux/bpf.h                           |   2 +
 include/linux/bpf_types.h                     |   1 +
 include/net/bpf_sk_storage.h                  |  13 +
 include/net/sock.h                            |   5 +
 include/uapi/linux/bpf.h                      |  44 +-
 kernel/bpf/syscall.c                          |   3 +-
 kernel/bpf/verifier.c                         |  27 +-
 net/bpf/test_run.c                            |   2 +
 net/core/Makefile                             |   1 +
 net/core/bpf_sk_storage.c                     | 804 ++++++++++++++++++
 net/core/filter.c                             |  12 +
 net/core/sock.c                               |   5 +
 tools/bpf/bpftool/map.c                       |   1 +
 tools/include/uapi/linux/bpf.h                |  44 +-
 tools/lib/bpf/libbpf_probes.c                 |  74 +-
 tools/testing/selftests/bpf/Makefile          |  25 +-
 tools/testing/selftests/bpf/bpf_helpers.h     |   5 +
 .../selftests/bpf/map_tests/sk_storage_map.c  | 629 ++++++++++++++
 .../bpf/progs/test_sock_fields_kern.c         |  53 ++
 tools/testing/selftests/bpf/test_btf.c        |  63 +-
 tools/testing/selftests/bpf/test_btf.h        |  69 ++
 tools/testing/selftests/bpf/test_maps.c       |  18 +-
 tools/testing/selftests/bpf/test_maps.h       |  17 +
 .../testing/selftests/bpf/test_sock_fields.c  | 115 ++-
 tools/testing/selftests/bpf/test_verifier.c   |  55 +-
 tools/testing/selftests/bpf/verifier/sock.c   | 116 +++
 26 files changed, 2089 insertions(+), 114 deletions(-)
 create mode 100644 include/net/bpf_sk_storage.h
 create mode 100644 net/core/bpf_sk_storage.c
 create mode 100644 tools/testing/selftests/bpf/map_tests/sk_storage_map.c
 create mode 100644 tools/testing/selftests/bpf/test_btf.h
 create mode 100644 tools/testing/selftests/bpf/test_maps.h

Comments

Yonghong Song April 27, 2019, 4:01 p.m. UTC | #1
On 4/26/19 4:39 PM, Martin KaFai Lau wrote:
> v4:
> - Move checks to map_alloc_check in patch 1 (Stanislav Fomichev)
> - Refactor BTF encoding macros to test_btf.h at
>    a new patch 4 (Stanislav Fomichev)
> - Refactor getenv and add print PASS message at the
>    end of the test in patch 6 (Yonghong Song)
> 
> v3:
> - Replace spinlock_types.h with spinlock.h in patch 1
>    (kbuild test robot <lkp@intel.com>)
> 
> v2:
> - Add the "test_maps.h" file in patch 5
> 
> This series introduces the BPF sk local storage.  The
> details is in the patch 1 commit message.
> 
> Martin KaFai Lau (7):
>    bpf: Introduce bpf sk local storage
>    bpf: Sync bpf.h to tools
>    bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing
>    bpf: Refactor BTF encoding macro to test_btf.h
>    bpf: Add verifier tests for the bpf_sk_storage
>    bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps
>    bpf: Add ene-to-end test for bpf_sk_storage_* helpers

Looks good to me. Ack the whole series.

Acked-by: Yonghong Song <yhs@fb.com>

> 
>   include/linux/bpf.h                           |   2 +
>   include/linux/bpf_types.h                     |   1 +
>   include/net/bpf_sk_storage.h                  |  13 +
>   include/net/sock.h                            |   5 +
>   include/uapi/linux/bpf.h                      |  44 +-
>   kernel/bpf/syscall.c                          |   3 +-
>   kernel/bpf/verifier.c                         |  27 +-
>   net/bpf/test_run.c                            |   2 +
>   net/core/Makefile                             |   1 +
>   net/core/bpf_sk_storage.c                     | 804 ++++++++++++++++++
>   net/core/filter.c                             |  12 +
>   net/core/sock.c                               |   5 +
>   tools/bpf/bpftool/map.c                       |   1 +
>   tools/include/uapi/linux/bpf.h                |  44 +-
>   tools/lib/bpf/libbpf_probes.c                 |  74 +-
>   tools/testing/selftests/bpf/Makefile          |  25 +-
>   tools/testing/selftests/bpf/bpf_helpers.h     |   5 +
>   .../selftests/bpf/map_tests/sk_storage_map.c  | 629 ++++++++++++++
>   .../bpf/progs/test_sock_fields_kern.c         |  53 ++
>   tools/testing/selftests/bpf/test_btf.c        |  63 +-
>   tools/testing/selftests/bpf/test_btf.h        |  69 ++
>   tools/testing/selftests/bpf/test_maps.c       |  18 +-
>   tools/testing/selftests/bpf/test_maps.h       |  17 +
>   .../testing/selftests/bpf/test_sock_fields.c  | 115 ++-
>   tools/testing/selftests/bpf/test_verifier.c   |  55 +-
>   tools/testing/selftests/bpf/verifier/sock.c   | 116 +++
>   26 files changed, 2089 insertions(+), 114 deletions(-)
>   create mode 100644 include/net/bpf_sk_storage.h
>   create mode 100644 net/core/bpf_sk_storage.c
>   create mode 100644 tools/testing/selftests/bpf/map_tests/sk_storage_map.c
>   create mode 100644 tools/testing/selftests/bpf/test_btf.h
>   create mode 100644 tools/testing/selftests/bpf/test_maps.h
>
Alexei Starovoitov April 27, 2019, 4:17 p.m. UTC | #2
On Sat, Apr 27, 2019 at 9:01 AM Yonghong Song <yhs@fb.com> wrote:
>
>
>
> On 4/26/19 4:39 PM, Martin KaFai Lau wrote:
> > v4:
> > - Move checks to map_alloc_check in patch 1 (Stanislav Fomichev)
> > - Refactor BTF encoding macros to test_btf.h at
> >    a new patch 4 (Stanislav Fomichev)
> > - Refactor getenv and add print PASS message at the
> >    end of the test in patch 6 (Yonghong Song)
> >
> > v3:
> > - Replace spinlock_types.h with spinlock.h in patch 1
> >    (kbuild test robot <lkp@intel.com>)
> >
> > v2:
> > - Add the "test_maps.h" file in patch 5
> >
> > This series introduces the BPF sk local storage.  The
> > details is in the patch 1 commit message.
> >
> > Martin KaFai Lau (7):
> >    bpf: Introduce bpf sk local storage
> >    bpf: Sync bpf.h to tools
> >    bpf: Support BPF_MAP_TYPE_SK_STORAGE in bpf map probing
> >    bpf: Refactor BTF encoding macro to test_btf.h
> >    bpf: Add verifier tests for the bpf_sk_storage
> >    bpf: Add BPF_MAP_TYPE_SK_STORAGE test to test_maps
> >    bpf: Add ene-to-end test for bpf_sk_storage_* helpers
>
> Looks good to me. Ack the whole series.
>
> Acked-by: Yonghong Song <yhs@fb.com>

Looks great to me as well.
Applied to bpf-next. Thanks!