Displaying 16 results from an estimated 16 matches for "virtio_net_handle_rx".
2008 Jan 09
2
[PATCH] Increase the tx queue to 512 descriptors to fix performance problem.
.../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);
n->vc = qemu_new_vlan_client(nd->vlan, virtio_net_rec...
2008 Jan 09
2
[PATCH] Increase the tx queue to 512 descriptors to fix performance problem.
.../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);
n->vc = qemu_new_vlan_client(nd->vlan, virtio_net_rec...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...et *n = to_virtio_net(vdev);
+ struct virtio_net_config netcfg;
+
+ memcpy(netcfg.mac, n->mac, 6);
+ memcpy(config, &netcfg, sizeof(netcfg));
+}
+
+static uint32_t virtio_net_get_features(VirtIODevice *vdev)
+{
+ return (1 << VIRTIO_NET_F_MAC);
+}
+
+/* RX */
+
+static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
+{
+ VirtIONet *n = to_virtio_net(vdev);
+ n->can_receive = 1;
+}
+
+static int virtio_net_can_receive(void *opaque)
+{
+ VirtIONet *n = opaque;
+
+ return (n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK) && n->can_receive;
+}
+
+stati...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...et *n = to_virtio_net(vdev);
+ struct virtio_net_config netcfg;
+
+ memcpy(netcfg.mac, n->mac, 6);
+ memcpy(config, &netcfg, sizeof(netcfg));
+}
+
+static uint32_t virtio_net_get_features(VirtIODevice *vdev)
+{
+ return (1 << VIRTIO_NET_F_MAC);
+}
+
+/* RX */
+
+static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
+{
+ VirtIONet *n = to_virtio_net(vdev);
+ n->can_receive = 1;
+}
+
+static int virtio_net_can_receive(void *opaque)
+{
+ VirtIONet *n = opaque;
+
+ return (n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK) && n->can_receive;
+}
+
+stati...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...tures(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = to_virtio_net(vdev);
+ /* vhost net supports no features */
+ if (n->vhost_device)
+ return;
#ifdef TAP_VNET_HDR
VLANClientState *host = n->vc->vlan->first_client;
#endif
@@ -351,6 +361,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +424,7 @@...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...tures(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = to_virtio_net(vdev);
+ /* vhost net supports no features */
+ if (n->vhost_device)
+ return;
#ifdef TAP_VNET_HDR
VLANClientState *host = n->vc->vlan->first_client;
#endif
@@ -351,6 +361,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +424,7 @@...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...tures(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = to_virtio_net(vdev);
+ /* vhost net supports no features */
+ if (n->vhost_device)
+ return;
#ifdef TAP_VNET_HDR
VLANClientState *host = n->vc->vlan->first_client;
#endif
@@ -351,6 +361,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +424,7 @@...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...tures(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = to_virtio_net(vdev);
+ /* vhost net supports no features */
+ if (n->vhost_device)
+ return;
#ifdef TAP_VNET_HDR
VLANClientState *host = n->vc->vlan->first_client;
#endif
@@ -351,6 +361,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +424,7 @@...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...tures(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = to_virtio_net(vdev);
+ /* vhost net supports no features */
+ if (n->vhost_device)
+ return;
#ifdef TAP_VNET_HDR
VLANClientState *host = n->vc->vlan->first_client;
#endif
@@ -351,6 +361,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +424,7 @@...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...tures(VirtIODevice *vdev, uint32_t features)
{
VirtIONet *n = to_virtio_net(vdev);
+ /* vhost net supports no features */
+ if (n->vhost_device)
+ return;
#ifdef TAP_VNET_HDR
VLANClientState *host = n->vc->vlan->first_client;
#endif
@@ -351,6 +361,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +424,7 @@...
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
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...n->mergeable_rx_bufs = !!(features & (1 << VIRTIO_NET_F_MRG_RXBUF));
+ if (n->vhost_device) {
+ vhost_net_ack_features(&n->vhost, features);
+ }
#ifdef TAP_VNET_HDR
if (!tap_has_vnet_hdr(host) || !host->set_offload)
@@ -351,6 +364,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +427,7 @@...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...n->mergeable_rx_bufs = !!(features & (1 << VIRTIO_NET_F_MRG_RXBUF));
+ if (n->vhost_device) {
+ vhost_net_ack_features(&n->vhost, features);
+ }
#ifdef TAP_VNET_HDR
if (!tap_has_vnet_hdr(host) || !host->set_offload)
@@ -351,6 +364,9 @@ static void virtio_net_handle_rx(VirtIODevice *vdev, VirtQueue *vq)
static int do_virtio_net_can_receive(VirtIONet *n, int bufsize)
{
+ if (n->vhost_device)
+ return 0;
+
if (!virtio_queue_ready(n->rx_vq) ||
!(n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK))
return 0;
@@ -411,6 +427,7 @@...
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