Displaying 12 results from an estimated 12 matches for "vdpa_get_drvdata".
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...ivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -115,6 +115,43 @@ static irqreturn_t vhost_vdpa_config_cb(void *private)
> return IRQ_HANDLED;
> }
>
> +static void vhost_vdpa_setup_vq_irq(struct vdpa_device *dev, int qid, int irq)
> +{
> + struct vhost_vdpa *v = vdpa_get_drvdata(dev);
> + struct vhost_virtqueue *vq = &v->vqs[qid];
> + int ret;
> +
> + spin_lock(&vq->call_ctx.ctx_lock);
> + if (!vq->call_ctx.ctx) {
> + spin_unlock(&vq->call_ctx.ctx_lock);
> + return;
> + }
I think we can simply remove this check as what is...
2020 Jul 13
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...ivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -115,6 +115,63 @@ static irqreturn_t vhost_vdpa_config_cb(void *private)
> return IRQ_HANDLED;
> }
>
> +static void vhost_vdpa_setup_vq_irq(struct vdpa_device *dev, int qid, int irq)
> +{
> + struct vhost_vdpa *v = vdpa_get_drvdata(dev);
> + struct vhost_virtqueue *vq = &v->vqs[qid];
> + int ret;
> +
> + vq_err(vq, "setup irq bypass for vq %d with irq = %d\n", qid, irq);
> + spin_lock(&vq->call_ctx.ctx_lock);
> + if (!vq->call_ctx.ctx)
> + return;
> +
> + vq->call_ctx....
2020 Jul 15
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...gt;>>>> *private)
>>>>> ????? return IRQ_HANDLED;
>>>>> ? }
>>>>> ? +static void vhost_vdpa_setup_vq_irq(struct vdpa_device *dev,
>>>>> int qid, int irq)
>>>>> +{
>>>>> +??? struct vhost_vdpa *v = vdpa_get_drvdata(dev);
>>>>> +??? struct vhost_virtqueue *vq = &v->vqs[qid];
>>>>> +??? int ret;
>>>>> +
>>>>> +??? vq_err(vq, "setup irq bypass for vq %d with irq = %d\n", qid,
>>>>> irq);
>>>>> +??? spin_lo...
2020 Jul 15
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...15,63 @@ static irqreturn_t vhost_vdpa_config_cb(void
>>> *private)
>>> ????? return IRQ_HANDLED;
>>> ? }
>>> ? +static void vhost_vdpa_setup_vq_irq(struct vdpa_device *dev, int
>>> qid, int irq)
>>> +{
>>> +??? struct vhost_vdpa *v = vdpa_get_drvdata(dev);
>>> +??? struct vhost_virtqueue *vq = &v->vqs[qid];
>>> +??? int ret;
>>> +
>>> +??? vq_err(vq, "setup irq bypass for vq %d with irq = %d\n", qid,
>>> irq);
>>> +??? spin_lock(&vq->call_ctx.ctx_lock);
>>>...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
....c:122:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
122 | int ret;
| ^~~
vim +/ret +122 drivers/vhost/vdpa.c
117
118 static void vhost_vdpa_setup_vq_irq(struct vdpa_device *dev, int qid, int irq)
119 {
120 struct vhost_vdpa *v = vdpa_get_drvdata(dev);
121 struct vhost_virtqueue *vq = &v->vqs[qid];
> 122 int ret;
123
124 spin_lock(&vq->call_ctx.ctx_lock);
125 if (!vq->call_ctx.ctx) {
126 spin_unlock(&vq->call_ctx.ctx_lock);
127 return;
128 }
129
130 vq->call_ctx.producer....
2020 Feb 10
0
[PATCH V2 4/5] virtio: introduce a vDPA based transport
...ops->get_vendor_id(vdpa);
+ ret = register_virtio_device(&vd_dev->vdev);
+ if (ret)
+ goto err;
+
+ vdpa_set_drvdata(vdpa, vd_dev);
+
+ return 0;
+
+err:
+ kfree(vd_dev);
+ return ret;
+}
+
+static void virtio_vdpa_remove(struct vdpa_device *vdpa)
+{
+ struct virtio_vdpa_device *vd_dev = vdpa_get_drvdata(vdpa);
+
+ unregister_virtio_device(&vd_dev->vdev);
+}
+
+static struct vdpa_driver virtio_vdpa_driver = {
+ .driver = {
+ .name = "virtio_vdpa",
+ },
+ .probe = virtio_vdpa_probe,
+ .remove = virtio_vdpa_remove,
+};
+
+module_vdpa_driver(virtio_vdpa_driver);
+
+MODULE_VERSION(MOD...
2020 Feb 20
0
[PATCH V3 4/5] virtio: introduce a vDPA based transport
...ops->get_vendor_id(vdpa);
+ ret = register_virtio_device(&vd_dev->vdev);
+ if (ret)
+ goto err;
+
+ vdpa_set_drvdata(vdpa, vd_dev);
+
+ return 0;
+
+err:
+ kfree(vd_dev);
+ return ret;
+}
+
+static void virtio_vdpa_remove(struct vdpa_device *vdpa)
+{
+ struct virtio_vdpa_device *vd_dev = vdpa_get_drvdata(vdpa);
+
+ unregister_virtio_device(&vd_dev->vdev);
+}
+
+static struct vdpa_driver virtio_vdpa_driver = {
+ .driver = {
+ .name = "virtio_vdpa",
+ },
+ .probe = virtio_vdpa_probe,
+ .remove = virtio_vdpa_remove,
+};
+
+module_vdpa_driver(virtio_vdpa_driver);
+
+MODULE_VERSION(MOD...
2020 Feb 10
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...r)
+
+static inline struct vdpa_driver *drv_to_vdpa(struct device_driver *driver)
+{
+ return container_of(driver, struct vdpa_driver, driver);
+}
+
+static inline struct vdpa_device *dev_to_vdpa(struct device *_dev)
+{
+ return container_of(_dev, struct vdpa_device, dev);
+}
+
+static inline void *vdpa_get_drvdata(const struct vdpa_device *vdev)
+{
+ return dev_get_drvdata(&vdev->dev);
+}
+
+static inline void vdpa_set_drvdata(struct vdpa_device *vdev, void *data)
+{
+ dev_set_drvdata(&vdev->dev, data);
+}
+
+static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev)
+{
+ return vd...
2020 Feb 20
0
[PATCH V3 3/5] vDPA: introduce vDPA bus
...r)
+
+static inline struct vdpa_driver *drv_to_vdpa(struct device_driver *driver)
+{
+ return container_of(driver, struct vdpa_driver, driver);
+}
+
+static inline struct vdpa_device *dev_to_vdpa(struct device *_dev)
+{
+ return container_of(_dev, struct vdpa_device, dev);
+}
+
+static inline void *vdpa_get_drvdata(const struct vdpa_device *vdev)
+{
+ return dev_get_drvdata(&vdev->dev);
+}
+
+static inline void vdpa_set_drvdata(struct vdpa_device *vdev, void *data)
+{
+ dev_set_drvdata(&vdev->dev, data);
+}
+
+static inline struct device *vdpa_get_dma_dev(struct vdpa_device *vdev)
+{
+ return vd...
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all:
This is an update version of vDPA support in kernel.
vDPA device is a device that uses a datapath which complies with the
virtio specifications with vendor specific control path. vDPA devices
can be both physically located on the hardware or emulated by
software. vDPA hardware devices are usually implemented through PCIE
with the following types:
- PF (Physical Function) - A single
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all:
This is an update version of vDPA support in kernel.
vDPA device is a device that uses a datapath which complies with the
virtio specifications with vendor specific control path. vDPA devices
can be both physically located on the hardware or emulated by
software. vDPA hardware devices are usually implemented through PCIE
with the following types:
- PF (Physical Function) - A single
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all:
This is an updated version of kernel support for vDPA device. Various
changes were made based on the feedback since last verion. One major
change is to drop the sysfs API and leave the management interface for
future development, and introudce the incremental DMA bus
operations. Please see changelog for more information.
The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is