1. 24 Jan, 2020 2 commits
  2. 23 Jan, 2020 36 commits
  3. 22 Jan, 2020 2 commits
    • Daniel Borkmann's avatar
      Merge branch 'bpf-dynamic-relinking' · 1b2fd38d
      Daniel Borkmann authored
      Alexei Starovoitov says:
      
      ====================
      The last few month BPF community has been discussing an approach to call
      chaining, since exiting bpt_tail_call() mechanism used in production XDP
      programs has plenty of downsides. The outcome of these discussion was a
      conclusion to implement dynamic re-linking of BPF programs. Where rootlet XDP
      program attached to a netdevice can programmatically define a policy of
      execution of other XDP programs. Such rootlet would be compiled as normal XDP
      program and provide a number of placeholder global functions which later can be
      replaced with future XDP programs. BPF trampoline, function by function
      verification were building blocks towards that goal. The patch 1 is a final
      building block. It introduces dynamic program extensions. A number of
      improvements like more flexible function by function verification and better
      libbpf api will be implemented in future patches.
      
      v1->v2:
      - addressed Andrii's comments
      - rebase
      ====================
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      1b2fd38d
    • Alexei Starovoitov's avatar
      selftests/bpf: Add tests for program extensions · 7805fe84
      Alexei Starovoitov authored
      Add program extension tests that build on top of fexit_bpf2bpf tests.
      Replace three global functions in previously loaded test_pkt_access.c program
      with three new implementations:
      int get_skb_len(struct __sk_buff *skb);
      int get_constant(long val);
      int get_skb_ifindex(int val, struct __sk_buff *skb, int var);
      New function return the same results as original only if arguments match.
      
      new_get_skb_ifindex() demonstrates that 'skb' argument doesn't have to be first
      and only argument of BPF program. All normal skb based accesses are available.
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
      Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
      Acked-by: default avatarToke Høiland-Jørgensen <toke@redhat.com>
      Link: https://lore.kernel.org/bpf/20200121005348.2769920-4-ast@kernel.org
      7805fe84