Lines Matching full:map_opts

31 static struct bpf_map_create_opts map_opts = { .sz = sizeof(map_opts) };  variable
38 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value), 2, &map_opts); in test_hashmap()
135 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, i, j, 2, &map_opts); in test_hashmap_sizes()
157 sizeof(bpf_percpu(value, 0)), 2, &map_opts); in test_hashmap_percpu()
270 max_entries, &map_opts); in helper_fill_hashmap()
273 "err: %s, flags: 0x%x\n", strerror(errno), map_opts.map_flags); in helper_fill_hashmap()
329 old_flags = map_opts.map_flags; in test_hashmap_zero_seed()
330 map_opts.map_flags |= BPF_F_ZERO_SEED; in test_hashmap_zero_seed()
352 map_opts.map_flags = old_flags; in test_hashmap_zero_seed()
546 fd = bpf_map_create(BPF_MAP_TYPE_QUEUE, NULL, 4, sizeof(val), MAP_SIZE, &map_opts); in test_queuemap()
549 fd = bpf_map_create(BPF_MAP_TYPE_QUEUE, NULL, 0, sizeof(val), MAP_SIZE, &map_opts); in test_queuemap()
551 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_queuemap()
602 fd = bpf_map_create(BPF_MAP_TYPE_STACK, NULL, 4, sizeof(val), MAP_SIZE, &map_opts); in test_stackmap()
605 fd = bpf_map_create(BPF_MAP_TYPE_STACK, NULL, 0, sizeof(val), MAP_SIZE, &map_opts); in test_stackmap()
607 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_stackmap()
1315 MAP_SIZE, &map_opts); in test_map_large()
1402 (err == ENOMEM && map_opts.map_flags == BPF_F_NO_PREALLOC)); in can_retry()
1479 MAP_SIZE, &map_opts); in test_map_parallel()
1536 old_flags = map_opts.map_flags; in test_map_rdonly()
1537 map_opts.map_flags |= BPF_F_RDONLY; in test_map_rdonly()
1539 MAP_SIZE, &map_opts); in test_map_rdonly()
1540 map_opts.map_flags = old_flags; in test_map_rdonly()
1565 old_flags = map_opts.map_flags; in test_map_wronly_hash()
1566 map_opts.map_flags |= BPF_F_WRONLY; in test_map_wronly_hash()
1568 MAP_SIZE, &map_opts); in test_map_wronly_hash()
1569 map_opts.map_flags = old_flags; in test_map_wronly_hash()
1596 old_flags = map_opts.map_flags; in test_map_wronly_stack_or_queue()
1597 map_opts.map_flags |= BPF_F_WRONLY; in test_map_wronly_stack_or_queue()
1598 fd = bpf_map_create(map_type, NULL, 0, sizeof(value), MAP_SIZE, &map_opts); in test_map_wronly_stack_or_queue()
1599 map_opts.map_flags = old_flags; in test_map_wronly_stack_or_queue()
1601 if (map_opts.map_flags & BPF_F_NO_PREALLOC) { in test_map_wronly_stack_or_queue()
1924 map_opts.map_flags = 0; in main()
1927 map_opts.map_flags = BPF_F_NO_PREALLOC; in main()