virtio-net: correctly set xdp_xmit for mergeable buffer
Subsystems (4)
PATCH 1/1 virtio-net: correctly set xdp_xmit for mergeable buffer
We should set xdp_xmit only when xdp_do_redirect() succeed.
Cc John Fastabend <[email protected]>
Signed-off-by Jason Wang <[email protected]>
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/virtio_net.c +1 -1
@@ -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;
Signature · 1 line
2.7.4
From: Jason Wang <[email protected]>
Date: Fri, 22 Sep 2017 14:38:58 +0800
Quoted 4 lines
We should set
xdp_xmitonly whenxdp_do_redirect()succeed.Cc John Fastabend <[email protected]>Signed-off-by Jason Wang <[email protected]>
Applied, thanks Jason.
From: Jason Wang <[email protected]>
Date: Fri, 22 Sep 2017 14:38:58 +0800
Quoted 4 lines
We should set
xdp_xmitonly whenxdp_do_redirect()succeed.Cc John Fastabend <[email protected]>Signed-off-by Jason Wang <[email protected]>
Applied, thanks Jason.