Lines Matching refs:map_opts
35 static struct bpf_map_create_opts map_opts = { .sz = sizeof(map_opts) }; variable
42 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value), 2, &map_opts); in test_hashmap()
139 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, i, j, 2, &map_opts); in test_hashmap_sizes()
161 sizeof(bpf_percpu(value, 0)), 2, &map_opts); in test_hashmap_percpu()
274 max_entries, &map_opts); in helper_fill_hashmap()
277 "err: %s, flags: 0x%x\n", strerror(errno), map_opts.map_flags); in helper_fill_hashmap()
333 old_flags = map_opts.map_flags; in test_hashmap_zero_seed()
334 map_opts.map_flags |= BPF_F_ZERO_SEED; in test_hashmap_zero_seed()
356 map_opts.map_flags = old_flags; in test_hashmap_zero_seed()
550 fd = bpf_map_create(BPF_MAP_TYPE_QUEUE, NULL, 4, sizeof(val), MAP_SIZE, &map_opts); in test_queuemap()
553 fd = bpf_map_create(BPF_MAP_TYPE_QUEUE, NULL, 0, sizeof(val), MAP_SIZE, &map_opts); in test_queuemap()
555 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_queuemap()
606 fd = bpf_map_create(BPF_MAP_TYPE_STACK, NULL, 4, sizeof(val), MAP_SIZE, &map_opts); in test_stackmap()
609 fd = bpf_map_create(BPF_MAP_TYPE_STACK, NULL, 0, sizeof(val), MAP_SIZE, &map_opts); in test_stackmap()
611 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_stackmap()
1319 MAP_SIZE, &map_opts); in test_map_large()
1482 MAP_SIZE, &map_opts); in test_map_parallel()
1539 old_flags = map_opts.map_flags; in test_map_rdonly()
1540 map_opts.map_flags |= BPF_F_RDONLY; in test_map_rdonly()
1542 MAP_SIZE, &map_opts); in test_map_rdonly()
1543 map_opts.map_flags = old_flags; in test_map_rdonly()
1568 old_flags = map_opts.map_flags; in test_map_wronly_hash()
1569 map_opts.map_flags |= BPF_F_WRONLY; in test_map_wronly_hash()
1571 MAP_SIZE, &map_opts); in test_map_wronly_hash()
1572 map_opts.map_flags = old_flags; in test_map_wronly_hash()
1599 old_flags = map_opts.map_flags; in test_map_wronly_stack_or_queue()
1600 map_opts.map_flags |= BPF_F_WRONLY; in test_map_wronly_stack_or_queue()
1601 fd = bpf_map_create(map_type, NULL, 0, sizeof(value), MAP_SIZE, &map_opts); in test_map_wronly_stack_or_queue()
1602 map_opts.map_flags = old_flags; in test_map_wronly_stack_or_queue()
1604 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_map_wronly_stack_or_queue()
1927 map_opts.map_flags = 0; in main()
1930 map_opts.map_flags = BPF_F_NO_PREALLOC; in main()