29 Aug, 2017

1 commit


01 Aug, 2017

1 commit

  • test_tunnel_bpf.sh fails to remove the vxlan11 tunnel device, causing the
    next geneve tunnelling test case fails. In addition, the geneve reserved bit
    in tcbpf2_kern.c should be zero, according to the RFC.

    Signed-off-by: William Tu
    Signed-off-by: David S. Miller

    William Tu
     

30 Oct, 2016

1 commit

  • Some of the sample files are causing issues when they are loaded with tc
    and cls_bpf, meaning tc bails out while trying to parse the resulting ELF
    file as program/map/etc sections are not present, which can be easily
    spotted with readelf(1).

    Currently, BPF samples are including some of the kernel headers and mid
    term we should change them to refrain from this, really. When dynamic
    debugging is enabled, we bail out due to undeclared KBUILD_MODNAME, which
    is easily overlooked in the build as clang spills this along with other
    noisy warnings from various header includes, and llc still generates an
    ELF file with mentioned characteristics. For just playing around with BPF
    examples, this can be a bit of a hurdle to take.

    Just add a fake KBUILD_MODNAME as a band-aid to fix the issue, same is
    done in xdp*_kern samples already.

    Fixes: 65d472fb007d ("samples/bpf: add 'pointer to packet' tests")
    Fixes: 6afb1e28b859 ("samples/bpf: Add tunnel set/get tests.")
    Fixes: a3f74617340b ("cgroup: bpf: Add an example to do cgroup checking in BPF")
    Reported-by: Chandrasekar Kannan
    Signed-off-by: Daniel Borkmann
    Acked-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

17 Sep, 2016

2 commits

  • the test creates 3 namespaces with veth connected via bridge.
    First two namespaces simulate two different hosts with the same
    IPv4 and IPv6 addresses configured on the tunnel interface and they
    communicate with outside world via standard tunnels.
    Third namespace creates collect_md tunnel that is driven by BPF
    program which selects different remote host (either first or
    second namespace) based on tcp dest port number while tcp dst
    ip is the same.
    This scenario is rough approximation of load balancer use case.
    The tests check both traditional tunnel configuration and collect_md mode.

    Signed-off-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     
  • extend existing tests for vxlan, geneve, gre to include IPIP tunnel.
    It tests both traditional tunnel configuration and
    dynamic via bpf helpers.

    Signed-off-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

20 Aug, 2016

1 commit

  • The patch creates sample code exercising bpf_skb_{set,get}_tunnel_key,
    and bpf_skb_{set,get}_tunnel_opt for GRE, VXLAN, and GENEVE. A native
    tunnel device is created in a namespace to interact with a lwtunnel
    device out of the namespace, with metadata enabled. The bpf_skb_set_*
    program is attached to tc egress and bpf_skb_get_* is attached to egress
    qdisc. A ping between two tunnels is used to verify correctness and
    the result of bpf_skb_get_* printed by bpf_trace_printk.

    Signed-off-by: William Tu
    Signed-off-by: David S. Miller

    William Tu