search for: virtqueue_add_outbuf_urgent

Displaying 17 results from an estimated 17 matches for "virtqueue_add_outbuf_urgent".

2014 Sep 22
2
[PATCH RFC 2/2] vhost: support urgent descriptors
...cleared unconditionally in virtqueue_disable_cb(). So virtqueue_enable_cb() was used to not only publish a new event index but also enable the urgent descriptor. And virtqueue_disable_cb() disabled all interrupts including the urgent descriptor. Guest won't get urgent interrupts by just adding virtqueue_add_outbuf_urgent() since what it needs is to enable and disable interrupt for !urgent descriptor. Btw, not sure "urgent" is a suitable name, since interrupt is often slow in kvm guest. And in fact virtio-net will probably use "urgent" descriptor for those packets (e.g stream packets who can be...
2014 Sep 22
2
[PATCH RFC 2/2] vhost: support urgent descriptors
...cleared unconditionally in virtqueue_disable_cb(). So virtqueue_enable_cb() was used to not only publish a new event index but also enable the urgent descriptor. And virtqueue_disable_cb() disabled all interrupts including the urgent descriptor. Guest won't get urgent interrupts by just adding virtqueue_add_outbuf_urgent() since what it needs is to enable and disable interrupt for !urgent descriptor. Btw, not sure "urgent" is a suitable name, since interrupt is often slow in kvm guest. And in fact virtio-net will probably use "urgent" descriptor for those packets (e.g stream packets who can be...
2014 Oct 12
0
[PATCH net-next RFC 1/3] virtio: support for urgent descriptors
.... > + * @gfp: how to do memory allocations (if necessary). > + * > + * Caller must ensure we don't call this with other virtqueue operations > + * at the same time (except where noted). > + * > + * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO). > + */ > +int virtqueue_add_outbuf_urgent(struct virtqueue *vq, > + struct scatterlist sg[], unsigned int num, > + void *data, > + gfp_t gfp) > +{ > + return virtqueue_add(vq, true, &sg, sg_next_arr, num, 0, 1, 0, data, gfp); > +} > +EXPORT_SYMBOL_GPL(virtqueue_add_outbuf_urgent); > + > +/** > *...
2014 Oct 11
2
[PATCH net-next RFC 1/3] virtio: support for urgent descriptors
...@data: the token identifying the buffer. + * @gfp: how to do memory allocations (if necessary). + * + * Caller must ensure we don't call this with other virtqueue operations + * at the same time (except where noted). + * + * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO). + */ +int virtqueue_add_outbuf_urgent(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp) +{ + return virtqueue_add(vq, true, &sg, sg_next_arr, num, 0, 1, 0, data, gfp); +} +EXPORT_SYMBOL_GPL(virtqueue_add_outbuf_urgent); + +/** * virtqueue_add_inbuf - expose input buffers to oth...
2014 Oct 11
2
[PATCH net-next RFC 1/3] virtio: support for urgent descriptors
...@data: the token identifying the buffer. + * @gfp: how to do memory allocations (if necessary). + * + * Caller must ensure we don't call this with other virtqueue operations + * at the same time (except where noted). + * + * Returns zero or a negative error (ie. ENOSPC, ENOMEM, EIO). + */ +int virtqueue_add_outbuf_urgent(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp) +{ + return virtqueue_add(vq, true, &sg, sg_next_arr, num, 0, 1, 0, data, gfp); +} +EXPORT_SYMBOL_GPL(virtqueue_add_outbuf_urgent); + +/** * virtqueue_add_inbuf - expose input buffers to oth...
2014 Sep 22
1
[PATCH RFC 2/2] vhost: support urgent descriptors
.... > >> So virtqueue_enable_cb() was >> used to not only publish a new event index but also enable the urgent >> descriptor. And virtqueue_disable_cb() disabled all interrupts including >> the urgent descriptor. Guest won't get urgent interrupts by just adding >> virtqueue_add_outbuf_urgent() since what it needs is to enable and >> disable interrupt for !urgent descriptor. > Right, we want a new API that advances event index but does not > set VRING_AVAIL_F_NO_INTERRUPT. > IMO still want to set VRING_AVAIL_F_NO_INTERRUPT when handling tx > interrupts, to avoid interr...
2014 Sep 22
1
[PATCH RFC 2/2] vhost: support urgent descriptors
.... > >> So virtqueue_enable_cb() was >> used to not only publish a new event index but also enable the urgent >> descriptor. And virtqueue_disable_cb() disabled all interrupts including >> the urgent descriptor. Guest won't get urgent interrupts by just adding >> virtqueue_add_outbuf_urgent() since what it needs is to enable and >> disable interrupt for !urgent descriptor. > Right, we want a new API that advances event index but does not > set VRING_AVAIL_F_NO_INTERRUPT. > IMO still want to set VRING_AVAIL_F_NO_INTERRUPT when handling tx > interrupts, to avoid interr...
2014 Sep 22
0
[PATCH RFC 2/2] vhost: support urgent descriptors
...reverse actually, right? > So virtqueue_enable_cb() was > used to not only publish a new event index but also enable the urgent > descriptor. And virtqueue_disable_cb() disabled all interrupts including > the urgent descriptor. Guest won't get urgent interrupts by just adding > virtqueue_add_outbuf_urgent() since what it needs is to enable and > disable interrupt for !urgent descriptor. Right, we want a new API that advances event index but does not set VRING_AVAIL_F_NO_INTERRUPT. IMO still want to set VRING_AVAIL_F_NO_INTERRUPT when handling tx interrupts, to avoid interrupt storms. > Btw,...
2014 Oct 11
10
[PATCH net-next RFC 0/3] virtio-net: Conditionally enable tx interrupt
Hello all: We free old transmitted packets in ndo_start_xmit() currently, so any packet must be orphaned also there. This was used to reduce the overhead of tx interrupt to achieve better performance. But this may not work for some protocols such as TCP stream. TCP depends on the value of sk_wmem_alloc to implement various optimization for small packets stream such as TCP small queue and auto
2014 Oct 11
10
[PATCH net-next RFC 0/3] virtio-net: Conditionally enable tx interrupt
Hello all: We free old transmitted packets in ndo_start_xmit() currently, so any packet must be orphaned also there. This was used to reduce the overhead of tx interrupt to achieve better performance. But this may not work for some protocols such as TCP stream. TCP depends on the value of sk_wmem_alloc to implement various optimization for small packets stream such as TCP small queue and auto
2014 Sep 19
2
[PATCH RFC 2/2] vhost: support urgent descriptors
On 07/01/2014 06:49 PM, Michael S. Tsirkin wrote: > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/vhost/vhost.h | 19 +++++++++++++------ > drivers/vhost/net.c | 30 +++++++++++++++++++++--------- > drivers/vhost/scsi.c | 23 +++++++++++++++-------- > drivers/vhost/test.c | 5 +++-- > drivers/vhost/vhost.c | 23 ++++++++++++++++------- >
2014 Sep 19
2
[PATCH RFC 2/2] vhost: support urgent descriptors
On 07/01/2014 06:49 PM, Michael S. Tsirkin wrote: > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/vhost/vhost.h | 19 +++++++++++++------ > drivers/vhost/net.c | 30 +++++++++++++++++++++--------- > drivers/vhost/scsi.c | 23 +++++++++++++++-------- > drivers/vhost/test.c | 5 +++-- > drivers/vhost/vhost.c | 23 ++++++++++++++++------- >
2014 Jul 01
5
[PATCH RFC 1/2] virtio: support for urgent descriptors
...changed, 51 insertions(+), 4 deletions(-) diff --git a/include/linux/virtio.h b/include/linux/virtio.h index b46671e..14625a6 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -39,6 +39,12 @@ int virtqueue_add_outbuf(struct virtqueue *vq, void *data, gfp_t gfp); +int virtqueue_add_outbuf_urgent(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp); + + int virtqueue_add_inbuf(struct virtqueue *vq, struct scatterlist sg[], unsigned int num, void *data, diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h...
2014 Jul 01
5
[PATCH RFC 1/2] virtio: support for urgent descriptors
...changed, 51 insertions(+), 4 deletions(-) diff --git a/include/linux/virtio.h b/include/linux/virtio.h index b46671e..14625a6 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -39,6 +39,12 @@ int virtqueue_add_outbuf(struct virtqueue *vq, void *data, gfp_t gfp); +int virtqueue_add_outbuf_urgent(struct virtqueue *vq, + struct scatterlist sg[], unsigned int num, + void *data, + gfp_t gfp); + + int virtqueue_add_inbuf(struct virtqueue *vq, struct scatterlist sg[], unsigned int num, void *data, diff --git a/include/uapi/linux/virtio_ring.h b/include/uapi/linux/virtio_ring.h...
2014 Oct 14
0
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...int xmit_skb(struct send_queue *sq, struct sk_buff *skb) > sg_set_buf(sq->sg, hdr, hdr_len); > num_sg = skb_to_sgvec(skb, sq->sg + 1, 0, skb->len) + 1; > } > - return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, GFP_ATOMIC); > + if (urgent) > + return virtqueue_add_outbuf_urgent(sq->vq, sq->sg, num_sg, > + skb, GFP_ATOMIC); > + else > + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, > + GFP_ATOMIC); > +} > + > +static bool virtnet_skb_needs_intr(struct sk_buff *skb) > +{ > + union { > + unsigned char *ne...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...t; @@ -908,7 +948,43 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) sg_set_buf(sq->sg, hdr, hdr_len); num_sg = skb_to_sgvec(skb, sq->sg + 1, 0, skb->len) + 1; } - return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, GFP_ATOMIC); + if (urgent) + return virtqueue_add_outbuf_urgent(sq->vq, sq->sg, num_sg, + skb, GFP_ATOMIC); + else + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, + GFP_ATOMIC); +} + +static bool virtnet_skb_needs_intr(struct sk_buff *skb) +{ + union { + unsigned char *network; + struct iphdr *ipv4; + struct ipv6hdr *i...
2014 Oct 11
2
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...t; @@ -908,7 +948,43 @@ static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) sg_set_buf(sq->sg, hdr, hdr_len); num_sg = skb_to_sgvec(skb, sq->sg + 1, 0, skb->len) + 1; } - return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, GFP_ATOMIC); + if (urgent) + return virtqueue_add_outbuf_urgent(sq->vq, sq->sg, num_sg, + skb, GFP_ATOMIC); + else + return virtqueue_add_outbuf(sq->vq, sq->sg, num_sg, skb, + GFP_ATOMIC); +} + +static bool virtnet_skb_needs_intr(struct sk_buff *skb) +{ + union { + unsigned char *network; + struct iphdr *ipv4; + struct ipv6hdr *i...