mirror of https://gitee.com/openkylin/linux.git
virtio-net: correctly set xdp_xmit for mergeable buffer
We should set xdp_xmit only when xdp_do_redirect() succeed. Cc: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
411d788a23
commit
dd54379749
|
@ -721,7 +721,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
|
|||
goto xdp_xmit;
|
||||
case XDP_REDIRECT:
|
||||
err = xdp_do_redirect(dev, &xdp, xdp_prog);
|
||||
if (err)
|
||||
if (!err)
|
||||
*xdp_xmit = true;
|
||||
rcu_read_unlock();
|
||||
goto xdp_xmit;
|
||||
|
|
Loading…
Reference in New Issue