mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
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>
This commit is contained in:
parent
3622e7e493
commit
89b9760701
8 changed files with 23 additions and 15 deletions
|
@ -34,7 +34,7 @@ static int test_sock(void)
|
|||
long long value = 0, tcp_cnt, udp_cnt, icmp_cnt;
|
||||
|
||||
map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key), sizeof(value),
|
||||
256);
|
||||
256, 0);
|
||||
if (map_fd < 0) {
|
||||
printf("failed to create map '%s'\n", strerror(errno));
|
||||
goto cleanup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue