search for: to_virtio_net

Displaying 20 results from an estimated 32 matches for "to_virtio_net".

2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...8_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); + struct virtio_net_config netcfg; + + memcpy(netcfg.mac, n->mac, 6); + memcpy(config, &netcfg, sizeof(ne...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 2/7] userspace virtio
...8_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); + struct virtio_net_config netcfg; + + memcpy(netcfg.mac, n->mac, 6); + memcpy(config, &netcfg, sizeof(ne...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
.../* TODO @@ -134,9 +138,12 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) (1 << VIRTIO_NET_F_CTRL_RX) | (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_featur...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
.../* TODO @@ -134,9 +138,12 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) (1 << VIRTIO_NET_F_CTRL_RX) | (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_featur...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
.../* TODO @@ -134,9 +138,12 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) (1 << VIRTIO_NET_F_CTRL_RX) | (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_featur...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
.../* TODO @@ -134,9 +138,12 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) (1 << VIRTIO_NET_F_CTRL_RX) | (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_featur...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
.../* TODO @@ -134,9 +138,12 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) (1 << VIRTIO_NET_F_CTRL_RX) | (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_featur...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
.../* TODO @@ -134,9 +138,12 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) (1 << VIRTIO_NET_F_CTRL_RX) | (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_featur...
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
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
...- (1 << VIRTIO_NET_F_CTRL_VQ) | - (1 << VIRTIO_NET_F_CTRL_RX) | - (1 << VIRTIO_NET_F_CTRL_VLAN) | - (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + uint32_t features = 0; + VirtIONet *n = to_virtio_net(vdev); #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -149,12 +147,23 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) features |= (1 << VIRTIO_NET_...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...- (1 << VIRTIO_NET_F_CTRL_VQ) | - (1 << VIRTIO_NET_F_CTRL_RX) | - (1 << VIRTIO_NET_F_CTRL_VLAN) | - (1 << VIRTIO_NET_F_CTRL_RX_EXTRA); + uint32_t features = 0; + VirtIONet *n = to_virtio_net(vdev); #ifdef TAP_VNET_HDR - VirtIONet *n = to_virtio_net(vdev); VLANClientState *host = n->vc->vlan->first_client; if (tap_has_vnet_hdr(host)) { @@ -149,12 +147,23 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev) features |= (1 << VIRTIO_NET_...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
.../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 *opaque) return (n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK) && n->can_receive; } -static void virtio_net_receive(void *opaque, const uint8_t *buf, int size) +...
2007 Dec 21
2
[Virtio-for-kvm] [PATCH 7/7] userspace virtio
.../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 *opaque) return (n->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK) && n->can_receive; } -static void virtio_net_receive(void *opaque, const uint8_t *buf, int size) +...
2013 Mar 27
3
[PATCH 0/2] virtio-spec: dynamic network offloads configuration
From: Dmitry Fleytman <dfleytma at redhat.com> One of recently introduced Windows features (RSC) requires network driver to be able to enable and disable HW LRO offload on the fly without device reinitialization. Current Virtio specification doesn't support this requirement. The solution proposed by following spec patch is to add a new control command for this purpose. The same
2013 Mar 27
3
[PATCH 0/2] virtio-spec: dynamic network offloads configuration
From: Dmitry Fleytman <dfleytma at redhat.com> One of recently introduced Windows features (RSC) requires network driver to be able to enable and disable HW LRO offload on the fly without device reinitialization. Current Virtio specification doesn't support this requirement. The solution proposed by following spec patch is to add a new control command for this purpose. The same
2013 Apr 02
3
[PATCH 0/2 V3] virtio-spec/net: dynamic network offloads configuration
From: Dmitry Fleytman <dfleytma at redhat.com> V3 changes: 1. Compat macro added 2. Feature name beautification V2 changes: 1. _GUEST_ added to command and feature names 2. Live migration logic fixed Reported-by: Michael S. Tsirkin <mst at redhat.com> One of recently introduced Windows features (RSC) requires network driver to be able to enable and disable HW LRO offload on
2013 Apr 02
3
[PATCH 0/2 V3] virtio-spec/net: dynamic network offloads configuration
From: Dmitry Fleytman <dfleytma at redhat.com> V3 changes: 1. Compat macro added 2. Feature name beautification V2 changes: 1. _GUEST_ added to command and feature names 2. Live migration logic fixed Reported-by: Michael S. Tsirkin <mst at redhat.com> One of recently introduced Windows features (RSC) requires network driver to be able to enable and disable HW LRO offload on