Lines Matching refs:prog
84 struct bpf_prog *prog; in mana_run_xdp() local
88 prog = rcu_dereference(rxq->bpf_prog); in mana_run_xdp()
90 if (!prog) in mana_run_xdp()
96 act = bpf_prog_run_xdp(prog, xdp); in mana_run_xdp()
107 rxq->xdp_rc = xdp_do_redirect(ndev, xdp, prog); in mana_run_xdp()
123 trace_xdp_exception(ndev, prog, act); in mana_run_xdp()
127 bpf_warn_invalid_xdp_action(ndev, prog, act); in mana_run_xdp()
149 void mana_chn_setxdp(struct mana_port_context *apc, struct bpf_prog *prog) in mana_chn_setxdp() argument
157 if (old_prog == prog) in mana_chn_setxdp()
160 if (prog) in mana_chn_setxdp()
161 bpf_prog_add(prog, num_queues); in mana_chn_setxdp()
164 rcu_assign_pointer(apc->rxqs[i]->bpf_prog, prog); in mana_chn_setxdp()
171 static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog, in mana_xdp_set() argument
182 if (!old_prog && !prog) in mana_xdp_set()
185 if (prog && ndev->mtu > MANA_XDP_MTU_MAX) { in mana_xdp_set()
196 apc->bpf_prog = prog; in mana_xdp_set()
202 mana_chn_setxdp(apc, prog); in mana_xdp_set()
204 if (prog) in mana_xdp_set()
219 return mana_xdp_set(ndev, bpf->prog, extack); in mana_bpf()