Displaying 20 results from an estimated 53 matches for "exp_data_len".
Did you mean:
eth_data_len
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...work(vs, evt);
tcm_vhost_free_evt(vs, evt);
}
}
@@ -568,6 +624,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
}
static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct vhost_scsi *vs,
struct tcm_vhost_tpg *tv_tpg,
struct virtio_scsi_cmd_req *v_req,
u32 exp_data_len,
@@ -592,6 +649,8 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
tv_cmd->tvc_exp_data_len = exp_data_len;
tv_cmd->tvc_data_direction = data_direction;
tv_cmd->tvc_nexus = tv_nexus;
+ tv_cmd->tvc_vhost = vs;
+ tv_cmd->inflight = tcm_vhost_inc_inflight(vs);
return t...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...work(vs, evt);
tcm_vhost_free_evt(vs, evt);
}
}
@@ -568,6 +624,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
}
static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct vhost_scsi *vs,
struct tcm_vhost_tpg *tv_tpg,
struct virtio_scsi_cmd_req *v_req,
u32 exp_data_len,
@@ -592,6 +649,8 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
tv_cmd->tvc_exp_data_len = exp_data_len;
tv_cmd->tvc_data_direction = data_direction;
tv_cmd->tvc_nexus = tv_nexus;
+ tv_cmd->tvc_vhost = vs;
+ tv_cmd->inflight = tcm_vhost_inc_inflight(vs);
return t...
2018 Sep 21
2
[PATCH] vhost/scsi: truncate T10 PI iov_iter to prot_bytes
...tesin);
> }
> /*
> - * Set prot_iter to data_iter, and advance past any
> + * Set prot_iter to data_iter and truncate it to
> + * prot_bytes, and advance data_iter past any
> * preceeding prot_bytes that may be present.
> *
> * Also fix up the exp_data_len to reflect only the
> @@ -973,6 +974,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
> if (prot_bytes) {
> exp_data_len -= prot_bytes;
> prot_iter = data_iter;
> + iov_iter_truncate(&prot_iter, prot_bytes);
> iov_iter_advance(...
2013 May 03
5
[PATCH 0/5] vhost-scsi cleanup
Asias He (5):
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
vhost-scsi: Rename struct vhost_scsi *s to *vs
vhost-scsi: Make func indention more consistent
vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg
vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd
drivers/vhost/scsi.c | 469 +++++++++++++++++++++++++++------------------------
1 file changed,
2013 May 03
5
[PATCH 0/5] vhost-scsi cleanup
Asias He (5):
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
vhost-scsi: Rename struct vhost_scsi *s to *vs
vhost-scsi: Make func indention more consistent
vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg
vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd
drivers/vhost/scsi.c | 469 +++++++++++++++++++++++++++------------------------
1 file changed,
2013 Mar 22
4
[PATCH V2 0/3] tcm_vhost pending requests flush
Changes in v2:
- Increase/Decrease inflight requests in
vhost_scsi_{allocate,free}_cmd and tcm_vhost_{allocate,free}_evt
Asias He (3):
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
tcm_vhost: Wait for pending requests in vhost_scsi_clear_endpoint()
tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq
drivers/vhost/tcm_vhost.c | 131
2013 Mar 22
4
[PATCH V2 0/3] tcm_vhost pending requests flush
Changes in v2:
- Increase/Decrease inflight requests in
vhost_scsi_{allocate,free}_cmd and tcm_vhost_{allocate,free}_evt
Asias He (3):
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
tcm_vhost: Wait for pending requests in vhost_scsi_clear_endpoint()
tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq
drivers/vhost/tcm_vhost.c | 131
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...otected 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 */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
+ if (unlikely(!vs->vs_endpoint))
return;
-...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...otected 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 */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
+ if (unlikely(!vs->vs_endpoint))
return;
-...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...pletion work item */
struct llist_head vs_completion_list; /* cmd completion queue */
+ char vs_vhost_wwpn[TRANSPORT_IQN_LEN];
+ int vs_num_target;
};
/* Local pointer to allocated TCM configfs fabric module */
@@ -564,13 +569,7 @@ 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;
-
- /* Must use ioctl VHOST_SCSI_SET_ENDPOINT */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
- return;
- }
+ u8 target;
mutex_lock(&vq->mutex);...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...pletion work item */
struct llist_head vs_completion_list; /* cmd completion queue */
+ char vs_vhost_wwpn[TRANSPORT_IQN_LEN];
+ int vs_num_target;
};
/* Local pointer to allocated TCM configfs fabric module */
@@ -564,13 +569,7 @@ 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;
-
- /* Must use ioctl VHOST_SCSI_SET_ENDPOINT */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
- return;
- }
+ u8 target;
mutex_lock(&vq->mutex);...
2013 May 06
13
[PATCH v2 00/11] vhost cleanups
MST, This is on top of [PATCH 0/2] vhost-net fix ubuf.
Asias He (11):
vhost: Remove vhost_enable_zcopy in vhost.h
vhost: Move VHOST_NET_FEATURES to net.c
vhost: Make vhost a separate module
vhost: Remove comments for hdr in vhost.h
vhost: Simplify dev->vqs[i] access
vhost-net: Cleanup vhost_ubuf and vhost_zcopy
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
2013 May 06
13
[PATCH v2 00/11] vhost cleanups
MST, This is on top of [PATCH 0/2] vhost-net fix ubuf.
Asias He (11):
vhost: Remove vhost_enable_zcopy in vhost.h
vhost: Move VHOST_NET_FEATURES to net.c
vhost: Make vhost a separate module
vhost: Remove comments for hdr in vhost.h
vhost: Simplify dev->vqs[i] access
vhost-net: Cleanup vhost_ubuf and vhost_zcopy
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...otected 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 */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg))
+ if (unlikely(!vs->vs_endpoint))
return;
mutex_lock(&vq->mutex);
@@ -635,6 +641,28 @@ sta...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...otected 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 */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg))
+ if (unlikely(!vs->vs_endpoint))
return;
mutex_lock(&vq->mutex);
@@ -635,6 +641,28 @@ sta...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...tion_list, &vs->vs_completion_list);
+ spin_unlock_bh(&vs->vs_completion_lock);
+
+ vhost_work_queue(&vs->dev, &vs->vs_completion_work);
+}
+
+static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct tcm_vhost_tpg *tv_tpg,
+ struct virtio_scsi_cmd_req *v_req,
+ u32 exp_data_len,
+ int data_direction)
+{
+ struct tcm_vhost_cmd *tv_cmd;
+ struct tcm_vhost_nexus *tv_nexus;
+ struct se_portal_group *se_tpg = &tv_tpg->se_tpg;
+ struct se_session *se_sess;
+ struct se_cmd *se_cmd;
+ int sam_task_attr;
+
+ tv_nexus = tv_tpg->tpg_nexus;
+ if (!tv_nexus) {
+ pr_err(&quo...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...tion_list, &vs->vs_completion_list);
+ spin_unlock_bh(&vs->vs_completion_lock);
+
+ vhost_work_queue(&vs->dev, &vs->vs_completion_work);
+}
+
+static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct tcm_vhost_tpg *tv_tpg,
+ struct virtio_scsi_cmd_req *v_req,
+ u32 exp_data_len,
+ int data_direction)
+{
+ struct tcm_vhost_cmd *tv_cmd;
+ struct tcm_vhost_nexus *tv_nexus;
+ struct se_portal_group *se_tpg = &tv_tpg->se_tpg;
+ struct se_session *se_sess;
+ struct se_cmd *se_cmd;
+ int sam_task_attr;
+
+ tv_nexus = tv_tpg->tpg_nexus;
+ if (!tv_nexus) {
+ pr_err(&quo...
2017 Jan 12
1
[patch] vhost/scsi: silence uninitialized variable warning
...t a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 253310c..b98dac1 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -843,7 +843,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
struct iov_iter out_iter, in_iter, prot_iter, data_iter;
u64 tag;
u32 exp_data_len, data_direction;
- unsigned out, in;
+ unsigned int out = 0, in = 0;
int head, ret, prot_bytes;
size_t req_size, rsp_size = sizeof(struct virtio_scsi_cmd_resp);
size_t out_size, in_size;
2017 Jan 12
1
[patch] vhost/scsi: silence uninitialized variable warning
...t a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 253310c..b98dac1 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -843,7 +843,7 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
struct iov_iter out_iter, in_iter, prot_iter, data_iter;
u64 tag;
u32 exp_data_len, data_direction;
- unsigned out, in;
+ unsigned int out = 0, in = 0;
int head, ret, prot_bytes;
size_t req_size, rsp_size = sizeof(struct virtio_scsi_cmd_resp);
size_t out_size, in_size;
2013 Jul 06
3
[PATCH-v2 0/3] target/vhost-scsi: Add per-cpu ida tag pre-allocation for v3.12
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
This is an updated series for adding tag pre-allocation support of
target fabric descriptor memory, utilizing Kent's latest in-flight
per-cpu ida bits here:
[PATCH v3] lib/idr.c rewrite, percpu ida/tag allocator
http://marc.info/?l=linux-kernel&m=137308733526328&w=2
Patch #1 includes target-core setup of