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()
1315 MAP_SIZE, &map_opts); in test_map_large()
1471 MAP_SIZE, &map_opts); in test_map_parallel()
1528 old_flags = map_opts.map_flags; in test_map_rdonly()
1529 map_opts.map_flags |= BPF_F_RDONLY; in test_map_rdonly()
1531 MAP_SIZE, &map_opts); in test_map_rdonly()
1532 map_opts.map_flags = old_flags; in test_map_rdonly()
1557 old_flags = map_opts.map_flags; in test_map_wronly_hash()
1558 map_opts.map_flags |= BPF_F_WRONLY; in test_map_wronly_hash()
1560 MAP_SIZE, &map_opts); in test_map_wronly_hash()
1561 map_opts.map_flags = old_flags; in test_map_wronly_hash()
1588 old_flags = map_opts.map_flags; in test_map_wronly_stack_or_queue()
1589 map_opts.map_flags |= BPF_F_WRONLY; in test_map_wronly_stack_or_queue()
1590 fd = bpf_map_create(map_type, NULL, 0, sizeof(value), MAP_SIZE, &map_opts); in test_map_wronly_stack_or_queue()
1591 map_opts.map_flags = old_flags; in test_map_wronly_stack_or_queue()
1593 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_map_wronly_stack_or_queue()
1916 map_opts.map_flags = 0; in main()
1919 map_opts.map_flags = BPF_F_NO_PREALLOC; in main()