search for: vlanclientstate

Displaying 20 results from an estimated 29 matches for "vlanclientstate".

2012 Jun 25
4
[RFC V2 PATCH 0/4] Multiqueue support for tap and virtio-net/vhost
...le file descriptors to a signle netdev by: qemu -netdev tap,id=hn0,fd=10,fd=11,... Patch 2 introduce generic helpers in tap to attach or detach a file descriptor from a tap device, emulated nics could use this helper to enable/disable queues. Patch 3 modifies the NICState to allow multiple VLANClientState to be stored in it, with this patch, qemu has basic support of multiple capable tap backend. Patch 4 converts virtio-net/vhost to be multiple capable. The vhost device were created per tx/rx queue pairs as usual. Changes from V1: - rebase to the latest - fix memory leak in parse_netdev - fix gue...
2012 Jun 25
4
[RFC V2 PATCH 0/4] Multiqueue support for tap and virtio-net/vhost
...le file descriptors to a signle netdev by: qemu -netdev tap,id=hn0,fd=10,fd=11,... Patch 2 introduce generic helpers in tap to attach or detach a file descriptor from a tap device, emulated nics could use this helper to enable/disable queues. Patch 3 modifies the NICState to allow multiple VLANClientState to be stored in it, with this patch, qemu has basic support of multiple capable tap backend. Patch 4 converts virtio-net/vhost to be multiple capable. The vhost device were created per tx/rx queue pairs as usual. Changes from V1: - rebase to the latest - fix memory leak in parse_netdev - fix gue...
2012 Jul 06
5
[RFC V3 0/5] Multiqueue support for tap and virtio-net/vhost
...descriptors to a signle netdev by: qemu -netdev tap,id=h0,queues=2,fd=10,fd=11 ... Patch 2 introduce generic helpers in tap to attach or detach a file descriptor from a tap device, emulated nics could use this helper to enable/disable queues. Patch 3 modifies the NICState to allow multiple VLANClientState to be stored in it, with this patch, qemu has basic support of multiple capable tap backend. Patch 4 implement 1:1 mapping of tx/rx virtqueue pairs with vhost_net backend. Patch 5 converts virtio-net to multiqueue device, after this patch, multiqueue virtio-net device could be specified by:...
2012 Jul 06
5
[RFC V3 0/5] Multiqueue support for tap and virtio-net/vhost
...descriptors to a signle netdev by: qemu -netdev tap,id=h0,queues=2,fd=10,fd=11 ... Patch 2 introduce generic helpers in tap to attach or detach a file descriptor from a tap device, emulated nics could use this helper to enable/disable queues. Patch 3 modifies the NICState to allow multiple VLANClientState to be stored in it, with this patch, qemu has basic support of multiple capable tap backend. Patch 4 implement 1:1 mapping of tx/rx virtqueue pairs with vhost_net backend. Patch 5 converts virtio-net to multiqueue device, after this patch, multiqueue virtio-net device could be specified by:...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...++++++++++++++++++++++++++++++++++++++++++++ qemu-options.hx | 4 + 3 files changed, 198 insertions(+), 1 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 469c6e3..2e51a6a 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -531,7 +531,8 @@ static ssize_t virtio_net_receive2(VLANClientState *vc, const uint8_t *buf, size virtqueue_pop(n->rx_vq, &elem) == 0) { if (i == 0) return -1; - fprintf(stderr, "virtio-net truncating packet\n"); + fprintf(stderr, "virtio-net truncating packet. offset %zd size %z...
2009 Nov 02
0
[PATCHv4 3/6] qemu/net: add raw backend
...++++++++++++++++++++++++++++++++++++++++++++ qemu-options.hx | 4 + 3 files changed, 198 insertions(+), 1 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 469c6e3..2e51a6a 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -531,7 +531,8 @@ static ssize_t virtio_net_receive2(VLANClientState *vc, const uint8_t *buf, size virtqueue_pop(n->rx_vq, &elem) == 0) { if (i == 0) return -1; - fprintf(stderr, "virtio-net truncating packet\n"); + fprintf(stderr, "virtio-net truncating packet. offset %zd size %z...
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...(features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) - net->dev.acked_features |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY); - if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) - net->dev.acked_features |= (1 << VIRTIO_RING_F_INDIRECT_DESC); -} - static int vhost_net_get_fd(VLANClientState *backend) { switch (backend->info->type) { @@ -58,6 +50,25 @@ static int vhost_net_get_fd(VLANClientSt } } +void vhost_net_ack_features(struct vhost_net *net, unsigned features) +{ + int vnet_hdr_sz = sizeof(struct virtio_net_hdr); + + net->dev.acked_features = net->dev.backend_...
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...(features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) - net->dev.acked_features |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY); - if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) - net->dev.acked_features |= (1 << VIRTIO_RING_F_INDIRECT_DESC); -} - static int vhost_net_get_fd(VLANClientState *backend) { switch (backend->info->type) { @@ -58,6 +50,25 @@ static int vhost_net_get_fd(VLANClientSt } } +void vhost_net_ack_features(struct vhost_net *net, unsigned features) +{ + int vnet_hdr_sz = sizeof(struct virtio_net_hdr); + + net->dev.acked_features = net->dev.backend_...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...dev.backend_features; + if (features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) + net->dev.acked_features |= VIRTIO_F_NOTIFY_ON_EMPTY; + if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) + net->dev.acked_features |= VIRTIO_RING_F_INDIRECT_DESC; +} + +static int vhost_net_get_fd(VLANClientState *backend, + unsigned long long *backend_features) +{ + int r; + r = raw_get_fd(backend); + if (r >= 0) { + *backend_features = (1 << VHOST_NET_F_VIRTIO_NET_HDR); + return r; + } + r = tap_get_fd(backend); + if (r >= 0) { + *backend_features = 0; + return r; + } + fprintf(stder...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...dev.backend_features; + if (features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) + net->dev.acked_features |= VIRTIO_F_NOTIFY_ON_EMPTY; + if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) + net->dev.acked_features |= VIRTIO_RING_F_INDIRECT_DESC; +} + +static int vhost_net_get_fd(VLANClientState *backend, + unsigned long long *backend_features) +{ + int r; + r = raw_get_fd(backend); + if (r >= 0) { + *backend_features = (1 << VHOST_NET_F_VIRTIO_NET_HDR); + return r; + } + r = tap_get_fd(backend); + if (r >= 0) { + *backend_features = 0; + return r; + } + fprintf(stder...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...virtio-blk.h */ void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index f6f1f28..b955a5e 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -60,8 +60,13 @@ typedef struct VirtIONet VirtQueue *tx_vq; VLANClientState *vc; int can_receive; + int tap_fd; + struct VirtIONet *next; + int do_notify; } VirtIONet; +static VirtIONet *VirtIONetHead = NULL; + static VirtIONet *to_virtio_net(VirtIODevice *vdev) { return (VirtIONet *)vdev; @@ -96,42 +101,81 @@ static int virtio_net_can_receive(void...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
...virtio-blk.h */ void *virtio_blk_init(PCIBus *bus, uint16_t vendor, uint16_t device, diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index f6f1f28..b955a5e 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -60,8 +60,13 @@ typedef struct VirtIONet VirtQueue *tx_vq; VLANClientState *vc; int can_receive; + int tap_fd; + struct VirtIONet *next; + int do_notify; } VirtIONet; +static VirtIONet *VirtIONetHead = NULL; + static VirtIONet *to_virtio_net(VirtIODevice *vdev) { return (VirtIONet *)vdev; @@ -96,42 +101,81 @@ static int virtio_net_can_receive(void...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...(1 << VIRTIO_NET_F_CTRL_VLAN) | (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + VirtIONet *n = to_virtio_net(vdev); + + if (n->vhost_device) + return 1 << VIRTIO_NET_F_MAC; #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -175,6 +182,9 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev) static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) { VirtIONet *n = to_virtio_net(vdev); + /* vhost net...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...(1 << VIRTIO_NET_F_CTRL_VLAN) | (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + VirtIONet *n = to_virtio_net(vdev); + + if (n->vhost_device) + return 1 << VIRTIO_NET_F_MAC; #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -175,6 +182,9 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev) static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) { VirtIONet *n = to_virtio_net(vdev); + /* vhost net...
2009 Nov 02
1
[PATCHv4 0/6] qemu-kvm: vhost net support
This adds support for vhost-net virtio kernel backend. This is not intented for merge. See vhost net patch description for details. This applies on top of commit 47e465f031fc43c53ea8f08fa55cc3482c6435c8 in Avi's tree. It won't apply to tree tip. TODO: rebase. The patchset also includes raw socket backend since I find it useful for testing vhost. When we get to merging, there's no
2009 Nov 02
1
[PATCHv4 0/6] qemu-kvm: vhost net support
This adds support for vhost-net virtio kernel backend. This is not intented for merge. See vhost net patch description for details. This applies on top of commit 47e465f031fc43c53ea8f08fa55cc3482c6435c8 in Avi's tree. It won't apply to tree tip. TODO: rebase. The patchset also includes raw socket backend since I find it useful for testing vhost. When we get to merging, there's no
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...(1 << VIRTIO_NET_F_CTRL_VLAN) | (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + VirtIONet *n = to_virtio_net(vdev); + + if (n->vhost_device) + return 1 << VIRTIO_NET_F_MAC; #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -175,6 +182,9 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev) static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) { VirtIONet *n = to_virtio_net(vdev); + /* vhost net...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...(1 << VIRTIO_NET_F_CTRL_VLAN) | (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + VirtIONet *n = to_virtio_net(vdev); + + if (n->vhost_device) + return 1 << VIRTIO_NET_F_MAC; #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -175,6 +182,9 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev) static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) { VirtIONet *n = to_virtio_net(vdev); + /* vhost net...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...(1 << VIRTIO_NET_F_CTRL_VLAN) | (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + VirtIONet *n = to_virtio_net(vdev); + + if (n->vhost_device) + return 1 << VIRTIO_NET_F_MAC; #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -175,6 +182,9 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev) static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) { VirtIONet *n = to_virtio_net(vdev); + /* vhost net...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...(1 << VIRTIO_NET_F_CTRL_VLAN) | (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + VirtIONet *n = to_virtio_net(vdev); + + if (n->vhost_device) + return 1 << VIRTIO_NET_F_MAC; #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -175,6 +182,9 @@ static uint32_t virtio_net_bad_features(VirtIODevice *vdev) static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) { VirtIONet *n = to_virtio_net(vdev); + /* vhost net...