search for: virtio_net_get_features

Displaying 20 results from an estimated 60 matches for "virtio_net_get_features".

2008 Jan 09
2
[PATCH] Increase the tx queue to 512 descriptors to fix performance problem.
...t a/qemu/hw/virtio-net.c b/qemu/hw/virtio-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-&...
2008 Jan 09
2
[PATCH] Increase the tx queue to 512 descriptors to fix performance problem.
...t a/qemu/hw/virtio-net.c b/qemu/hw/virtio-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-&...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...eturn (VirtIONet *)vdev; +} + +static void virtio_net_update_config(VirtIODevice *vdev, uint8_t *config) +{ + VirtIONet *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...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...eturn (VirtIONet *)vdev; +} + +static void virtio_net_update_config(VirtIODevice *vdev, uint8_t *config) +{ + VirtIONet *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...
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) { return features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1e214b5..fcfc95f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && !get_vhost_net(nc->peer)) { + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) {...
2014 Nov 26
0
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...- 32)); > + } > + > if (index > 0) { > return features; > } > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 1e214b5..fcfc95f 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, > VirtIONet *n = VIRTIO_NET(vdev); > NetClientState *nc = qemu_get_queue(n->nic); > > + if (index == 1 && !get_vhost_net(nc->peer)) { > + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); > + } > +...
2014 Dec 11
0
[PATCH RFC v6 17/20] virtio-net: enable virtio 1.0
...d-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7ee2bd6..b5dd356 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -473,6 +473,7 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features) } if (!get_vhost_net(nc->peer)) { + virtio_add_feature(&features, VIRTIO_F_VERSION_1); return features; } return vhost_net_get_features(get_vhost_net(nc->peer), features); -- 1.7.9.5
2014 Dec 16
1
[PATCH RFC v6 17/20] virtio-net: enable virtio 1.0
...f not there. > --- > hw/net/virtio-net.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 7ee2bd6..b5dd356 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -473,6 +473,7 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features) > } > > if (!get_vhost_net(nc->peer)) { > + virtio_add_feature(&features, VIRTIO_F_VERSION_1); > return features; > } > return vhost_net_get_features(get_vhost_net(nc->peer), features); >...
2014 Nov 26
1
[PATCH RFC v3 11/12] virtio-net/virtio-blk: enable virtio 1.0
...features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) { return features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 1e214b5..fcfc95f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,10 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && !get_vhost_net(nc->peer)) { + features |= (1 << (VIRTIO_F_VERSION_1 - 32)); + } + if (index > 0) {...
2014 Dec 11
0
[PATCH RFC v6 17/20] virtio-net: enable virtio 1.0
...d-off-by: Cornelia Huck <cornelia.huck at de.ibm.com> --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7ee2bd6..b5dd356 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -473,6 +473,7 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features) } if (!get_vhost_net(nc->peer)) { + virtio_add_feature(&features, VIRTIO_F_VERSION_1); return features; } return vhost_net_get_features(get_vhost_net(nc->peer), features); -- 1.7.9.5
2014 Dec 16
1
[PATCH RFC v6 17/20] virtio-net: enable virtio 1.0
...f not there. > --- > hw/net/virtio-net.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 7ee2bd6..b5dd356 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -473,6 +473,7 @@ static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features) > } > > if (!get_vhost_net(nc->peer)) { > + virtio_add_feature(&features, VIRTIO_F_VERSION_1); > return features; > } > return vhost_net_get_features(get_vhost_net(nc->peer), features); >...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 67f91c0..4b75105 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && get_vhost_net(nc->peer)) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) {...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 67f91c0..4b75105 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -447,6 +447,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index == 1 && get_vhost_net(nc->peer)) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) {...
2014 Dec 02
0
[PATCH RFC v5 05/19] virtio: support more feature bits
...RTIO_NET_F_MQ, + {.flags = 1ULL << VIRTIO_NET_F_MQ, .end = endof(struct virtio_net_config, max_virtqueue_pairs)}, {} }; @@ -441,7 +441,7 @@ static void virtio_net_set_queues(VirtIONet *n) static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue); -static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) +static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features) { VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); @@ -471,9 +471,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32...
2014 Dec 02
0
[PATCH RFC v5 05/19] virtio: support more feature bits
...RTIO_NET_F_MQ, + {.flags = 1ULL << VIRTIO_NET_F_MQ, .end = endof(struct virtio_net_config, max_virtqueue_pairs)}, {} }; @@ -441,7 +441,7 @@ static void virtio_net_set_queues(VirtIONet *n) static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue); -static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) +static uint64_t virtio_net_get_features(VirtIODevice *vdev, uint64_t features) { VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); @@ -471,9 +471,9 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32...
2009 Aug 10
1
[PATCH] qemu/virtio: move features to an inline function
..._console_get_features(VirtIODevice *vdev) { - return 0; + return virtio_common_features(); } static int vcon_can_read(void *opaque) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index ef9e7ff..2e51a6a 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -154,7 +154,7 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) } #endif - return features; + return features | virtio_common_features(); } static uint32_t virtio_net_bad_features(VirtIODevice *vdev) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 3b9bfd1..90f51be 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -...
2009 Aug 10
1
[PATCH] qemu/virtio: move features to an inline function
..._console_get_features(VirtIODevice *vdev) { - return 0; + return virtio_common_features(); } static int vcon_can_read(void *opaque) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index ef9e7ff..2e51a6a 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -154,7 +154,7 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) } #endif - return features; + return features | virtio_common_features(); } static uint32_t virtio_net_bad_features(VirtIODevice *vdev) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 3b9bfd1..90f51be 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -...
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...est_features[0])) { info->vlan = RX_STATE_ALL; } else if (!info->vlan_table) { info->vlan = RX_STATE_NONE; @@ -441,11 +441,16 @@ static void virtio_net_set_queues(VirtIONet *n) static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue); -static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) +static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, + uint32_t features) { VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index > 0)...
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...est_features[0])) { info->vlan = RX_STATE_ALL; } else if (!info->vlan_table) { info->vlan = RX_STATE_NONE; @@ -441,11 +441,16 @@ static void virtio_net_set_queues(VirtIONet *n) static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue); -static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features) +static uint32_t virtio_net_get_features(VirtIODevice *vdev, unsigned int index, + uint32_t features) { VirtIONet *n = VIRTIO_NET(vdev); NetClientState *nc = qemu_get_queue(n->nic); + if (index > 0)...
2009 Nov 02
1
[PATCHv4 1/6] qemu/virtio: move features to an inline function
..._console_get_features(VirtIODevice *vdev) { - return 0; + return virtio_common_features(); } static int vcon_can_read(void *opaque) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index ce8e6cb..469c6e3 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -154,7 +154,7 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) } #endif - return features; + return features | virtio_common_features(); } static uint32_t virtio_net_bad_features(VirtIODevice *vdev) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 01782e5..0716f6f 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -...