[PATCH 2/2] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-01 Thread Sagi Grimberg
loopback transport to include protection information in the transferred data length (like other scsi transports). Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/target/loopback/tcm_loop.c | 35 +++ drivers/target/target_core_sbc.c | 15

[PATCH 0/2] Include protection information in iscsi header

2014-06-01 Thread Sagi Grimberg
includes protection information. Although these patches involve 3 subsystems with different maintainers (scsi, iser, target) I would prefer seeing these patches included together. Sagi Grimberg (2): libiscsi, iser: Adjust data_length to include protection information TARGET/sbc,loopback

[PATCH 1/2] libiscsi, iser: Adjust data_length to include protection information

2014-06-01 Thread Sagi Grimberg
In case protection information exists over the wire iscsi header data_length field is required to include it. Also remove iser transfer length checks for each task as they are not always true and somewhat redundant anyway. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband

Re: [PATCH 2/2] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-05 Thread Sagi Grimberg
On 6/2/2014 7:54 PM, Martin K. Petersen wrote: Sagi == Sagi Grimberg sa...@mellanox.com writes: Sagi, Sagi In various areas of the code, it is assumed that Sagi se_cmd- data_length describes pure data. In case Sagi that protection information exists over the wire (protect bits is Sagi

Re: [PATCH 0/2] Include protection information in iscsi header

2014-06-05 Thread Sagi Grimberg
On 6/3/2014 9:16 AM, Roland Dreier wrote: On Sun, Jun 1, 2014 at 9:19 AM, Sagi Grimberg sa...@mellanox.com wrote: Although these patches involve 3 subsystems with different maintainers (scsi, iser, target) I would prefer seeing these patches included together. Why? Because they break wire

Re: [PATCH 1/2] libiscsi, iser: Adjust data_length to include protection information

2014-06-05 Thread Sagi Grimberg
On 6/3/2014 7:11 PM, Mike Christie wrote: On 06/01/2014 11:19 AM, Sagi Grimberg wrote: /** + * iscsi_adjust_dl - Adjust SCSI data length to include PI + * @sc: scsi command. + * @data_length: command data length. + * + * Adjust the data length to account for how much data + * is actually

Re: [PATCH 1/2] libiscsi, iser: Adjust data_length to include protection information

2014-06-05 Thread Sagi Grimberg
On 6/4/2014 1:18 AM, Martin K. Petersen wrote: Mike == Mike Christie micha...@cs.wisc.edu writes: Mike On 06/01/2014 11:19 AM, Sagi Grimberg wrote: +/* + * data integrity helpers + */ +static inline unsigned +iscsi_prot_len(unsigned data_len, unsigned sector_size) +{ + switch (sector_size

[PATCH v1 3/3] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-08 Thread Sagi Grimberg
loopback device to include protection information in the transferred data length (like other scsi transports). Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/target/loopback/tcm_loop.c | 15 --- drivers/target/target_core_sbc.c | 15 +-- 2 files changed, 25

[PATCH v1 0/3] Include protection information in iscsi header

2014-06-08 Thread Sagi Grimberg
in the presence of protection information (instead of having each transport doing the same computation). - Modify iscsi to set correct transfer length using scsi helpers - Modify loopback transport to set correct transfer length using scsi helpers Sagi Grimberg (3): scsi_cmnd: Introduce

[PATCH v1 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-08 Thread Sagi Grimberg
. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- include/scsi/scsi_cmnd.h | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index dd7c998..84d9593 100644 --- a/include/scsi

[PATCH v1 2/3] libiscsi, iser: Adjust data_length to include protection information

2014-06-08 Thread Sagi Grimberg
and somewhat redundant anyway. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/iser/iser_initiator.c | 34 +++-- drivers/scsi/libiscsi.c | 18 +++--- 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/drivers

Re: [PATCH v1 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-10 Thread Sagi Grimberg
On 6/10/2014 10:02 PM, Martin K. Petersen wrote: Sagi == Sagi Grimberg sa...@mellanox.com writes: +static inline unsigned scsi_prot_length(unsigned data_length, + unsigned sector_size) +{ + switch (sector_size) { + case 512

Re: [PATCH v1 3/3] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-11 Thread Sagi Grimberg
On 6/11/2014 12:17 AM, Quinn Tran wrote: SNIP QT Instead of using existing value within cmd-data_length, can we calculated data_length based on secstors blocksize. cmd-data_length = sectors * dev-dev_attrib.block_size; We can do that I suppose... Although it seems weird that the core

[PATCH v2 2/3] libiscsi, iser: Adjust data_length to include protection information

2014-06-11 Thread Sagi Grimberg
and somewhat redundant anyway. Signed-off-by: Sagi Grimberg sa...@mellanox.com Reviewed-by: Mike Christie micha...@cs.wisc.edu --- drivers/infiniband/ulp/iser/iser_initiator.c | 34 +++-- drivers/scsi/libiscsi.c | 18 +++--- 2 files changed, 19

[PATCH v2 0/3] Include protection information in transport header

2014-06-11 Thread Sagi Grimberg
information. - Modify iscsi to set correct transfer length using scsi helpers - Modify loopback transport to set correct transfer length using scsi helpers Sagi Grimberg (3): scsi_cmnd: Introduce scsi_transfer_length helper libiscsi, iser: Adjust data_length to include protection information

[PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-11 Thread Sagi Grimberg
. Signed-off-by: Sagi Grimberg sa...@mellanox.com Signed-off-by: Martin K. Petersen martin.peter...@oracle.com --- include/scsi/scsi_cmnd.h | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index dd7c998

[PATCH v2 3/3] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-11 Thread Sagi Grimberg
in the cdb). Modify loopback device to include protection information in the transferred data length (like other scsi transports). Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/target/loopback/tcm_loop.c | 15 --- drivers/target/target_core_sbc.c | 15

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread sagi grimberg
On 6/24/2014 9:54 AM, Mike Christie wrote: On 06/11/2014 04:09 AM, Sagi Grimberg wrote: In case protection information exists on the wire scsi transports should include it in the transfer byte count (even if protection information does not exist in the host memory space). This helper

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread Sagi Grimberg
On 6/24/2014 3:53 PM, Martin K. Petersen wrote: Mike == Mike Christie micha...@cs.wisc.edu writes: Mike The problem is WRITE_SAME requests are setup so that Mike req-__data_len is the value of the entire request when the setup Mike is completed but during the setup process it's value changes

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread sagi grimberg
sector_size = scmd-device-sector_size; Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread Sagi Grimberg
On 6/24/2014 7:08 PM, Michael Christie wrote: On Jun 24, 2014, at 7:53 AM, Martin K. Petersen martin.peter...@oracle.com wrote: Mike == Mike Christie micha...@cs.wisc.edu writes: Mike The problem is WRITE_SAME requests are setup so that Mike req-__data_len is the value of the entire request

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-25 Thread Sagi Grimberg
On 6/25/2014 6:32 AM, Mike Christie wrote: On 06/24/2014 12:08 PM, Mike Christie wrote: On 06/24/2014 12:00 PM, Mike Christie wrote: On 06/24/2014 11:30 AM, Christoph Hellwig wrote: On Tue, Jun 24, 2014 at 07:27:46PM +0300, Sagi Grimberg wrote: This condition only matters in the bidi case

Re: Crash on WRITE SAME

2014-07-03 Thread Sagi Grimberg
On 7/2/2014 9:36 PM, Christoph Hellwig wrote: On Wed, Jul 02, 2014 at 02:29:05PM -0400, Mikulas Patocka wrote: And what about protection information for commands that transfer partial sectors? (for example, UMAP transfers 24 bytes). Should scsi_transfer_length return 24 or 32 in this case? As

Re: [PATCH 01/14] block: Get rid of bdev_integrity_enabled()

2014-07-03 Thread Sagi Grimberg
-by: Christoph Hellwig h...@lst.de Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 02/14] block: Replace bi_integrity with bi_special

2014-07-03 Thread Sagi Grimberg
On 6/12/2014 3:18 AM, Martin K. Petersen wrote: Christoph == Christoph Hellwig h...@infradead.org writes: Christoph Instead of having a union of pointer just make it a void Christoph pointer. I also think special is a terribly generic name, but Christoph I don't really have a better idea at

Re: [PATCH 05/14] block: Deprecate the use of the term sector in the context of block integrity

2014-07-03 Thread Sagi Grimberg
On 5/29/2014 6:28 AM, Martin K. Petersen wrote: The protection interval is not necessarily tied to the logical block size of a block device. Stop using the terms sector and sectors. Signed-off-by: Martin K. Petersen martin.peter...@oracle.com --- block/bio-integrity.c | 46

Re: [PATCH 06/14] block: Clean up the code used to generate and verify integrity metadata

2014-07-03 Thread Sagi Grimberg
; + integrity_processing_fn *generate_fn; + integrity_processing_fn *verify_fn; unsigned short flags; unsigned short tuple_size; Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord

Re: [PATCH 07/14] block: Add prefix to block integrity profile flags

2014-07-03 Thread Sagi Grimberg
data integrity on write */ +enum blk_integrity_flags { + BLK_INTEGRITY_VERIFY= 1 0, + BLK_INTEGRITY_GENERATE = 1 1, +}; struct blk_integrity_iter { void*prot_buf; Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe

Re: [PATCH 08/14] block: Add a disk flag to block integrity profile

2014-07-03 Thread Sagi Grimberg
On 6/25/2014 2:49 PM, Martin K. Petersen wrote: Christoph == Christoph Hellwig h...@infradead.org writes: Christoph On Wed, Jun 11, 2014 at 09:30:34PM -0400, Martin K. Petersen wrote: /sys/block/foo/integrity/disk_is_formatted_with_pi /sys/block/foo/integrity/disk_is_integrity_capable

Re: [PATCH 09/14] block: Relocate integrity flags

2014-07-03 Thread Sagi Grimberg
On 5/29/2014 6:28 AM, Martin K. Petersen wrote: Move flags affecting the integrity code out of the bio bi_flags and into the block integrity payload. Signed-off-by: Martin K. Petersen martin.peter...@oracle.com --- block/bio-integrity.c | 4 ++-- drivers/scsi/sd_dif.c | 4 ++--

Re: [PATCH 11/14] block: Don't merge requests if integrity flags differ

2014-07-03 Thread Sagi Grimberg
-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 04/14] block: Remove bip_buf

2014-07-03 Thread Sagi Grimberg
-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 05/14] block: Deprecate the use of the term sector in the context of block integrity

2014-07-03 Thread Sagi Grimberg
On 7/3/2014 12:35 PM, Sagi Grimberg wrote: On 5/29/2014 6:28 AM, Martin K. Petersen wrote: The protection interval is not necessarily tied to the logical block size of a block device. Stop using the terms sector and sectors. Signed-off-by: Martin K. Petersen martin.peter...@oracle.com

Re: [PATCH 0/5] SRP initiator patches for kernel 3.17

2014-07-03 Thread Sagi Grimberg
at http://vger.kernel.org/majordomo-info.html . Hey Bart, The series looks good, You can add to the series: Reviewed-by: Sagi Grimberg sa...@mellanox.com Specifically to patches #1, #4, #5 you can add: Tested-by: Sagi Grimberg sa...@mellanox.com Sagi. -- To unsubscribe from this list: send the line

Re: [PATCH 3.15 099/139] libiscsi, iser: Adjust data_length to include protection information

2014-07-06 Thread Sagi Grimberg
explain how this commit: commit d77e65350f2d82dfa0557707d505711f5a43c8fd Author: Sagi Grimberg sa...@mellanox.com Date: Wed Jun 11 12:09:58 2014 +0300 libiscsi, iser: Adjust data_length to include protection information In case protection information exists over the wire iscsi

Re: scsi-mq V2

2014-07-14 Thread Sagi Grimberg
this is why my benchmarks shows only randread IO pattern (getting familiar numbers). I need to figure out whats wrong with IO writes - I'll start bisecting on this. I also reviewed the patch set and at this point, I don't have any comments. So you can add to the series: Reviewed-by: Sagi Grimberg 'sa

Re: [PATCH] [SCSI] Make scsi_transfer_length take a scsi_data_buffer argument

2014-08-06 Thread Sagi Grimberg
direction the calculation should apply to. Hey Martin, Christoph, Sorry for the late response, I was on vacation. Some comments below. Signed-off-by: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Christoph Hellwig h...@infradead.org --- drivers/scsi

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-08-06 Thread Sagi Grimberg
On 7/27/2014 12:11 PM, Boaz Harrosh wrote: On 06/25/2014 01:32 PM, Sagi Grimberg wrote: On 6/25/2014 11:48 AM, Sagi Grimberg wrote: SNIP I made the patch below which should fix both bidi support in iscsi and also WRITE_SAME (and similar commands) support. I'm a bit confused, for all

Re: [PATCH v2 2/3] libiscsi, iser: Adjust data_length to include protection information

2014-08-06 Thread Sagi Grimberg
Hi Boaz, On 7/27/2014 1:08 PM, Boaz Harrosh wrote: SNIP diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 26dc005..3f46234 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -338,7 +338,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task)

Re: [PATCH] [SCSI] Make scsi_transfer_length take a scsi_data_buffer argument

2014-08-06 Thread Sagi Grimberg
On 8/6/2014 3:12 PM, Sagi Grimberg wrote: SNIP diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index f2db82beb646..fdea8c1527d4 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -391,7 +391,7 @@ static int iscsi_prep_scsi_cmd_pdu(struct iscsi_task *task

Re: [PATCH 02/14] block: Replace bi_integrity with bi_special

2014-08-06 Thread Sagi Grimberg
*bi_integrity; /* data integrity */ #endif + }; So I take it that we settled on a nameless union... Looks good to me. Reviewed-by: Sagi Grimberg sa...@mellanox.com Sagi. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org

Re: [PATCH 03/14] block: Remove integrity tagging functions

2014-08-06 Thread Sagi Grimberg
. Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 05/14] block: Deprecate the use of the term sector in the context of block integrity

2014-08-06 Thread Sagi Grimberg
will be used to describe the portion of the data buffer that a given piece of protection information is associated with. Signed-off-by: Martin K. Petersen martin.peter...@oracle.com Looks good to me, Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line

Re: [PATCH 05/14] block: Deprecate the use of the term sector in the context of block integrity

2014-08-06 Thread Sagi Grimberg
On 8/6/2014 4:32 PM, Sagi Grimberg wrote: On 7/25/2014 11:34 PM, Martin K. Petersen wrote: The protection interval is not necessarily tied to the logical block size of a block device. Stop using the terms sector and sectors. Going forward we will use the term seed to describe the initial

Re: [PATCH 11/14] block: Integrity checksum flag

2014-08-06 Thread Sagi Grimberg
, }; struct blk_integrity_iter { Looks good to me, Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 06/14] block: Make protection interval calculation generic

2014-08-06 Thread Sagi Grimberg
; - - return sectors; + return sectors (ilog2(bi-interval) - 9); } static inline unsigned int bio_integrity_bytes(struct blk_integrity *bi, Looks good to me, Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi

Re: [PATCH v2 2/3] libiscsi, iser: Adjust data_length to include protection information

2014-08-13 Thread Sagi Grimberg
On 8/6/2014 4:25 PM, Boaz Harrosh wrote: On 08/06/2014 03:43 PM, Sagi Grimberg wrote: Hi Boaz, I hate that you introduced this new transfer_length variable. It does not exist. In BIDI supporting driver there is out_len and in_len just as original code. Effectively, out_len and in_len

Re: [PATCH scsi 1/1] libiscsi : Add T10 Data Integrity Feature support

2014-08-14 Thread Sagi Grimberg
On 8/7/2014 1:37 AM, Anish Bhatt wrote: Signed-off-by: Anish Bhatt an...@chelsio.com Signed-off by: Manoj Malvia manojmalv...@chelsio.com Signed-off by: Karen Xie k...@chelsio.com --- drivers/scsi/libiscsi.c | 61 +++-- drivers/scsi/libiscsi_tcp.c | 296

Performance degradation in IO writes vs. reads (was scsi-mq V2)

2014-08-21 Thread Sagi Grimberg
On 7/14/2014 12:13 PM, Sagi Grimberg wrote: SNIP I'd like to share some benchmarks I took on this patch set using iSER initiator (+2 pre-submitted performance improvements) vs LIO iSER target. I ran workloads I think are interesting use-cases (single LUN with 1,2,4 IO threads up to a fully

Re: Performance degradation in IO writes vs. reads (was scsi-mq V2)

2014-08-21 Thread Sagi Grimberg
On 8/21/2014 4:03 PM, Christoph Hellwig wrote: On Thu, Aug 21, 2014 at 03:32:09PM +0300, Sagi Grimberg wrote: So I just got back to checking this issue of *extremely low* IO write performance I got in 3.16-rc2. Please test with 3.16 final. There once issue each in aio and dio that caused bad

Re: Performance degradation in IO writes vs. reads (was scsi-mq V2)

2014-08-24 Thread Sagi Grimberg
On 8/21/2014 5:02 PM, Sagi Grimberg wrote: On 8/21/2014 4:03 PM, Christoph Hellwig wrote: On Thu, Aug 21, 2014 at 03:32:09PM +0300, Sagi Grimberg wrote: So I just got back to checking this issue of *extremely low* IO write performance I got in 3.16-rc2. Please test with 3.16 final

Re: [PATCH 14/14] sd: Honor block layer integrity handling flags

2014-08-31 Thread Sagi Grimberg
. Reviewed-by: Sagi Grimberg sa...@mellanox.com Sagi. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/1] libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu

2014-09-07 Thread Sagi Grimberg
buffer of len %u for op 0x%x\n, data_size, opcode); + return NULL; + } + BUG_ON(conn-c_stage == ISCSI_CONN_INITIAL_STAGE); BUG_ON(conn-c_stage == ISCSI_CONN_STOPPED); Looks good to me too, Reviewed-by: Sagi Grimberg sa

Re: [PATCH 14/14] sd: Honor block layer integrity handling flags

2014-09-11 Thread Sagi Grimberg
On 9/11/2014 3:07 AM, Martin K. Petersen wrote: Sagi == Sagi Grimberg sa...@dev.mellanox.co.il writes: [Back from vacation] Hey Martin, + [SCSI_PROT_WRITE_PASS] = SCSI_PROT_TRANSFER_PI | + SCSI_PROT_GUARD_CHECK | + SCSI_PROT_REF_CHECK | + SCSI_PROT_REF_INCREMENT | + SCSI_PROT_IP_CHECKSUM

Re: [PATCH 14/14] sd: Honor block layer integrity handling flags

2014-09-12 Thread Sagi Grimberg
On 9/12/2014 4:35 AM, Martin K. Petersen wrote: Sagi == Sagi Grimberg sa...@dev.mellanox.co.il writes: Sagi, Sagi That's still a dependence on prot_type (type 0...). Notice that Sagi you set SCSI_PROT_REF_INCREMENT in every op index (except Sagi SCSI_PROT_NORMAL) so my point is that it's

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 6:38 PM, Jens Axboe wrote: On 09/19/2014 09:35 AM, Bart Van Assche wrote: On 09/19/14 17:27, Ming Lei wrote: On Fri, Sep 19, 2014 at 11:21 PM, Bart Van Assche bvanass...@acm.org wrote: On 09/19/14 16:28, Ming Lei wrote: On Fri, Sep 19, 2014 at 9:00 PM, Bart Van Assche

Re: [PATCH RFC 0/8] IB/srp: Add multichannel support

2014-09-19 Thread Sagi Grimberg
, unsigned int nr_queues, const int cpu) { - return cpu / ((nr_cpus + nr_queues - 1) / nr_queues); + return cpu * nr_queues / nr_cpus; } static int get_first_sibling(unsigned int cpu) Seems reasonable enough. Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from

Re: [PATCH 2/8] scsi-mq: Add support for multiple hardware queues

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 3:57 PM, Bart Van Assche wrote: Allow a SCSI LLD to declare how many hardware queues it supports by setting Scsi_Host.nr_hw_queues before calling scsi_add_host(). Note: it is assumed that each hardware queue has a queue depth of shost-can_queue. In other words, the total queue

Re: [PATCH 4/8] IB/srp: Move ib_destroy_cm_id() call into srp_free_ch_ib()

2014-09-19 Thread Sagi Grimberg
(host, target); @@ -3067,9 +3071,6 @@ out: err_disconnect: srp_disconnect_target(target); -err_cm_id: - ib_destroy_cm_id(target-cm_id); - err_free_ib: srp_free_target_ib(target); Looks good. Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send

Re: [PATCH 5/8] IB/srp: Remove stale connection retry mechanism

2014-09-19 Thread Sagi Grimberg
are keeping cm_ids online returning stale connection rejects longer then expected. let user-space retry from scratch... Reviewed-by: Sagi Grimberg sa...@mellanox.com Signed-off-by: Bart Van Assche bvanass...@acm.org --- drivers/infiniband/ulp/srp/ib_srp.c | 16 +++- 1 file changed, 3

Re: [PATCH 7/8] IB/srp: Separate target and channel variables

2014-09-19 Thread Sagi Grimberg
On 9/19/2014 3:59 PM, Bart Van Assche wrote: Changes in this patch: - Move channel variables into a new structure (struct srp_rdma_ch). - cm_id and completion handler context pointer are now of type srp_rdma_ch * insteoad of srp_target_port *. s/insteoad/instead No functionality is

Re: [PATCH 7/8] IB/srp: Separate target and channel variables

2014-09-23 Thread Sagi Grimberg
On 9/19/2014 3:59 PM, Bart Van Assche wrote: Changes in this patch: - Move channel variables into a new structure (struct srp_rdma_ch). - cm_id and completion handler context pointer are now of type srp_rdma_ch * insteoad of srp_target_port *. No functionality is changed. Signed-off-by:

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-23 Thread Sagi Grimberg
On 9/19/2014 4:00 PM, Bart Van Assche wrote: Improve performance by using multiple RDMA/RC channels per SCSI host for communicating with an SRP target. Hey Bart, Since you don't seem to negotiate/declare multichannel with the target, did you test this code with some target implementations

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-24 Thread Sagi Grimberg
On 9/23/2014 10:02 PM, Bart Van Assche wrote: On 23/09/2014 10:32, Sagi Grimberg wrote: On 9/19/2014 4:00 PM, Bart Van Assche wrote: Improve performance by using multiple RDMA/RC channels per SCSI host for communicating with an SRP target. Hey Bart, Since you don't seem to negotiate

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-24 Thread Sagi Grimberg
On 9/24/2014 4:13 PM, Bart Van Assche wrote: On 24/09/2014 6:22, Sagi Grimberg wrote: Since SRP_LOGIN_REQ/RESP has some free bits why not declare it and activate it when both sides *says* they support it? I'd be much calmer knowing we're on the safe side on this... Hello Sagi, Since more

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-09-24 Thread Sagi Grimberg
On 9/24/2014 4:38 PM, Sagi Grimberg wrote: On 9/24/2014 4:13 PM, Bart Van Assche wrote: On 24/09/2014 6:22, Sagi Grimberg wrote: Since SRP_LOGIN_REQ/RESP has some free bits why not declare it and activate it when both sides *says* they support it? I'd be much calmer knowing we're on the safe

Re: [PATCH] tcm_loop: Fixup tag handling

2014-10-02 Thread Sagi Grimberg
On 10/2/2014 10:30 AM, Hannes Reinecke wrote: The SCSI command tag is set to the tag assigned from the block layer, not the SCSI-II tag message. So we need to convert it into the correct SCSI-II tag message based on the device flags, not the tag value itself. Looks Good Reviewed-by: Sagi

Re: [PATCH] iser-target: Disable TX completion interrupt coalescing

2014-10-07 Thread Sagi Grimberg
Cc: Moussa Ba mouss...@micron.com Reported-by: Sagi Grimberg sa...@dev.mellanox.co.il Cc: Sagi Grimberg sa...@dev.mellanox.co.il Cc: sta...@vger.kernel.org # 3.13+ Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/infiniband/ulp/isert/ib_isert.c |4 ++-- 1 file changed, 2

Re: [PATCH 1/1] IB/iser: Remove hard coded values for cqe and send_wr

2014-10-07 Thread Sagi Grimberg
On 10/8/2014 3:41 AM, Jay Kallickal wrote: From: Jayamohan Kallickal jayamoh...@gmail.com This patch allows the underlying hardware to choose values other than hard coded max values for cqe and send_wr while preventing them from exceeding max supported values. Hi Minh and Jayamohan,

Re: [PATCH] iser-target: Disable TX completion interrupt coalescing

2014-10-08 Thread Sagi Grimberg
On 10/8/2014 9:01 AM, Nicholas A. Bellinger wrote: On Tue, 2014-10-07 at 09:58 +0300, Sagi Grimberg wrote: On 10/6/2014 5:15 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch explicitly disables TX completion interrupt coalescing logic

Re: [PATCH 1/1] IB/iser: Remove hard coded values for cqe and send_wr

2014-10-13 Thread Sagi Grimberg
On 10/9/2014 8:14 AM, Jayamohan.K wrote: SNIP Hi Minh and Jayamohan, So I agree that we would want to take device capabilities into account here, but we need to be able to adjust scsi_cmds_max (can_queue) in case the max wqe supported is lower than scsi_cmds_max *

Re: [PATCH 8/8] IB/srp: Add multichannel support

2014-10-13 Thread Sagi Grimberg
On 10/7/2014 3:51 PM, Bart Van Assche wrote: On 09/23/14 18:32, Sagi Grimberg wrote: Since you don't seem to negotiate/declare multichannel with the target, did you test this code with some target implementations other than SCST that happen to be out there? (replying to an e-mail of two weeks

Re: [PATCH v2 01/12] blk-mq: Use all available hardware queues

2014-10-17 Thread Sagi Grimberg
On Mon, Oct 13, 2014 at 11:45:43AM +0200, Bart Van Assche wrote: Since patch 1/12 already has been sent separately to Jens patches 2/12..12/12 remain. The SRP initiator changes in this series depend on the blk-mq and scsi-mq features added in patches 2/12..4/12. I think we should avoid

Re: [PATCH v2 03/12] scsi-mq: Add support for multiple hardware queues

2014-10-19 Thread Sagi Grimberg
depth per host is (number of hardware queues) * (shost-can_queue). Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Christoph Hellwig h...@lst.de Cc: Sagi Grimberg sa...@mellanox.com --- drivers/scsi/scsi_lib.c | 2 +- include/scsi/scsi_host.h | 4 2 files changed, 5 insertions(+), 1

Re: [PATCH v2 04/12] scsi_tcq.h: Add support for multiple hardware queues

2014-10-19 Thread Sagi Grimberg
On 10/7/2014 4:04 PM, Bart Van Assche wrote: Modify scsi_find_tag() and scsi_host_find_tag() such that these fuctions can translate a tag generated by blk_mq_unique_tag(). Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Christoph Hellwig h...@lst.de Cc: Sagi Grimberg sa...@mellanox.com

Re: [PATCH v2 02/12] blk-mq: Add blk_mq_unique_tag()

2014-10-19 Thread Sagi Grimberg
can be eliminated by inlining it into blk_mq_unique_tag(). Would you like me to rework this patch accordingly ? Yes, please. With this bit you can add: Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message

Re: [PATCH v2 07/12] IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning

2014-10-19 Thread Sagi Grimberg
is pulled during a SCSI LUN scan. Note: so far the above behavior has only been observed with the kernel module parameter ch_count set to a value = 2. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com

Re: [PATCH v2 08/12] IB/srp: Introduce two new srp_target_port member variables

2014-10-19 Thread Sagi Grimberg
. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com --- drivers/infiniband/ulp/srp/ib_srp.c | 39 ++--- drivers/infiniband/ulp/srp/ib_srp.h | 4 +++- 2 files changed

Re: [PATCH v2 09/12] IB/srp: Separate target and channel variables

2014-10-19 Thread Sagi Grimberg
bit of it. You can add: Acked-by: Sagi Grimberg sa...@mellanox.com Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com --- drivers/infiniband/ulp/srp/ib_srp.c | 674

Re: [PATCH v2 11/12] IB/srp: Eliminate free_reqs list

2014-10-19 Thread Sagi Grimberg
On 10/17/2014 1:59 PM, Christoph Hellwig wrote: On Tue, Oct 07, 2014 at 03:06:54PM +0200, Bart Van Assche wrote: The free_reqs list is no longer needed now that we are using tags assigned by the block layer. Hence remove it. Is there any good reason not to fold this into the previous patch?

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-19 Thread Sagi Grimberg
after the corresponding allocation function failed. - Add a ch_count sysfs attribute per target port. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com --- Documentation/ABI/stable/sysfs-driver-ib_srp

Re: [PATCH 0/5] block/scsi/lio support for COMPARE_AND_WRITE

2014-10-20 Thread Sagi Grimberg
On 10/18/2014 11:32 PM, Mike Christie wrote: On 10/18/2014 03:11 AM, Bart Van Assche wrote: On 10/16/14 07:37, micha...@cs.wisc.edu wrote: The following patches implement the SCSI command COMPARE_AND_WRITE as a new bio/request type REQ_CMP_AND_WRITE. COMPARE_AND_WRITE is defined in the SCSI

Re: [PATCH v2 04/12] scsi_tcq.h: Add support for multiple hardware queues

2014-10-21 Thread Sagi Grimberg
On 10/21/2014 11:49 AM, Christoph Hellwig wrote: On Mon, Oct 20, 2014 at 02:01:25PM +0200, Bart Van Assche wrote: On 10/19/14 18:12, Sagi Grimberg wrote: On 10/7/2014 4:04 PM, Bart Van Assche wrote: -req = blk_queue_find_tag(sdev-request_queue, tag); +req

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-21 Thread Sagi Grimberg
On 10/20/2014 3:56 PM, Bart Van Assche wrote: On 10/19/14 19:36, Sagi Grimberg wrote: On 10/7/2014 4:07 PM, Bart Van Assche wrote: * comp_vector, a number in the range 0..n-1 specifying the - MSI-X completion vector. Some HCA's allocate multiple (n) - MSI-X vectors

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-21 Thread Sagi Grimberg
after the corresponding allocation function failed. - Add a ch_count sysfs attribute per target port. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com SNIP spin_lock_irqsave

Re: [GIT PULL] target updates for v3.18-rc2

2014-10-21 Thread Sagi Grimberg
On 10/21/2014 2:39 AM, Nicholas A. Bellinger wrote: Hi Linus, Here are the target updates for v3.18-rc2 code. These where originally destined for -rc1, but due to the combination of travel last week for KVM Forum and my mistake of taking the three week merge window literally, the pull request

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-28 Thread Sagi Grimberg
On 10/21/2014 12:10 PM, Sagi Grimberg wrote: On 10/20/2014 3:56 PM, Bart Van Assche wrote: On 10/19/14 19:36, Sagi Grimberg wrote: On 10/7/2014 4:07 PM, Bart Van Assche wrote: * comp_vector, a number in the range 0..n-1 specifying the - MSI-X completion vector. Some HCA's

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-30 Thread Sagi Grimberg
On 10/29/2014 12:52 PM, Bart Van Assche wrote: On 10/28/14 19:32, Sagi Grimberg wrote: On 10/21/2014 12:10 PM, Sagi Grimberg wrote: On 10/20/2014 3:56 PM, Bart Van Assche wrote: On 10/19/14 19:36, Sagi Grimberg wrote: On 10/7/2014 4:07 PM, Bart Van Assche wrote: * comp_vector

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-30 Thread Sagi Grimberg
On 10/29/2014 2:36 PM, Bart Van Assche wrote: On 10/21/14 11:14, Sagi Grimberg wrote: On 10/7/2014 4:07 PM, Bart Van Assche wrote: spin_lock_irqsave(ch-lock, flags); ch-req_lim += be32_to_cpu(rsp-req_lim_delta); @@ -1906,7 +1970,7 @@ static int srp_queuecommand

Re: [PATCH v3 11/11] IB/srp: Fix a race condition triggered by destroying a queue pair

2014-10-30 Thread Sagi Grimberg
by modifying a QP into the error state and by waiting until all receive completions have been processed before destroying a QP. Reported-by: Max Gurtuvoy m...@mellanox.com Signed-off-by: Bart Van Assche bvanass...@acm.org Reviewed-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/srp

Re: [PATCH v3 06/11] IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning

2014-10-30 Thread Sagi Grimberg
is pulled during a SCSI LUN scan. Note: so far the above behavior has only been observed with the kernel module parameter ch_count set to a value = 2. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com

Re: [PATCH v3 09/11] IB/srp: Use block layer tags

2014-10-30 Thread Sagi Grimberg
that list. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com --- drivers/infiniband/ulp/srp/ib_srp.c | 55 +++-- drivers/infiniband/ulp/srp/ib_srp.h | 3 -- 2 files

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-30 Thread Sagi Grimberg
On 10/30/2014 4:36 PM, Bart Van Assche wrote: On 10/30/14 15:19, Sagi Grimberg wrote: My impression here that in the default settings, on a 1 NUMA node with 8 cores, 2 different srp connections (using 4 channels each) will be associated with comp vectors 0-3. while it could potentially use

Re: [PATCH v3 11/11] IB/srp: Fix a race condition triggered by destroying a queue pair

2014-10-30 Thread Sagi Grimberg
On 10/30/2014 4:53 PM, Bart Van Assche wrote: On 10/30/14 15:26, Sagi Grimberg wrote: On 10/30/2014 3:50 PM, Bart Van Assche wrote: +/* Destroying a QP and reusing ch-done is only safe if not connected */ +WARN_ON_ONCE(target-connected); I thought we agreed that cannot happen. I

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-10-30 Thread Sagi Grimberg
On 10/30/2014 5:19 PM, Bart Van Assche wrote: On 10/30/14 16:06, Sagi Grimberg wrote: I'm not aware of any implicit interrupt coalescing effect... In case it was not clear what I was referring to: if multiple completion queue handling routines run on the same CPU then the average number

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-11-02 Thread Sagi Grimberg
On 10/31/2014 11:19 AM, Bart Van Assche wrote: On 10/30/14 18:33, Sagi Grimberg wrote: Now I realize that we can hit serious problems here since we never solved the issue of srp polling routine that might poll forever within an interrupt (or at least until a hard lockup). Its interesting

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-11-04 Thread Sagi Grimberg
On 11/4/2014 1:46 PM, Bart Van Assche wrote: On 11/03/14 02:46, Elliott, Robert (Server Storage) wrote: -Original Message- From: Sagi Grimberg [mailto:sa...@dev.mellanox.co.il] Sent: Sunday, November 02, 2014 7:03 AM To: Bart Van Assche; Christoph Hellwig Cc: Jens Axboe; Sagi Grimberg

Re: [PATCH v2 12/12] IB/srp: Add multichannel support

2014-11-05 Thread Sagi Grimberg
On 11/5/2014 6:57 AM, Elliott, Robert (Server Storage) wrote: -Original Message- From: Sagi Grimberg [mailto:sa...@dev.mellanox.co.il] Sent: Tuesday, November 04, 2014 6:15 AM To: Bart Van Assche; Elliott, Robert (Server Storage); Christoph Hellwig Cc: Jens Axboe; Sagi Grimberg

Re: [PATCH] iscsi-target: fix error path in iscsi_target_init_module()

2014-11-30 Thread Sagi Grimberg
; r2t_out: + iscsit_unregister_transport(iscsi_target_transport); kmem_cache_destroy(lio_r2t_cache); ooo_out: kmem_cache_destroy(lio_ooo_cache); Yep, Looks good. Reviewed-by: Sagi Grimberg sa...@mellanox.com -- To unsubscribe from this list: send the line unsubscribe linux

Re: [LSF/MM TOPIC] Reducing the SRP initiator failover time

2013-02-08 Thread Sagi Grimberg
On 2/8/2013 12:42 AM, Vu Pham wrote: It is known that it takes about two to three minutes before the upstream SRP initiator fails over from a failed path to a working path. This is not only considered longer than acceptable but is also longer than other Linux SCSI initiators (e.g. iSCSI

  1   2   3   4   5   6   >