diff options
author | Alexei Starovoitov <ast@fb.com> | 2016-03-07 21:57:20 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-08 15:28:32 -0500 |
commit | 89b976070190eb9dd14943c0d6ca4b7209f61405 (patch) | |
tree | 36762c9aedfdf442e89148c0079e6cc1cbebbd57 /samples/bpf/test_verifier.c | |
parent | 3622e7e4935105991dc648bca650c858576aecda (diff) |
samples/bpf: add map_flags to bpf loader
note old loader is compatible with new kernel.
map_flags are optional
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/test_verifier.c')
-rw-r--r-- | samples/bpf/test_verifier.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/test_verifier.c b/samples/bpf/test_verifier.c index 563c507c0a09..4b51a9039c0d 100644 --- a/samples/bpf/test_verifier.c +++ b/samples/bpf/test_verifier.c @@ -1198,7 +1198,7 @@ static int create_map(void) int map_fd; map_fd = bpf_create_map(BPF_MAP_TYPE_HASH, - sizeof(long long), sizeof(long long), 1024); + sizeof(long long), sizeof(long long), 1024, 0); if (map_fd < 0) printf("failed to create map '%s'\n", strerror(errno)); @@ -1210,7 +1210,7 @@ static int create_prog_array(void) int map_fd; map_fd = bpf_create_map(BPF_MAP_TYPE_PROG_ARRAY, - sizeof(int), sizeof(int), 4); + sizeof(int), sizeof(int), 4, 0); if (map_fd < 0) printf("failed to create prog_array '%s'\n", strerror(errno)); |