bpf: add sendmsg option for testing BPF programs
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 22 Jan 2018 18:35:45 +0000 (10:35 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 24 Jan 2018 09:46:58 +0000 (10:46 +0100)
commiteaf8c6eec5f9ab5d9d7155d7041fb7eea7028052
tree4869d078a6e12252ddb73936ea9f4388798fef83
parent6627426fa2741866f1bdd194216a91a82ec063e4
bpf: add sendmsg option for testing BPF programs

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: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/sockmap/sockmap_user.c