Lines Matching defs:map

14 int xsk_map_inc(struct xsk_map *map)
16 bpf_map_inc(&map->map);
20 void xsk_map_put(struct xsk_map *map)
22 bpf_map_put(&map->map);
25 static struct xsk_map_node *xsk_map_node_alloc(struct xsk_map *map,
35 err = xsk_map_inc(map);
41 node->map = map;
48 xsk_map_put(node->map);
102 bpf_map_init_from_attr(&m->map, attr);
103 bpf_map_charge_move(&m->map.memory, &mem);
106 return &m->map;
109 static void xsk_map_free(struct bpf_map *map)
111 struct xsk_map *m = container_of(map, struct xsk_map, map);
113 bpf_clear_redirect_map(map);
118 static int xsk_map_get_next_key(struct bpf_map *map, void *key, void *next_key)
120 struct xsk_map *m = container_of(map, struct xsk_map, map);
124 if (index >= m->map.max_entries) {
129 if (index == m->map.max_entries - 1)
135 static int xsk_map_gen_lookup(struct bpf_map *map, struct bpf_insn *insn_buf)
141 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 5);
151 static void *xsk_map_lookup_elem(struct bpf_map *map, void *key)
154 return __xsk_map_lookup_elem(map, *(u32 *)key);
157 static void *xsk_map_lookup_elem_sys_only(struct bpf_map *map, void *key)
162 static int xsk_map_update_elem(struct bpf_map *map, void *key, void *value,
165 struct xsk_map *m = container_of(map, struct xsk_map, map);
174 if (unlikely(i >= m->map.max_entries))
222 static int xsk_map_delete_elem(struct bpf_map *map, void *key)
224 struct xsk_map *m = container_of(map, struct xsk_map, map);
228 if (k >= map->max_entries)
241 void xsk_map_try_sock_delete(struct xsk_map *map, struct xdp_sock *xs,
244 spin_lock_bh(&map->lock);
249 spin_unlock_bh(&map->lock);