search for: tailroom

Displaying 20 results from an estimated 73 matches for "tailroom".

2018 Mar 02
6
[PATCH net V2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
XDP_REDIRECT support for mergeable buffer was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). This is because we don't reserve enough tailroom for struct skb_shared_info which breaks XDP assumption. So this patch fixes this by reserving enough tailroom and using fixed size of rx buffer. Signed-off-by: Jason Wang <jasowang at redhat.com> --- Changes from V1: - do not add duplicated tracepoint when redirection fails --- drivers/net/...
2018 Mar 02
6
[PATCH net V2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
XDP_REDIRECT support for mergeable buffer was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). This is because we don't reserve enough tailroom for struct skb_shared_info which breaks XDP assumption. So this patch fixes this by reserving enough tailroom and using fixed size of rx buffer. Signed-off-by: Jason Wang <jasowang at redhat.com> --- Changes from V1: - do not add duplicated tracepoint when redirection fails --- drivers/net/...
2018 Mar 01
3
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
...asowang at redhat.com> wrote: > >> This series tries to re-enable XDP_REDIRECT for mergeable buffer which >> was removed since commit 7324f5399b06 ("virtio_net: disable >> XDP_REDIRECT in receive_mergeable() case"). Main concerns are: >> >> - not enough tailroom was reserved which breaks cpumap > To address this at a more fundamental level, I would suggest that we/you > instead extend XDP to know it's buffers "frame" size/end. (The > assumption use to be, xdp_buff->data_hard_start + PAGE_SIZE, but > ixgbe+virtio_net broke that...
2018 Mar 01
3
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
...asowang at redhat.com> wrote: > >> This series tries to re-enable XDP_REDIRECT for mergeable buffer which >> was removed since commit 7324f5399b06 ("virtio_net: disable >> XDP_REDIRECT in receive_mergeable() case"). Main concerns are: >> >> - not enough tailroom was reserved which breaks cpumap > To address this at a more fundamental level, I would suggest that we/you > instead extend XDP to know it's buffers "frame" size/end. (The > assumption use to be, xdp_buff->data_hard_start + PAGE_SIZE, but > ixgbe+virtio_net broke that...
2018 Mar 01
2
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
...t;>>> This series tries to re-enable XDP_REDIRECT for mergeable buffer which >>>> was removed since commit 7324f5399b06 ("virtio_net: disable >>>> XDP_REDIRECT in receive_mergeable() case"). Main concerns are: >>>> >>>> - not enough tailroom was reserved which breaks cpumap >>> To address this at a more fundamental level, I would suggest that we/you >>> instead extend XDP to know it's buffers "frame" size/end. (The >>> assumption use to be, xdp_buff->data_hard_start + PAGE_SIZE, but >>...
2018 Mar 01
2
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
...t;>>> This series tries to re-enable XDP_REDIRECT for mergeable buffer which >>>> was removed since commit 7324f5399b06 ("virtio_net: disable >>>> XDP_REDIRECT in receive_mergeable() case"). Main concerns are: >>>> >>>> - not enough tailroom was reserved which breaks cpumap >>> To address this at a more fundamental level, I would suggest that we/you >>> instead extend XDP to know it's buffers "frame" size/end. (The >>> assumption use to be, xdp_buff->data_hard_start + PAGE_SIZE, but >>...
2018 Mar 02
0
[PATCH net V2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
On Fri, Mar 02, 2018 at 05:29:14PM +0800, Jason Wang wrote: > XDP_REDIRECT support for mergeable buffer was removed since commit > 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() > case"). This is because we don't reserve enough tailroom for struct > skb_shared_info which breaks XDP assumption. So this patch fixes this > by reserving enough tailroom and using fixed size of rx buffer. > > Signed-off-by: Jason Wang <jasowang at redhat.com> Acked-by: Michael S. Tsirkin <mst at redhat.com> I think the next in...
2018 Mar 02
2
[PATCH net] virtio-net: re enable XDP_REDIRECT for mergeable buffer
XDP_REDIRECT support for mergeable buffer was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). This is because we don't reserve enough tailroom for struct skb_shared_info which breaks XDP assumption. So this patch fixes this by reserving enough tailroom and using fixed size of rx buffer. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 55 +++++++++++++++++++++++++++++++++++++----------- 1 file chan...
2018 Mar 02
2
[PATCH net] virtio-net: re enable XDP_REDIRECT for mergeable buffer
XDP_REDIRECT support for mergeable buffer was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). This is because we don't reserve enough tailroom for struct skb_shared_info which breaks XDP assumption. So this patch fixes this by reserving enough tailroom and using fixed size of rx buffer. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 55 +++++++++++++++++++++++++++++++++++++----------- 1 file chan...
2023 Apr 13
1
[PATCH net] virtio_net: bugfix overflow inside xdp_linearize_page()
...index 2396c28c0122..ea1bd4bb326d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -814,8 +814,13 @@ static struct page *xdp_linearize_page(struct receive_queue *rq, int page_off, unsigned int *len) { - struct page *page = alloc_page(GFP_ATOMIC); + int tailroom = SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); + struct page *page; + + if (page_off + *len + tailroom > PAGE_SIZE) + return NULL; + page = alloc_page(GFP_ATOMIC); if (!page) return NULL; @@ -823,7 +828,6 @@ static struct page *xdp_linearize_page(struct receive_queue *rq, page_off...
2023 Apr 14
1
[PATCH net v1] virtio_net: bugfix overflow inside xdp_linearize_page()
...index 2396c28c0122..ea1bd4bb326d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -814,8 +814,13 @@ static struct page *xdp_linearize_page(struct receive_queue *rq, int page_off, unsigned int *len) { - struct page *page = alloc_page(GFP_ATOMIC); + int tailroom = SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); + struct page *page; + + if (page_off + *len + tailroom > PAGE_SIZE) + return NULL; + page = alloc_page(GFP_ATOMIC); if (!page) return NULL; @@ -823,7 +828,6 @@ static struct page *xdp_linearize_page(struct receive_queue *rq, page_off +...
2018 Mar 01
7
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
Hi: This series tries to re-enable XDP_REDIRECT for mergeable buffer which was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). Main concerns are: - not enough tailroom was reserved which breaks cpumap - complex logic like EWMA and linearizing during XDP processing Fix those by: - reserve enough tailroom during refill - disable EWMA and use fixed size of rx buffer - drop linearizing logic and offload it to generic XDP routine, this could happen only when the b...
2018 Mar 01
7
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
Hi: This series tries to re-enable XDP_REDIRECT for mergeable buffer which was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). Main concerns are: - not enough tailroom was reserved which breaks cpumap - complex logic like EWMA and linearizing during XDP processing Fix those by: - reserve enough tailroom during refill - disable EWMA and use fixed size of rx buffer - drop linearizing logic and offload it to generic XDP routine, this could happen only when the b...
2018 Mar 01
1
[PATCH net-next 1/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
On Thu, Mar 01, 2018 at 11:19:04AM +0800, Jason Wang wrote: > XDP_REDIRECT support for mergeable buffer was removed since commit > 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() > case"). This is because we don't reserve enough tailroom for struct > skb_shared_info which breaks XDP assumption. Other complaints are, the > complex linearize logic and EWMA estimation may increase the > possibility of linearizing. > > Signed-off-by: Jason Wang <jasowang at redhat.com> How about reposting just this patch for net?...
2018 Mar 01
0
[PATCH net-next 1/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
XDP_REDIRECT support for mergeable buffer was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). This is because we don't reserve enough tailroom for struct skb_shared_info which breaks XDP assumption. Other complaints are, the complex linearize logic and EWMA estimation may increase the possibility of linearizing. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 107 +++++++++++++++++++++++++++++-----...
2018 Mar 05
1
[PATCH net V2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
...sowang at redhat.com> > Date: Fri, 2 Mar 2018 17:29:14 +0800 > >> XDP_REDIRECT support for mergeable buffer was removed since commit >> 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() >> case"). This is because we don't reserve enough tailroom for struct >> skb_shared_info which breaks XDP assumption. So this patch fixes this >> by reserving enough tailroom and using fixed size of rx buffer. >> >> Signed-off-by: Jason Wang <jasowang at redhat.com> >> --- >> Changes from V1: >> - do not add...
2018 Mar 01
1
[PATCH net-next 1/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
On Thu, 1 Mar 2018 11:19:04 +0800 Jason Wang <jasowang at redhat.com> wrote: > XDP_REDIRECT support for mergeable buffer was removed since commit > 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() > case"). This is because we don't reserve enough tailroom for struct > skb_shared_info which breaks XDP assumption. Other complaints are, the > complex linearize logic and EWMA estimation may increase the > possibility of linearizing. This patch also have the intermixing issues, I mentioned for patch 2/2. On Thu, 1 Mar 2018 09:02:06 +0100 Jespe...
2018 Mar 01
0
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
...series tries to re-enable XDP_REDIRECT for mergeable buffer which > >>>> was removed since commit 7324f5399b06 ("virtio_net: disable > >>>> XDP_REDIRECT in receive_mergeable() case"). Main concerns are: > >>>> > >>>> - not enough tailroom was reserved which breaks cpumap > >>> To address this at a more fundamental level, I would suggest that we/you > >>> instead extend XDP to know it's buffers "frame" size/end. (The > >>> assumption use to be, xdp_buff->data_hard_start + PAGE_S...
2020 May 06
2
[PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers
On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: > We should not exclude headroom and tailroom when XDP is set. So this > patch fixes this by initializing the truesize from PAGE_SIZE when XDP > is set. > > Cc: Jesper Dangaard Brouer <brouer at redhat.com> > Signed-off-by: Jason Wang <jasowang at redhat.com> Seems too aggressive, we do not use up the whole page fo...
2020 May 06
2
[PATCH net-next 2/2] virtio-net: fix the XDP truesize calculation for mergeable buffers
On Wed, May 06, 2020 at 02:16:33PM +0800, Jason Wang wrote: > We should not exclude headroom and tailroom when XDP is set. So this > patch fixes this by initializing the truesize from PAGE_SIZE when XDP > is set. > > Cc: Jesper Dangaard Brouer <brouer at redhat.com> > Signed-off-by: Jason Wang <jasowang at redhat.com> Seems too aggressive, we do not use up the whole page fo...