Lines Matching refs:offdev
44 struct bpf_offload_dev *offdev; member
111 offload->offdev = ondev->offdev; in bpf_prog_offload_init()
135 ret = offload->offdev->ops->prepare(prog); in bpf_prog_offload_verifier_prep()
152 ret = offload->offdev->ops->insn_hook(env, insn_idx, in bpf_prog_offload_verify_insn()
167 if (offload->offdev->ops->finalize) in bpf_prog_offload_finalize()
168 ret = offload->offdev->ops->finalize(env); in bpf_prog_offload_finalize()
188 ops = offload->offdev->ops; in bpf_prog_offload_replace_insn()
205 if (!offload->opt_failed && offload->offdev->ops->remove_insns) in bpf_prog_offload_remove_insns()
206 ret = offload->offdev->ops->remove_insns(env, off, cnt); in bpf_prog_offload_remove_insns()
217 offload->offdev->ops->destroy(prog); in __bpf_prog_offload_destroy()
243 ret = offload->offdev->ops->translate(prog); in bpf_prog_offload_translate()
564 return ondev1 && ondev2 && ondev1->offdev == ondev2->offdev; in __bpf_offload_dev_match()
595 int bpf_offload_dev_netdev_register(struct bpf_offload_dev *offdev, in bpf_offload_dev_netdev_register() argument
606 ondev->offdev = offdev; in bpf_offload_dev_netdev_register()
617 list_add(&ondev->offdev_netdevs, &offdev->netdevs); in bpf_offload_dev_netdev_register()
628 void bpf_offload_dev_netdev_unregister(struct bpf_offload_dev *offdev, in bpf_offload_dev_netdev_unregister() argument
646 altdev = list_first_entry_or_null(&offdev->netdevs, in bpf_offload_dev_netdev_unregister()
675 struct bpf_offload_dev *offdev; in bpf_offload_dev_create() local
689 offdev = kzalloc(sizeof(*offdev), GFP_KERNEL); in bpf_offload_dev_create()
690 if (!offdev) in bpf_offload_dev_create()
693 offdev->ops = ops; in bpf_offload_dev_create()
694 offdev->priv = priv; in bpf_offload_dev_create()
695 INIT_LIST_HEAD(&offdev->netdevs); in bpf_offload_dev_create()
697 return offdev; in bpf_offload_dev_create()
701 void bpf_offload_dev_destroy(struct bpf_offload_dev *offdev) in bpf_offload_dev_destroy() argument
703 WARN_ON(!list_empty(&offdev->netdevs)); in bpf_offload_dev_destroy()
704 kfree(offdev); in bpf_offload_dev_destroy()
708 void *bpf_offload_dev_priv(struct bpf_offload_dev *offdev) in bpf_offload_dev_priv() argument
710 return offdev->priv; in bpf_offload_dev_priv()