Displaying 8 results from an estimated 8 matches for "vs_endpoint".
Did you mean:
ps_endpoints
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...VQ_IO = 2,
};
+#define VHOST_SCSI_MAX_TARGET 256
+
struct vhost_scsi {
- struct tcm_vhost_tpg *vs_tpg; /* Protected by vhost_scsi->dev.mutex */
+ /* Protected by vhost_scsi->dev.mutex */
+ struct tcm_vhost_tpg *vs_tpg[VHOST_SCSI_MAX_TARGET];
+ char vs_vhost_wwpn[TRANSPORT_IQN_LEN];
+ bool vs_endpoint;
+
struct vhost_dev dev;
struct vhost_virtqueue vqs[3];
@@ -564,13 +570,11 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
+ u8 target;
/* Must use ioctl VHOST_SCSI_SET_ENDPOINT */...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...VQ_IO = 2,
};
+#define VHOST_SCSI_MAX_TARGET 256
+
struct vhost_scsi {
- struct tcm_vhost_tpg *vs_tpg; /* Protected by vhost_scsi->dev.mutex */
+ /* Protected by vhost_scsi->dev.mutex */
+ struct tcm_vhost_tpg *vs_tpg[VHOST_SCSI_MAX_TARGET];
+ char vs_vhost_wwpn[TRANSPORT_IQN_LEN];
+ bool vs_endpoint;
+
struct vhost_dev dev;
struct vhost_virtqueue vqs[3];
@@ -564,13 +570,11 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
+ u8 target;
/* Must use ioctl VHOST_SCSI_SET_ENDPOINT */...
2013 Mar 08
8
[PATCH V2 0/6] tcm_vhost hotplug/hotunplug support and locking/flushing fix
...on in tcm_vhost_{hotplug,hotunplug}
- Fix racing of vs_events_nr
- Add flush fix patch to this series
Asias He (6):
tcm_vhost: Add missed lock in vhost_scsi_clear_endpoint()
tcm_vhost: Introduce tcm_vhost_check_feature()
tcm_vhost: Introduce tcm_vhost_check_endpoint()
tcm_vhost: Fix vs->vs_endpoint checking in vhost_scsi_handle_vq()
tcm_vhost: Add hotplug/hotunplug support
tcm_vhost: Flush vhost_work in vhost_scsi_flush()
drivers/vhost/tcm_vhost.c | 243 ++++++++++++++++++++++++++++++++++++++++++++--
drivers/vhost/tcm_vhost.h | 10 ++
2 files changed, 247 insertions(+), 6 deletions(-)...
2013 Mar 08
8
[PATCH V2 0/6] tcm_vhost hotplug/hotunplug support and locking/flushing fix
...on in tcm_vhost_{hotplug,hotunplug}
- Fix racing of vs_events_nr
- Add flush fix patch to this series
Asias He (6):
tcm_vhost: Add missed lock in vhost_scsi_clear_endpoint()
tcm_vhost: Introduce tcm_vhost_check_feature()
tcm_vhost: Introduce tcm_vhost_check_endpoint()
tcm_vhost: Fix vs->vs_endpoint checking in vhost_scsi_handle_vq()
tcm_vhost: Add hotplug/hotunplug support
tcm_vhost: Flush vhost_work in vhost_scsi_flush()
drivers/vhost/tcm_vhost.c | 243 ++++++++++++++++++++++++++++++++++++++++++++--
drivers/vhost/tcm_vhost.h | 10 ++
2 files changed, 247 insertions(+), 6 deletions(-)...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...VQ_IO = 2,
};
+#define VHOST_SCSI_MAX_TARGET 256
+
struct vhost_scsi {
- struct tcm_vhost_tpg *vs_tpg; /* Protected by vhost_scsi->dev.mutex */
+ /* Protected by vhost_scsi->dev.mutex */
+ struct tcm_vhost_tpg *vs_tpg[VHOST_SCSI_MAX_TARGET];
+ char vs_vhost_wwpn[TRANSPORT_IQN_LEN];
+ bool vs_endpoint;
+
struct vhost_dev dev;
struct vhost_virtqueue vqs[3];
@@ -564,10 +570,10 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
+ u8 target;
/* Must use ioctl VHOST_SCSI_SET_ENDPOINT */...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...VQ_IO = 2,
};
+#define VHOST_SCSI_MAX_TARGET 256
+
struct vhost_scsi {
- struct tcm_vhost_tpg *vs_tpg; /* Protected by vhost_scsi->dev.mutex */
+ /* Protected by vhost_scsi->dev.mutex */
+ struct tcm_vhost_tpg *vs_tpg[VHOST_SCSI_MAX_TARGET];
+ char vs_vhost_wwpn[TRANSPORT_IQN_LEN];
+ bool vs_endpoint;
+
struct vhost_dev dev;
struct vhost_virtqueue vqs[3];
@@ -564,10 +570,10 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
+ u8 target;
/* Must use ioctl VHOST_SCSI_SET_ENDPOINT */...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...d *tv_cmd)
kfree(tv_cmd);
}
+static void tcm_vhost_do_evt_work(struct vhost_scsi *vs,
+ struct virtio_scsi_event *event)
+{
+ struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT];
+ struct virtio_scsi_event __user *eventp;
+ unsigned out, in;
+ int head, ret;
+
+ if (!vs || !vs->vs_endpoint)
+ return;
+
+ mutex_lock(&vq->mutex);
+again:
+ vhost_disable_notify(&vs->dev, vq);
+ head = vhost_get_vq_desc(&vs->dev, vq, vq->iov,
+ ARRAY_SIZE(vq->iov), &out, &in,
+ NULL, NULL);
+ if (head < 0) {
+ vs->vs_events_dropped = true;
+ goto out;
+ }
+...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...d *tv_cmd)
kfree(tv_cmd);
}
+static void tcm_vhost_do_evt_work(struct vhost_scsi *vs,
+ struct virtio_scsi_event *event)
+{
+ struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT];
+ struct virtio_scsi_event __user *eventp;
+ unsigned out, in;
+ int head, ret;
+
+ if (!vs || !vs->vs_endpoint)
+ return;
+
+ mutex_lock(&vq->mutex);
+again:
+ vhost_disable_notify(&vs->dev, vq);
+ head = vhost_get_vq_desc(&vs->dev, vq, vq->iov,
+ ARRAY_SIZE(vq->iov), &out, &in,
+ NULL, NULL);
+ if (head < 0) {
+ vs->vs_events_dropped = true;
+ goto out;
+ }
+...