Re: [PATCH RFC 2/2] IB/mlx5: Implement Fast Indirect Memory Registration Feature

2014-10-13 Thread Sagi Grimberg
On 10/12/2014 10:39 PM, Or Gerlitz wrote: On 10/7/2014 4:48 PM, Sagi Grimberg wrote: * Nit change in mr_align() static routine to handle void* instead of __be64. nit comment... any reason not to put in different and unrelated to this series patch? I can, But there is no use for this out

Re: [PATCH RFC 0/2] Indirect Fast Memory registration support

2014-10-13 Thread Sagi Grimberg
On 10/13/2014 11:48 AM, Bart Van Assche wrote: On 10/12/14 21:43, Or Gerlitz wrote: Sean, Bart - any comment on the API before Sagi sits down to code the iSER changes? Hello Or, Hey Bart, Will this API ever be supported by other Mellanox RDMA drivers than mlx5, e.g. mlx4 ? Well,

[PATCH RFC 0/2] Indirect Fast Memory registration support

2014-10-07 Thread Sagi Grimberg
a usage for this feature in iSER. In the meantime, I have a working example of krping utility practicing indirect registration feature at: git://flatbed.openfabrics.org/~sgrimberg/krping.git (branch: indir_registration) Sagi Grimberg (2): IB/core: Introduce Fast Indirect Memory Registration verbs API

[PATCH RFC 1/2] IB/core: Introduce Fast Indirect Memory Registration verbs API

2014-10-07 Thread Sagi Grimberg
(if requested) 7. Free indirect MR and ib_indir_reg_list via ib_destroy_mr() and ib_free_indir_reg_list() Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/core/verbs.c | 29 include/rdma/ib_verbs.h | 55

[PATCH RFC 2/2] IB/mlx5: Implement Fast Indirect Memory Registration Feature

2014-10-07 Thread Sagi Grimberg
() static routine to handle void* instead of __be64. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/hw/mlx5/cq.c |2 + drivers/infiniband/hw/mlx5/main.c|4 + drivers/infiniband/hw/mlx5/mlx5_ib.h | 20 +++ drivers/infiniband/hw/mlx5/mr.c | 70

Re: [PATCH RFC 1/2] IB/core: Introduce Fast Indirect Memory Registration verbs API

2014-10-07 Thread Sagi Grimberg
On 10/7/2014 9:12 PM, Steve Wise wrote: On 10/7/2014 9:48 AM, Sagi Grimberg wrote: In order to support that we provide the user with an interface to pass a scattered list of buffers to the IB core layer called ib_indir_reg_list and provide the a new send work request opcode called

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 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 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 v1 for-next 00/16] On demand paging

2014-09-10 Thread Sagi Grimberg
On 9/10/2014 11:51 AM, Haggai Eran wrote: SNIP The main benefits of ODP is the simplified programming model, simplified management, and avoiding worst-case memory commitment. For example, we were able to run multiple concurrent instances of iSER targets, allowing over-commitment that otherwise

Re: mlx5 + SRP: max_qp_sz mismatch

2014-08-19 Thread Sagi Grimberg
On 8/19/2014 2:20 AM, Mark Lehrer wrote: I have a client machine that is trying to establish an SRP connection, and it is failing due to an ENOMEM memory allocation error. I traced it down to the max_qp_sz field -- the mlx5 limits this to 16384 but the request wants 32768. I spent some time

Re: [PATCH v1 for-next 00/16] On demand paging

2014-08-18 Thread Sagi Grimberg
On 7/3/2014 11:44 AM, Haggai Eran wrote: Hi Roland, I understand that you were reluctant to review these patches as long as there was an ongoing debate on whether or not the i_mmap_mutex should be changed into a spinlock. It seems that the debate concluded with the decision to change it into a

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

[PATCH 2/7] IB/iser: Remove redundant assignment

2014-08-13 Thread Sagi Grimberg
We clear the struct before - no need to do 0 assignment. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/iser/iser_memory.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/ulp/iser/iser_memory.c b/drivers/infiniband/ulp/iser

[PATCH 6/7] Target/iser: Centralize ib_sig_domain setting

2014-08-13 Thread Sagi Grimberg
Later there will be more parameters to set, so we want to do it in a centralized place. This patch does not change any functionality. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/isert/ib_isert.c | 33 +++ 1 files changed, 16

[PATCH 4/7] IB/mlx5: Use extended internal signature layout

2014-08-13 Thread Sagi Grimberg
Rather than using the basic BSF layout which utilizes a pre-configured signature settings (sufficient for current DIF implementation), we use the extended BSF layout to expose advanced signature settings. These settings will also be exposed to the user later. Signed-off-by: Sagi Grimberg sa

[PATCH 7/7] IB/mlx5, iser, isert: Add Signature API additions

2014-08-13 Thread Sagi Grimberg
-code new parameters (by DIF type). In the future, callers will retrieve them from the scsi command structure. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/hw/mlx5/qp.c | 104 drivers/infiniband/ulp/iser/iser_memory.c | 50

[PATCH 3/7] IB/iser: Set IP_CSUM as default guard type

2014-08-13 Thread Sagi Grimberg
In the future this will be a per-command parameter so we can lose it, but in the mean time IP_CSUM is a lot lighter for SW layers to compute, set it as default. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/ulp/iser/iscsi_iser.c |4 ++-- 1 files changed, 2 insertions

[PATCH 0/7] Signature feature update

2014-08-13 Thread Sagi Grimberg
- Patches #5, #6 are code centralization - Patch #7 is an API update (modifies ib_core, mlx5, iser, isert) Roland, there are some patches in iser-target code, but I'm pretty sure that they can go from your tree. Right Nic? Sagi Grimberg (7): IB/mlx5: Use enumerations for PI copy mask IB/iser: Remove

[PATCH 1/7] IB/mlx5: Use enumerations for PI copy mask

2014-08-13 Thread Sagi Grimberg
In case input and output space parameters match, we can use a copy mask from input and output space. Use enums for those. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/hw/mlx5/qp.c |6 +++--- include/linux/mlx5/qp.h |3 +++ 2 files changed, 6 insertions

Re: [PATCH for-next 2/3] mlx4_core: Add helper functions to support MR re-registration

2014-08-06 Thread Sagi Grimberg
On 7/31/2014 11:01 AM, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com Add few helper functions to support a mechanism of getting an MPT, modifying it and updating the HCA with the modified object. The code takes 2 paths, one for directly changing the MPT (and sometimes its related

Re: [PATCH for-next 3/3] IB/mlx4_ib: Add support for user MR re-registration

2014-08-06 Thread Sagi Grimberg
On 7/31/2014 11:01 AM, Or Gerlitz wrote: From: Matan Barak mat...@mellanox.com This enables the user to change the protection domain, access flags and translation (address and length) of the MR. Use basic mlx4_core helper functions to get, update and set MPT and MTT objects according to the

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 5/5] IB/srp: Optimize completion queue polling

2014-07-08 Thread Sagi Grimberg
On 7/8/2014 4:49 PM, Bart Van Assche wrote: SNIP Hello Dave, Thanks for digging up this information and also for sharing it. This is interesting. What I noticed is that the in the SRP target driver attached to the previous e-mail (srptest.c) one command at a time is processed. However, in the

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-25 Thread Sagi Grimberg
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 commands (bidi or not) the iscsi header data_length should describe the scsi_data_buffer

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-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 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 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 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 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] mlx5: Fix possible race between mr tree insert/delete

2014-06-08 Thread Sagi Grimberg
In mlx5_core_destroy_mkey we must first remove the mr from the radix tree and then destroy it, Otherwise we might hit a race in case the key was reallocated and we attempted to insert it to the radix tree. Also handle radix tree insert/delete failures. Signed-off-by: Sagi Grimberg sa

[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

[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

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

Re: [PATCH v3 0/9] SRP initiator patches for kernel 3.16

2014-05-18 Thread Sagi Grimberg
-srp-Rename-FMR-related-variables.patch 0009-IB-srp-Add-fast-registration-support.patch The series looks good to me. Reviewed-by: Sagi Grimberg sa...@mellanox.com Sagi. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org

[PATCH 0/3] mlx5 signature handover fixes for kernel 3.16

2014-05-18 Thread Sagi Grimberg
implementations. Sagi Grimberg (3): mlx5: Fix signature handover operation for interleaved buffers mlx5: Simplify signature handover wqe for interleaved buffers mlx5: Copy DIF fields only when input and output space values match drivers/infiniband/hw/mlx5/qp.c | 38

[PATCH 3/3] mlx5: Copy DIF fields only when input and output space values match

2014-05-18 Thread Sagi Grimberg
Some DIF implementations (SCSI initiator/target) may want to use different input/output values for application tag and/or reference tag. So in case memory/wire domain values don't match HW must not copy them. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/hw/mlx5/qp.c

[PATCH 2/3] mlx5: Simplify signature handover wqe for interleaved buffers

2014-05-18 Thread Sagi Grimberg
No need for repetition format pattern in case the data and protection are already interleaved in the memory domain since the pattern already exists. A single key entry is sufficient and may save some extra fetch ops. Signed-off-by: Sagi Grimberg sa...@mellanox.com --- drivers/infiniband/hw/mlx5

Re: [PATCH v2 9/9] IB/srp: Add fast registration support

2014-05-14 Thread Sagi Grimberg
On 5/14/2014 10:05 AM, Bart Van Assche wrote: On 05/13/14 18:48, Sagi Grimberg wrote: On 5/13/2014 5:44 PM, Bart Van Assche wrote: static int srp_create_target_ib(struct srp_target_port *target) { struct srp_device *dev = target-srp_host-srp_dev; @@ -318,6 +449,8 @@ static int

Re: [PATCH v2 9/9] IB/srp: Add fast registration support

2014-05-14 Thread Sagi Grimberg
On 5/14/2014 11:51 AM, Bart Van Assche wrote: On 05/14/14 10:18, Sagi Grimberg wrote: On 5/14/2014 10:05 AM, Bart Van Assche wrote: On 05/13/14 18:48, Sagi Grimberg wrote: On 5/13/2014 5:44 PM, Bart Van Assche wrote: +memcpy(desc-frpl-page_list, state-pages, + sizeof(state

Re: [PATCH v2 9/9] IB/srp: Add fast registration support

2014-05-13 Thread Sagi Grimberg
() handles completions correctly that arrive after srp_finish_req() has been invoked. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow d...@thedillows.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Vu Pham v...@mellanox.com Cc: Sebastian

Re: [PATCH v2 0/9] SRP initiator patches for kernel 3.16

2014-05-13 Thread Sagi Grimberg
On 5/13/2014 5:38 PM, Bart Van Assche wrote: Changes compared to v1: - Modified the FMR code such that one FMR pool is allocated per connection instead of one pool per HCA. - Dropped the patch Make srp_alloc_req_data() reallocate request data. - Moved introduction of the register_always

Re: [PATCH 9/9] IB/srp: Add fast registration support

2014-05-08 Thread Sagi Grimberg
On 5/8/2014 3:38 PM, Bart Van Assche wrote: On 05/07/14 19:19, Sagi Grimberg wrote: On 5/7/2014 5:59 PM, Bart Van Assche wrote: On 05/07/14 13:34, Sagi Grimberg wrote: +pool = srp_create_fr_pool(dev-dev, dev-pd, + SRP_MDESC_PER_POOL, max_pages_per_mr); 1024 FRMRs

Re: [PATCH 9/9] IB/srp: Add fast registration support

2014-05-08 Thread Sagi Grimberg
On 5/8/2014 7:00 PM, Bart Van Assche wrote: On 05/08/14 17:16, Sagi Grimberg wrote: On 5/8/2014 3:38 PM, Bart Van Assche wrote: On 05/07/14 19:19, Sagi Grimberg wrote: On 5/7/2014 5:59 PM, Bart Van Assche wrote: On 05/07/14 13:34, Sagi Grimberg wrote: +pool = srp_create_fr_pool(dev

Re: [PATCH 1/9] IB/srp: Fix kernel-doc warnings

2014-05-07 Thread Sagi Grimberg
, struct srp_target_port *target) Looks good, Reviewed-by: Sagi Grimberg sa...@mellanox.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 2/9] IB/srp: Introduce an additional local variable

2014-05-07 Thread Sagi Grimberg
On 5/6/2014 3:51 PM, Bart Van Assche wrote: This patch does not change any functionality. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow d...@thedillows.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Vu Pham v...@mellanox.com Cc

Re: [PATCH 3/9] IB/srp: Introduce srp_alloc_fmr_pool()

2014-05-07 Thread Sagi Grimberg
: Roland Dreier rol...@purestorage.com Cc: David Dillow d...@thedillows.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Vu Pham v...@mellanox.com Cc: Sebastian Parschauer sebastian.rie...@profitbricks.com --- drivers/infiniband/ulp/srp/ib_srp.c | 56 ++--- 1 file changed, 33

Re: [PATCH 4/9] IB/srp: Introduce srp_map_fmr()

2014-05-07 Thread Sagi Grimberg
On 5/6/2014 3:53 PM, Bart Van Assche wrote: This patch does not change any functionality. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow d...@thedillows.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Vu Pham v...@mellanox.com Cc

Re: [PATCH 5/9] IB/srp: Introduce srp_finish_mapping()

2014-05-07 Thread Sagi Grimberg
On 5/6/2014 3:53 PM, Bart Van Assche wrote: This patch does not change any functionality. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow d...@thedillows.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Vu Pham v...@mellanox.com Cc

Re: [PATCH 6/9] IB/srp: Make srp_alloc_req_data() reallocate request data

2014-05-07 Thread Sagi Grimberg
On 5/6/2014 3:54 PM, Bart Van Assche wrote: This patch is needed by the patch that adds fast registration support. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow d...@thedillows.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Vu Pham v

Re: [PATCH 2/9] IB/srp: Introduce an additional local variable

2014-05-07 Thread Sagi Grimberg
On 5/7/2014 4:52 PM, Bart Van Assche wrote: On 05/07/14 12:37, Sagi Grimberg wrote: On 5/6/2014 3:51 PM, Bart Van Assche wrote: This patch does not change any functionality. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow d

Re: [PATCH 6/9] IB/srp: Make srp_alloc_req_data() reallocate request data

2014-05-07 Thread Sagi Grimberg
On 5/7/2014 5:11 PM, Bart Van Assche wrote: On 05/07/14 12:50, Sagi Grimberg wrote: On 5/6/2014 3:54 PM, Bart Van Assche wrote: -static void srp_free_req_data(struct srp_target_port *target) +static void srp_free_req_data(struct srp_target_port *target, + struct srp_request

Re: [PATCH 9/9] IB/srp: Add fast registration support

2014-05-07 Thread Sagi Grimberg
On 5/7/2014 5:59 PM, Bart Van Assche wrote: On 05/07/14 13:34, Sagi Grimberg wrote: +module_param(prefer_fr, bool, 0444); +MODULE_PARM_DESC(prefer_fr, + Whether to use FR if both FMR and FR are supported); Will it be better to make it a per-target attribute? Hello Sagi, The only

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-28 Thread Sagi Grimberg
On 4/27/2014 3:37 PM, Chuck Lever wrote: SNIP Why not first create a new id+qp and assign them - and then destroy the old id+qp? see SRP related section: ib_srp.x:srp_create_target_ib() Anyway it is indeed important to guarantee that no xmit flows happens concurrently to that, and cleanups

Re: [PATCH V1] NFS-RDMA: fix qp pointer validation checks

2014-04-24 Thread Sagi Grimberg
On 4/24/2014 2:30 AM, Devesh Sharma wrote: Hi Chuck Following is the complete call trace of a typical NFS-RDMA transaction while mounting a share. It is unavoidable to stop calling post-send in case it is not created. Therefore, applying checks to the connection state is a must While

Re: [PATCH V2 16/17] xprtrdma: Limit work done by completion handler

2014-04-23 Thread Sagi Grimberg
On 4/22/2014 1:03 AM, Chuck Lever wrote: Sagi Grimberg sa...@dev.mellanox.co.il points out that a steady stream of CQ events could starve other work because of the boundless loop pooling in rpcrdma_{send,recv}_poll(). Instead of a (potentially infinite) while loop, return after collecting

Re: [PATCH V2 10/17] xprtrdma: Add CONFIG setting that can disable ALLPHYSICAL

2014-04-23 Thread Sagi Grimberg
On 4/22/2014 9:23 AM, Christoph Hellwig wrote: On Mon, Apr 21, 2014 at 06:02:14PM -0400, Chuck Lever wrote: ALLPHYSICAL is not a safe memory registration mode because it permits NFS servers to write anywhere in a client's memory. NFS server bugs could result in client memory being overwritten.

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-20 Thread Sagi Grimberg
On 4/19/2014 7:31 PM, Chuck Lever wrote: Hi Sagi- On Apr 17, 2014, at 3:11 PM, Sagi Grimberg sa...@dev.mellanox.co.il wrote: On 4/17/2014 5:34 PM, Steve Wise wrote: SNIP You could use a small array combined with a loop and a budget count. So the code would grab, say, 4 at a time, and keep

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-17 Thread Sagi Grimberg
On 4/16/2014 9:21 PM, Chuck Lever wrote: Passing a small array to ip_poll_cq() is actually easy to do, and is exactly equivalent to a poll budget. The struct ib_wc should be taken off the stack anyway, IMO. The only other example I see in 3.15 right now is IPoIB, which seems to do exactly this.

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-17 Thread Sagi Grimberg
On 4/17/2014 4:55 PM, Chuck Lever wrote: On Apr 17, 2014, at 3:06 AM, Sagi Grimberg sa...@dev.mellanox.co.il wrote: On 4/16/2014 9:21 PM, Chuck Lever wrote: Passing a small array to ip_poll_cq() is actually easy to do, and is exactly equivalent to a poll budget. The struct ib_wc should

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-17 Thread Sagi Grimberg
On 4/17/2014 5:34 PM, Steve Wise wrote: SNIP You could use a small array combined with a loop and a budget count. So the code would grab, say, 4 at a time, and keep looping polling up to 4 until the CQ is empty or the desired budget is reached... Bingo... couldn't agree more. Poll Arrays

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-16 Thread Sagi Grimberg
On 4/15/2014 1:23 AM, Chuck Lever wrote: The current CQ handler uses the ib_wc.opcode field to distinguish between event types. However, the contents of that field are not reliable if the completion status is not IB_WC_SUCCESS. When an error completion occurs on a send event, the CQ handler

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-16 Thread Sagi Grimberg
On 4/16/2014 4:30 PM, Steve Wise wrote: On 4/16/2014 7:48 AM, Sagi Grimberg wrote: On 4/15/2014 1:23 AM, Chuck Lever wrote: The current CQ handler uses the ib_wc.opcode field to distinguish between event types. However, the contents of that field are not reliable if the completion status

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-16 Thread Sagi Grimberg
On 4/16/2014 5:25 PM, Steve Wise wrote: -Original Message- From: Sagi Grimberg [mailto:sa...@dev.mellanox.co.il] Sent: Wednesday, April 16, 2014 9:13 AM To: Steve Wise; Chuck Lever; linux-...@vger.kernel.org; linux-rdma@vger.kernel.org Subject: Re: [PATCH 7/8] xprtrdma: Split

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-16 Thread Sagi Grimberg
On 4/16/2014 5:43 PM, Steve Wise wrote: Hmm, But if either FASTREG or LINV failed the QP will go to error state and you *will* get the error wc (with a rain of FLUSH errors). AFAICT it is safe to assume that it succeeded as long as you don't get error completions. But if an unsignaled FASTREG

Re: [PATCH 7/8] xprtrdma: Split the completion queue

2014-04-16 Thread Sagi Grimberg
On 4/16/2014 6:08 PM, Chuck Lever wrote: Hi Sagi- Thanks for the review! In-line replies below. SNIP 2. If I understood correctly, I see that the CQs are loop-polled in an interrupt context. This may become problematic in stress workload where the CQ simply never drains (imagine

Re: Kernel oops/panic with NFS over RDMA mount after disrupted Infiniband connection

2014-03-28 Thread sagi grimberg
On 3/29/2014 1:30 AM, Chuck Lever wrote: On Mar 28, 2014, at 2:42 AM, Senn Klemens klemens.s...@ims.co.at wrote: Hi Chuck, On 03/27/2014 04:59 PM, Chuck Lever wrote: Hi- On Mar 27, 2014, at 12:53 AM, Reiter Rafael rafael.rei...@ims.co.at wrote: On 03/26/2014 07:15 PM, Chuck Lever wrote:

Re: Kernel oops/panic with NFS over RDMA mount after disrupted Infiniband connection

2014-03-28 Thread sagi grimberg
On 3/29/2014 3:05 AM, Chuck Lever wrote: On Mar 28, 2014, at 4:06 PM, sagi grimberg sa...@mellanox.com wrote: On 3/29/2014 1:30 AM, Chuck Lever wrote: On Mar 28, 2014, at 2:42 AM, Senn Klemens klemens.s...@ims.co.at wrote: Hi Chuck, On 03/27/2014 04:59 PM, Chuck Lever wrote: Hi- On Mar

Re: [PATCH v2 11/13] SCSI/libiscsi: Add check_protection callback for transports

2014-03-17 Thread Sagi Grimberg
On 3/17/2014 6:59 PM, Mike Christie wrote: SNIP This patch is ok, but happened to the patch for the xmit task path? Hey Mike, Thanks for your Ack on this. The xmit_task fix was posted as a separate patch since it is not specific to this set (relevant also for existing data dma_mapping in

Re: [PATCH v1 1/3] IB/srp: Fix crash when unmapping data loop

2014-03-13 Thread Sagi Grimberg
On 3/12/2014 3:16 PM, Bart Van Assche wrote: On 03/11/14 16:30, Sagi Grimberg wrote: State FAIL_FAST must come *after* stated BLOCKED. Do you think that taking the lock once the rport transitions to state BLOCKED suffices? I'm aiming to avoid this lock in the sunny-day flow. Taking this lock

Re: [PATCH v2 12/12] IB/isert: Support T10-PI protected transactions

2014-03-13 Thread Sagi Grimberg
On 3/13/2014 8:15 PM, Nicholas A. Bellinger wrote: Hey Sagi, On Wed, 2014-02-19 at 17:50 +0200, Sagi Grimberg wrote: In case the Target core passed transport T10 protection operation: 1. Register data buffer (data memory region) 2. Register protection buffer if exsists (prot memory region) 3

Re: [PATCH v2 12/12] IB/isert: Support T10-PI protected transactions

2014-03-13 Thread Sagi Grimberg
On 3/13/2014 8:59 PM, Nicholas A. Bellinger wrote: On Thu, 2014-03-13 at 20:57 +0200, Sagi Grimberg wrote: On 3/13/2014 8:15 PM, Nicholas A. Bellinger wrote: Hey Sagi, On Wed, 2014-02-19 at 17:50 +0200, Sagi Grimberg wrote: In case the Target core passed transport T10 protection operation

Re: [PATCH 0/6] iser-target: Fix active I/O shutdown related issues

2014-03-11 Thread Sagi Grimberg
On 3/11/2014 12:00 AM, Nicholas A. Bellinger wrote: On Thu, 2014-03-06 at 16:05 +0200, sagi grimberg wrote: On 3/6/2014 12:04 AM, Nicholas A. Bellinger wrote: On Wed, 2014-03-05 at 14:12 +0200, Sagi Grimberg wrote: On 3/5/2014 2:06 AM, Nicholas A. Bellinger wrote: On Tue, 2014-03-04 at 17:17

Re: [PATCH v1 1/3] IB/srp: Fix crash when unmapping data loop

2014-03-11 Thread Sagi Grimberg
On 3/7/2014 10:13 AM, Bart Van Assche wrote: On 03/06/14 17:10, Sagi Grimberg wrote: So I took Roland latest 3.14-rc1 and tried to reproduce this issue using HCA with no FMRs support and was *NOT* able to reproduce this issue. This issue reproduced for me on RH6 backported srp and I can't tell

Re: [PATCH v1 1/3] IB/srp: Fix crash when unmapping data loop

2014-03-11 Thread Sagi Grimberg
On 3/11/2014 3:51 PM, Bart Van Assche wrote: On 03/11/14 14:38, Sagi Grimberg wrote: And before the SCSI host lock push-down the SCSI host lock was held around the srp_queuecommand() invocation. In other words, holding a spin lock around the srp_post_send() call in srp_queuecommand() is neither

Re: [PATCH v1 1/3] IB/srp: Fix crash when unmapping data loop

2014-03-11 Thread Sagi Grimberg
On 3/11/2014 4:29 PM, Bart Van Assche wrote: On 03/11/14 15:07, Sagi Grimberg wrote: On 3/11/2014 3:51 PM, Bart Van Assche wrote: On 03/11/14 14:38, Sagi Grimberg wrote: I see... will assigning scmnd = NULL only if srp_post_send will fail, and restore the assignment as before help? Sorry

Re: [PATCH v1 1/3] IB/srp: Fix crash when unmapping data loop

2014-03-11 Thread Sagi Grimberg
On 3/11/2014 5:00 PM, Bart Van Assche wrote: On 03/11/14 15:48, Sagi Grimberg wrote: But I think this lock can be taken conditionally. I mean in the sunny-day scenario we don't expect srp_terminate_io to race with srp_post_send. That can happen only when rport state transitions to FAIL_FAST

Re: [PATCH v5 00/10] Introduce Signature feature

2014-03-09 Thread Sagi Grimberg
On 3/7/2014 9:43 PM, Roland Dreier wrote: So I went ahead and applied this for 3.15, Hey Roland, Thanks for taking the time to take a look and pick this up. although I suspect the verbs API is probably the wrong one. I will be more than happy to here your concerns, share our approach and

Re: [PATCH 0/6] iser-target: Fix active I/O shutdown related issues

2014-03-06 Thread sagi grimberg
On 3/6/2014 12:04 AM, Nicholas A. Bellinger wrote: On Wed, 2014-03-05 at 14:12 +0200, Sagi Grimberg wrote: On 3/5/2014 2:06 AM, Nicholas A. Bellinger wrote: On Tue, 2014-03-04 at 17:17 +0200, Sagi Grimberg wrote: On 3/4/2014 2:00 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n

Re: [PATCH v1 1/3] IB/srp: Fix crash when unmapping data loop

2014-03-06 Thread sagi grimberg
On 3/6/2014 11:10 AM, Bart Van Assche wrote: On 02/27/14 12:32, Sagi Grimberg wrote: As I recall (need to re-confirm this), the problem was that in unstable ports condition srp_abort is called invoking srp_free_req (unmap call #1) and reconnect process (or reset_device or terminate_io

Re: [PATCH v1 1/3] IB/srp: Fix crash when unmapping data loop

2014-03-06 Thread Sagi Grimberg
On 3/6/2014 5:32 PM, sagi grimberg wrote: On 3/6/2014 11:10 AM, Bart Van Assche wrote: On 02/27/14 12:32, Sagi Grimberg wrote: As I recall (need to re-confirm this), the problem was that in unstable ports condition srp_abort is called invoking srp_free_req (unmap call #1) and reconnect

Re: [PATCH 0/6] iser-target: Fix active I/O shutdown related issues

2014-03-05 Thread Sagi Grimberg
On 3/5/2014 2:06 AM, Nicholas A. Bellinger wrote: On Tue, 2014-03-04 at 17:17 +0200, Sagi Grimberg wrote: On 3/4/2014 2:00 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi Or Sagi, This series addresses a number of active I/O shutdown related issues in iser

<    5   6   7   8   9   10   11   12   >