Lines Matching refs:nfp_map

120 void nfp_bpf_ctrl_free_map(struct nfp_app_bpf *bpf, struct nfp_bpf_map *nfp_map)  in nfp_bpf_ctrl_free_map()  argument
134 req->tid = cpu_to_be32(nfp_map->tid); in nfp_bpf_ctrl_free_map()
198 nfp_bpf_ctrl_op_cache_get(struct nfp_bpf_map *nfp_map, enum nfp_ccm_type op, in nfp_bpf_ctrl_op_cache_get() argument
202 struct bpf_map *map = &nfp_map->offmap->map; in nfp_bpf_ctrl_op_cache_get()
203 struct nfp_app_bpf *bpf = nfp_map->bpf; in nfp_bpf_ctrl_op_cache_get()
209 spin_lock(&nfp_map->cache_lock); in nfp_bpf_ctrl_op_cache_get()
210 *cache_gen = nfp_map->cache_gen; in nfp_bpf_ctrl_op_cache_get()
211 if (nfp_map->cache_blockers) in nfp_bpf_ctrl_op_cache_get()
219 if (!nfp_map->cache) in nfp_bpf_ctrl_op_cache_get()
221 if (nfp_map->cache_to < ktime_get_ns()) in nfp_bpf_ctrl_op_cache_get()
224 reply = (void *)nfp_map->cache->data; in nfp_bpf_ctrl_op_cache_get()
252 nfp_map->cache_blockers++; in nfp_bpf_ctrl_op_cache_get()
254 dev_consume_skb_any(nfp_map->cache); in nfp_bpf_ctrl_op_cache_get()
255 nfp_map->cache = NULL; in nfp_bpf_ctrl_op_cache_get()
257 spin_unlock(&nfp_map->cache_lock); in nfp_bpf_ctrl_op_cache_get()
262 nfp_bpf_ctrl_op_cache_put(struct nfp_bpf_map *nfp_map, enum nfp_ccm_type op, in nfp_bpf_ctrl_op_cache_put() argument
275 spin_lock(&nfp_map->cache_lock); in nfp_bpf_ctrl_op_cache_put()
277 nfp_map->cache_blockers--; in nfp_bpf_ctrl_op_cache_put()
278 nfp_map->cache_gen++; in nfp_bpf_ctrl_op_cache_put()
280 if (filler && !nfp_map->cache_blockers && in nfp_bpf_ctrl_op_cache_put()
281 nfp_map->cache_gen == cache_gen) { in nfp_bpf_ctrl_op_cache_put()
282 nfp_map->cache_to = to; in nfp_bpf_ctrl_op_cache_put()
283 swap(nfp_map->cache, skb); in nfp_bpf_ctrl_op_cache_put()
285 spin_unlock(&nfp_map->cache_lock); in nfp_bpf_ctrl_op_cache_put()
295 struct nfp_bpf_map *nfp_map = offmap->dev_priv; in nfp_bpf_ctrl_entry_op() local
297 struct nfp_app_bpf *bpf = nfp_map->bpf; in nfp_bpf_ctrl_entry_op()
310 n_entries = nfp_bpf_ctrl_op_cache_get(nfp_map, op, key, out_key, in nfp_bpf_ctrl_entry_op()
322 req->tid = cpu_to_be32(nfp_map->tid); in nfp_bpf_ctrl_entry_op()
373 nfp_bpf_ctrl_op_cache_put(nfp_map, op, skb, cache_gen); in nfp_bpf_ctrl_entry_op()
379 nfp_bpf_ctrl_op_cache_put(nfp_map, op, NULL, cache_gen); in nfp_bpf_ctrl_entry_op()