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 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] 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] 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] 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 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 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-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 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 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 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-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: 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

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: [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

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] 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: 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 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: 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 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: [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 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 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

[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 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 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: iSCSI Expected Data Transfer Length for T10-PI

2014-05-27 Thread Sagi Grimberg
On 5/27/2014 2:58 PM, Black, David wrote: Hi Sagi, Hey David, RFC-7143 states: the Expected Data Transfer Length field contains the number of bytes of data involved in this SCSI operation. Since this field relates to *data bytes* I kept T10-PI implicit wrt this field. The iSCSI target

Re: [PATCH] iser-target: Add missing target_put_sess_cmd for ImmedateData failure

2014-05-25 Thread Sagi Grimberg
descriptors. This fix follows what traditional iscsi-target code already does for the same failure case within iscsit_get_immediate_data(). Reported-by: Sagi Grimberg sa...@dev.mellanox.co.il Cc: Sagi Grimberg sa...@dev.mellanox.co.il Cc: Or Gerlitz ogerl...@mellanox.com Signed-off-by: Nicholas Bellinger n

iSCSI Expected Data Transfer Length for T10-PI

2014-05-25 Thread Sagi Grimberg
Hey All, Recently, iSER end-to-end T10-PI support maid it mainline. I am wandering about the impact T10-PI should or shouldn't have on iSCSI header field Expected Data Transfer Length. RFC-7143 states: the Expected Data Transfer Length field contains the number of bytes of data involved in

Re: iSCSI Expected Data Transfer Length for T10-PI

2014-05-25 Thread Sagi Grimberg
On 5/25/2014 10:39 PM, Julian Satran wrote: Hi Julian, I have some trouble parsing you English/Question. I'll try to clarify. I think the intent of SCSI PI was that wherever the PI exist it should be checked end-to-end and it may be checked in between. A storage client (server) will have

Re: [PATCH] target: Allow non-supporting backends to set pi_prot_type to 0

2014-04-16 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: blk-mq queue selection and queue_rq preemption

2014-04-09 Thread Sagi Grimberg
On 4/8/2014 6:40 PM, Jens Axboe wrote: On 2014-04-08 05:10, Sagi Grimberg wrote: On 4/7/2014 10:45 PM, Jens Axboe wrote: On 04/07/2014 06:44 AM, Sagi Grimberg wrote: Hey Jens, Christoph Co, I raised this question at LSF but didn't get a clear answer on this matter. So it seems to me

Re: [PATCH 1/9] target/iblock: Fix double bioset_integrity_free bug

2014-04-07 Thread Sagi Grimberg
was introduced with commit ecebbf6cc, and will end up triggering a general protection fault in iblock_free_device() Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Or Gerlitz ogerl...@mellanox.com Cc: Quinn Tran quinn.t...@qlogic.com Cc: Giridhar Malavali

Re: [PATCH 2/9] target: Pass in transport supported PI at session initialization

2014-04-07 Thread Sagi Grimberg
this to be exposed via a new iscsit_transport-iscsit_get_sup_prot_ops() callback. For loopback, set TARGET_PROT_ALL to signal SCSI initiator mode operation. For all other drivers, set TARGET_PROT_NORMAL to disable fabric level PI. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg

Re: [PATCH 3/9] target/spc: Only expose PI inquiry bits when supported by fabric

2014-04-07 Thread Sagi Grimberg
; + } /* Set HEADSUP, ORDSUP, SIMPSUP */ buf[5] = 0x07; 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

Re: [PATCH 5/9] target/sbc: Only expose PI read_cap16 bits when supported by fabric

2014-04-07 Thread Sagi Grimberg
On 4/3/2014 12:35 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Only expose the PI protection type bits in READ_CAPACITY_16 if the session + fabric support DIX PASS operations. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa

Re: [PATCH 6/9] target/sbc: Add sbc_dif_write_insert software emulation

2014-04-07 Thread Sagi Grimberg
with backend devices that currently have T10 PI enabled. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Or Gerlitz ogerl...@mellanox.com Cc: Quinn Tran quinn.t...@qlogic.com Cc: Giridhar Malavali giridhar.malav...@qlogic.com Signed-off-by: Nicholas Bellinger n

Re: [PATCH 7/9] target: Enable WRITE_INSERT emulation in target_execute_cmd

2014-04-07 Thread Sagi Grimberg
drivers that currently don't support DIF over-the-wire, in order to inact with backend devices that have hardware (IBLOCK) or software (FILEIO + RAMDISK) support for handling T10 PI. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Or Gerlitz ogerl

Re: [PATCH 8/9] target/sbc: Add sbc_dif_read_strip software emulation

2014-04-07 Thread Sagi Grimberg
sbc_dif_read_strip() in order to determine number of sectors using cmd-prot_length, and skip the extra sbc_dif_copy_prot(). Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Or Gerlitz ogerl...@mellanox.com Cc: Quinn Tran quinn.t...@qlogic.com Cc: Giridhar Malavali

Re: [PATCH 9/9] target: Enable READ_STRIP emulation in target_complete_ok_work

2014-04-07 Thread Sagi Grimberg
still like to interact with backend device that have T10 PI enabled. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Or Gerlitz ogerl...@mellanox.com Cc: Quinn Tran quinn.t...@qlogic.com Cc: Giridhar Malavali giridhar.malav...@qlogic.com Signed-off

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-04-07 Thread Sagi Grimberg
buffer (Paolo) - Enable virtio_scsi_cmd_req_pi usage (Paolo) Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: Hannes Reinecke h...@suse.de Cc: Sagi Grimberg sa...@dev.mellanox.co.il Cc

Re: [PATCH 7/9] target: Enable WRITE_INSERT emulation in target_execute_cmd

2014-04-07 Thread sagi grimberg
On 4/7/2014 11:11 AM, Nicholas A. Bellinger wrote: Looks good to me. Reviewed-by: Sagi Grimberg sa...@mellanox.com This is useless though without the code setting this prot_op in sbc_set_prot_op_checks()... Not sure I follow.. sbc_set_prot_op_checks() is already setting

blk-mq queue selection and queue_rq preemption

2014-04-07 Thread Sagi Grimberg
Hey Jens, Christoph Co, I raised this question at LSF but didn't get a clear answer on this matter. So it seems to me that the hctx selection and the actual request dispatch (queue_rq) are preemptive: (1) blk_mq_get_ctx(q); (2) map_queue(q, ctx-cpu); ... (3) blk_mq_put_ctx(ctx); (4)

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-04-02 Thread Sagi Grimberg
On 4/1/2014 8:45 PM, Nicholas A. Bellinger wrote: On Tue, 2014-04-01 at 20:27 +0300, sagi grimberg wrote: On 4/1/2014 8:09 PM, Martin K. Petersen wrote: Sagi == Sagi Grimberg sa...@dev.mellanox.co.il writes: Sagi I originally wrote the code to support that. But it got left Sagi behind since I

Re: [PATCH 2/4] tcm_qla2xxx: T10-Dif set harware capability

2014-04-02 Thread sagi grimberg
On 4/1/2014 8:40 PM, Nicholas A. Bellinger wrote: SNIP So no way to get it centralized? Yes, still working on how that might look.. I still don't understand the iscsi/iser constraint. Every other fabric aside from iscsi/iser could simply provide a TFO-get_fabric_prot(se_tpg) to query for

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-04-01 Thread Sagi Grimberg
On 4/1/2014 4:19 AM, Nicholas A. Bellinger wrote: On Mon, 2014-03-31 at 17:53 +, Quinn Tran wrote: On 3/28/14 6:24 PM, sagi grimberg sa...@mellanox.com wrote: On 3/29/2014 3:53 AM, Quinn Tran wrote: SNIP +} +} + if (lun-lun_se_dev != NULL

Re: [PATCH 2/4] tcm_qla2xxx: T10-Dif set harware capability

2014-04-01 Thread Sagi Grimberg
On 4/1/2014 4:11 AM, Nicholas A. Bellinger wrote: SNIP + +if (scsi_host_get_prot(lport-qla_vha-host)) { +tpg-se_tpg.fabric_sup_prot_type = (TARGET_DIF_TYPE0_PROT| +TARGET_DIF_TYPE1_PROT|TARGET_DIF_TYPE2_PROT| +TARGET_DIF_TYPE3_PROT); + +

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-04-01 Thread sagi grimberg
On 4/1/2014 8:09 PM, Martin K. Petersen wrote: Sagi == Sagi Grimberg sa...@dev.mellanox.co.il writes: Sagi I originally wrote the code to support that. But it got left Sagi behind since I figured it is not an interesting use-case. If your Sagi beckend doesn't support T10-PI why should

[PATCH] Block/iopoll: Remove redundant export variable blk_iopoll_enabled

2014-03-28 Thread Sagi Grimberg
Wen can confirm. Signed-off-by: Sagi Grimberg sa...@mellanox.com Cc: Jayamohan Kallickal jayamohan.kallic...@emulex.com Cc: Wen Xiong wenxi...@linux.vnet.ibm.com Cc: Brian King brk...@us.ibm.com --- block/blk-iopoll.c |3 - drivers/scsi/be2iscsi/be_main.c | 206

Re: [PATCH] Block/iopoll: Remove redundant export variable blk_iopoll_enabled

2014-03-28 Thread sagi grimberg
On 3/28/2014 11:05 PM, Jens Axboe wrote: On 03/28/2014 02:01 PM, Sagi Grimberg wrote: No need for this variable anymore - blk_iopoll should always be enabled. Also remove the user references to it. I just removed the blk_iopoll_enabled condition from the user logic but I don't have

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-03-28 Thread sagi grimberg
On 3/29/2014 2:05 AM, Quinn Tran wrote: Check lower layer/HW support of T10-dif capability. When the LUN is linked between the underlining fabric and back end device, the Protection Type(1,2,3) is check against each other to make sure both side are capable of supporting the same protection

Re: [PATCH 2/4] tcm_qla2xxx: T10-Dif set harware capability

2014-03-28 Thread sagi grimberg
On 3/29/2014 2:05 AM, Quinn Tran wrote: Set Protection Type(1,2,3) capabilities, Guarg type (CRC/IPchksm) capabilities bits to let TCM core knows of HW/fabric capabilities. Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org Signed-off-by: Giridhar Malavali giridhar.malav...@qlogic.com ---

Re: [PATCH 3/4] target/rd: T10-Dif: Add init/format support

2014-03-28 Thread sagi grimberg
...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: Hannes Reinecke h...@suse.de Cc: Sagi Grimberg sa...@mellanox.com Cc: Or Gerlitz ogerl...@mellanox.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target/target_core_rd.c | 64

<    1   2   3   4   5   6   >