Searched refs:bpf_map_create (Results 1 - 25 of 48) sorted by relevance

12

/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dbloom_filter_map.c16 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 4, sizeof(value), 100, NULL);
17 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid key size"))
21 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 0, 0, 100, NULL);
22 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid value size 0"))
26 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 0, INT32_MAX, 100, NULL);
27 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid value too large"))
31 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 0, sizeof(value), 0, NULL);
32 if (!ASSERT_LT(fd, 0, "bpf_map_create bloom filter invalid max entries size"))
37 fd = bpf_map_create(BPF_MAP_TYPE_BLOOM_FILTER, NULL, 0, sizeof(value), 100, &opts);
38 if (!ASSERT_LT(fd, 0, "bpf_map_create bloo
[all...]
H A Dmap_btf.c30 map_fd_arr[i] = bpf_map_create(BPF_MAP_TYPE_PERCPU_ARRAY, NULL, 4, 4, 256, NULL);
H A Dcgroup_attach_multi.c18 map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, 4, 8, 1, NULL);
24 cgroup_storage_fd = bpf_map_create(BPF_MAP_TYPE_CGROUP_STORAGE, NULL,
31 percpu_cgroup_storage_fd = bpf_map_create(
H A Dmap_in_map.c36 fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, 4, 4, 1, NULL);
H A Dbpf_obj_pinning.c75 map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, map_name, 4, 4, 1, NULL);
250 map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, map_name, 4, 4, 1, NULL);
H A Dsockmap_ktls.c153 map = bpf_map_create(map_type, NULL, sizeof(int), sizeof(int), 1, NULL);
154 if (!ASSERT_GE(map, 0, "bpf_map_create"))
H A Dringbuf_multi.c62 proto_fd = bpf_map_create(BPF_MAP_TYPE_RINGBUF, NULL, 0, 0, page_size, NULL);
63 if (CHECK(proto_fd < 0, "bpf_map_create", "bpf_map_create failed\n"))
H A Dtest_bpffs.c89 map = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, 4, 4, 1, NULL);
/linux-master/samples/bpf/
H A Dtest_cgrp2_array_pin.c67 array_fd = bpf_map_create(BPF_MAP_TYPE_CGROUP_ARRAY, NULL,
H A Dsock_example.c41 map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, sizeof(key), sizeof(value),
H A Dfds_example.c83 fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, sizeof(uint32_t),
H A Dtest_cgrp2_attach.c97 map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL,
H A Dtest_lru_dist.c102 lru->map_fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL,
209 map_fd = bpf_map_create(map_type, NULL, sizeof(unsigned long long),
/linux-master/tools/testing/selftests/bpf/
H A Dtest_cgroup_storage.c57 map_fd = bpf_map_create(BPF_MAP_TYPE_CGROUP_STORAGE, NULL, sizeof(key),
64 percpu_map_fd = bpf_map_create(BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE, NULL,
H A Dtest_maps.c42 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value), 2, &map_opts);
139 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, i, j, 2, &map_opts);
160 fd = bpf_map_create(BPF_MAP_TYPE_PERCPU_HASH, NULL, sizeof(key),
273 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(key), sizeof(value),
366 fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, sizeof(key), sizeof(value), 2, NULL);
421 fd = bpf_map_create(BPF_MAP_TYPE_PERCPU_ARRAY, NULL, sizeof(key),
484 fd = bpf_map_create(BPF_MAP_TYPE_PERCPU_ARRAY, NULL, sizeof(key),
516 fd = bpf_map_create(BPF_MAP_TYPE_DEVMAP, NULL, sizeof(key), sizeof(value), 2, NULL);
530 fd = bpf_map_create(BPF_MAP_TYPE_DEVMAP_HASH, NULL, sizeof(key), sizeof(value), 2, NULL);
550 fd = bpf_map_create(BPF_MAP_TYPE_QUEU
[all...]
H A Dtest_lpm_map.c237 map = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, NULL,
347 map_fd_ipv4 = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, NULL,
352 map_fd_ipv6 = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, NULL,
434 map_fd = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, NULL,
544 map_fd = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, NULL, key_size, sizeof(value), 100, &opts);
756 map_fd = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, NULL, key_size, value_size, 100, &opts);
H A Dtest_verifier.c553 fd = bpf_map_create(type, NULL, size_key, size_value, max_elem, &opts);
609 mfd = bpf_map_create(BPF_MAP_TYPE_PROG_ARRAY, NULL, sizeof(int),
643 inner_map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, sizeof(int),
653 outer_map_fd = bpf_map_create(BPF_MAP_TYPE_ARRAY_OF_MAPS, NULL,
673 fd = bpf_map_create(type, NULL, sizeof(struct bpf_cgroup_storage_key),
815 fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, "test_map", 4, 8, 1, &opts);
834 fd = bpf_map_create(BPF_MAP_TYPE_SK_STORAGE, "test_map", 4, 8, 0, &opts);
854 fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, "test_map", 4, 16, 1, &opts);
873 fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, "test_map", 4, 24, 1, &opts);
/linux-master/tools/testing/selftests/bpf/map_tests/
H A Dsk_storage_map.c151 map_fd = bpf_map_create(BPF_MAP_TYPE_SK_STORAGE, "sk_storage_map", 4, 8, 0, &map_opts);
155 "bpf_map_create()", "errno:%d\n", errno);
474 map_fd = bpf_map_create(BPF_MAP_TYPE_SK_STORAGE, "sk_storage_map", 4, 8, 0, &map_opts);
475 CHECK(map_fd == -1, "bpf_map_create(good_xattr)",
565 err = bpf_map_create(BPF_MAP_TYPE_SK_STORAGE, "sk_storage_map", 4, 8, 0, &bad_xattr);
566 CHECK(!err || errno != EINVAL, "bpf_map_create(bad_xattr)",
571 err = bpf_map_create(BPF_MAP_TYPE_SK_STORAGE, "sk_storage_map", 4, 8, 0, &bad_xattr);
572 CHECK(!err || errno != EINVAL, "bpf_map_create(bad_xattr)",
575 err = bpf_map_create(BPF_MAP_TYPE_SK_STORAGE, "sk_storage_map", 4, 8, 1, &map_opts);
576 CHECK(!err || errno != EINVAL, "bpf_map_create(bad_xatt
[all...]
H A Dmap_in_map_batch_ops.c41 map_fd = bpf_map_create(map_type, map_name, sizeof(__u32),
44 "inner bpf_map_create() failed",
72 outer_map_fd = bpf_map_create(map_type, "outer_map", sizeof(__u32),
76 "outer bpf_map_create()",
H A Dlpm_trie_map_batch_ops.c80 map_fd = bpf_map_create(BPF_MAP_TYPE_LPM_TRIE, "lpm_trie_map",
83 CHECK(map_fd == -1, "bpf_map_create()", "error:%s\n",
H A Darray_map_batch_ops.c83 map_fd = bpf_map_create(is_pcpu ? BPF_MAP_TYPE_PERCPU_ARRAY : BPF_MAP_TYPE_ARRAY,
86 "bpf_map_create()", "error:%s\n", strerror(errno));
H A Dmap_percpu_stats.c151 map_fd = bpf_map_create(BPF_MAP_TYPE_HASH, "small", 4, 4, 4, NULL);
152 CHECK(map_fd < 0, "bpf_map_create()", "error:%s (name=%s)\n",
348 map_fd = bpf_map_create(type, name, key_size, val_size, max_entries, map_opts);
349 CHECK(map_fd < 0, "bpf_map_create()", "error:%s (name=%s)\n",
/linux-master/tools/testing/selftests/bpf/benchs/
H A Dbench_local_storage.c147 fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL, sizeof(int),
150 fd = bpf_map_create(BPF_MAP_TYPE_TASK_STORAGE, NULL, sizeof(int),
/linux-master/tools/lib/bpf/
H A Dfeatures.c67 map = bpf_map_create(BPF_MAP_TYPE_ARRAY, "libbpf_global", sizeof(int), 32, 1, &map_opts);
222 fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, "libbpf_mmap", sizeof(int), sizeof(int), 1, &opts);
285 map = bpf_map_create(BPF_MAP_TYPE_ARRAY, "libbpf_det_bind", sizeof(int), 32, 1, &map_opts);
H A Dlibbpf_probes.c374 fd_inner = bpf_map_create(BPF_MAP_TYPE_HASH, NULL,
388 fd = bpf_map_create(map_type, NULL, key_size, value_size, max_entries, &opts);

Completed in 639 milliseconds

12