search for: adjust_head

Displaying 20 results from an estimated 27 matches for "adjust_head".

2016 Dec 23
1
[RFC PATCH] virtio_net: XDP support for adjust_head
Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add. It reads better to do a prog ref unwind vs another queue setup call. TBD merge with Jason Wang's fixes, do a bit more testing, note
2016 Dec 23
1
[RFC PATCH] virtio_net: XDP support for adjust_head
Add support for XDP adjust head by allocating a 256B header region that XDP programs can grow into. This is only enabled when a XDP program is loaded. In order to ensure that we do not have to unwind queue headroom push queue setup below bpf_prog_add. It reads better to do a prog ref unwind vs another queue setup call. TBD merge with Jason Wang's fixes, do a bit more testing, note
2017 Jan 24
2
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
...200 > > > On Tue, Jan 24, 2017 at 03:09:59PM -0500, David Miller wrote: > >> From: "Michael S. Tsirkin" <mst at redhat.com> > >> Date: Tue, 24 Jan 2017 21:53:13 +0200 > >> > >> > I didn't realise. Why can't we? I thought that adjust_header is an > >> > optional feature that userspace can test for, so no rush. > >> > >> No, we want the base set of XDP features to be present in all drivers > >> supporting XDP. > > > > I see, I didn't realize this. In light of this, is there any...
2017 Jan 24
2
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
...200 > > > On Tue, Jan 24, 2017 at 03:09:59PM -0500, David Miller wrote: > >> From: "Michael S. Tsirkin" <mst at redhat.com> > >> Date: Tue, 24 Jan 2017 21:53:13 +0200 > >> > >> > I didn't realise. Why can't we? I thought that adjust_header is an > >> > optional feature that userspace can test for, so no rush. > >> > >> No, we want the base set of XDP features to be present in all drivers > >> supporting XDP. > > > > I see, I didn't realize this. In light of this, is there any...
2017 Jan 24
2
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
...in a week or two, but now we're > basically a month or so later. > > Please come to some kind of agreement about how to implement this > because we can't let v4.10 go out without this being resolved. > > Thank you. I didn't realise. Why can't we? I thought that adjust_header is an optional feature that userspace can test for, so no rush. -- MST
2017 Jan 24
2
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
...in a week or two, but now we're > basically a month or so later. > > Please come to some kind of agreement about how to implement this > because we can't let v4.10 go out without this being resolved. > > Thank you. I didn't realise. Why can't we? I thought that adjust_header is an optional feature that userspace can test for, so no rush. -- MST
2017 Jan 24
2
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
On Tue, Jan 24, 2017 at 03:09:59PM -0500, David Miller wrote: > From: "Michael S. Tsirkin" <mst at redhat.com> > Date: Tue, 24 Jan 2017 21:53:13 +0200 > > > I didn't realise. Why can't we? I thought that adjust_header is an > > optional feature that userspace can test for, so no rush. > > No, we want the base set of XDP features to be present in all drivers > supporting XDP. I see, I didn't realize this. In light of this, is there any guidance *how much* head room is required to be conside...
2017 Jan 24
2
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
On Tue, Jan 24, 2017 at 03:09:59PM -0500, David Miller wrote: > From: "Michael S. Tsirkin" <mst at redhat.com> > Date: Tue, 24 Jan 2017 21:53:13 +0200 > > > I didn't realise. Why can't we? I thought that adjust_header is an > > optional feature that userspace can test for, so no rush. > > No, we want the base set of XDP features to be present in all drivers > supporting XDP. I see, I didn't realize this. In light of this, is there any guidance *how much* head room is required to be conside...
2017 Jan 24
0
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
...gt; On Tue, Jan 24, 2017 at 03:09:59PM -0500, David Miller wrote: >> >> From: "Michael S. Tsirkin" <mst at redhat.com> >> >> Date: Tue, 24 Jan 2017 21:53:13 +0200 >> >> >> >> > I didn't realise. Why can't we? I thought that adjust_header is an >> >> > optional feature that userspace can test for, so no rush. >> >> >> >> No, we want the base set of XDP features to be present in all drivers >> >> supporting XDP. >> > >> > I see, I didn't realize this. In lig...
2017 Jan 24
1
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
On Tue, Jan 24, 2017 at 04:10:46PM -0500, David Miller wrote: > This works in the regimen that XDP packets always live in exactly one > page. That will be needed to mmap the RX ring into userspace, and it > helps make adjust_header trivial as well. I think the point was to avoid resets across xdp attach/detach. If we are doing resets now, we could do whatever buffering we want. We could also just disable mergeable buffers for that matter. > MTU 1500, PAGESIZE >= 4096, so a headroom of 256 is no problem, and > we...
2017 Jan 24
1
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
On Tue, Jan 24, 2017 at 04:10:46PM -0500, David Miller wrote: > This works in the regimen that XDP packets always live in exactly one > page. That will be needed to mmap the RX ring into userspace, and it > helps make adjust_header trivial as well. I think the point was to avoid resets across xdp attach/detach. If we are doing resets now, we could do whatever buffering we want. We could also just disable mergeable buffers for that matter. > MTU 1500, PAGESIZE >= 4096, so a headroom of 256 is no problem, and > we...
2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...43 58 00 00 00 00 48 8b 7b 68 48 85 ff 74 05 <f0> ff 0f 74 20 48 8b 43 60 48 85 c0 74 14 65 8b 15 f3 ab 8d 7e [ 74.351008] RIP: skb_release_head_state+0x28/0x80 RSP: ffffc9000438b8d0 [ 74.351625] ---[ end trace fe6e19fd11cfc80b ]--- Fixes: 2de2f7f40ef9 ("virtio_net: XDP support for adjust_head") Cc: John Fastabend <john.fastabend at gmail.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virti...
2017 Feb 15
3
[PATCH net-next] virito-net: set queues after reset during xdp_set
...43 58 00 00 00 00 48 8b 7b 68 48 85 ff 74 05 <f0> ff 0f 74 20 48 8b 43 60 48 85 c0 74 14 65 8b 15 f3 ab 8d 7e [ 74.351008] RIP: skb_release_head_state+0x28/0x80 RSP: ffffc9000438b8d0 [ 74.351625] ---[ end trace fe6e19fd11cfc80b ]--- Fixes: 2de2f7f40ef9 ("virtio_net: XDP support for adjust_head") Cc: John Fastabend <john.fastabend at gmail.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virti...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...ement the reset communication request defined in the VIRTIO 1.0 specification and introduces in Linux in commit c00bbcf862896 ("virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit"). Use the virtnet_reset function introduced in commit 2de2f7f40ef9 ("virtio_net: XDP support for adjust_head"). That was removed in commit 4941d472bf95 ("virtio-net: do not reset during XDP set"), because no longer used. Bring it back, minus the xdp specific code. Before tearing down any state, virtnet_freeze_down quiesces the device with netif_tx_disable. virtnet_reset also ensures that n...
2017 Oct 13
2
[PATCH net-next] virtio_net: implement VIRTIO_CONFIG_S_NEEDS_RESET
...ement the reset communication request defined in the VIRTIO 1.0 specification and introduces in Linux in commit c00bbcf862896 ("virtio: add VIRTIO_CONFIG_S_NEEDS_RESET device status bit"). Use the virtnet_reset function introduced in commit 2de2f7f40ef9 ("virtio_net: XDP support for adjust_head"). That was removed in commit 4941d472bf95 ("virtio-net: do not reset during XDP set"), because no longer used. Bring it back, minus the xdp specific code. Before tearing down any state, virtnet_freeze_down quiesces the device with netif_tx_disable. virtnet_reset also ensures that n...
2016 Dec 23
0
[PATCH net 0/9] several fixups for virtio-net XDP
...; virtio-net: XDP support for small buffers > > drivers/net/virtio_net.c | 172 ++++++++++++++++++++++++++++------------------- > 1 file changed, 102 insertions(+), 70 deletions(-) > Thanks a lot Jason. The last piece that is needed is support to complete XDP support is to get the adjust_head part correct. I'll send out a patch in a bit but will need to merge it on top of this set. .John
2017 Jan 24
0
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
From: "Michael S. Tsirkin" <mst at redhat.com> Date: Tue, 24 Jan 2017 21:53:13 +0200 > I didn't realise. Why can't we? I thought that adjust_header is an > optional feature that userspace can test for, so no rush. No, we want the base set of XDP features to be present in all drivers supporting XDP.
2017 Jan 24
0
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
...: Tue, 24 Jan 2017 22:45:37 +0200 > On Tue, Jan 24, 2017 at 03:09:59PM -0500, David Miller wrote: >> From: "Michael S. Tsirkin" <mst at redhat.com> >> Date: Tue, 24 Jan 2017 21:53:13 +0200 >> >> > I didn't realise. Why can't we? I thought that adjust_header is an >> > optional feature that userspace can test for, so no rush. >> >> No, we want the base set of XDP features to be present in all drivers >> supporting XDP. > > I see, I didn't realize this. In light of this, is there any > guidance *how much* head...
2017 Jul 18
0
[PATCH net-next 0/5] refine virtio-net XDP
...+0800, Jason Wang wrote: > Hi: > > This series brings two optimizations for virtio-net XDP: > > - avoid reset during XDP set > - turn off offloads on demand I'm glad to see this take shape - this can be extended to optimize virtnet_get_headroom so we don't waste room if adjust_head is enabled. I see a couple of issues, responded to individual patches. > Please review. > > Thanks > > Jason Wang (5): > virtio_ring: allow to store zero as the ctx > virtio-net: pack headroom into ctx for mergeable buffer > virtio-net: switch to use new ctx API f...
2017 Jan 23
2
[PATCH v2] virtio_net: fix PAGE_SIZE > 64k
I don't have any guests with PAGE_SIZE > 64k but the code seems to be clearly broken in that case as PAGE_SIZE / MERGEABLE_BUFFER_ALIGN will need more than 8 bit and so the code in mergeable_ctx_to_buf_address does not give us the actual true size. Cc: John Fastabend <john.fastabend at gmail.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- changes from v1: fix