Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/K8sVerifier: Cover several datapath configurations #17470

Merged
merged 2 commits into from
Oct 19, 2021

Commits on Oct 15, 2021

  1. test/K8sVerifier: Support testing several configs per program

    Until now, K8sVerifier relied only on bpf/Makefile to compile BPF
    programs for verifier tests. The Makefile would define, for each BPF
    program, the set of configs to enable to maximize program size and
    complexity. All BPF programs would then be compiled at once and loaded
    with a single call to verifier-test.sh.
    
    This commit rewrites most of K8sVerifier to support testing more than
    one datapath config per BPF program. The list of datapath configs to
    test for each program is defined in a file at
    bpf/complexity-tests/[kernel]/[program].txt. For each BPF program and
    for each config in the file, K8sVerifier then compiles and loads the
    program.
    
    This change will allow us to significantly increase our complexity
    coverage by testing more configurations.
    
    Signed-off-by: Paul Chaignon <paul@cilium.io>
    pchaigno committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    2cb3ae8 View commit details
    Browse the repository at this point in the history
  2. bpf: Verifier tests with a single IP family for bpf_{host,lxc}

    In bpf_host and bpf_lxc, we split some BPF programs into tail calls
    conditionally depending on whether both IPv4 and IPv6 are enabled or
    only one of the two. These two options can therefore have an impact on
    whether we reach the complexity limit.
    
    This commit duplicates the existing tested datapath configurations of
    bpf_host and bpf_lxc, but with only one of IPv4 or IPv6 enabled. We are
    now testing 3 datapath configurations per kernel instead of 1.
    
    Signed-off-by: Paul Chaignon <paul@cilium.io>
    pchaigno committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    5e690bf View commit details
    Browse the repository at this point in the history