Home
last modified time | relevance | path

Searched refs:BPF_EXIST (Results 1 – 25 of 31) sorted by relevance

12

/openbmc/linux/Documentation/bpf/
H A Dmap_queue_stack.rst40 ``BPF_ANY`` or ``BPF_EXIST``. If ``flags`` is set to ``BPF_EXIST`` then,
79 ``NULL`` and ``flags`` must be set to ``BPF_ANY`` or ``BPF_EXIST``, with the
H A Dmap_sockmap.rst134 - ``BPF_EXIST``: Update an existing element.
155 - ``BPF_EXIST``: Update an existing element.
284 - BPF_EXIST: Update an existing element.
317 - BPF_EXIST: Update an existing element.
H A Dmap_cpumap.rst76 - BPF_EXIST: Update an existing element.
H A Dmap_lru_hash_update.dot138 fn_htab_lru_map_update_elem_EEXIST [xlabel="BPF_EXIST set and\nkey already exists"]
H A Dmap_sk_storage.rst82 - ``BPF_EXIST`` will update existing storage for `socket` ``fd`` if it already
H A Dmap_lpm_trie.rst69 The flags parameter must be one of BPF_ANY, BPF_NOEXIST or BPF_EXIST,
H A Dmap_xskmap.rst109 - BPF_EXIST: Update an existing element.
H A Dmap_devmap.rst102 - ``BPF_EXIST``: Update an existing element.
H A Dmap_hash.rst64 - ``BPF_EXIST`` will update an existing element
/openbmc/linux/tools/testing/selftests/bpf/
H A Dtest_maps.c78 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) < 0 && in test_hashmap()
94 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) == 0); in test_hashmap()
207 assert(bpf_map_update_elem(fd, &key, value, BPF_EXIST) < 0 && in test_hashmap_percpu()
248 assert(bpf_map_update_elem(fd, &key, value, BPF_EXIST) == 0); in test_hashmap_percpu()
311 assert(bpf_map_update_elem(fd, &key, value, BPF_EXIST) == 0); in test_hashmap_walk()
392 assert(bpf_map_update_elem(fd, &key, &value, BPF_EXIST) < 0 && in test_arraymap()
451 assert(bpf_map_update_elem(fd, &key, values, BPF_EXIST) < 0 && in test_arraymap_percpu()
1027 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1069 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1763 BPF_EXIST); in test_reuseport_array()
[all …]
H A Dtest_lru_map.c190 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -ENOENT); in test_lru_sanity0()
369 BPF_EXIST)); in test_lru_sanity2()
716 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -ENOENT); in test_lru_sanity7()
805 assert(bpf_map_update_elem(lru_map_fd, &key, value, BPF_EXIST) == -ENOENT); in test_lru_sanity8()
/openbmc/linux/kernel/bpf/
H A Dqueue_stack_maps.c200 bool replace = (flags & BPF_EXIST); in queue_stack_map_push_elem()
203 if (flags & BPF_NOEXIST || flags > BPF_EXIST) in queue_stack_map_push_elem()
H A Dreuseport_array.c197 if (!osk && map_flags == BPF_EXIST) in reuseport_array_update_check()
243 if (map_flags > BPF_EXIST) in bpf_fd_reuseport_array_update_elem()
H A Dlocal_storage.c150 if (unlikely(flags & ~(BPF_F_LOCK | BPF_EXIST))) in cgroup_storage_update_elem()
219 if (map_flags != BPF_ANY && map_flags != BPF_EXIST) in bpf_percpu_cgroup_storage_update()
H A Dhashtab.c1085 if (!l_old && (map_flags & ~BPF_F_LOCK) == BPF_EXIST) in check_flags()
1104 if (unlikely((map_flags & ~BPF_F_LOCK) > BPF_EXIST)) in htab_map_update_elem()
1207 if (unlikely(map_flags > BPF_EXIST)) in htab_lru_map_update_elem()
1276 if (unlikely(map_flags > BPF_EXIST)) in __htab_percpu_map_update_elem()
1331 if (unlikely(map_flags > BPF_EXIST)) in __htab_lru_percpu_map_update_elem()
1350 if (map_flags != BPF_EXIST) { in __htab_lru_percpu_map_update_elem()
H A Ddevmap.c904 if (unlikely(map_flags > BPF_EXIST)) in __dev_map_update_elem()
958 if (unlikely(map_flags > BPF_EXIST || !val.ifindex)) in __dev_map_hash_update_elem()
H A Dlpm_trie.c318 if (unlikely(flags > BPF_EXIST)) in trie_update_elem()
H A Dcpumap.c537 if (unlikely(map_flags > BPF_EXIST)) in cpu_map_update_elem()
/openbmc/linux/tools/testing/selftests/bpf/progs/
H A Dtest_tc_edt.c58 if (bpf_map_update_elem(&flow_map, &key, &next_tstamp, BPF_EXIST)) in throttle_flow()
/openbmc/linux/net/xdp/
H A Dxskmap.c172 if (unlikely(map_flags > BPF_EXIST)) in xsk_map_update_elem()
203 } else if (!old_xs && map_flags == BPF_EXIST) { in xsk_map_update_elem()
/openbmc/linux/samples/bpf/
H A Dtest_lru_dist.c147 bpf_map_update_elem(lru->map_fd, &node->key, &null_node, BPF_EXIST); in pfect_lru_lookup_or_insert()
155 assert(!bpf_map_update_elem(lru->map_fd, &key, &node, BPF_EXIST)); in pfect_lru_lookup_or_insert()
/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dbloom_filter_map.c49 err = bpf_map_update_elem(fd, NULL, &value, BPF_EXIST); in test_fail_cases()
/openbmc/linux/tools/testing/selftests/bpf/map_tests/
H A Dsk_storage_map.c495 BPF_EXIST | BPF_F_LOCK); in test_sk_storage_map_basic()
508 err = bpf_map_update_elem(map_fd, &sk_fd, &value, BPF_EXIST); in test_sk_storage_map_basic()
/openbmc/linux/net/core/
H A Dsock_map.c477 if (unlikely(flags > BPF_EXIST)) in sock_map_update_common()
498 } else if (!osk && flags == BPF_EXIST) { in sock_map_update_common()
996 if (unlikely(flags > BPF_EXIST)) in sock_hash_update_common()
1018 } else if (!elem && flags == BPF_EXIST) { in sock_hash_update_common()
/openbmc/linux/drivers/net/netdevsim/
H A Dbpf.c423 if (idx < 0 && flags == BPF_EXIST) { in nsim_map_update_elem()

12