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

2014-10-29 Thread Martin K. Petersen
e driver would want to describe in its host template. That's why I asked. We can add it if somebody wants it but it's a bit of a chicken and egg problem. Anyway. Minor issue. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "un

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

2014-10-27 Thread Martin K. Petersen
>>>>> "Bart" == Bart Van Assche writes: Bart> Modify scsi_find_tag() and scsi_host_find_tag() such that these Bart> fuctions can translate a tag generated by blk_mq_unique_tag(). Looks good to me. Reviewed-by: Martin K. Petersen -- Martin K. Petersen

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

2014-10-27 Thread Martin K. Petersen
gt; shost-> can_queue. In other words, the total queue depth per host Bart> is (number of hardware queues) * (shost->can_queue). I suggest you emphasize that assumption in the header file. Also: What about the host template? Reviewed-by: Martin K. Petersen -- Martin K. Petersen O

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

2014-10-27 Thread Martin K. Petersen
structure, and since passing the hctx pointer directly to the Bart> queuecommand callback function would require modification of all Bart> SCSI LLDs, add a function to the block layer that allows to query Bart> the hardware context index. I agree with consolidating the two functions.

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

2014-08-06 Thread Martin K. Petersen
ields in the DIF data buffer Sagi> (usually this is offloaded). READ CAPACITY returns a block size of 512 even though the blocks on disk are 520. That's the beauty of it. At the command level all transfers are expressed in number of blocks, not bytes. The application will see an N x 512 byt

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

2014-07-13 Thread Martin K. Petersen
he future? I have cleaned this up in my integrity patch set since we already have the flag to determine whether to transfer PI or not. I'll get those patches out today. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe

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

2014-06-25 Thread Martin K. Petersen
the easiest fix is to just pass a scsi_data_buffer to Christoph> scsi_transfer_length(), and let the caller use Christoph> scsi_in/scsi_out to find the right one. I'm perfectly OK with that approach. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send

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

2014-06-24 Thread Martin K. Petersen
>>>>> "Mike" == Mike Christie writes: Mike> It would be nice to just have one function to call and it just do Mike> the right thing for the drivers. But what is the right thing when there are buffers for both directions? -- Martin K. Petersen Oracle Linu

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

2014-06-24 Thread Martin K. Petersen
->length; I guess that depends on the context the wrapper is called in. I think iscsi is the only place where there's a distinction thanks to bidi. Looks like there are several places where that's done. In that case I wonder if we should have explicit scsi_in_transfer_length() and s

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

2014-06-24 Thread Martin K. Petersen
ig Debugged-by: Mike Christie Signed-off-by: Martin K. Petersen diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 42ed789ebafc..e0ae71098144 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -318,7 +318,7 @@ static inline void set_driver_byte(stru

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

2014-06-23 Thread Martin K. Petersen
>>>>> "Mike" == Mike Christie writes: >> + unsigned int xfer_len = blk_rq_bytes(scmd->request); Mike> Can you do bidi and dif/dix? Nope. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscri

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

2014-06-11 Thread Martin K. Petersen
i> will compute the total transfer length from the scsi command data Sagi> length and protection attributes. Looks good! -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majo

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

2014-06-11 Thread Martin K. Petersen
ntially nab> the same tradeoff of recalculating the transport's cmd->data_length nab> from values within the CDB w/ prot=1. nab> MKP, WDYT..? My general feeling is that once sbc on the target sees {rd,wr}protect > 0 we're in the territory where you should start sepa

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

2014-06-10 Thread Martin K. Petersen
>>>>> "Or" == Or Gerlitz writes: Or> Just to make sure, by 3.16 you also mean 3.15.y, right? Yes. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to ma

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

2014-06-10 Thread Martin K. Petersen
_len = blk_rq_bytes(scmd->request); if (scsi_prot_flagged(SCSI_PROT_TRANSFER_PI)) xfer_len += (xfer_len >> ilog2(scsi_prot_interval(scmd))) * 8; return xfer_len; } -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "uns

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

2014-06-03 Thread Martin K. Petersen
meant to be the thing driver's should key off of to adjust transfer length. But I'm also happy to provide a unsigned int scsi_transfer_length(struct scsi_cmnd *) thingy that returns the right byte count. Just bear in mind that the host-facing DIX transfer length may be different. --

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

2014-06-02 Thread Martin K. Petersen
break; + case 4096: + data_len += (data_len >> 12) * 8; + break; + default: + data_len += + (data_len >> ilog2(sc

Re: linux rdma 3.14 merge plans

2014-01-17 Thread Martin K. Petersen
airly trivial but do require some changes to mptNsas, lpfc and qla2xxx. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html