• John Fastabend's avatar
    bpf: add sendmsg option for testing BPF programs · eaf8c6ee
    John Fastabend authored
    When testing BPF programs using sockmap I often want to have more
    control over how sendmsg is exercised. This becomes even more useful
    as new sockmap program types are added.
    
    This adds a test type option to select type of test to run. Currently,
    only "ping" and "sendmsg" are supported, but more can be added as
    needed.
    
    The new help argument gives the following,
    
     Usage: ./sockmap --cgroup <cgroup_path>
     options:
     --help         -h
     --cgroup       -c
     --rate         -r
     --verbose      -v
     --iov_count    -i
     --length       -l
     --test         -t
    Signed-off-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    eaf8c6ee
sockmap_user.c 10 KB