bpf 1149 arch/um/drivers/vector_kern.c kfree(vp->bpf); bpf 1271 arch/um/drivers/vector_kern.c vp->bpf = uml_vector_default_bpf(vp->fds->rx_fd, dev->dev_addr); bpf 124 arch/um/drivers/vector_kern.h void *bpf; bpf 663 arch/um/drivers/vector_user.c int uml_vector_attach_bpf(int fd, void *bpf, int bpf_len) bpf 665 arch/um/drivers/vector_user.c int err = setsockopt(fd, SOL_SOCKET, SO_ATTACH_FILTER, bpf, bpf_len); bpf 676 arch/um/drivers/vector_user.c struct sock_filter *bpf; bpf 684 arch/um/drivers/vector_user.c bpf = uml_kmalloc( bpf 686 arch/um/drivers/vector_user.c if (bpf != NULL) { bpf 687 arch/um/drivers/vector_user.c bpf_prog.filter = bpf; bpf 689 arch/um/drivers/vector_user.c bpf[0] = (struct sock_filter){ 0x20, 0, 0, 0x00000008 }; bpf 691 arch/um/drivers/vector_user.c bpf[1] = (struct sock_filter){ 0x15, 0, 3, ntohl(*mac1)}; bpf 693 arch/um/drivers/vector_user.c bpf[2] = (struct sock_filter){ 0x28, 0, 0, 0x00000006 }; bpf 695 arch/um/drivers/vector_user.c bpf[3] = (struct sock_filter){ 0x15, 0, 1, ntohs(*mac2)}; bpf 697 arch/um/drivers/vector_user.c bpf[4] = (struct sock_filter){ 0x6, 0, 0, 0x00000000 }; bpf 699 arch/um/drivers/vector_user.c bpf[5] = (struct sock_filter){ 0x6, 0, 0, 0x00040000 }; bpf 702 arch/um/drivers/vector_user.c kfree(bpf); bpf 703 arch/um/drivers/vector_user.c bpf = NULL; bpf 706 arch/um/drivers/vector_user.c return bpf; bpf 99 arch/um/drivers/vector_user.h extern int uml_vector_attach_bpf(int fd, void *bpf, int bpf_len); bpf 709 drivers/media/pci/bt8xx/bttv-risc.c int bpf = bpl * (buf->vb.height >> 1); bpf 736 drivers/media/pci/bt8xx/bttv-risc.c bpf,bpl,0,0,buf->vb.height >> 1); bpf 18 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_cmsg_alloc(struct nfp_app_bpf *bpf, unsigned int size) bpf 22 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c skb = nfp_app_ctrl_msg_alloc(bpf->app, size, GFP_KERNEL); bpf 29 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_cmsg_map_req_size(struct nfp_app_bpf *bpf, unsigned int n) bpf 34 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c size += (bpf->cmsg_key_sz + bpf->cmsg_val_sz) * n; bpf 40 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_cmsg_map_req_alloc(struct nfp_app_bpf *bpf, unsigned int n) bpf 42 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c return nfp_bpf_cmsg_alloc(bpf, nfp_bpf_cmsg_map_req_size(bpf, n)); bpf 46 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_cmsg_map_reply_size(struct nfp_app_bpf *bpf, unsigned int n) bpf 51 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c size += (bpf->cmsg_key_sz + bpf->cmsg_val_sz) * n; bpf 57 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_ctrl_rc_to_errno(struct nfp_app_bpf *bpf, bpf 74 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "FW responded with invalid status: %u\n", rc); bpf 82 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_ctrl_alloc_map(struct nfp_app_bpf *bpf, struct bpf_map *map) bpf 90 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c skb = nfp_bpf_cmsg_alloc(bpf, sizeof(*req)); bpf 101 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c skb = nfp_ccm_communicate(&bpf->ccm, skb, NFP_CCM_TYPE_BPF_MAP_ALLOC, bpf 107 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c err = nfp_bpf_ctrl_rc_to_errno(bpf, &reply->reply_hdr); bpf 120 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c void nfp_bpf_ctrl_free_map(struct nfp_app_bpf *bpf, struct nfp_bpf_map *nfp_map) bpf 127 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c skb = nfp_bpf_cmsg_alloc(bpf, sizeof(*req)); bpf 129 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "leaking map - failed to allocate msg\n"); bpf 136 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c skb = nfp_ccm_communicate(&bpf->ccm, skb, NFP_CCM_TYPE_BPF_MAP_FREE, bpf 139 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "leaking map - I/O error\n"); bpf 144 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c err = nfp_bpf_ctrl_rc_to_errno(bpf, &reply->reply_hdr); bpf 146 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "leaking map - FW responded with: %d\n", err); bpf 152 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_ctrl_req_key(struct nfp_app_bpf *bpf, struct cmsg_req_map_op *req, bpf 155 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c return &req->data[bpf->cmsg_key_sz * n + bpf->cmsg_val_sz * n]; bpf 159 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_ctrl_req_val(struct nfp_app_bpf *bpf, struct cmsg_req_map_op *req, bpf 162 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c return &req->data[bpf->cmsg_key_sz * (n + 1) + bpf->cmsg_val_sz * n]; bpf 166 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_ctrl_reply_key(struct nfp_app_bpf *bpf, struct cmsg_reply_map_op *reply, bpf 169 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c return &reply->data[bpf->cmsg_key_sz * n + bpf->cmsg_val_sz * n]; bpf 173 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_ctrl_reply_val(struct nfp_app_bpf *bpf, struct cmsg_reply_map_op *reply, bpf 176 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c return &reply->data[bpf->cmsg_key_sz * (n + 1) + bpf->cmsg_val_sz * n]; bpf 203 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c struct nfp_app_bpf *bpf = nfp_map->bpf; bpf 207 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c n_entries = nfp_bpf_ctrl_op_cache_fill(op) ? bpf->cmsg_cache_cnt : 1; bpf 230 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cached_key = nfp_bpf_ctrl_reply_key(bpf, reply, i); bpf 235 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c memcpy(out_value, nfp_bpf_ctrl_reply_val(bpf, reply, i), bpf 242 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_ctrl_reply_key(bpf, reply, i + 1), bpf 297 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c struct nfp_app_bpf *bpf = nfp_map->bpf; bpf 315 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c skb = nfp_bpf_cmsg_map_req_alloc(bpf, 1); bpf 328 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c memcpy(nfp_bpf_ctrl_req_key(bpf, req, 0), key, map->key_size); bpf 330 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c memcpy(nfp_bpf_ctrl_req_val(bpf, req, 0), value, bpf 333 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c skb = nfp_ccm_communicate(&bpf->ccm, skb, op, 0); bpf 340 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "cmsg drop - type 0x%02x too short %d!\n", bpf 348 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c err = nfp_bpf_ctrl_rc_to_errno(bpf, &reply->reply_hdr); bpf 358 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c if (skb->len != nfp_bpf_cmsg_map_reply_size(bpf, reply_entries)) { bpf 359 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "cmsg drop - type 0x%02x too short %d for %d entries!\n", bpf 367 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c memcpy(out_key, nfp_bpf_ctrl_reply_key(bpf, reply, 0), bpf 370 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c memcpy(out_value, nfp_bpf_ctrl_reply_val(bpf, reply, 0), bpf 417 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c unsigned int nfp_bpf_ctrl_cmsg_min_mtu(struct nfp_app_bpf *bpf) bpf 419 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c return max(nfp_bpf_cmsg_map_req_size(bpf, 1), bpf 420 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_cmsg_map_reply_size(bpf, 1)); bpf 423 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c unsigned int nfp_bpf_ctrl_cmsg_mtu(struct nfp_app_bpf *bpf) bpf 426 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_cmsg_map_req_size(bpf, NFP_BPF_MAP_CACHE_CNT), bpf 427 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_cmsg_map_reply_size(bpf, NFP_BPF_MAP_CACHE_CNT)); bpf 430 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c unsigned int nfp_bpf_ctrl_cmsg_cache_cnt(struct nfp_app_bpf *bpf) bpf 434 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c mtu = bpf->app->ctrl->dp.mtu; bpf 435 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c entry_sz = bpf->cmsg_key_sz + bpf->cmsg_val_sz; bpf 444 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c struct nfp_app_bpf *bpf = app->priv; bpf 447 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "cmsg drop - too short %d!\n", skb->len); bpf 453 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c if (!nfp_bpf_event_output(bpf, skb->data, skb->len)) bpf 459 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_ccm_rx(&bpf->ccm, skb); bpf 466 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c struct nfp_app_bpf *bpf = app->priv; bpf 469 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "cmsg drop - too short %d!\n", len); bpf 474 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c nfp_bpf_event_output(bpf, data, len); bpf 476 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c cmsg_warn(bpf, "cmsg drop - msg type %d with raw buffer!\n", bpf 1606 drivers/net/ethernet/netronome/nfp/bpf/jit.c adjust_head = &nfp_prog->bpf->adjust_head; bpf 4585 drivers/net/ethernet/netronome/nfp/bpf/jit.c val = nfp_prog->bpf->helpers.map_lookup; bpf 4588 drivers/net/ethernet/netronome/nfp/bpf/jit.c val = nfp_prog->bpf->helpers.map_update; bpf 4591 drivers/net/ethernet/netronome/nfp/bpf/jit.c val = nfp_prog->bpf->helpers.map_delete; bpf 4594 drivers/net/ethernet/netronome/nfp/bpf/jit.c val = nfp_prog->bpf->helpers.perf_event_output; bpf 27 drivers/net/ethernet/netronome/nfp/bpf/main.c struct nfp_app_bpf *bpf = nn->app->priv; bpf 30 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->abi_version && bpf 31 drivers/net/ethernet/netronome/nfp/bpf/main.c nn_readb(nn, NFP_NET_CFG_BPF_ABI) == bpf->abi_version; bpf 200 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_adjust_head(struct nfp_app_bpf *bpf, void __iomem *value, bpf 204 drivers/net/ethernet/netronome/nfp/bpf/main.c struct nfp_cpp *cpp = bpf->app->pf->cpp; bpf 211 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->adjust_head.flags = readl(&cap->flags); bpf 212 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->adjust_head.off_min = readl(&cap->off_min); bpf 213 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->adjust_head.off_max = readl(&cap->off_max); bpf 214 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->adjust_head.guaranteed_sub = readl(&cap->guaranteed_sub); bpf 215 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->adjust_head.guaranteed_add = readl(&cap->guaranteed_add); bpf 217 drivers/net/ethernet/netronome/nfp/bpf/main.c if (bpf->adjust_head.off_min > bpf->adjust_head.off_max) { bpf 221 drivers/net/ethernet/netronome/nfp/bpf/main.c if (!FIELD_FIT(UR_REG_IMM_MAX, bpf->adjust_head.off_min) || bpf 222 drivers/net/ethernet/netronome/nfp/bpf/main.c !FIELD_FIT(UR_REG_IMM_MAX, bpf->adjust_head.off_max)) { bpf 224 drivers/net/ethernet/netronome/nfp/bpf/main.c memset(&bpf->adjust_head, 0, sizeof(bpf->adjust_head)); bpf 232 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_func(struct nfp_app_bpf *bpf, void __iomem *value, u32 length) bpf 237 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_err(bpf->app->cpp, "truncated function TLV: %d\n", length); bpf 243 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->helpers.map_lookup = readl(&cap->func_addr); bpf 246 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->helpers.map_update = readl(&cap->func_addr); bpf 249 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->helpers.map_delete = readl(&cap->func_addr); bpf 252 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->helpers.perf_event_output = readl(&cap->func_addr); bpf 260 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_maps(struct nfp_app_bpf *bpf, void __iomem *value, u32 length) bpf 265 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_err(bpf->app->cpp, "truncated maps TLV: %d\n", length); bpf 269 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->maps.types = readl(&cap->types); bpf 270 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->maps.max_maps = readl(&cap->max_maps); bpf 271 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->maps.max_elems = readl(&cap->max_elems); bpf 272 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->maps.max_key_sz = readl(&cap->max_key_sz); bpf 273 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->maps.max_val_sz = readl(&cap->max_val_sz); bpf 274 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->maps.max_elem_sz = readl(&cap->max_elem_sz); bpf 280 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_random(struct nfp_app_bpf *bpf, void __iomem *value, bpf 283 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->pseudo_random = true; bpf 288 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_qsel(struct nfp_app_bpf *bpf, void __iomem *value, u32 length) bpf 290 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->queue_select = true; bpf 295 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_adjust_tail(struct nfp_app_bpf *bpf, void __iomem *value, bpf 298 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->adjust_tail = true; bpf 303 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_cmsg_multi_ent(struct nfp_app_bpf *bpf, void __iomem *value, bpf 306 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->cmsg_multi_ent = true; bpf 311 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_parse_cap_abi_version(struct nfp_app_bpf *bpf, void __iomem *value, bpf 315 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_err(bpf->app->cpp, "truncated ABI version TLV: %d\n", bpf 320 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->abi_version = readl(value); bpf 321 drivers/net/ethernet/netronome/nfp/bpf/main.c if (bpf->abi_version < 2 || bpf->abi_version > 3) { bpf 322 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_warn(bpf->app->cpp, "unsupported BPF ABI version: %d\n", bpf 323 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->abi_version); bpf 324 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->abi_version = 0; bpf 412 drivers/net/ethernet/netronome/nfp/bpf/main.c static void nfp_bpf_init_capabilities(struct nfp_app_bpf *bpf) bpf 414 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->abi_version = 2; /* Original BPF ABI version */ bpf 419 drivers/net/ethernet/netronome/nfp/bpf/main.c struct nfp_app_bpf *bpf = app->priv; bpf 421 drivers/net/ethernet/netronome/nfp/bpf/main.c return bpf_offload_dev_netdev_register(bpf->bpf_dev, netdev); bpf 426 drivers/net/ethernet/netronome/nfp/bpf/main.c struct nfp_app_bpf *bpf = app->priv; bpf 428 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf_offload_dev_netdev_unregister(bpf->bpf_dev, netdev); bpf 433 drivers/net/ethernet/netronome/nfp/bpf/main.c struct nfp_app_bpf *bpf = app->priv; bpf 435 drivers/net/ethernet/netronome/nfp/bpf/main.c if (app->ctrl->dp.mtu < nfp_bpf_ctrl_cmsg_min_mtu(bpf)) { bpf 436 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_err(bpf->app->cpp, bpf 438 drivers/net/ethernet/netronome/nfp/bpf/main.c app->ctrl->dp.mtu, nfp_bpf_ctrl_cmsg_min_mtu(bpf)); bpf 442 drivers/net/ethernet/netronome/nfp/bpf/main.c if (bpf->cmsg_multi_ent) bpf 443 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->cmsg_cache_cnt = nfp_bpf_ctrl_cmsg_cache_cnt(bpf); bpf 445 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->cmsg_cache_cnt = 1; bpf 452 drivers/net/ethernet/netronome/nfp/bpf/main.c struct nfp_app_bpf *bpf; bpf 455 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf = kzalloc(sizeof(*bpf), GFP_KERNEL); bpf 456 drivers/net/ethernet/netronome/nfp/bpf/main.c if (!bpf) bpf 458 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->app = app; bpf 459 drivers/net/ethernet/netronome/nfp/bpf/main.c app->priv = bpf; bpf 461 drivers/net/ethernet/netronome/nfp/bpf/main.c INIT_LIST_HEAD(&bpf->map_list); bpf 463 drivers/net/ethernet/netronome/nfp/bpf/main.c err = nfp_ccm_init(&bpf->ccm, app); bpf 467 drivers/net/ethernet/netronome/nfp/bpf/main.c err = rhashtable_init(&bpf->maps_neutral, &nfp_bpf_maps_neutral_params); bpf 471 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_bpf_init_capabilities(bpf); bpf 477 drivers/net/ethernet/netronome/nfp/bpf/main.c if (bpf->abi_version < 3) { bpf 478 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->cmsg_key_sz = CMSG_MAP_KEY_LW * 4; bpf 479 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->cmsg_val_sz = CMSG_MAP_VALUE_LW * 4; bpf 481 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->cmsg_key_sz = bpf->maps.max_key_sz; bpf 482 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->cmsg_val_sz = bpf->maps.max_val_sz; bpf 483 drivers/net/ethernet/netronome/nfp/bpf/main.c app->ctrl_mtu = nfp_bpf_ctrl_cmsg_mtu(bpf); bpf 486 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf->bpf_dev = bpf_offload_dev_create(&nfp_bpf_dev_ops, bpf); bpf 487 drivers/net/ethernet/netronome/nfp/bpf/main.c err = PTR_ERR_OR_ZERO(bpf->bpf_dev); bpf 494 drivers/net/ethernet/netronome/nfp/bpf/main.c rhashtable_destroy(&bpf->maps_neutral); bpf 496 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_ccm_clean(&bpf->ccm); bpf 498 drivers/net/ethernet/netronome/nfp/bpf/main.c kfree(bpf); bpf 504 drivers/net/ethernet/netronome/nfp/bpf/main.c struct nfp_app_bpf *bpf = app->priv; bpf 506 drivers/net/ethernet/netronome/nfp/bpf/main.c bpf_offload_dev_destroy(bpf->bpf_dev); bpf 507 drivers/net/ethernet/netronome/nfp/bpf/main.c nfp_ccm_clean(&bpf->ccm); bpf 508 drivers/net/ethernet/netronome/nfp/bpf/main.c WARN_ON(!list_empty(&bpf->map_list)); bpf 509 drivers/net/ethernet/netronome/nfp/bpf/main.c WARN_ON(bpf->maps_in_use || bpf->map_elems_in_use); bpf 510 drivers/net/ethernet/netronome/nfp/bpf/main.c rhashtable_free_and_destroy(&bpf->maps_neutral, bpf 512 drivers/net/ethernet/netronome/nfp/bpf/main.c kfree(bpf); bpf 539 drivers/net/ethernet/netronome/nfp/bpf/main.c .bpf = nfp_ndo_bpf, bpf 21 drivers/net/ethernet/netronome/nfp/bpf/main.h #define cmsg_warn(bpf, msg...) nn_dp_warn(&(bpf)->app->ctrl->dp, msg) bpf 211 drivers/net/ethernet/netronome/nfp/bpf/main.h struct nfp_app_bpf *bpf; bpf 514 drivers/net/ethernet/netronome/nfp/bpf/main.h struct nfp_app_bpf *bpf; bpf 579 drivers/net/ethernet/netronome/nfp/bpf/main.h struct netdev_bpf *bpf); bpf 589 drivers/net/ethernet/netronome/nfp/bpf/main.h unsigned int nfp_bpf_ctrl_cmsg_min_mtu(struct nfp_app_bpf *bpf); bpf 590 drivers/net/ethernet/netronome/nfp/bpf/main.h unsigned int nfp_bpf_ctrl_cmsg_mtu(struct nfp_app_bpf *bpf); bpf 591 drivers/net/ethernet/netronome/nfp/bpf/main.h unsigned int nfp_bpf_ctrl_cmsg_cache_cnt(struct nfp_app_bpf *bpf); bpf 593 drivers/net/ethernet/netronome/nfp/bpf/main.h nfp_bpf_ctrl_alloc_map(struct nfp_app_bpf *bpf, struct bpf_map *map); bpf 595 drivers/net/ethernet/netronome/nfp/bpf/main.h nfp_bpf_ctrl_free_map(struct nfp_app_bpf *bpf, struct nfp_bpf_map *nfp_map); bpf 606 drivers/net/ethernet/netronome/nfp/bpf/main.h int nfp_bpf_event_output(struct nfp_app_bpf *bpf, const void *data, bpf 31 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_map_ptr_record(struct nfp_app_bpf *bpf, struct nfp_prog *nfp_prog, bpf 38 drivers/net/ethernet/netronome/nfp/bpf/offload.c record = rhashtable_lookup_fast(&bpf->maps_neutral, &map->id, bpf 63 drivers/net/ethernet/netronome/nfp/bpf/offload.c err = rhashtable_insert_fast(&bpf->maps_neutral, &record->l, bpf 80 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_map_ptrs_forget(struct nfp_app_bpf *bpf, struct nfp_prog *nfp_prog) bpf 91 drivers/net/ethernet/netronome/nfp/bpf/offload.c WARN_ON(rhashtable_remove_fast(&bpf->maps_neutral, bpf 113 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_map_ptrs_record(struct nfp_app_bpf *bpf, struct nfp_prog *nfp_prog, bpf 134 drivers/net/ethernet/netronome/nfp/bpf/offload.c err = nfp_map_ptr_record(bpf, nfp_prog, bpf 137 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_map_ptrs_forget(bpf, nfp_prog); bpf 199 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_prog->bpf = bpf_offload_dev_priv(prog->aux->offload->offdev); bpf 240 drivers/net/ethernet/netronome/nfp/bpf/offload.c return nfp_map_ptrs_record(nfp_prog->bpf, nfp_prog, prog); bpf 248 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_map_ptrs_forget(nfp_prog->bpf, nfp_prog); bpf 328 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_bpf_map_alloc(struct nfp_app_bpf *bpf, struct bpf_offloaded_map *offmap) bpf 334 drivers/net/ethernet/netronome/nfp/bpf/offload.c if (!bpf->maps.types) bpf 343 drivers/net/ethernet/netronome/nfp/bpf/offload.c if (!(bpf->maps.types & 1 << offmap->map.map_type)) { bpf 347 drivers/net/ethernet/netronome/nfp/bpf/offload.c if (bpf->maps.max_maps == bpf->maps_in_use) { bpf 351 drivers/net/ethernet/netronome/nfp/bpf/offload.c if (bpf->maps.max_elems - bpf->map_elems_in_use < bpf 355 drivers/net/ethernet/netronome/nfp/bpf/offload.c bpf->maps.max_elems - bpf->map_elems_in_use); bpf 360 drivers/net/ethernet/netronome/nfp/bpf/offload.c round_up(offmap->map.value_size, 8) > bpf->maps.max_elem_sz) { bpf 364 drivers/net/ethernet/netronome/nfp/bpf/offload.c bpf->maps.max_elem_sz); bpf 367 drivers/net/ethernet/netronome/nfp/bpf/offload.c if (offmap->map.key_size > bpf->maps.max_key_sz) { bpf 369 drivers/net/ethernet/netronome/nfp/bpf/offload.c offmap->map.key_size, bpf->maps.max_key_sz); bpf 372 drivers/net/ethernet/netronome/nfp/bpf/offload.c if (offmap->map.value_size > bpf->maps.max_val_sz) { bpf 374 drivers/net/ethernet/netronome/nfp/bpf/offload.c offmap->map.value_size, bpf->maps.max_val_sz); bpf 387 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_map->bpf = bpf; bpf 390 drivers/net/ethernet/netronome/nfp/bpf/offload.c res = nfp_bpf_ctrl_alloc_map(bpf, &offmap->map); bpf 398 drivers/net/ethernet/netronome/nfp/bpf/offload.c bpf->maps_in_use++; bpf 399 drivers/net/ethernet/netronome/nfp/bpf/offload.c bpf->map_elems_in_use += offmap->map.max_entries; bpf 400 drivers/net/ethernet/netronome/nfp/bpf/offload.c list_add_tail(&nfp_map->l, &bpf->map_list); bpf 406 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_bpf_map_free(struct nfp_app_bpf *bpf, struct bpf_offloaded_map *offmap) bpf 410 drivers/net/ethernet/netronome/nfp/bpf/offload.c nfp_bpf_ctrl_free_map(bpf, nfp_map); bpf 414 drivers/net/ethernet/netronome/nfp/bpf/offload.c bpf->map_elems_in_use -= offmap->map.max_entries; bpf 415 drivers/net/ethernet/netronome/nfp/bpf/offload.c bpf->maps_in_use--; bpf 421 drivers/net/ethernet/netronome/nfp/bpf/offload.c int nfp_ndo_bpf(struct nfp_app *app, struct nfp_net *nn, struct netdev_bpf *bpf) bpf 423 drivers/net/ethernet/netronome/nfp/bpf/offload.c switch (bpf->command) { bpf 425 drivers/net/ethernet/netronome/nfp/bpf/offload.c return nfp_bpf_map_alloc(app->priv, bpf->offmap); bpf 427 drivers/net/ethernet/netronome/nfp/bpf/offload.c return nfp_bpf_map_free(app->priv, bpf->offmap); bpf 441 drivers/net/ethernet/netronome/nfp/bpf/offload.c int nfp_bpf_event_output(struct nfp_app_bpf *bpf, const void *data, bpf 463 drivers/net/ethernet/netronome/nfp/bpf/offload.c record = rhashtable_lookup_fast(&bpf->maps_neutral, &map_id, bpf 467 drivers/net/ethernet/netronome/nfp/bpf/offload.c cmsg_warn(bpf, "perf event: map id %lld (0x%llx) not recognized, dropping event\n", bpf 48 drivers/net/ethernet/netronome/nfp/bpf/verifier.c nfp_record_adjust_head(struct nfp_app_bpf *bpf, struct nfp_prog *nfp_prog, bpf 65 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (imm > (int)bpf->adjust_head.guaranteed_add || bpf 66 drivers/net/ethernet/netronome/nfp/bpf/verifier.c imm < -bpf->adjust_head.guaranteed_sub) bpf 177 drivers/net/ethernet/netronome/nfp/bpf/verifier.c struct nfp_app_bpf *bpf = nfp_prog->bpf; bpf 182 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (!bpf->adjust_head.off_max) { bpf 186 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (!(bpf->adjust_head.flags & NFP_BPF_ADJUST_HEAD_NO_META)) { bpf 191 drivers/net/ethernet/netronome/nfp/bpf/verifier.c nfp_record_adjust_head(bpf, nfp_prog, meta, reg2); bpf 195 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (!bpf->adjust_tail) { bpf 203 drivers/net/ethernet/netronome/nfp/bpf/verifier.c bpf->helpers.map_lookup, reg1) || bpf 211 drivers/net/ethernet/netronome/nfp/bpf/verifier.c bpf->helpers.map_update, reg1) || bpf 221 drivers/net/ethernet/netronome/nfp/bpf/verifier.c bpf->helpers.map_delete, reg1) || bpf 228 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (bpf->pseudo_random) bpf 239 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (!bpf->helpers.perf_event_output) { bpf 284 drivers/net/ethernet/netronome/nfp/bpf/verifier.c dev_warn_once(&nfp_prog->bpf->app->pf->pdev->dev, bpf 512 drivers/net/ethernet/netronome/nfp/bpf/verifier.c if (nfp_prog->bpf->queue_select) bpf 135 drivers/net/ethernet/netronome/nfp/nfp_app.h int (*bpf)(struct nfp_app *app, struct nfp_net *nn, bpf 321 drivers/net/ethernet/netronome/nfp/nfp_app.h struct netdev_bpf *bpf) bpf 323 drivers/net/ethernet/netronome/nfp/nfp_app.h if (!app || !app->type->bpf) bpf 325 drivers/net/ethernet/netronome/nfp/nfp_app.h return app->type->bpf(app, nn, bpf); bpf 3644 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_xdp_setup_drv(struct nfp_net *nn, struct netdev_bpf *bpf) bpf 3646 drivers/net/ethernet/netronome/nfp/nfp_net_common.c struct bpf_prog *prog = bpf->prog; bpf 3650 drivers/net/ethernet/netronome/nfp/nfp_net_common.c if (!xdp_attachment_flags_ok(&nn->xdp, bpf)) bpf 3655 drivers/net/ethernet/netronome/nfp/nfp_net_common.c xdp_attachment_setup(&nn->xdp, bpf); bpf 3669 drivers/net/ethernet/netronome/nfp/nfp_net_common.c err = nfp_net_ring_reconfig(nn, dp, bpf->extack); bpf 3673 drivers/net/ethernet/netronome/nfp/nfp_net_common.c xdp_attachment_setup(&nn->xdp, bpf); bpf 3677 drivers/net/ethernet/netronome/nfp/nfp_net_common.c static int nfp_net_xdp_setup_hw(struct nfp_net *nn, struct netdev_bpf *bpf) bpf 3681 drivers/net/ethernet/netronome/nfp/nfp_net_common.c if (!xdp_attachment_flags_ok(&nn->xdp_hw, bpf)) bpf 3684 drivers/net/ethernet/netronome/nfp/nfp_net_common.c err = nfp_app_xdp_offload(nn->app, nn, bpf->prog, bpf->extack); bpf 3688 drivers/net/ethernet/netronome/nfp/nfp_net_common.c xdp_attachment_setup(&nn->xdp_hw, bpf); bpf 2341 drivers/net/ethernet/ti/cpsw.c static int cpsw_xdp_prog_setup(struct cpsw_priv *priv, struct netdev_bpf *bpf) bpf 2343 drivers/net/ethernet/ti/cpsw.c struct bpf_prog *prog = bpf->prog; bpf 2348 drivers/net/ethernet/ti/cpsw.c if (!xdp_attachment_flags_ok(&priv->xdpi, bpf)) bpf 2353 drivers/net/ethernet/ti/cpsw.c xdp_attachment_setup(&priv->xdpi, bpf); bpf 2358 drivers/net/ethernet/ti/cpsw.c static int cpsw_ndo_bpf(struct net_device *ndev, struct netdev_bpf *bpf) bpf 2362 drivers/net/ethernet/ti/cpsw.c switch (bpf->command) { bpf 2364 drivers/net/ethernet/ti/cpsw.c return cpsw_xdp_prog_setup(priv, bpf); bpf 2367 drivers/net/ethernet/ti/cpsw.c return xdp_attachment_query(&priv->xdpi, bpf); bpf 175 drivers/net/netdevsim/bpf.c static int nsim_xdp_offload_prog(struct netdevsim *ns, struct netdev_bpf *bpf) bpf 177 drivers/net/netdevsim/bpf.c if (!nsim_xdp_offload_active(ns) && !bpf->prog) bpf 179 drivers/net/netdevsim/bpf.c if (!nsim_xdp_offload_active(ns) && bpf->prog && ns->bpf_offloaded) { bpf 180 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "TC program is already loaded"); bpf 184 drivers/net/netdevsim/bpf.c return nsim_bpf_offload(ns, bpf->prog, nsim_xdp_offload_active(ns)); bpf 188 drivers/net/netdevsim/bpf.c nsim_xdp_set_prog(struct netdevsim *ns, struct netdev_bpf *bpf, bpf 193 drivers/net/netdevsim/bpf.c if (!xdp_attachment_flags_ok(xdp, bpf)) bpf 196 drivers/net/netdevsim/bpf.c if (bpf->command == XDP_SETUP_PROG && !ns->bpf_xdpdrv_accept) { bpf 197 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "driver XDP disabled in DebugFS"); bpf 200 drivers/net/netdevsim/bpf.c if (bpf->command == XDP_SETUP_PROG_HW && !ns->bpf_xdpoffload_accept) { bpf 201 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "XDP offload disabled in DebugFS"); bpf 205 drivers/net/netdevsim/bpf.c if (bpf->command == XDP_SETUP_PROG_HW) { bpf 206 drivers/net/netdevsim/bpf.c err = nsim_xdp_offload_prog(ns, bpf); bpf 211 drivers/net/netdevsim/bpf.c xdp_attachment_setup(xdp, bpf); bpf 289 drivers/net/netdevsim/bpf.c static int nsim_setup_prog_checks(struct netdevsim *ns, struct netdev_bpf *bpf) bpf 291 drivers/net/netdevsim/bpf.c if (bpf->prog && bpf->prog->aux->offload) { bpf 292 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "attempt to load offloaded prog to drv"); bpf 296 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "MTU too large w/ XDP enabled"); bpf 303 drivers/net/netdevsim/bpf.c nsim_setup_prog_hw_checks(struct netdevsim *ns, struct netdev_bpf *bpf) bpf 307 drivers/net/netdevsim/bpf.c if (!bpf->prog) bpf 310 drivers/net/netdevsim/bpf.c if (!bpf->prog->aux->offload) { bpf 311 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "xdpoffload of non-bound program"); bpf 314 drivers/net/netdevsim/bpf.c if (!bpf_offload_dev_match(bpf->prog, ns->netdev)) { bpf 315 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "program bound to different dev"); bpf 319 drivers/net/netdevsim/bpf.c state = bpf->prog->aux->offload->dev_priv; bpf 321 drivers/net/netdevsim/bpf.c NSIM_EA(bpf->extack, "offloading program in bad state"); bpf 544 drivers/net/netdevsim/bpf.c int nsim_bpf(struct net_device *dev, struct netdev_bpf *bpf) bpf 551 drivers/net/netdevsim/bpf.c switch (bpf->command) { bpf 553 drivers/net/netdevsim/bpf.c return xdp_attachment_query(&ns->xdp, bpf); bpf 555 drivers/net/netdevsim/bpf.c return xdp_attachment_query(&ns->xdp_hw, bpf); bpf 557 drivers/net/netdevsim/bpf.c err = nsim_setup_prog_checks(ns, bpf); bpf 561 drivers/net/netdevsim/bpf.c return nsim_xdp_set_prog(ns, bpf, &ns->xdp); bpf 563 drivers/net/netdevsim/bpf.c err = nsim_setup_prog_hw_checks(ns, bpf); bpf 567 drivers/net/netdevsim/bpf.c return nsim_xdp_set_prog(ns, bpf, &ns->xdp_hw); bpf 572 drivers/net/netdevsim/bpf.c return nsim_bpf_map_alloc(ns, bpf->offmap); bpf 574 drivers/net/netdevsim/bpf.c nsim_bpf_map_free(bpf->offmap); bpf 86 drivers/net/netdevsim/netdevsim.h int nsim_bpf(struct net_device *dev, struct netdev_bpf *bpf); bpf 109 drivers/net/netdevsim/netdevsim.h static inline int nsim_bpf(struct net_device *dev, struct netdev_bpf *bpf) bpf 111 drivers/net/netdevsim/netdevsim.h return bpf->command == XDP_QUERY_PROG ? 0 : -EOPNOTSUPP; bpf 482 include/linux/cgroup-defs.h struct cgroup_bpf bpf; bpf 945 include/linux/cgroup.h percpu_ref_get(&cgrp->bpf.refcnt); bpf 950 include/linux/cgroup.h percpu_ref_put(&cgrp->bpf.refcnt); bpf 1811 include/linux/lsm_hooks.h int (*bpf)(int cmd, union bpf_attr *attr, bpf 2054 include/linux/lsm_hooks.h struct hlist_head bpf; bpf 1438 include/linux/netdevice.h struct netdev_bpf *bpf); bpf 3696 include/linux/netdevice.h typedef int (*bpf_op_t)(struct net_device *dev, struct netdev_bpf *bpf); bpf 872 include/net/tcp.h } bpf; bpf 880 include/net/tcp.h TCP_SKB_CB(skb)->bpf.data_end = skb->data + skb_headlen(skb); bpf 885 include/net/tcp.h return TCP_SKB_CB(skb)->bpf.flags & BPF_F_INGRESS; bpf 890 include/net/tcp.h return TCP_SKB_CB(skb)->bpf.sk_redir; bpf 895 include/net/tcp.h TCP_SKB_CB(skb)->bpf.sk_redir = NULL; bpf 178 include/net/xdp.h struct netdev_bpf *bpf); bpf 180 include/net/xdp.h struct netdev_bpf *bpf); bpf 182 include/net/xdp.h struct netdev_bpf *bpf); bpf 28 kernel/bpf/cgroup.c percpu_ref_kill(&cgrp->bpf.refcnt); bpf 39 kernel/bpf/cgroup.c bpf.release_work); bpf 46 kernel/bpf/cgroup.c for (type = 0; type < ARRAY_SIZE(cgrp->bpf.progs); type++) { bpf 47 kernel/bpf/cgroup.c struct list_head *progs = &cgrp->bpf.progs[type]; bpf 61 kernel/bpf/cgroup.c cgrp->bpf.effective[type], bpf 71 kernel/bpf/cgroup.c percpu_ref_exit(&cgrp->bpf.refcnt); bpf 82 kernel/bpf/cgroup.c struct cgroup *cgrp = container_of(ref, struct cgroup, bpf.refcnt); bpf 84 kernel/bpf/cgroup.c INIT_WORK(&cgrp->bpf.release_work, cgroup_bpf_release); bpf 85 kernel/bpf/cgroup.c queue_work(system_wq, &cgrp->bpf.release_work); bpf 118 kernel/bpf/cgroup.c u32 flags = p->bpf.flags[type]; bpf 123 kernel/bpf/cgroup.c cnt = prog_list_length(&p->bpf.progs[type]); bpf 150 kernel/bpf/cgroup.c if (cnt == 0 || (p->bpf.flags[type] & BPF_F_ALLOW_MULTI)) bpf 151 kernel/bpf/cgroup.c cnt += prog_list_length(&p->bpf.progs[type]); bpf 163 kernel/bpf/cgroup.c if (cnt > 0 && !(p->bpf.flags[type] & BPF_F_ALLOW_MULTI)) bpf 166 kernel/bpf/cgroup.c list_for_each_entry(pl, &p->bpf.progs[type], node) { bpf 186 kernel/bpf/cgroup.c rcu_swap_protected(cgrp->bpf.effective[type], old_array, bpf 203 kernel/bpf/cgroup.c #define NR ARRAY_SIZE(cgrp->bpf.effective) bpf 208 kernel/bpf/cgroup.c ret = percpu_ref_init(&cgrp->bpf.refcnt, cgroup_bpf_release_fn, 0, bpf 217 kernel/bpf/cgroup.c INIT_LIST_HEAD(&cgrp->bpf.progs[i]); bpf 234 kernel/bpf/cgroup.c percpu_ref_exit(&cgrp->bpf.refcnt); bpf 249 kernel/bpf/cgroup.c if (percpu_ref_is_zero(&desc->bpf.refcnt)) bpf 252 kernel/bpf/cgroup.c err = compute_effective_progs(desc, type, &desc->bpf.inactive); bpf 261 kernel/bpf/cgroup.c if (percpu_ref_is_zero(&desc->bpf.refcnt)) { bpf 262 kernel/bpf/cgroup.c if (unlikely(desc->bpf.inactive)) { bpf 263 kernel/bpf/cgroup.c bpf_prog_array_free(desc->bpf.inactive); bpf 264 kernel/bpf/cgroup.c desc->bpf.inactive = NULL; bpf 269 kernel/bpf/cgroup.c activate_effective_progs(desc, type, desc->bpf.inactive); bpf 270 kernel/bpf/cgroup.c desc->bpf.inactive = NULL; bpf 282 kernel/bpf/cgroup.c bpf_prog_array_free(desc->bpf.inactive); bpf 283 kernel/bpf/cgroup.c desc->bpf.inactive = NULL; bpf 304 kernel/bpf/cgroup.c struct list_head *progs = &cgrp->bpf.progs[type]; bpf 320 kernel/bpf/cgroup.c if (!list_empty(progs) && cgrp->bpf.flags[type] != flags) bpf 386 kernel/bpf/cgroup.c cgrp->bpf.flags[type] = flags; bpf 433 kernel/bpf/cgroup.c struct list_head *progs = &cgrp->bpf.progs[type]; bpf 435 kernel/bpf/cgroup.c u32 flags = cgrp->bpf.flags[type]; bpf 488 kernel/bpf/cgroup.c cgrp->bpf.flags[type] = 0; bpf 506 kernel/bpf/cgroup.c struct list_head *progs = &cgrp->bpf.progs[type]; bpf 507 kernel/bpf/cgroup.c u32 flags = cgrp->bpf.flags[type]; bpf 511 kernel/bpf/cgroup.c effective = rcu_dereference_protected(cgrp->bpf.effective[type], bpf 652 kernel/bpf/cgroup.c cgrp->bpf.effective[type], skb, __bpf_prog_run_save_cb); bpf 654 kernel/bpf/cgroup.c ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], skb, bpf 685 kernel/bpf/cgroup.c ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], sk, BPF_PROG_RUN); bpf 729 kernel/bpf/cgroup.c ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], &ctx, BPF_PROG_RUN); bpf 758 kernel/bpf/cgroup.c ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], sock_ops, bpf 777 kernel/bpf/cgroup.c allow = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], &ctx, bpf 936 kernel/bpf/cgroup.c ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[type], &ctx, BPF_PROG_RUN); bpf 960 kernel/bpf/cgroup.c prog_array = rcu_dereference(cgrp->bpf.effective[attach_type]); bpf 1024 kernel/bpf/cgroup.c ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[BPF_CGROUP_SETSOCKOPT], bpf 1108 kernel/bpf/cgroup.c ret = BPF_PROG_RUN_ARRAY(cgrp->bpf.effective[BPF_CGROUP_GETSOCKOPT], bpf 2841 kernel/bpf/syscall.c SYSCALL_DEFINE3(bpf, int, cmd, union bpf_attr __user *, uattr, unsigned int, size) bpf 333 kernel/sys_ni.c COND_SYSCALL(bpf); bpf 8320 net/core/filter.c off += offsetof(struct tcp_skb_cb, bpf.data_end); bpf 118 net/core/lwt_bpf.c struct bpf_lwt *bpf; bpf 121 net/core/lwt_bpf.c bpf = bpf_lwt_lwtunnel(dst->lwtstate); bpf 122 net/core/lwt_bpf.c if (bpf->in.prog) { bpf 123 net/core/lwt_bpf.c ret = run_lwt_bpf(skb, &bpf->in, dst, NO_REDIRECT); bpf 141 net/core/lwt_bpf.c struct bpf_lwt *bpf; bpf 144 net/core/lwt_bpf.c bpf = bpf_lwt_lwtunnel(dst->lwtstate); bpf 145 net/core/lwt_bpf.c if (bpf->out.prog) { bpf 146 net/core/lwt_bpf.c ret = run_lwt_bpf(skb, &bpf->out, dst, NO_REDIRECT); bpf 153 net/core/lwt_bpf.c bpf->out.name); bpf 272 net/core/lwt_bpf.c struct bpf_lwt *bpf; bpf 274 net/core/lwt_bpf.c bpf = bpf_lwt_lwtunnel(dst->lwtstate); bpf 275 net/core/lwt_bpf.c if (bpf->xmit.prog) { bpf 279 net/core/lwt_bpf.c ret = run_lwt_bpf(skb, &bpf->xmit, dst, CAN_REDIRECT); bpf 320 net/core/lwt_bpf.c struct bpf_lwt *bpf = bpf_lwt_lwtunnel(lwt); bpf 322 net/core/lwt_bpf.c bpf_lwt_prog_destroy(&bpf->in); bpf 323 net/core/lwt_bpf.c bpf_lwt_prog_destroy(&bpf->out); bpf 324 net/core/lwt_bpf.c bpf_lwt_prog_destroy(&bpf->xmit); bpf 377 net/core/lwt_bpf.c struct bpf_lwt *bpf; bpf 391 net/core/lwt_bpf.c newts = lwtunnel_state_alloc(sizeof(*bpf)); bpf 396 net/core/lwt_bpf.c bpf = bpf_lwt_lwtunnel(newts); bpf 400 net/core/lwt_bpf.c ret = bpf_parse_prog(tb[LWT_BPF_IN], &bpf->in, bpf 408 net/core/lwt_bpf.c ret = bpf_parse_prog(tb[LWT_BPF_OUT], &bpf->out, bpf 416 net/core/lwt_bpf.c ret = bpf_parse_prog(tb[LWT_BPF_XMIT], &bpf->xmit, bpf 433 net/core/lwt_bpf.c bpf->family = family; bpf 465 net/core/lwt_bpf.c struct bpf_lwt *bpf = bpf_lwt_lwtunnel(lwt); bpf 467 net/core/lwt_bpf.c if (bpf_fill_lwt_prog(skb, LWT_BPF_IN, &bpf->in) < 0 || bpf 468 net/core/lwt_bpf.c bpf_fill_lwt_prog(skb, LWT_BPF_OUT, &bpf->out) < 0 || bpf 469 net/core/lwt_bpf.c bpf_fill_lwt_prog(skb, LWT_BPF_XMIT, &bpf->xmit) < 0) bpf 707 net/core/skmsg.c tcp->bpf.flags |= BPF_F_INGRESS; bpf 468 net/core/sock_map.c tcb->bpf.flags = flags; bpf 469 net/core/sock_map.c tcb->bpf.sk_redir = __sock_map_lookup_elem(map, key); bpf 470 net/core/sock_map.c if (!tcb->bpf.sk_redir) bpf 929 net/core/sock_map.c tcb->bpf.flags = flags; bpf 930 net/core/sock_map.c tcb->bpf.sk_redir = __sock_hash_lookup_elem(map, key); bpf 931 net/core/sock_map.c if (!tcb->bpf.sk_redir) bpf 437 net/core/xdp.c struct netdev_bpf *bpf) bpf 439 net/core/xdp.c bpf->prog_id = info->prog ? info->prog->aux->id : 0; bpf 440 net/core/xdp.c bpf->prog_flags = info->prog ? info->flags : 0; bpf 446 net/core/xdp.c struct netdev_bpf *bpf) bpf 448 net/core/xdp.c if (info->prog && (bpf->flags ^ info->flags) & XDP_FLAGS_MODES) { bpf 449 net/core/xdp.c NL_SET_ERR_MSG(bpf->extack, bpf 458 net/core/xdp.c struct netdev_bpf *bpf) bpf 462 net/core/xdp.c info->prog = bpf->prog; bpf 463 net/core/xdp.c info->flags = bpf->flags; bpf 56 net/ipv6/seg6_local.c struct bpf_lwt_prog bpf; bpf 518 net/ipv6/seg6_local.c ret = bpf_prog_run_save_cb(slwt->bpf.prog, skb); bpf 843 net/ipv6/seg6_local.c slwt->bpf.name = nla_memdup(tb[SEG6_LOCAL_BPF_PROG_NAME], GFP_KERNEL); bpf 844 net/ipv6/seg6_local.c if (!slwt->bpf.name) bpf 850 net/ipv6/seg6_local.c kfree(slwt->bpf.name); bpf 854 net/ipv6/seg6_local.c slwt->bpf.prog = p; bpf 862 net/ipv6/seg6_local.c if (!slwt->bpf.prog) bpf 869 net/ipv6/seg6_local.c if (nla_put_u32(skb, SEG6_LOCAL_BPF_PROG, slwt->bpf.prog->aux->id)) bpf 872 net/ipv6/seg6_local.c if (slwt->bpf.name && bpf 873 net/ipv6/seg6_local.c nla_put_string(skb, SEG6_LOCAL_BPF_PROG_NAME, slwt->bpf.name)) bpf 881 net/ipv6/seg6_local.c if (!a->bpf.name && !b->bpf.name) bpf 884 net/ipv6/seg6_local.c if (!a->bpf.name || !b->bpf.name) bpf 887 net/ipv6/seg6_local.c return strcmp(a->bpf.name, b->bpf.name); bpf 1012 net/ipv6/seg6_local.c kfree(slwt->bpf.name); bpf 1013 net/ipv6/seg6_local.c bpf_prog_put(slwt->bpf.prog); bpf 94 net/xdp/xdp_umem.c struct netdev_bpf bpf; bpf 135 net/xdp/xdp_umem.c bpf.command = XDP_SETUP_XSK_UMEM; bpf 136 net/xdp/xdp_umem.c bpf.xsk.umem = umem; bpf 137 net/xdp/xdp_umem.c bpf.xsk.queue_id = queue_id; bpf 139 net/xdp/xdp_umem.c err = dev->netdev_ops->ndo_bpf(dev, &bpf); bpf 156 net/xdp/xdp_umem.c struct netdev_bpf bpf; bpf 165 net/xdp/xdp_umem.c bpf.command = XDP_SETUP_XSK_UMEM; bpf 166 net/xdp/xdp_umem.c bpf.xsk.umem = NULL; bpf 167 net/xdp/xdp_umem.c bpf.xsk.queue_id = umem->queue_id; bpf 169 net/xdp/xdp_umem.c err = umem->dev->netdev_ops->ndo_bpf(umem->dev, &bpf); bpf 2374 security/security.c return call_int_hook(bpf, 0, cmd, attr, size); bpf 7059 security/selinux/hooks.c LSM_HOOK_INIT(bpf, selinux_bpf), bpf 501 tools/bpf/bpf_dbg.c struct sock_fprog bpf = { bpf 511 tools/bpf/bpf_dbg.c ret = setsockopt(sock, SOL_SOCKET, SO_ATTACH_FILTER, &bpf, sizeof(bpf)); bpf 2507 tools/perf/builtin-script.c script->tool.bpf = process_bpf_events; bpf 81 tools/perf/builtin-version.c STATUS(HAVE_LIBBPF_SUPPORT, bpf); bpf 361 tools/perf/lib/include/perf/event.h struct perf_record_bpf_event bpf; bpf 40 tools/perf/util/bpf-event.c int id = event->bpf.id; bpf 75 tools/perf/util/bpf-event.c switch (event->bpf.type) { bpf 87 tools/perf/util/bpf-event.c pr_debug("unexpected bpf event type of %d\n", event->bpf.type); bpf 165 tools/perf/util/bpf-event.c struct perf_record_bpf_event *bpf_event = &event->bpf; bpf 305 tools/perf/util/bpf-event.c event = malloc(sizeof(event->bpf) + KSYM_NAME_LEN + machine->id_hdr_size); bpf 402 tools/perf/util/bpf-event.c switch (event->bpf.type) { bpf 404 tools/perf/util/bpf-event.c perf_env__add_bpf_info(env, event->bpf.id); bpf 414 tools/perf/util/bpf-event.c pr_debug("unexpected bpf event type of %d\n", event->bpf.type); bpf 398 tools/perf/util/event.c event->bpf.type, event->bpf.flags, event->bpf.id); bpf 1082 tools/perf/util/evsel.c attr->bpf_event = track && !opts->no_bpf_event && !perf_missing_features.bpf; bpf 1642 tools/perf/util/evsel.c if (perf_missing_features.bpf) bpf 1759 tools/perf/util/evsel.c } else if (!perf_missing_features.bpf && evsel->core.attr.bpf_event) { bpf 1760 tools/perf/util/evsel.c perf_missing_features.bpf = true; bpf 116 tools/perf/util/evsel.h bool bpf; bpf 486 tools/perf/util/session.c if (tool->bpf == NULL) bpf 487 tools/perf/util/session.c tool->bpf = perf_event__process_bpf; bpf 1467 tools/perf/util/session.c return tool->bpf(tool, event, sample, machine); bpf 59 tools/perf/util/tool.h bpf;