Re: [PATCH 02/14] IB/srp: Fix race between srp_queuecommand() and srp_claim_req()

2013-06-28 Thread Bart Van Assche
On 06/27/13 23:02, David Dillow wrote: On Wed, 2013-06-12 at 17:14 +0200, Bart Van Assche wrote: Not sure how I missed that ... I will drop this version and replace it with the proper fix. I expect the merge window will be opening soon; I should be able to make time on Sunday to review

Re: [PATCH 05/14] IB/srp: Maintain a single connection per I_T nexus

2013-06-28 Thread Bart Van Assche
On 06/27/13 23:10, David Dillow wrote: On Wed, 2013-06-12 at 15:25 +0200, Bart Van Assche wrote: An SRP target is required to maintain a single connection between initiator and target. This means that if the 'add_target' attribute is used to create a second connection to a target that the first

Re: [PATCH 01/14] IB/srp: Fix remove_one crash due to resource exhaustion

2013-06-28 Thread Sebastian Riemer
On 28.06.2013 01:45, Roland Dreier wrote: On Thu, Jun 27, 2013 at 2:01 PM, David Dillow dillo...@ornl.gov wrote: On Wed, 2013-06-12 at 15:20 +0200, Bart Van Assche wrote: If the add_one callback fails during driver load no resources are allocated so there isn't a need to release any resources.

RE: [PATCH 00/15 ibacm] ACM Cache Preloading (and some cosmetic cleanups)

2013-06-28 Thread Hefty, Sean
I've pulled in this series, with the changes mentioned in a separate email, plus updates to the patches below (mostly renames of functions, variables, enums, etc.). The updated patches are available from my ibacm.git tree in the preload branch. Please look over those changes and see if you

[PATCH] osmtest: Make the -guid option's argument mandatory

2013-06-28 Thread Roland Dreier
From: Roland Dreier rol...@purestorage.com Currently, the getopt table in osmtest labels the -guid option as taking an optional argument; however, running osmtest with the -guid option but no argument just leads to: $ /usr/sbin/osmtest -guid Command Line Arguments Segmentation fault

Re: [PATCH 12/14] IB/srp: Make HCA completion vector configurable

2013-06-28 Thread Bart Van Assche
On 06/28/13 14:04, David Dillow wrote: On Fri, 2013-06-28 at 10:18 +0200, Bart Van Assche wrote: On 06/27/13 23:24, David Dillow wrote: To me this looks like a standard procedure that applies to any HCA that supports multiple MSI-X vectors ? To you and I, sure, this is relatively standard.

Re: [PATCH 13/14] IB/srp: Make transport layer retry count configurable

2013-06-28 Thread Bart Van Assche
On 06/28/13 14:07, David Dillow wrote: This does need to be documented in Documentation/ABI/stable/sysfs-driver-ib_srp, though. OK, I will update that document in v2 of this patch series. Bart. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to

[PATCH v2 0/15] IB SRP initiator patches for kernel 3.11

2013-06-28 Thread Bart Van Assche
The purpose of this InfiniBand SRP initiator patch series is as follows: - Make the SRP initiator driver better suited for use in a H.A. setup. Speed up failover by reducing the IB RC retry count and by notifying multipathd faster about transport layer failures by adding fast_io_fail_tmo

[PATCH v2 01/15] IB/srp: Fix remove_one crash due to resource exhaustion

2013-06-28 Thread Bart Van Assche
From: Dotan Barak dot...@dev.mellanox.co.il If the add_one callback fails during driver load no resources are allocated so there isn't a need to release any resources. Trying to clean the resource may lead to the following kernel panic: BUG: unable to handle kernel NULL pointer dereference at

[PATCH v2 02/15] IB/srp: Fix race between srp_queuecommand() and srp_claim_req()

2013-06-28 Thread Bart Van Assche
Avoid that srp_claim_command() can claim a command while srp_queuecommand() is still busy queueing the same command. Found this via source reading. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow dillo...@ornl.gov Cc: Vu Pham

[PATCH v2 03/15] IB/srp: Avoid that srp_reset_host() is skipped after a TL error

2013-06-28 Thread Bart Van Assche
The SCSI error handler assumes that the transport layer is operational if an eh_abort_handler() returns SUCCESS. Hence let srp_abort() only return SUCCESS if sending the ABORT TASK task management function succeeded. This patch avoids that the SCSI error handler skips the srp_reset_host() call

[PATCH v2 05/15] IB/srp: Skip host settle delay

2013-06-28 Thread Bart Van Assche
The SRP initiator implements host reset by reconnecting to the SRP target. That means that communication with the target is possible as soon as host reset finished. Hence skip the host settle delay. Signed-off-by: Bart Van Assche bvanass...@acm.org Acked-by: David Dillow dillo...@ornl.gov Cc:

[PATCH v2 06/15] IB/srp: Maintain a single connection per I_T nexus

2013-06-28 Thread Bart Van Assche
An SRP target is required to maintain a single connection between initiator and target. This means that if the 'add_target' attribute is used to create a second connection to a target that the first connection will be logged out and that the SCSI error handler will kick in. The SCSI error handler

[PATCH v2 07/15] IB/srp: Keep rport as long as the IB transport layer

2013-06-28 Thread Bart Van Assche
Keep the rport data structure around after srp_remove_host() has finished until cleanup of the IB transport layer has finished completely. This is necessary because later patches use the rport pointer inside the queuecommand callback. Without this patch accessing the rport from inside a

[PATCH v2 08/15] scsi_transport_srp: Add transport layer error handling

2013-06-28 Thread Bart Van Assche
Add the necessary functions in the SRP transport module to allow an SRP initiator driver to implement transport layer error handling similar to the functionality already provided by the FC transport layer. This includes: - Support for implementing fast_io_fail_tmo, the time that should elapse

[PATCH v2 09/15] IB/srp: Add srp_terminate_io()

2013-06-28 Thread Bart Van Assche
Finish all outstanding I/O requests after fast_io_fail_tmo expired, which speeds up failover in a multipath setup. This patch is a reworked version of a patch from Sebastian Riemer. Reported-by: Sebastian Riemer sebastian.rie...@profitbricks.com Signed-off-by: Bart Van Assche bvanass...@acm.org

[PATCH v2 10/15] IB/srp: Use SRP transport layer error recovery

2013-06-28 Thread Bart Van Assche
Enable reconnect_delay, fast_io_fail_tmo and dev_loss_tmo functionality for the IB SRP initiator. Add kernel module parameters that allow to specify default values for these three parameters. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David Dillow dillo...@ornl.gov Cc: Roland Dreier

[PATCH v2 04/15] IB/srp: Fail I/O fast if target offline

2013-06-28 Thread Bart Van Assche
If reconnecting failed we know that no command completion will be received anymore. Hence let the SCSI error handler fail such commands immediately. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow dillo...@ornl.gov Cc: Sebastian Riemer

[PATCH v2 12/15] IB/srp: Fail SCSI commands silently

2013-06-28 Thread Bart Van Assche
From: Sebastian Riemer sebastian.rie...@profitbricks.com Avoid that path failover in a multipath setup causes the SCSI layer to generate kernel messages about SCSI command failures. This patch speeds up SRP initiator operation significantly when monitoring kernel messages over a serial port.

[PATCH v2 13/15] IB/srp: Make HCA completion vector configurable

2013-06-28 Thread Bart Van Assche
Several InfiniBand HCA's allow to configure the completion vector per queue pair. This allows to spread the workload created by IB completion interrupts over multiple MSI-X vectors and hence over multiple CPU cores. In other words, configuring the completion vector properly not only allows to

[PATCH v2 14/15] IB/srp: Make transport layer retry count configurable

2013-06-28 Thread Bart Van Assche
From: Vu Pham vuhu...@mellanox.com Allow the InfiniBand RC retry count to be configured by the user as an option in the target login string. The transport layer timeout in nanoseconds is computed as follows from the retry count: rc_timeout = rc_retry_count * 4 * 4096 * (1 qp-timeout) The

[PATCH v2 15/15] IB/srp: Bump driver version and release date

2013-06-28 Thread Bart Van Assche
From: Vu Pham vuhu...@mellanox.com Signed-off-by: Vu Pham v...@mellanox.com Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Cc: David Dillow dillo...@ornl.gov Cc: Sebastian Riemer sebastian.rie...@profitbricks.com --- drivers/infiniband/ulp/srp/ib_srp.c

Re: [PATCH 12/14] IB/srp: Make HCA completion vector configurable

2013-06-28 Thread David Dillow
On Fri, 2013-06-28 at 10:18 +0200, Bart Van Assche wrote: On 06/27/13 23:24, David Dillow wrote: Shouldn't there be some documentation about how to set this? What happens when you try to set it on an HCA that doesn't support this how does the user know what's wrong? Hello Dave, HCA

Re: [PATCH for-next 0/8] Add Mellanox mlx5 driver for Connect-IB devices

2013-06-28 Thread Or Gerlitz
On Sun, Jun 16, 2013 at 3:02 PM, Eli Cohen e...@dev.mellanox.co.il wrote: From: Eli Cohen e...@mellanox.com The patches that follow constitute the driver for Mellanox's 5th generation of HCAs named Connect-IB. The driver is comprised of two kernel modules: mlx5_ib and mlx5_core. This

Re: [PATCH for-next 0/8] Add Mellanox mlx5 driver for Connect-IB devices

2013-06-28 Thread Or Gerlitz
On Fri, Jun 28, 2013 at 4:20 PM, Or Gerlitz or.gerl...@gmail.com wrote: On Sun, Jun 16, 2013 at 3:02 PM, Eli Cohen e...@dev.mellanox.co.il wrote: From: Eli Cohen e...@mellanox.com The patches that follow constitute the driver for Mellanox's 5th generation of HCAs named Connect-IB. The

Re: [PATCH v2 02/15] IB/srp: Fix race between srp_queuecommand() and srp_claim_req()

2013-06-28 Thread Sebastian Riemer
On 28.06.2013 14:48, Bart Van Assche wrote: Avoid that srp_claim_command() can claim a command while srp_queuecommand() is still busy queueing the same command. Found this via source reading. Nice, that's much less re-acquiring of the target lock in error case in srp_queuecommand(). But if we

Re: [PATCH v2 02/15] IB/srp: Fix race between srp_queuecommand() and srp_claim_req()

2013-06-28 Thread Bart Van Assche
On 06/28/13 16:42, Sebastian Riemer wrote: On 28.06.2013 14:48, Bart Van Assche wrote: Avoid that srp_claim_command() can claim a command while srp_queuecommand() is still busy queueing the same command. Found this via source reading. Nice, that's much less re-acquiring of the target lock in

Re: [PATCH v2 02/15] IB/srp: Fix race between srp_queuecommand() and srp_claim_req()

2013-06-28 Thread Sebastian Riemer
On 28.06.2013 16:51, Bart Van Assche wrote: Nice, that's much less re-acquiring of the target lock in error case in srp_queuecommand(). But if we have to change that many locations for srp_put_tx_iu() anyway, wouldn't it make sense to rename it into __srp_put_tx_iu() as well? Then we can

Re: [PATCH 00/15 ibacm] ACM Cache Preloading (and some cosmetic cleanups)

2013-06-28 Thread Hal Rosenstock
On 6/28/2013 3:45 AM, Hefty, Sean wrote: I've pulled in this series, with the changes mentioned in a separate email, plus updates to the patches below (mostly renames of functions, variables, enums, etc.). The updated patches are available from my ibacm.git tree in the preload branch.

[PATCH ibacm] acm.c: Fix addr_data_file handling

2013-06-28 Thread Hal Rosenstock
Signed-off-by: Hal Rosenstock h...@mellanox.com --- diff --git a/src/acm.c b/src/acm.c index f55ebc0..ae326e5 100644 --- a/src/acm.c +++ b/src/acm.c @@ -3466,7 +3466,7 @@ static void acm_set_options(void) else if (!stricmp(addr_preload, opt)) addr_preload =

[PATCH ibacm] acme.c: Fix a couple of cosmetic issues with option file generation

2013-06-28 Thread Hal Rosenstock
Add route_data_file and addr_data_file option names before full pathname to file Signed-off-by: Hal Rosenstock h...@mellanox.com --- diff --git a/src/acme.c b/src/acme.c index 1109b50..287fd32 100644 --- a/src/acme.c +++ b/src/acme.c @@ -261,7 +261,7 @@ static void gen_opts_temp(FILE *f)

RE: [PATCH 00/15 ibacm] ACM Cache Preloading (and some cosmetic cleanups)

2013-06-28 Thread Hefty, Sean
I looked them over and retested this. I have a few minor fixups to follow shortly. I've incorporated your changes into the patch set and updated the preload branch. The one thing I noticed is that the check for using this (address) preload option without the previous (route) preload option

RE: [PATCH v2 15/16 ibacm] Add support for preloading IPv4 and IPv6 ACM caches

2013-06-28 Thread Hefty, Sean
+static void acm_parse_hosts_file(struct acm_ep *ep) +{ + FILE *f; + char s[120]; + char addr[INET6_ADDRSTRLEN], gid[INET6_ADDRSTRLEN]; + uint8_t name[ACM_MAX_ADDRESS]; + struct in6_addr ip_addr, ib_addr; + struct acm_dest *dest, *new_dest; + uint8_t addr_type;

Re: [PATCH v2 15/16 ibacm] Add support for preloading IPv4 and IPv6 ACM caches

2013-06-28 Thread Hal Rosenstock
On 6/28/2013 1:50 PM, Hefty, Sean wrote: +static void acm_parse_hosts_file(struct acm_ep *ep) +{ +FILE *f; +char s[120]; +char addr[INET6_ADDRSTRLEN], gid[INET6_ADDRSTRLEN]; +uint8_t name[ACM_MAX_ADDRESS]; +struct in6_addr ip_addr, ib_addr; +struct acm_dest *dest,

Re: [PATCH for/net-next 2/8] net/mlx5: Mellanox Connect-IB, core driver part 2/3

2013-06-28 Thread David Miller
From: Or Gerlitz ogerl...@mellanox.com Date: Wed, 26 Jun 2013 17:22:11 +0300 + eqe-owner = 0x55; Magic constant. If this is how you will represent Invalid Owner, then make a macro for this value 0x55 expressing that. + switch (synd) { + case 0x1: Please make descriptive

Re: [PATCH for/net-next 3/8] net/mlx5: Mellanox Connect-IB, core driver part 3/3

2013-06-28 Thread David Miller
From: Or Gerlitz ogerl...@mellanox.com Date: Wed, 26 Jun 2013 17:22:12 +0300 + for (--i; i = 0; --i) { Please, i-- is more canonical in for() loops. + for (--i; i = 0; --i) { Likewise. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to