Re: [PATCH net] virtio-net: re enable XDP_REDIRECT for mergeable buffer
From: Jesper Dangaard Brouer
Date: Fri Mar 02 2018 - 02:05:41 EST
On Fri, 2 Mar 2018 14:25:29 +0800
Jason Wang <jasowang@xxxxxxxxxx> wrote:
> @@ -770,6 +774,19 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
> goto err_xdp;
> rcu_read_unlock();
> goto xdp_xmit;
> + case XDP_REDIRECT:
> + err = xdp_do_redirect(dev, &xdp, xdp_prog);
> + if (err) {
> + trace_xdp_exception(vi->dev, xdp_prog, act);
Do not add a trace_xdp_exception here... this is handled inside
xdp_do_redirect() invocation.
> + if (unlikely(xdp_page != page))
> + put_page(xdp_page);
> + goto err_xdp;
> + }
> + *xdp_xmit = true;
> + if (unlikely(xdp_page != page))
> + goto err_xdp;
> + rcu_read_unlock();
> + goto xdp_xmit;
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer