search for: vhost_device

Displaying 20 results from an estimated 58 matches for "vhost_device".

2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...rn -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, dev); + if (r < 0) + return r; + + net->sock = socket(PF_PACKET, SO...
2009 Aug 17
1
[PATCHv3 3/4] qemu-kvm: vhost-net implementation
...rn -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, dev); + if (r < 0) + return r; + + net->sock = socket(PF_PACKET, SO...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...rn -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, dev); + if (r < 0) + return r; + + net->sock = socket(PF_PACKET, SO...
2009 Aug 13
0
[PATCHv2 3/3] qemu-kvm: vhost-net implementation
...rn -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, dev); + if (r < 0) + return r; + + net->sock = socket(PF_PACKET, SO...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...rn -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, dev); + if (r < 0) + return r; + + net->sock = socket(PF_PACKET, SO...
2009 Aug 10
0
[PATCH 3/3] qemu-kvm: vhost-net implementation
...rn -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, dev); + if (r < 0) + return r; + + net->sock = socket(PF_PACKET, SO...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...t.c +++ b/hw/virtio-net.c @@ -19,6 +19,8 @@ #include "qemu-kvm.h" #endif +#include "vhost_net.h" + #define TAP_VNET_HDR #define VIRTIO_NET_VM_VERSION 10 @@ -56,6 +58,8 @@ typedef struct VirtIONet uint8_t *macs; } mac_table; uint32_t *vlans; + int vhost_device; + struct vhost_net vhost; } VirtIONet; /* TODO @@ -127,16 +131,10 @@ static void virtio_net_reset(VirtIODevice *vdev) static uint32_t virtio_net_get_features(VirtIODevice *vdev) { - uint32_t features = (1 << VIRTIO_NET_F_MAC) | - (1 << VIRTIO_NET_F_...
2009 Nov 02
2
[PATCHv4 6/6] qemu-kvm: vhost-net implementation
...t.c +++ b/hw/virtio-net.c @@ -19,6 +19,8 @@ #include "qemu-kvm.h" #endif +#include "vhost_net.h" + #define TAP_VNET_HDR #define VIRTIO_NET_VM_VERSION 10 @@ -56,6 +58,8 @@ typedef struct VirtIONet uint8_t *macs; } mac_table; uint32_t *vlans; + int vhost_device; + struct vhost_net vhost; } VirtIONet; /* TODO @@ -127,16 +131,10 @@ static void virtio_net_reset(VirtIODevice *vdev) static uint32_t virtio_net_get_features(VirtIODevice *vdev) { - uint32_t features = (1 << VIRTIO_NET_F_MAC) | - (1 << VIRTIO_NET_F_...
2014 Nov 27
3
[PATCH net-next] vhost: remove unnecessary forward declarations in vhost.h
...vhost/vhost.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..7d039ef 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -12,8 +12,6 @@ #include <linux/virtio_ring.h> #include <linux/atomic.h> -struct vhost_device; - struct vhost_work; typedef void (*vhost_work_fn_t)(struct vhost_work *work); @@ -54,8 +52,6 @@ struct vhost_log { u64 len; }; -struct vhost_virtqueue; - /* The virtqueue structure describes a queue attached to a device. */ struct vhost_virtqueue { struct vhost_dev *dev; -- 1.9.1
2014 Nov 27
3
[PATCH net-next] vhost: remove unnecessary forward declarations in vhost.h
...vhost/vhost.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..7d039ef 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -12,8 +12,6 @@ #include <linux/virtio_ring.h> #include <linux/atomic.h> -struct vhost_device; - struct vhost_work; typedef void (*vhost_work_fn_t)(struct vhost_work *work); @@ -54,8 +52,6 @@ struct vhost_log { u64 len; }; -struct vhost_virtqueue; - /* The virtqueue structure describes a queue attached to a device. */ struct vhost_virtqueue { struct vhost_dev *dev; -- 1.9.1
2020 Feb 14
1
[PATCH V2 3/5] vDPA: introduce vDPA bus
On Fri, Feb 14, 2020 at 12:05:32PM +0800, Jason Wang wrote: > > The standard driver model is a 'bus' driver provides the HW access > > (think PCI level things), and a 'hw driver' attaches to the bus > > device, > > This is not true, kernel had already had plenty virtual bus where virtual > devices and drivers could be attached, besides mdev and virtio,
2010 Sep 14
1
[PATCH] vhost: max s/g to match qemu
..._MAXIOV); if (unlikely(ret < 0)) { vq_err(vq, "Translation failure %d in indirect.\n", ret); return ret; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index afd7729..edc8929 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -15,11 +15,6 @@ struct vhost_device; -enum { - /* Enough place for all fragments, head, and virtio net header. */ - VHOST_NET_MAX_SG = MAX_SKB_FRAGS + 2, -}; - struct vhost_work; typedef void (*vhost_work_fn_t)(struct vhost_work *work); @@ -93,12 +88,15 @@ struct vhost_virtqueue { bool log_used; u64 log_addr; - struct iov...
2010 Sep 14
1
[PATCH] vhost: max s/g to match qemu
..._MAXIOV); if (unlikely(ret < 0)) { vq_err(vq, "Translation failure %d in indirect.\n", ret); return ret; diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index afd7729..edc8929 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -15,11 +15,6 @@ struct vhost_device; -enum { - /* Enough place for all fragments, head, and virtio net header. */ - VHOST_NET_MAX_SG = MAX_SKB_FRAGS + 2, -}; - struct vhost_work; typedef void (*vhost_work_fn_t)(struct vhost_work *work); @@ -93,12 +88,15 @@ struct vhost_virtqueue { bool log_used; u64 log_addr; - struct iov...
2012 Oct 31
8
[PATCHv2 net-next 0/8] enable/disable zero copy tx dynamically
tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b, however you can only enable this mode if you know your workload does not trigger heavy guest to host/host to guest traffic - otherwise you get a (minor) performance regression. This patchset addresses this problem by notifying the owner device when callback is invoked because of a data copy. This makes it possible to
2012 Oct 31
8
[PATCHv2 net-next 0/8] enable/disable zero copy tx dynamically
tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b, however you can only enable this mode if you know your workload does not trigger heavy guest to host/host to guest traffic - otherwise you get a (minor) performance regression. This patchset addresses this problem by notifying the owner device when callback is invoked because of a data copy. This makes it possible to
2012 Oct 29
9
[PATCH net-next 0/8] enable/disable zero copy tx dynamically
tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b, however you can only enable this mode if you know your workload does not trigger heavy guest to host/host to guest traffic - otherwise you get a (minor) performance regression. This patchset addresses this problem by notifying the owner device when callback is invoked because of a data copy. This makes it possible to
2012 Oct 29
9
[PATCH net-next 0/8] enable/disable zero copy tx dynamically
tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b, however you can only enable this mode if you know your workload does not trigger heavy guest to host/host to guest traffic - otherwise you get a (minor) performance regression. This patchset addresses this problem by notifying the owner device when callback is invoked because of a data copy. This makes it possible to
2010 Aug 05
0
[PATCH RFC] vhost: max s/g to match qemu
.../vhost/vhost.h b/drivers/vhost/vhost.h index 19f4334..61b1a6e 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -12,14 +12,10 @@ #include <linux/uio.h> #include <linux/virtio_config.h> #include <linux/virtio_ring.h> +#include <linux/virtio_net.h> struct vhost_device; -enum { - /* Enough place for all fragments, head, and virtio net header. */ - VHOST_NET_MAX_SG = MAX_SKB_FRAGS + 2, -}; - /* Poll a file (eventfd or socket) */ /* Note: there's nothing vhost specific about this structure. */ struct vhost_poll { @@ -83,9 +79,12 @@ struct vhost_virtqueue {...
2010 Aug 05
0
[PATCH RFC] vhost: max s/g to match qemu
.../vhost/vhost.h b/drivers/vhost/vhost.h index 19f4334..61b1a6e 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@ -12,14 +12,10 @@ #include <linux/uio.h> #include <linux/virtio_config.h> #include <linux/virtio_ring.h> +#include <linux/virtio_net.h> struct vhost_device; -enum { - /* Enough place for all fragments, head, and virtio net header. */ - VHOST_NET_MAX_SG = MAX_SKB_FRAGS + 2, -}; - /* Poll a file (eventfd or socket) */ /* Note: there's nothing vhost specific about this structure. */ struct vhost_poll { @@ -83,9 +79,12 @@ struct vhost_virtqueue {...
2012 Nov 01
9
[PATCHv3 net-next 0/8] enable/disable zero copy tx dynamically
tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b, however you can only enable this mode if you know your workload does not trigger heavy guest to host/host to guest traffic - otherwise you get a (minor) performance regression. This patchset addresses this problem by notifying the owner device when callback is invoked because of a data copy. This makes it possible to