* [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer
@ 2017-09-22 6:38 Jason Wang
2017-09-23 1:16 ` David Miller
2017-09-23 1:16 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Jason Wang @ 2017-09-22 6:38 UTC (permalink / raw)
To: mst, jasowang, virtualization, netdev, linux-kernel; +Cc: John Fastabend
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>
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f6c1f13..dd14a45 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer
2017-09-22 6:38 [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer Jason Wang
2017-09-23 1:16 ` David Miller
@ 2017-09-23 1:16 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-09-23 1:16 UTC (permalink / raw)
To: jasowang; +Cc: mst, virtualization, netdev, linux-kernel, john.fastabend
From: Jason Wang <jasowang@redhat.com>
Date: Fri, 22 Sep 2017 14:38:58 +0800
> 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>
Applied, thanks Jason.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer
2017-09-22 6:38 [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer Jason Wang
@ 2017-09-23 1:16 ` David Miller
2017-09-23 1:16 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-09-23 1:16 UTC (permalink / raw)
To: jasowang; +Cc: netdev, virtualization, john.fastabend, linux-kernel, mst
From: Jason Wang <jasowang@redhat.com>
Date: Fri, 22 Sep 2017 14:38:58 +0800
> 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>
Applied, thanks Jason.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer
@ 2017-09-22 6:38 Jason Wang
0 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2017-09-22 6:38 UTC (permalink / raw)
To: mst, jasowang, virtualization, netdev, linux-kernel; +Cc: John Fastabend
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>
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f6c1f13..dd14a45 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -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;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-23 1:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 6:38 [PATCH net-next] virtio-net: correctly set xdp_xmit for mergeable buffer Jason Wang
2017-09-23 1:16 ` David Miller
2017-09-23 1:16 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2017-09-22 6:38 Jason Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.