/linux-6.6.21/kernel/bpf/ |
D | offload.c | 120 static int bpf_map_offload_ndo(struct bpf_offloaded_map *offmap, in bpf_map_offload_ndo() argument 129 data.offmap = offmap; in bpf_map_offload_ndo() 131 netdev = offmap->netdev; in bpf_map_offload_ndo() 136 static void __bpf_map_offload_destroy(struct bpf_offloaded_map *offmap) in __bpf_map_offload_destroy() argument 138 WARN_ON(bpf_map_offload_ndo(offmap, BPF_OFFLOAD_MAP_FREE)); in __bpf_map_offload_destroy() 140 bpf_map_free_id(&offmap->map); in __bpf_map_offload_destroy() 141 list_del_init(&offmap->offloads); in __bpf_map_offload_destroy() 142 offmap->netdev = NULL; in __bpf_map_offload_destroy() 149 struct bpf_offloaded_map *offmap, *mtmp; in __bpf_offload_dev_netdev_unregister() local 173 list_for_each_entry(offmap, &ondev->maps, offloads) in __bpf_offload_dev_netdev_unregister() [all …]
|
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/bpf/ |
D | offload.c | 264 for (i = 0; i < DIV_ROUND_UP(nfp_map->offmap->map.value_size, 4); i++) in nfp_map_bpf_byte_swap() 278 for (i = 0; i < DIV_ROUND_UP(nfp_map->offmap->map.value_size, 4); i++) in nfp_map_bpf_byte_swap_record() 285 nfp_bpf_map_lookup_entry(struct bpf_offloaded_map *offmap, in nfp_bpf_map_lookup_entry() argument 290 err = nfp_bpf_ctrl_lookup_entry(offmap, key, value); in nfp_bpf_map_lookup_entry() 294 nfp_map_bpf_byte_swap(offmap->dev_priv, value); in nfp_bpf_map_lookup_entry() 299 nfp_bpf_map_update_entry(struct bpf_offloaded_map *offmap, in nfp_bpf_map_update_entry() argument 302 nfp_map_bpf_byte_swap(offmap->dev_priv, value); in nfp_bpf_map_update_entry() 303 nfp_map_bpf_byte_swap_record(offmap->dev_priv, value); in nfp_bpf_map_update_entry() 304 return nfp_bpf_ctrl_update_entry(offmap, key, value, flags); in nfp_bpf_map_update_entry() 308 nfp_bpf_map_get_next_key(struct bpf_offloaded_map *offmap, in nfp_bpf_map_get_next_key() argument [all …]
|
D | cmsg.c | 202 struct bpf_map *map = &nfp_map->offmap->map; in nfp_bpf_ctrl_op_cache_get() 292 nfp_bpf_ctrl_entry_op(struct bpf_offloaded_map *offmap, enum nfp_ccm_type op, in nfp_bpf_ctrl_entry_op() argument 295 struct nfp_bpf_map *nfp_map = offmap->dev_priv; in nfp_bpf_ctrl_entry_op() 298 struct bpf_map *map = &offmap->map; in nfp_bpf_ctrl_entry_op() 383 int nfp_bpf_ctrl_update_entry(struct bpf_offloaded_map *offmap, in nfp_bpf_ctrl_update_entry() argument 386 return nfp_bpf_ctrl_entry_op(offmap, NFP_CCM_TYPE_BPF_MAP_UPDATE, in nfp_bpf_ctrl_update_entry() 390 int nfp_bpf_ctrl_del_entry(struct bpf_offloaded_map *offmap, void *key) in nfp_bpf_ctrl_del_entry() argument 392 return nfp_bpf_ctrl_entry_op(offmap, NFP_CCM_TYPE_BPF_MAP_DELETE, in nfp_bpf_ctrl_del_entry() 396 int nfp_bpf_ctrl_lookup_entry(struct bpf_offloaded_map *offmap, in nfp_bpf_ctrl_lookup_entry() argument 399 return nfp_bpf_ctrl_entry_op(offmap, NFP_CCM_TYPE_BPF_MAP_LOOKUP, in nfp_bpf_ctrl_lookup_entry() [all …]
|
D | main.h | 210 struct bpf_offloaded_map *offmap; member 598 int nfp_bpf_ctrl_getfirst_entry(struct bpf_offloaded_map *offmap, 600 int nfp_bpf_ctrl_update_entry(struct bpf_offloaded_map *offmap, 602 int nfp_bpf_ctrl_del_entry(struct bpf_offloaded_map *offmap, void *key); 603 int nfp_bpf_ctrl_lookup_entry(struct bpf_offloaded_map *offmap, 605 int nfp_bpf_ctrl_getnext_entry(struct bpf_offloaded_map *offmap,
|
D | verifier.c | 87 struct bpf_offloaded_map *offmap; in nfp_bpf_map_update_value_ok() local 99 offmap = map_to_offmap(reg1->map_ptr); in nfp_bpf_map_update_value_ok() 100 nfp_map = offmap->dev_priv; in nfp_bpf_map_update_value_ok() 103 for (i = 0; i < offmap->map.value_size; i++) { in nfp_bpf_map_update_value_ok() 421 struct bpf_offloaded_map *offmap; in nfp_bpf_map_mark_used() local 433 offmap = map_to_offmap(reg->map_ptr); in nfp_bpf_map_mark_used() 434 nfp_map = offmap->dev_priv; in nfp_bpf_map_mark_used() 436 if (off + size > offmap->map.value_size) { in nfp_bpf_map_mark_used()
|
/linux-6.6.21/drivers/net/netdevsim/ |
D | bpf.c | 333 static int nsim_map_key_find(struct bpf_offloaded_map *offmap, void *key) in nsim_map_key_find() argument 335 struct nsim_bpf_bound_map *nmap = offmap->dev_priv; in nsim_map_key_find() 339 if (nsim_map_key_match(&offmap->map, &nmap->entry[i], key)) in nsim_map_key_find() 346 nsim_map_alloc_elem(struct bpf_offloaded_map *offmap, unsigned int idx) in nsim_map_alloc_elem() argument 348 struct nsim_bpf_bound_map *nmap = offmap->dev_priv; in nsim_map_alloc_elem() 350 nmap->entry[idx].key = kmalloc(offmap->map.key_size, in nsim_map_alloc_elem() 354 nmap->entry[idx].value = kmalloc(offmap->map.value_size, in nsim_map_alloc_elem() 366 nsim_map_get_next_key(struct bpf_offloaded_map *offmap, in nsim_map_get_next_key() argument 369 struct nsim_bpf_bound_map *nmap = offmap->dev_priv; in nsim_map_get_next_key() 375 idx = nsim_map_key_find(offmap, key); in nsim_map_get_next_key() [all …]
|
/linux-6.6.21/include/linux/ |
D | netdevice.h | 1015 struct bpf_offloaded_map *offmap; member
|