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

2014-06-24 Thread Mike Christie
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 will compute the total transfer length from the

Re: [PATCH 00/22] Add and use pci_zalloc_consistent

2014-06-24 Thread Johannes Berg
On Tue, 2014-06-24 at 09:27 +1000, Julian Calaby wrote: - x = (T)pci_alloc_consistent(E1,E2,E3); + x = pci_zalloc_consistent(E1,E2,E3); if ((x==NULL) || ...) S - memset((T2)x,0,E2); I don't know much about SmPL, but wouldn't having that if statement there reduce your matches? Code

[PATCH] cxgb4: Remove duplicate tcp-options clearing

2014-06-24 Thread Christoph Paasch
tmp_opt is memset to 0. Thus, no need for another call to tcp_clear_options which simply sets some fields explicitly to 0 again. Cc: Steve Wise sw...@chelsio.com Cc: Roland Dreier rol...@kernel.org Cc: Sean Hefty sean.he...@intel.com Cc: Hal Rosenstock hal.rosenst...@gmail.com Cc:

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

2014-06-24 Thread Martin K. Petersen
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 Oh, I see. So things break because iSCSI uses

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 will

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] xprtrdma: Fix DMA-API-DEBUG warning by checking dma_map result

2014-06-24 Thread Anna Schumaker
On 06/19/2014 09:06 AM, Yan Burman wrote: Fix the following warning when DMA-API debug is enabled by checking ib_dma_map_single result: [ 1455.345548] [ cut here ] [ 1455.346863] WARNING: CPU: 3 PID: 3929 at /home/yanb/kernel/net-next/lib/dma-debug.c:1140

Re: mlx4 - query regarding PF VF functionality division

2014-06-24 Thread Bob Biloxi
Not really, but let's take EIM approach, what's your goal/mission? Let's say I am going through code to understand only the PF related functionality without bothering about VF, what are the things I need to keep in mind. I mean do i need to : a. Go through all the files in mlx4 b. If the code is

RE: [PATCH] cxgb4: Remove duplicate tcp-options clearing

2014-06-24 Thread Steve Wise
Acked-by: Steve Wise sw...@opengridcomputing.com -- 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

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

2014-06-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 08:53:25AM -0400, Martin K. Petersen wrote: Oh, I see. So things break because iSCSI uses scsi_transfer_length() where the scatterlist length was used in the past. How about this? This fixes the regression for me. -- To unsubscribe from this list: send the line

Re: [PATCH V2] xprtrdma: Fix DMA-API-DEBUG warning by checking dma_map result

2014-06-24 Thread Chuck Lever
On Jun 24, 2014, at 9:47 AM, Anna Schumaker schumaker.a...@gmail.com wrote: On 06/19/2014 09:06 AM, Yan Burman wrote: Fix the following warning when DMA-API debug is enabled by checking ib_dma_map_single result: [ 1455.345548] [ cut here ] [ 1455.346863] WARNING:

Re: [PATCH v1 00/13] NFS/RDMA patches for 3.17

2014-06-24 Thread Or Gerlitz
On Tue, Jun 24, 2014 at 1:39 AM, Chuck Lever chuck.le...@oracle.com wrote: The main purpose of this series is to address more connection drop recovery issues by fixing FRMR re-use to make it less likely the client will drop the connection due to a memory operation error. Some other clean-ups

Re: [PATCH v1 01/13] xprtrdma: Fix panic in rpcrdma_register_frmr_external()

2014-06-24 Thread Or Gerlitz
On Tue, Jun 24, 2014 at 1:39 AM, Chuck Lever chuck.le...@oracle.com wrote: seg1-mr_nsegs is not yet initialized when it is used to unmap segments during an error exit. Use the same unmapping logic for all error exits. if (frmr_wr.wr.fast_reg.length len) { used to be a BUG_ON check. The

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

2014-06-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 04:08:25PM +0300, Sagi Grimberg wrote: Oh, I see. So things break because iSCSI uses scsi_transfer_length() where the scatterlist length was used in the past. Ohhh, didn't notice this one and sent out a duplicate... The patch looks good to me obviously. Can you

Re: PCI/AER: AER in SRIOV environment

2014-06-24 Thread Don Dutile
On 06/23/2014 06:44 PM, Yishai Hadas wrote: On 6/23/2014 11:12 PM, Don Dutile wrote: On 06/23/2014 03:09 PM, Bjorn Helgaas wrote: [+cc linux-pci, Don] Adding Alex Williamson in case he can add more to this conversation... On Mon, Jun 23, 2014 at 8:29 AM, Yishai Hadas

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: SCSI: Use SCSI data buffer length to extract transfer size Commit 8846bab180fa introduced a helper that can be used to query the wire transfer size for a SCSI command taking protection information into account. However, some commands

Re: [PATCH v1 08/13] xprtrdma: Back off rkey when FAST_REG_MR fails

2014-06-24 Thread Anna Schumaker
On 06/23/2014 06:40 PM, Chuck Lever wrote: If posting a FAST_REG_MR Work Reqeust fails, or the FAST_REG WR flushes, revert the rkey update to avoid subsequent IB_WC_MW_BIND_ERR completions. Suggested-by: Steve Wise sw...@opengridcomputing.com Signed-off-by: Chuck Lever chuck.le...@oracle.com

Re: [PATCH v1 13/13] xprtrdma: Handle additional connection events

2014-06-24 Thread Anna Schumaker
On 06/23/2014 06:40 PM, Chuck Lever wrote: Commit 38ca83a5 added RDMA_CM_EVENT_TIMEWAIT_EXIT. But that status is relevant only for consumers that re-use their QPs on new connections. xprtrdma creates a fresh QP on reconnection, so that event should be explicitly ignored. Squelch the alarming

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

2014-06-24 Thread Michael Christie
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 when the setup Mike is completed but during

Re: PCI/AER: AER in SRIOV environment

2014-06-24 Thread Yishai Hadas
On 6/24/2014 5:56 PM, Don Dutile wrote: On 06/23/2014 06:44 PM, Yishai Hadas wrote: On 6/23/2014 11:12 PM, Don Dutile wrote: On 06/23/2014 03:09 PM, Bjorn Helgaas wrote: [+cc linux-pci, Don] Adding Alex Williamson in case he can add more to this conversation... On Mon, Jun 23, 2014 at

Re: [PATCH v1 08/13] xprtrdma: Back off rkey when FAST_REG_MR fails

2014-06-24 Thread Chuck Lever
On Jun 24, 2014, at 11:47 AM, Anna Schumaker schumaker.a...@gmail.com wrote: On 06/23/2014 06:40 PM, Chuck Lever wrote: If posting a FAST_REG_MR Work Reqeust fails, or the FAST_REG WR flushes, revert the rkey update to avoid subsequent IB_WC_MW_BIND_ERR completions. Suggested-by: Steve

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

2014-06-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 11:08:54AM -0500, Michael Christie wrote: static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd) { - unsigned int xfer_len = blk_rq_bytes(scmd-request); + unsigned int xfer_len = scsi_out(scmd)-length; unsigned int prot_op =

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-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 07:27:46PM +0300, Sagi Grimberg wrote: This condition only matters in the bidi case, which is not relevant for the PI case. I suggested to condition that in libiscsi (posted in the second thread, copy-paste below). Although I do agree that scsi_transfer_length() helper

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

2014-06-24 Thread Martin K. Petersen
Mike == Michael Christie micha...@cs.wisc.edu writes: Mike Do we need to check for the data direction. Something like Mike if (scmd-sc_data_direction == DMA_TO_DEVICE) Mike xfer_len = scsi_out(scmnd)-length; Mike else Mike xfer_len = scsi_in(scmnd)-length; I guess that depends on the

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

2014-06-24 Thread Mike Christie
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, which is not relevant for the PI case. I suggested to condition that in libiscsi (posted in the second thread, copy-paste below).

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

2014-06-24 Thread Martin K. Petersen
Mike == Mike Christie micha...@cs.wisc.edu 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 Linux Engineering -- To

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

2014-06-24 Thread Mike Christie
On 06/24/2014 11:31 AM, Martin K. Petersen wrote: Mike == Michael Christie micha...@cs.wisc.edu writes: Mike Do we need to check for the data direction. Something like Mike if (scmd-sc_data_direction == DMA_TO_DEVICE) Mike xfer_len = scsi_out(scmnd)-length; Mike else Mike

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

2014-06-24 Thread Mike Christie
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, which is not relevant for the PI case. I suggested to condition that in libiscsi (posted

Re: [PATCH v1 00/13] NFS/RDMA patches for 3.17

2014-06-24 Thread Chuck Lever
On Jun 24, 2014, at 10:35 AM, Or Gerlitz or.gerl...@gmail.com wrote: On Tue, Jun 24, 2014 at 1:39 AM, Chuck Lever chuck.le...@oracle.com wrote: The main purpose of this series is to address more connection drop recovery issues by fixing FRMR re-use to make it less likely the client will

Re: PCI/AER: AER in SRIOV environment

2014-06-24 Thread Alex Williamson
On Tue, 2014-06-24 at 19:22 +0300, Yishai Hadas wrote: On 6/24/2014 5:56 PM, Don Dutile wrote: On 06/23/2014 06:44 PM, Yishai Hadas wrote: On 6/23/2014 11:12 PM, Don Dutile wrote: On 06/23/2014 03:09 PM, Bjorn Helgaas wrote: [+cc linux-pci, Don] Adding Alex Williamson in case he can

Re: [PATCH v1 10/13] xprtrdma: Release FRMR segment buffers during LOCAL_INV completion

2014-06-24 Thread Shirley Ma
Would it be possible to delay rpcrdma_buffer_put() until LOCAL_INV request send completion? remove rpcrdma_buffer_put() from xprt_rdma_free(), add a call back after LOCAL_INV completed? Shirley On 06/23/2014 03:40 PM, Chuck Lever wrote: FRMR uses a LOCAL_INV Work Request, which is