search for: rx_vq

Displaying 20 results from an estimated 45 matches for "rx_vq".

Did you mean: rx_vr
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...) { - VirtIONet *n = opaque; + VirtIONet *vnet; + int len; + fd_set rfds; + struct timeval tv; + int max_fd = -1; VirtQueueElement elem; struct virtio_net_hdr *hdr; - int offset, i; - - /* FIXME: the drivers really need to set their status better */ - if (n->rx_vq->vring.avail == NULL) { - n->can_receive = 0; - return; - } - - if (virtqueue_pop(n->rx_vq, &elem) == 0) { - /* wait until the guest adds some rx bufs */ - n->can_receive = 0; - return; - } - - hdr = (void *)elem.in_sg[0].iov_base; - hdr->flags = 0;...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...) { - VirtIONet *n = opaque; + VirtIONet *vnet; + int len; + fd_set rfds; + struct timeval tv; + int max_fd = -1; VirtQueueElement elem; struct virtio_net_hdr *hdr; - int offset, i; - - /* FIXME: the drivers really need to set their status better */ - if (n->rx_vq->vring.avail == NULL) { - n->can_receive = 0; - return; - } - - if (virtqueue_pop(n->rx_vq, &elem) == 0) { - /* wait until the guest adds some rx bufs */ - n->can_receive = 0; - return; - } - - hdr = (void *)elem.in_sg[0].iov_base; - hdr->flags = 0;...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...3 // GSO frame, IPv4 UDP (UFO) +#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP + uint8_t gso_type; + uint16_t gso_size; + uint16_t csum_start; + uint16_t csum_offset; +}; + +typedef struct VirtIONet +{ + VirtIODevice vdev; + uint8_t mac[6]; + VirtQueue *rx_vq; + VirtQueue *tx_vq; + VLANClientState *vc; + int can_receive; +} VirtIONet; + +static VirtIONet *to_virtio_net(VirtIODevice *vdev) +{ + return (VirtIONet *)vdev; +} + +static void virtio_net_update_config(VirtIODevice *vdev, uint8_t *config) +{ + VirtIONet *n = to_virtio_net(vdev);...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...3 // GSO frame, IPv4 UDP (UFO) +#define VIRTIO_NET_HDR_GSO_TCPV6 4 // GSO frame, IPv6 TCP + uint8_t gso_type; + uint16_t gso_size; + uint16_t csum_start; + uint16_t csum_offset; +}; + +typedef struct VirtIONet +{ + VirtIODevice vdev; + uint8_t mac[6]; + VirtQueue *rx_vq; + VirtQueue *tx_vq; + VLANClientState *vc; + int can_receive; +} VirtIONet; + +static VirtIONet *to_virtio_net(VirtIODevice *vdev) +{ + return (VirtIONet *)vdev; +} + +static void virtio_net_update_config(VirtIODevice *vdev, uint8_t *config) +{ + VirtIONet *n = to_virtio_net(vdev);...
2014 Aug 15
2
[PATCH net-next] vhost_net: stop rx net polling when possible
...100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -334,6 +334,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) static void handle_tx(struct vhost_net *net) { struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; + struct vhost_virtqueue *rx_vq = &net->vqs[VHOST_NET_VQ_RX].vq; + struct vhost_poll *rx_poll = &net->poll[VHOST_NET_VQ_RX]; struct vhost_virtqueue *vq = &nvq->vq; unsigned out, in, s; int head; @@ -348,15 +350,18 @@ static void handle_tx(struct vhost_net *net) size_t len, total_len = 0; int err;...
2014 Aug 15
2
[PATCH net-next] vhost_net: stop rx net polling when possible
...100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -334,6 +334,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) static void handle_tx(struct vhost_net *net) { struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; + struct vhost_virtqueue *rx_vq = &net->vqs[VHOST_NET_VQ_RX].vq; + struct vhost_poll *rx_poll = &net->poll[VHOST_NET_VQ_RX]; struct vhost_virtqueue *vq = &nvq->vq; unsigned out, in, s; int head; @@ -348,15 +350,18 @@ static void handle_tx(struct vhost_net *net) size_t len, total_len = 0; int err;...
2014 Aug 17
0
[PATCH net-next] vhost_net: stop rx net polling when possible
...t.c > +++ b/drivers/vhost/net.c > @@ -334,6 +334,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > static void handle_tx(struct vhost_net *net) > { > struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX]; > + struct vhost_virtqueue *rx_vq = &net->vqs[VHOST_NET_VQ_RX].vq; > + struct vhost_poll *rx_poll = &net->poll[VHOST_NET_VQ_RX]; > struct vhost_virtqueue *vq = &nvq->vq; > unsigned out, in, s; > int head; > @@ -348,15 +350,18 @@ static void handle_tx(struct vhost_net *net) > size_t len...
2016 Dec 07
0
[PATCH v2 3/4] vsock: add pkt cancel capability
...list_move(&pkt->list, &freeme); + } + spin_unlock_bh(&vsock->send_pkt_list_lock); + + list_for_each_entry_safe(pkt, n, &freeme, list) { + if (pkt->reply) + cnt++; + list_del(&pkt->list); + virtio_transport_free_pkt(pkt); + } + + if (cnt) { + struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX]; + int new_cnt; + + new_cnt = atomic_sub_return(cnt, &vsock->queued_replies); + if (new_cnt + cnt >= virtqueue_get_vring_size(rx_vq) && + new_cnt < virtqueue_get_vring_size(rx_vq)) + queue_work(virtio_vsock_workqueue, &vsock->rx_wor...
2016 Dec 08
0
[PATCH v3 3/4] vsock: add pkt cancel capability
...list_move(&pkt->list, &freeme); + } + spin_unlock_bh(&vsock->send_pkt_list_lock); + + list_for_each_entry_safe(pkt, n, &freeme, list) { + if (pkt->reply) + cnt++; + list_del(&pkt->list); + virtio_transport_free_pkt(pkt); + } + + if (cnt) { + struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX]; + int new_cnt; + + new_cnt = atomic_sub_return(cnt, &vsock->queued_replies); + if (new_cnt + cnt >= virtqueue_get_vring_size(rx_vq) && + new_cnt < virtqueue_get_vring_size(rx_vq)) + queue_work(virtio_vsock_workqueue, &vsock->rx_wor...
2016 Dec 12
0
[PATCH v4 3/4] vsock: add pkt cancel capability
...list_move(&pkt->list, &freeme); + } + spin_unlock_bh(&vsock->send_pkt_list_lock); + + list_for_each_entry_safe(pkt, n, &freeme, list) { + if (pkt->reply) + cnt++; + list_del(&pkt->list); + virtio_transport_free_pkt(pkt); + } + + if (cnt) { + struct virtqueue *rx_vq = vsock->vqs[VSOCK_VQ_RX]; + int new_cnt; + + new_cnt = atomic_sub_return(cnt, &vsock->queued_replies); + if (new_cnt + cnt >= virtqueue_get_vring_size(rx_vq) && + new_cnt < virtqueue_get_vring_size(rx_vq)) + queue_work(virtio_vsock_workqueue, &vsock->rx_wor...
2012 Jun 25
4
[RFC V2 PATCH 0/4] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2012 Jun 25
4
[RFC V2 PATCH 0/4] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2008 Jan 09
2
[PATCH] Increase the tx queue to 512 descriptors to fix performance problem.
...irtio-net.c index 777fe2c..3d07b65 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -293,7 +293,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) n->vdev.update_config = virtio_net_update_config; n->vdev.get_features = virtio_net_get_features; n->rx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_rx); - n->tx_vq = virtio_add_queue(&n->vdev, 128, virtio_net_handle_tx); + n->tx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_tx); n->can_receive = 0; memcpy(n->mac, nd->macaddr, 6);...
2008 Jan 09
2
[PATCH] Increase the tx queue to 512 descriptors to fix performance problem.
...irtio-net.c index 777fe2c..3d07b65 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -293,7 +293,7 @@ void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) n->vdev.update_config = virtio_net_update_config; n->vdev.get_features = virtio_net_get_features; n->rx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_rx); - n->tx_vq = virtio_add_queue(&n->vdev, 128, virtio_net_handle_tx); + n->tx_vq = virtio_add_queue(&n->vdev, 512, virtio_net_handle_tx); n->can_receive = 0; memcpy(n->mac, nd->macaddr, 6);...
2012 Jul 06
5
[RFC V3 0/5] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2012 Jul 06
5
[RFC V3 0/5] Multiqueue support for tap and virtio-net/vhost
Hello all: This seires is an update of last version of multiqueue support to add multiqueue capability to both tap and virtio-net. Some kinds of tap backends has (macvatp in linux) or would (tap) support multiqueue. In such kind of tap backend, each file descriptor of a tap is a qeueu and ioctls were prodived to attach an exist tap file descriptor to the tun/tap device. So the patch let qemu to
2016 Dec 12
3
[PATCH v4 2/4] vhost-vsock: add pkt cancel capability
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index a504e2e0..fef8808 100644 ---
2016 Dec 12
3
[PATCH v4 2/4] vhost-vsock: add pkt cancel capability
To allow canceling all packets of a connection. Reviewed-by: Stefan Hajnoczi <stefanha at redhat.com> Signed-off-by: Peng Tao <bergwolf at gmail.com> --- drivers/vhost/vsock.c | 41 +++++++++++++++++++++++++++++++++++++++++ include/net/af_vsock.h | 3 +++ 2 files changed, 44 insertions(+) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index a504e2e0..fef8808 100644 ---
2016 Dec 07
0
[PATCH 3/4] vsock: add pkt cancel capability
...virtio_transport_free_pkt(pkt); > + } > + atomic_sub(cnt, &vsock->queued_replies); If we stopped rx because there were too many replies in flight then we might be able to resume rx now: /* Do we now have resources to resume rx processing? */ if (old_val >= virtqueue_get_vring_size(rx_vq) && new_val < virtqueue_get_vring_size(rx_vq)) queue_work(virtio_vsock_workqueue, &vsock->rx_work); -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: not available URL: <h...
2016 Dec 07
1
[PATCH 3/4] vsock: add pkt cancel capability
Signed-off-by: Peng Tao <bergwolf at gmail.com> --- net/vmw_vsock/virtio_transport.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index 936d7ee..f88b6ed 100644 --- a/net/vmw_vsock/virtio_transport.c +++ b/net/vmw_vsock/virtio_transport.c @@ -170,6 +170,41 @@