search for: vhost_net_init

Displaying 20 results from an estimated 53 matches for "vhost_net_init".

2012 Jan 11
5
[PATCH] vhost-net: add module alias
...2 -0800 @@ -856,9 +856,9 @@ static const struct file_operations vhos }; static struct miscdevice vhost_net_misc = { - MISC_DYNAMIC_MINOR, - "vhost-net", - &vhost_net_fops, + .minor = VHOST_NET_MINOR, + .name = "vhost-net", + .fops = &vhost_net_fops, }; static int vhost_net_init(void) @@ -879,3 +879,5 @@ MODULE_VERSION("0.0.1"); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Michael S. Tsirkin"); MODULE_DESCRIPTION("Host kernel accelerator for virtio net"); +MODULE_ALIAS_MISCDEV(VHOST_NET_MINOR); +MODULE_ALIAS("devname:vhost-net&qu...
2012 Jan 11
5
[PATCH] vhost-net: add module alias
...2 -0800 @@ -856,9 +856,9 @@ static const struct file_operations vhos }; static struct miscdevice vhost_net_misc = { - MISC_DYNAMIC_MINOR, - "vhost-net", - &vhost_net_fops, + .minor = VHOST_NET_MINOR, + .name = "vhost-net", + .fops = &vhost_net_fops, }; static int vhost_net_init(void) @@ -879,3 +879,5 @@ MODULE_VERSION("0.0.1"); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Michael S. Tsirkin"); MODULE_DESCRIPTION("Host kernel accelerator for virtio net"); +MODULE_ALIAS_MISCDEV(VHOST_NET_MINOR); +MODULE_ALIAS("devname:vhost-net&qu...
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...<< VIRTIO_NET_F_MRG_RXBUF); + vnet_hdr_sz = sizeof(struct virtio_net_hdr_mrg_rxbuf); + } +#ifdef TUNSETVNETHDRSZ + if (ioctl(vhost_net_get_fd(net->vc), TUNSETVNETHDRSZ, &vnet_hdr_sz) < 0) + perror("TUNSETVNETHDRSZ"); +#endif /* TUNSETVNETHDRSZ */ +} + struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd) { int r; diff -ruNp qemu-kvm.mst/hw/virtio-net.c qemu-kvm.dls/hw/virtio-net.c --- qemu-kvm.mst/hw/virtio-net.c 2010-03-03 13:39:07.000000000 -0800 +++ qemu-kvm.dls/hw/virtio-net.c 2010-03-29 16:15:46.000000000 -0700 @@ -211,12 +211,16 @@ static void virtio_ne...
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...<< VIRTIO_NET_F_MRG_RXBUF); + vnet_hdr_sz = sizeof(struct virtio_net_hdr_mrg_rxbuf); + } +#ifdef TUNSETVNETHDRSZ + if (ioctl(vhost_net_get_fd(net->vc), TUNSETVNETHDRSZ, &vnet_hdr_sz) < 0) + perror("TUNSETVNETHDRSZ"); +#endif /* TUNSETVNETHDRSZ */ +} + struct vhost_net *vhost_net_init(VLANClientState *backend, int devfd) { int r; diff -ruNp qemu-kvm.mst/hw/virtio-net.c qemu-kvm.dls/hw/virtio-net.c --- qemu-kvm.mst/hw/virtio-net.c 2010-03-03 13:39:07.000000000 -0800 +++ qemu-kvm.dls/hw/virtio-net.c 2010-03-29 16:15:46.000000000 -0700 @@ -211,12 +211,16 @@ static void virtio_ne...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...ioctl(hdev->control, VHOST_SET_MEM_TABLE, mem); + if (r < 0) + return -errno; + + for (i = 0; i < hdev->nvqs; ++i) { + r = vhost_virtqueue_init(hdev, + vdev, + hdev->vqs + i, + vdev->vq + i, + i); + if (r < 0) + return r; + } + + return 0; +} + +int vhost_net_init(struct vhost_net *net, + VirtIODevice *dev, + char *vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->vqs; + r = vhost_dev_init(&net->dev, d...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...ioctl(hdev->control, VHOST_SET_MEM_TABLE, mem); + if (r < 0) + return -errno; + + for (i = 0; i < hdev->nvqs; ++i) { + r = vhost_virtqueue_init(hdev, + vdev, + hdev->vqs + i, + vdev->vq + i, + i); + if (r < 0) + return r; + } + + return 0; +} + +int vhost_net_init(struct vhost_net *net, + VirtIODevice *dev, + char *vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->vqs; + r = vhost_dev_init(&net->dev, d...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...ioctl(hdev->control, VHOST_SET_MEM_TABLE, mem); + if (r < 0) + return -errno; + + for (i = 0; i < hdev->nvqs; ++i) { + r = vhost_virtqueue_init(hdev, + vdev, + hdev->vqs + i, + vdev->vq + i, + i); + if (r < 0) + return r; + } + + return 0; +} + +int vhost_net_init(struct vhost_net *net, + VirtIODevice *dev, + char *vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->vqs; + r = vhost_dev_init(&net->dev, d...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...ioctl(hdev->control, VHOST_SET_MEM_TABLE, mem); + if (r < 0) + return -errno; + + for (i = 0; i < hdev->nvqs; ++i) { + r = vhost_virtqueue_init(hdev, + vdev, + hdev->vqs + i, + vdev->vq + i, + i); + if (r < 0) + return r; + } + + return 0; +} + +int vhost_net_init(struct vhost_net *net, + VirtIODevice *dev, + char *vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->vqs; + r = vhost_dev_init(&net->dev, d...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...ioctl(hdev->control, VHOST_SET_MEM_TABLE, mem); + if (r < 0) + return -errno; + + for (i = 0; i < hdev->nvqs; ++i) { + r = vhost_virtqueue_init(hdev, + vdev, + hdev->vqs + i, + vdev->vq + i, + i); + if (r < 0) + return r; + } + + return 0; +} + +int vhost_net_init(struct vhost_net *net, + VirtIODevice *dev, + char *vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->vqs; + r = vhost_dev_init(&net->dev, d...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...ioctl(hdev->control, VHOST_SET_MEM_TABLE, mem); + if (r < 0) + return -errno; + + for (i = 0; i < hdev->nvqs; ++i) { + r = vhost_virtqueue_init(hdev, + vdev, + hdev->vqs + i, + vdev->vq + i, + i); + if (r < 0) + return r; + } + + return 0; +} + +int vhost_net_init(struct vhost_net *net, + VirtIODevice *dev, + char *vhost_device) +{ + struct sockaddr_ll lladdr; + struct ifreq req; + int r; + const char *ifname = vhost_device; + if (!ifname) + return 0; + + net->dev.nvqs = 2; + net->dev.vqs = net->vqs; + r = vhost_dev_init(&net->dev, d...
2011 Jul 18
1
[PATCHv11] vhost: vhost TX zero-copy support
...,8 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) mutex_unlock(&n->dev.mutex); return 0; +err_ubufs: + fput(sock->file); err_vq: mutex_unlock(&vq->mutex); err: @@ -776,6 +849,8 @@ static struct miscdevice vhost_net_misc = { static int vhost_net_init(void) { + if (experimental_zcopytx) + vhost_enable_zcopy(VHOST_NET_VQ_TX); return misc_register(&vhost_net_misc); } module_init(vhost_net_init); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index ea966b3..5ef2f62 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c...
2011 Jul 18
1
[PATCHv11] vhost: vhost TX zero-copy support
...,8 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) mutex_unlock(&n->dev.mutex); return 0; +err_ubufs: + fput(sock->file); err_vq: mutex_unlock(&vq->mutex); err: @@ -776,6 +849,8 @@ static struct miscdevice vhost_net_misc = { static int vhost_net_init(void) { + if (experimental_zcopytx) + vhost_enable_zcopy(VHOST_NET_VQ_TX); return misc_register(&vhost_net_misc); } module_init(vhost_net_init); diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index ea966b3..5ef2f62 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...ckend); + 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(stderr, "vhost requires raw socket or tap backend\n"); + return -EBADFD; +} + +int vhost_net_init(struct vhost_net *net, VLANClientState *backend) +{ + int r; + + if (!backend) { + fprintf(stderr, "vhost requires backend to be setup\n"); + return -EINVAL; + } + r = vhost_net_get_fd(backend, &net->dev.backend_features); + if (r < 0) + return r; + net->backend = r; + + r...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...ckend); + 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(stderr, "vhost requires raw socket or tap backend\n"); + return -EBADFD; +} + +int vhost_net_init(struct vhost_net *net, VLANClientState *backend) +{ + int r; + + if (!backend) { + fprintf(stderr, "vhost requires backend to be setup\n"); + return -EINVAL; + } + r = vhost_net_get_fd(backend, &net->dev.backend_features); + if (r < 0) + return r; + net->backend = r; + + r...
2009 Aug 19
1
[PATCHv4 2/2] vhost_net: a kernel-level virtio server
...= vhost_net_release, + .unlocked_ioctl = vhost_net_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = vhost_net_compat_ioctl, +#endif + .open = vhost_net_open, +}; + +static struct miscdevice vhost_net_misc = { + VHOST_NET_MINOR, + "vhost-net", + &vhost_net_fops, +}; + +int vhost_net_init(void) +{ + int r = vhost_init(); + if (r) + goto err_init; + r = misc_register(&vhost_net_misc); + if (r) + goto err_reg; + return 0; +err_reg: + vhost_cleanup(); +err_init: + return r; + +} +module_init(vhost_net_init); + +void vhost_net_exit(void) +{ + misc_deregister(&vhost_net_misc);...
2009 Aug 19
1
[PATCHv4 2/2] vhost_net: a kernel-level virtio server
...= vhost_net_release, + .unlocked_ioctl = vhost_net_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = vhost_net_compat_ioctl, +#endif + .open = vhost_net_open, +}; + +static struct miscdevice vhost_net_misc = { + VHOST_NET_MINOR, + "vhost-net", + &vhost_net_fops, +}; + +int vhost_net_init(void) +{ + int r = vhost_init(); + if (r) + goto err_init; + r = misc_register(&vhost_net_misc); + if (r) + goto err_reg; + return 0; +err_reg: + vhost_cleanup(); +err_init: + return r; + +} +module_init(vhost_net_init); + +void vhost_net_exit(void) +{ + misc_deregister(&vhost_net_misc);...
2012 Aug 13
27
[RFC-v2 0/6] vhost-scsi: Add support for host virtualized target
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi Paolo, Stefan, & QEMU folks, The following is the second RFC series for vhost-scsi patches against mainline QEMU v1.1.0. The series is available from the following working branch: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git vhost-scsi-merge Apologies for the delayed follow-up on this series. The changes detailed
2012 Aug 13
27
[RFC-v2 0/6] vhost-scsi: Add support for host virtualized target
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi Paolo, Stefan, & QEMU folks, The following is the second RFC series for vhost-scsi patches against mainline QEMU v1.1.0. The series is available from the following working branch: git://git.kernel.org/pub/scm/virt/kvm/nab/qemu-kvm.git vhost-scsi-merge Apologies for the delayed follow-up on this series. The changes detailed
2009 Aug 11
2
[PATCHv2 2/2] vhost_net: a kernel-level virtio server
...ations vhost_net_fops = { + .owner = THIS_MODULE, + .release = vhost_net_release, + .unlocked_ioctl = vhost_net_ioctl, + .open = vhost_net_open, +}; + +static struct miscdevice vhost_net_misc = { + VHOST_NET_MINOR, + "vhost-net", + &vhost_net_fops, +}; + +int vhost_net_init(void) +{ + int r = vhost_init(); + if (r) + goto err_init; + r = misc_register(&vhost_net_misc); + if (r) + goto err_reg; + return 0; +err_reg: + vhost_cleanup(); +err_init: + return r; + +} +module_init(vhost_net_init); + +void vhost_net_exit(void) +{ + misc_deregister(&vhost_net_misc);...
2009 Aug 11
2
[PATCHv2 2/2] vhost_net: a kernel-level virtio server
...ations vhost_net_fops = { + .owner = THIS_MODULE, + .release = vhost_net_release, + .unlocked_ioctl = vhost_net_ioctl, + .open = vhost_net_open, +}; + +static struct miscdevice vhost_net_misc = { + VHOST_NET_MINOR, + "vhost-net", + &vhost_net_fops, +}; + +int vhost_net_init(void) +{ + int r = vhost_init(); + if (r) + goto err_init; + r = misc_register(&vhost_net_misc); + if (r) + goto err_reg; + return 0; +err_reg: + vhost_cleanup(); +err_init: + return r; + +} +module_init(vhost_net_init); + +void vhost_net_exit(void) +{ + misc_deregister(&vhost_net_misc);...