Fix several issues of virtio-net mergeable XDP
Subsystems (4)
cover Fix several issues of virtio-net mergeable XDP
Hi:
Please review the patches that tries to fix sevreal issues of virtio-net mergeable XDP.
Thanks
Jason Wang (4):
virtio-net: correctly redirect linearized packet
virtio-net: correctly transmit XDP buff after linearizing
virtio-net: reset num_buf to 1 after linearizing packet
virito-net: fix leaking page for gso packet during mergeable XDP
drivers/net/virtio_net.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/4 virtio-net: correctly redirect linearized packet
After a linearized packet was redirected by XDP, we should not go for the err path which will try to pop buffers for the next packet and increase the drop counter. Fixing this by just drop the page refcnt for the original page.
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/virtio_net.c +1 -1
@@ -787,7 +787,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;default :
Signature · 1 line
2.7.4
Re: [PATCH net 1/4] virtio-net: correctly redirect linearized packet
Quoted 9 lines · Jason Wang
After a linearized packet was redirected by XDP, we should not go for the err path which will try to pop buffers for the next packet and increase the drop counter. Fixing this by just drop the page refcnt for the original page.
Fixes 186b3c998c50 ("virtio-net: support XDP_REDIRECT")Reported-by David Ahern <[email protected]>Tested-by David Ahern <[email protected]>Signed-off-by Jason Wang <[email protected]>
Quoted 19 lines
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/virtio_net.c +1
-1@@ -787,7 +787,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;default :Signature · 1 line
2.7.4
Re: [PATCH net 1/4] virtio-net: correctly redirect linearized packet
In reply to Jason WangQuoted 9 lines · Jason Wang
After a linearized packet was redirected by XDP, we should not go for the err path which will try to pop buffers for the next packet and increase the drop counter. Fixing this by just drop the page refcnt for the original page.
Fixes 186b3c998c50 ("virtio-net: support XDP_REDIRECT")Reported-by David Ahern <[email protected]>Tested-by David Ahern <[email protected]>Signed-off-by Jason Wang <[email protected]>
Quoted 19 lines
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/virtio_net.c +1
-1@@ -787,7 +787,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;default :Signature · 1 line
2.7.4
PATCH 1/4 virtio-net: correctly redirect linearized packet
In reply to Jason WangAfter a linearized packet was redirected by XDP, we should not go for the err path which will try to pop buffers for the next packet and increase the drop counter. Fixing this by just drop the page refcnt for the original page.
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/virtio_net.c +1 -1
@@ -787,7 +787,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;default :
Signature · 1 line
2.7.4
PATCH 2/4 virtio-net: correctly transmit XDP buff after linearizing
In reply to Jason WangWe should not go for the error path after successfully transmitting a XDP buffer after linearizing. Since the error path may try to pop and drop next packet and increase the drop counters. Fixing this by simply drop the refcnt of original page and go for xmit path.
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/virtio_net.c +1 -1
@@ -775,7 +775,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;case XDP_REDIRECT :
Signature · 1 line
2.7.4
PATCH 2/4 virtio-net: correctly transmit XDP buff after linearizing
In reply to Jason WangWe should not go for the error path after successfully transmitting a XDP buffer after linearizing. Since the error path may try to pop and drop next packet and increase the drop counters. Fixing this by simply drop the refcnt of original page and go for xmit path.
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/virtio_net.c +1 -1
@@ -775,7 +775,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;case XDP_REDIRECT :
Signature · 1 line
2.7.4
Re: [PATCH net 2/4] virtio-net: correctly transmit XDP buff after linearizing
Quoted 8 lines · Jason Wang
We should not go for the error path after successfully transmitting a XDP buffer after linearizing. Since the error path may try to pop and drop next packet and increase the drop counters. Fixing this by simply drop the refcnt of original page and go for xmit path.
Fixes 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers")Cc John Fastabend <[email protected]>Signed-off-by Jason Wang <[email protected]>
Quoted 19 lines
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/virtio_net.c +1
-1@@ -775,7 +775,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;case XDP_REDIRECT :Signature · 1 line
2.7.4
Re: [PATCH net 2/4] virtio-net: correctly transmit XDP buff after linearizing
In reply to Jason WangQuoted 8 lines · Jason Wang
We should not go for the error path after successfully transmitting a XDP buffer after linearizing. Since the error path may try to pop and drop next packet and increase the drop counters. Fixing this by simply drop the refcnt of original page and go for xmit path.
Fixes 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers")Cc John Fastabend <[email protected]>Signed-off-by Jason Wang <[email protected]>
Quoted 19 lines
--- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/virtio_net.c +1
-1@@ -775,7 +775,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, } *xdp_xmit = true;if (unlikely (xdp_page != page)) - goto err_xdp; +put_page (page);rcu_read_unlock (); goto xdp_xmit;case XDP_REDIRECT :Signature · 1 line
2.7.4
PATCH 3/4 virtio-net: reset num_buf to 1 after linearizing packet
In reply to Jason WangIf we successfully linearize the packets, num_buf were set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path of receive_mergeable(). Zero num_buf will lead the code try to pop the buffers of next packet and drop it. Fixing this by set num_buf to 1 if we successfully linearize the packet.
--- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/virtio_net.c +1 -0
@@ -722,6 +722,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, &len);if (!xdp_page) goto err_xdp; + num_buf =1 ; offset =VIRTIO_XDP_HEADROOM ; }else { xdp_page = page;
Signature · 1 line
2.7.4
Michael S. Tsirkin
maintainerRe: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet
Quoted 17 lines · Jason Wang
If we successfully linearize the packets,
num_bufwere set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path ofreceive_mergeable(). Zeronum_bufwill lead the code try to pop the buffers of next packet and drop it. Fixing this by setnum_bufto 1 if we successfully linearize the packet.Fixes 4941d472bf95 ("virtio-net: do not reset during XDP set")Signed-off-by Jason Wang <[email protected]>--- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+)drivers/net/virtio_net.c +0
-0
drivers/net/virtio_net.c static struct sk_buff *receive_mergeable(struct net_device *dev, · line 725
Quoted 4 lines
drivers/net/virtio_net.c +1
-0@@ -722,6 +722,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, &len);if (!xdp_page) goto err_xdp; + num_buf =1 ;
So this is tweaked here for the benefit of err_skb below. That's confusing and we won't remember to change it if we change the error handling.
How about fixing the error path?
- while (--num_buf) {
+ while (num_buf-- > 1) {
Seems more robust to me.
Quoted 5 lines
drivers/net/virtio_net.c +0
-0offset =VIRTIO_XDP_HEADROOM ; }else { xdp_page = page;Signature · 1 line
2.7.4
Re: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet
Quoted 32 lines · Michael S. Tsirkin
Quoted 17 lines · Jason Wang
If we successfully linearize the packets,
num_bufwere set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path ofreceive_mergeable(). Zeronum_bufwill lead the code try to pop the buffers of next packet and drop it. Fixing this by setnum_bufto 1 if we successfully linearize the packet.Fixes 4941d472bf95 ("virtio-net: do not reset during XDP set")Signed-off-by Jason Wang <[email protected]>--- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+)drivers/net/virtio_net.c +0
-0drivers/net/virtio_net.c static struct sk_buff *receive_mergeable(struct net_device *dev, · line 725
Quoted 4 lines
drivers/net/virtio_net.c +1
-0@@ -722,6 +722,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, &len);if (!xdp_page) goto err_xdp; + num_buf =1 ;So this is tweaked here for the benefit of
err_skbbelow. That's confusing and we won't remember to change it if we change the error handling.How about fixing the error path?
(quoted diff) +1
-1- while (--num_buf) { + while (num_buf-- > 1) {
Quoted 1 line
Seems more robust to me.
Looks good, will do this in V2.
Thanks
Quoted 6 lines
Quoted 6 lines
drivers/net/virtio_net.c +0
-0offset =VIRTIO_XDP_HEADROOM ; }else { xdp_page = page;Signature · 1 line
2.7.4
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet
In reply to Michael S. TsirkinQuoted 32 lines · Michael S. Tsirkin
Quoted 17 lines · Jason Wang
If we successfully linearize the packets,
num_bufwere set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path ofreceive_mergeable(). Zeronum_bufwill lead the code try to pop the buffers of next packet and drop it. Fixing this by setnum_bufto 1 if we successfully linearize the packet.Fixes 4941d472bf95 ("virtio-net: do not reset during XDP set")Signed-off-by Jason Wang <[email protected]>--- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+)drivers/net/virtio_net.c +0
-0drivers/net/virtio_net.c static struct sk_buff *receive_mergeable(struct net_device *dev, · line 725
Quoted 4 lines
drivers/net/virtio_net.c +1
-0@@ -722,6 +722,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, &len);if (!xdp_page) goto err_xdp; + num_buf =1 ;So this is tweaked here for the benefit of
err_skbbelow. That's confusing and we won't remember to change it if we change the error handling.How about fixing the error path?
(quoted diff) +1
-1- while (--num_buf) { + while (num_buf-- > 1) {
Quoted 1 line
Seems more robust to me.
Looks good, will do this in V2.
Thanks
Quoted 6 lines
Quoted 6 lines
drivers/net/virtio_net.c +0
-0offset =VIRTIO_XDP_HEADROOM ; }else { xdp_page = page;Signature · 1 line
2.7.4
Michael S. Tsirkin
maintainerRe: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet
In reply to Jason WangQuoted 17 lines · Jason Wang
If we successfully linearize the packets,
num_bufwere set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path ofreceive_mergeable(). Zeronum_bufwill lead the code try to pop the buffers of next packet and drop it. Fixing this by setnum_bufto 1 if we successfully linearize the packet.Fixes 4941d472bf95 ("virtio-net: do not reset during XDP set")Signed-off-by Jason Wang <[email protected]>--- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+)drivers/net/virtio_net.c +0
-0
drivers/net/virtio_net.c static struct sk_buff *receive_mergeable(struct net_device *dev, · line 725
Quoted 4 lines
drivers/net/virtio_net.c +1
-0@@ -722,6 +722,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, &len);if (!xdp_page) goto err_xdp; + num_buf =1 ;
So this is tweaked here for the benefit of err_skb below. That's confusing and we won't remember to change it if we change the error handling.
How about fixing the error path?
- while (--num_buf) {
+ while (num_buf-- > 1) {
Seems more robust to me.
Quoted 5 lines
drivers/net/virtio_net.c +0
-0offset =VIRTIO_XDP_HEADROOM ; }else { xdp_page = page;Signature · 1 line
2.7.4
PATCH 3/4 virtio-net: reset num_buf to 1 after linearizing packet
In reply to Jason WangIf we successfully linearize the packets, num_buf were set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path of receive_mergeable(). Zero num_buf will lead the code try to pop the buffers of next packet and drop it. Fixing this by set num_buf to 1 if we successfully linearize the packet.
--- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/virtio_net.c +1 -0
@@ -722,6 +722,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, &len);if (!xdp_page) goto err_xdp; + num_buf =1 ; offset =VIRTIO_XDP_HEADROOM ; }else { xdp_page = page;
Signature · 1 line
2.7.4
PATCH 4/4 virito-net: fix leaking page for gso packet during mergeable XDP
In reply to Jason WangWe need to drop refcnt to xdp_page if we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic.
--- drivers/net/virtio_net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/virtio_net.c +8 -8
@@ -707,6 +707,14 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,void *data;u32 act; +/* Transient failure which in theory could occur if +* in-flight packets from before XDP was enabled reach +* the receive path after XDP is loaded. In practice I +* was not able to create this condition. +*/ +if (unlikely (hdr->hdr.gso_type)) + goto err_xdp; +/* This happens when rx buffer size is underestimated * or headroom is not enough because of the buffer * was refilled before XDP is set. This should only
@@ -728,14 +736,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, xdp_page = page; } -/* Transient failure which in theory could occur if -* in-flight packets from before XDP was enabled reach -* the receive path after XDP is loaded. In practice I -* was not able to create this condition. -*/ -if (unlikely (hdr->hdr.gso_type)) - goto err_xdp; -/* Allow consuming headroom but reserve enough space to push * the descriptor on if we get an XDP_TX return code. */
Signature · 1 line
2.7.4
Michael S. Tsirkin
maintainerRe: [PATCH net 4/4] virito-net: fix leaking page for gso packet during mergeable XDP
Quoted 7 lines · Jason Wang
We need to drop refcnt to
xdp_pageif we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic.Cc John Fastabend <[email protected]>Fixes 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers")Signed-off-by Jason Wang <[email protected]>
typo in subject
Quoted 9 lines
--- drivers/net/virtio_net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/net/virtio_net.c +0
-0
drivers/net/virtio_net.c static struct sk_buff *receive_mergeable(struct net_device *dev, · line 713
Quoted 7 lines
drivers/net/virtio_net.c +4
-0@@ -707,6 +707,14 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,void *data;u32 act; +/* Transient failure which in theory could occur if +* in-flight packets from before XDP was enabled reach +* the receive path after XDP is loaded. In practice I +* was not able to create this condition.
BTW we should probably drop the last sentence. It says in theory, should be enough.
Quoted 24 lines
drivers/net/virtio_net.c +4
-8+*/ +if (unlikely (hdr->hdr.gso_type)) + goto err_xdp; +/* This happens when rx buffer size is underestimated * or headroom is not enough because of the buffer * was refilled before XDP is set. This should only @@ -728,14 +736,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, xdp_page = page; } -/* Transient failure which in theory could occur if -* in-flight packets from before XDP was enabled reach -* the receive path after XDP is loaded. In practice I -* was not able to create this condition. -*/ -if (unlikely (hdr->hdr.gso_type)) - goto err_xdp; -/* Allow consuming headroom but reserve enough space to push * the descriptor on if we get an XDP_TX return code. */ Signature · 1 line
2.7.4
Re: [PATCH net 4/4] virito-net: fix leaking page for gso packet during mergeable XDP
Quoted 9 lines · Michael S. Tsirkin
Quoted 7 lines · Jason Wang
We need to drop refcnt to
xdp_pageif we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic.Cc John Fastabend <[email protected]>Fixes 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers")Signed-off-by Jason Wang <[email protected]>typo in subject
Let me fix it in V2.
Quoted 12 lines
Quoted 12 lines
--- drivers/net/virtio_net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/net/virtio_net.c +0
-0@@ -707,6 +707,14 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,void *data;u32 act;
Quoted 5 lines
drivers/net/virtio_net.c static struct sk_buff *receive_mergeable(struct net_device *dev, · line 713
Quoted 4 lines
drivers/net/virtio_net.c +4
-0+/* Transient failure which in theory could occur if +* in-flight packets from before XDP was enabled reach +* the receive path after XDP is loaded. In practice I +* was not able to create this condition. BTW we should probably drop the last sentence. It says in theory, should be enough.
Ok.
Thanks
Quoted 11 lines
Quoted 11 lines
drivers/net/virtio_net.c +4
-0+*/ +if (unlikely (hdr->hdr.gso_type)) + goto err_xdp; +/* This happens when rx buffer size is underestimated * or headroom is not enough because of the buffer * was refilled before XDP is set. This should only @@ -728,14 +736,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, xdp_page = page; }
Quoted 13 lines
Quoted 13 lines
drivers/net/virtio_net.c +0
-8-/* Transient failure which in theory could occur if -* in-flight packets from before XDP was enabled reach -* the receive path after XDP is loaded. In practice I -* was not able to create this condition. -*/ -if (unlikely (hdr->hdr.gso_type)) - goto err_xdp; -/* Allow consuming headroom but reserve enough space to push * the descriptor on if we get an XDP_TX return code. */ Signature · 1 line
2.7.4
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH net 4/4] virito-net: fix leaking page for gso packet during mergeable XDP
In reply to Michael S. TsirkinQuoted 9 lines · Michael S. Tsirkin
Quoted 7 lines · Jason Wang
We need to drop refcnt to
xdp_pageif we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic.Cc John Fastabend <[email protected]>Fixes 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers")Signed-off-by Jason Wang <[email protected]>typo in subject
Let me fix it in V2.
Quoted 12 lines
Quoted 12 lines
--- drivers/net/virtio_net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/net/virtio_net.c +0
-0@@ -707,6 +707,14 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,void *data;u32 act;
Quoted 5 lines
drivers/net/virtio_net.c static struct sk_buff *receive_mergeable(struct net_device *dev, · line 713
Quoted 4 lines
drivers/net/virtio_net.c +4
-0+/* Transient failure which in theory could occur if +* in-flight packets from before XDP was enabled reach +* the receive path after XDP is loaded. In practice I +* was not able to create this condition. BTW we should probably drop the last sentence. It says in theory, should be enough.
Ok.
Thanks
Quoted 24 lines
Quoted 24 lines
drivers/net/virtio_net.c +4
-8+*/ +if (unlikely (hdr->hdr.gso_type)) + goto err_xdp; +/* This happens when rx buffer size is underestimated * or headroom is not enough because of the buffer * was refilled before XDP is set. This should only @@ -728,14 +736,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, xdp_page = page; } -/* Transient failure which in theory could occur if -* in-flight packets from before XDP was enabled reach -* the receive path after XDP is loaded. In practice I -* was not able to create this condition. -*/ -if (unlikely (hdr->hdr.gso_type)) - goto err_xdp; -/* Allow consuming headroom but reserve enough space to push * the descriptor on if we get an XDP_TX return code. */ Signature · 1 line
2.7.4
PATCH 4/4 virito-net: fix leaking page for gso packet during mergeable XDP
In reply to Jason WangWe need to drop refcnt to xdp_page if we see a gso packet. Otherwise it will be leaked. Fixing this by moving the check of gso packet above the linearizing logic.
--- drivers/net/virtio_net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/virtio_net.c +8 -8
@@ -707,6 +707,14 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,void *data;u32 act; +/* Transient failure which in theory could occur if +* in-flight packets from before XDP was enabled reach +* the receive path after XDP is loaded. In practice I +* was not able to create this condition. +*/ +if (unlikely (hdr->hdr.gso_type)) + goto err_xdp; +/* This happens when rx buffer size is underestimated * or headroom is not enough because of the buffer * was refilled before XDP is set. This should only
@@ -728,14 +736,6 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, xdp_page = page; } -/* Transient failure which in theory could occur if -* in-flight packets from before XDP was enabled reach -* the receive path after XDP is loaded. In practice I -* was not able to create this condition. -*/ -if (unlikely (hdr->hdr.gso_type)) - goto err_xdp; -/* Allow consuming headroom but reserve enough space to push * the descriptor on if we get an XDP_TX return code. */
Signature · 1 line
2.7.4
Michael S. Tsirkin
maintainerQuoted 6 lines · Jason Wang
Hi:
Please review the patches that tries to fix sevreal issues of virtio-net mergeable XDP.
Thanks
I think we should do 3/4 differently.
The rest looks good, and probably needed on stable.
Thanks!
Quoted 11 lines
Jason Wang (4):
virtio-net: correctly redirect linearized packet
virtio-net: correctly transmit XDP buff after linearizing
virtio-net: resetnum_bufto 1 after linearizing packet
virito-net: fix leaking page for gso packet during mergeable XDPdrivers/net/virtio_net.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)Signature · 1 line
2.7.4
Michael S. Tsirkin
maintainerQuoted 6 lines · Jason Wang
Hi:
Please review the patches that tries to fix sevreal issues of virtio-net mergeable XDP.
Thanks
I think we should do 3/4 differently.
The rest looks good, and probably needed on stable.
Thanks!
Quoted 11 lines
Jason Wang (4):
virtio-net: correctly redirect linearized packet
virtio-net: correctly transmit XDP buff after linearizing
virtio-net: resetnum_bufto 1 after linearizing packet
virito-net: fix leaking page for gso packet during mergeable XDPdrivers/net/virtio_net.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)Signature · 1 line
2.7.4