bpf: refactor sockmap sample program update for arg parsing
authorJohn Fastabend <john.fastabend@gmail.com>
Mon, 22 Jan 2018 18:35:27 +0000 (10:35 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 24 Jan 2018 09:46:58 +0000 (10:46 +0100)
commit6627426fa2741866f1bdd194216a91a82ec063e4
treec5bc8fa04ca4d023831b1ecbd3b12d2af67ba3f2
parent31e95b61e172144bb2b626a291db1bdc0769275b
bpf: refactor sockmap sample program update for arg parsing

sockmap sample program takes arguments from cmd line but it reads them
in using offsets into the array. Because we want to add more arguments
in the future lets do proper argument handling.

Also refactor code to pull apart sock init and ping/pong test. This
allows us to add new tests in the future.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/sockmap/sockmap_user.c