[PATCH 0/7] Various libibverbs patches

2011-08-07 Thread Bart Van Assche
Hello Roland, This patch series addresses a few issues I noticed after having built libibverbs from the source tree available at kernel.org. Feedback is welcome. Bart. -- To unsubscribe from this list: send the line unsubscribe linux-rdma in the body of a message to majord...@vger.kernel.org

[PATCH 1/7] Add foreign option to AM_INIT_AUTOMAKE

2011-08-07 Thread Bart Van Assche
Tell automake that the libibverbs package does not follow the GNU standards. This change makes it possible to use 'autoreconf' for the libibverbs package. Signed-off-by: Bart Van Assche bvanass...@acm.org --- configure.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH 5/7] 32-bit compiler warning fix

2011-08-07 Thread Bart Van Assche
Avoid that the code in src/memory.c triggers a compiler warning when compiled on a 32-bit system. Signed-off-by: Bart Van Assche bvanass...@acm.org --- src/memory.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/memory.c b/src/memory.c index faa43f3..9f13774

[PATCH 4/7] .gitignore: Ignore files generated by the autotools

2011-08-07 Thread Bart Van Assche
Signed-off-by: Bart Van Assche bvanass...@acm.org --- .gitignore |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 78effef..a0a13a6 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,8 @@ Makefile config.status stamp-h1 libtool

[PATCH 2/7] Makefile.am: Fix an automake warning

2011-08-07 Thread Bart Van Assche
name for the same functionality. This variable is deprecated; we suggest using AM_CPPFLAGS and per-target _CPPFLAGS instead. Signed-off-by: Bart Van Assche bvanass...@acm.org --- Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am

[PATCH 6/7] Fix a compiler warning about an unused function

2011-08-07 Thread Bart Van Assche
Signed-off-by: Bart Van Assche bvanass...@acm.org --- src/memory.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/memory.c b/src/memory.c index 9f13774..7d97e55 100644 --- a/src/memory.c +++ b/src/memory.c @@ -269,6 +269,7 @@ static void __mm_rotate_left(struct

[PATCH 3/7] autogen.sh: Introduce autoreconf

2011-08-07 Thread Bart Van Assche
There is no need to invoke the different autotools individually - autoreconf already does that. Signed-off-by: Bart Van Assche bvanass...@acm.org --- autogen.sh |7 +-- 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/autogen.sh b/autogen.sh index fd47839..f6ff02c 100755

Re: [patch v2 26/37] add rxe_req.c

2011-08-10 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: + /* heuristic sliding window algorithm to keep +sender from overrunning receiver queues */ + if (qp_type(qp) == IB_QPT_RC) { + if (psn_compare(qp-req.psn, qp-comp.psn + +

Re: [patch v2 28/37] add rxe_arbiter.c

2011-08-10 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +int rxe_arbiter(void *arg) +{ + int err; + unsigned long flags; + struct rxe_dev *rxe = (struct rxe_dev *)arg; + struct sk_buff *skb; + struct list_head *qpl; + struct rxe_qp *qp; + + /*

Re: [patch v2 02/37] add opcodes to ib_pack.h

2011-08-15 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: Bring up to date with the current version of the IBTA spec.        - add new opcodes for RC and RD        - add new groups of opcodes for CN and XRC Signed-off-by: Bob Pearson rpear...@systemfabricworks.com ---  

Re: [patch v2 12/37] add rxe_verbs.h

2011-08-15 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +static inline int pkey_match(u16 key1, u16 key2) +{ + return (((key1 0x7fff) != 0) + ((key1 0x7fff) == (key2 0x7fff)) + ((key1 0x8000) || (key2 0x8000))) ? 1 : 0; +} Shouldn't the

Re: [patch v2 12/37] add rxe_verbs.h

2011-08-15 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: + rxe_qp.c:char *rxe_qp_state_name[] = { One more comment about rxe_verbs.h: why is the above declaration present in this header file ? As far as I can see it's only used in rxe_qp.c and not in any other source file. Bart.

Re: [patch v2 13/37] add rxe_verbs.c

2011-08-15 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +static int rxe_query_port(struct ib_device *dev, + u8 port_num, struct ib_port_attr *attr) +{ + struct rxe_dev *rxe = to_rdev(dev); + struct rxe_port *port; + + if (unlikely(port_num

Re: [patch v2 13/37] add rxe_verbs.c

2011-08-15 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: + for (i = 0; i ARRAY_SIZE(rxe_dev_attributes); ++i) { + err = device_create_file(dev-dev, rxe_dev_attributes[i]); + if (err) { + pr_warn(device_create_file failed, +

Re: [patch v2 13/37] add rxe_verbs.c

2011-08-15 Thread Bart Van Assche
On Mon, Aug 15, 2011 at 4:45 PM, Greg KH gre...@suse.de wrote: On Mon, Aug 15, 2011 at 04:33:14PM +0200, Bart Van Assche wrote: On Sun, Jul 24, 2011 at 9:43 PM,  rpear...@systemfabricworks.com wrote: +   for (i = 0; i ARRAY_SIZE(rxe_dev_attributes); ++i) { +           err

Re: [patch v2 21/37] add rxe_qp.c

2011-08-15 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +char *rxe_qp_state_name[] = { + [QP_STATE_RESET]= RESET, + [QP_STATE_INIT] = INIT, + [QP_STATE_READY]= READY, + [QP_STATE_DRAIN]= DRAIN, + [QP_STATE_DRAINED] =

Re: [patch v2 13/37] add rxe_verbs.c

2011-08-15 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +static ssize_t rxe_show_skb_num(struct device *device, + struct device_attribute *attr, char *buf) +{ + struct rxe_dev *rxe = container_of(device, struct rxe_dev, +

Re: [patch v2 02/37] add opcodes to ib_pack.h

2011-08-20 Thread Bart Van Assche
On Mon, Aug 15, 2011 at 6:15 PM, Bob Pearson rpear...@systemfabricworks.com wrote: I want to eventually complete the IB transport parts of the driver although they are not used by RoCE. They would be useful for a soft IB implementation with say an FPGA based MAC/PHY. The long term goal is to

Re: [patch v2 31/37] add rxe.c

2011-08-20 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +int rxe_fast_comp = 2; +module_param_named(fast_comp, rxe_fast_comp, int, 0644); +MODULE_PARM_DESC(fast_comp, fast path call to completer + (0=no, 1=no int context, 2=any context)); + +int rxe_fast_resp =

Re: [patch v2 06/37] add rxe_param.h

2011-08-20 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +enum rxe_mtu { + RXE_MTU_INVALID = 0, + RXE_MTU_256 = 1, + RXE_MTU_512 = 2, + RXE_MTU_1024= 3, + RXE_MTU_2048= 4, + RXE_MTU_4096= 5, + RXE_MTU_8192= 6, +}; Do the

Re: [patch v2 29/37] add rxe_dma.c

2011-08-20 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +static u64 rxe_dma_map_single(struct ib_device *dev, + void *cpu_addr, size_t size, + enum dma_data_direction direction) +{ +

Re: [patch v2 20/37] add rxe_cq.c

2011-08-20 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq, + int cqe, int comp_vector, struct ib_udata *udata) +{ + int count; + + if (cqe = 0) { + pr_warn(cqe(%d) = 0\n, cqe); +

Re: [patch v2 27/37] add rxe_resp.c

2011-08-20 Thread Bart Van Assche
On Sun, Jul 24, 2011 at 9:43 PM, rpear...@systemfabricworks.com wrote: +static char *resp_state_name[] = { + [RESPST_NONE] = NONE, Shouldn't that be const char * const instead of char * ? +/* rxe_recv calls here to add a request packet to the input queue */

Re: [patch v2 02/37] add opcodes to ib_pack.h

2011-08-22 Thread Bart Van Assche
On Sat, Aug 20, 2011 at 4:47 PM, Bart Van Assche bvanass...@acm.org wrote: On Mon, Aug 15, 2011 at 6:15 PM, Bob Pearson rpear...@systemfabricworks.com wrote: I want to eventually complete the IB transport parts of the driver although they are not used by RoCE. They would be useful for a soft

Re: [patch v2 13/37] add rxe_verbs.c

2011-09-01 Thread Bart Van Assche
On Thu, Sep 1, 2011 at 7:20 AM, Bob Pearson rpear...@systemfabricworks.com wrote: From: bvanass...@acm.org On Sun, Jul 24, 2011 at 9:43 PM,  rpear...@systemfabricworks.com wrote: +static int rxe_query_port(struct ib_device *dev, +                     u8 port_num, struct ib_port_attr *attr)

Re: [patch v2 13/37] add rxe_verbs.c

2011-09-01 Thread Bart Van Assche
On Thu, Sep 1, 2011 at 7:20 AM, Bob Pearson rpear...@systemfabricworks.com wrote: From: bvanass...@acm.org On Sun, Jul 24, 2011 at 9:43 PM,  rpear...@systemfabricworks.com wrote: +static struct ib_ah *rxe_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr) +{ +   int err; +  

Re: [patch v2 02/37] add opcodes to ib_pack.h

2011-09-01 Thread Bart Van Assche
On Thu, Sep 1, 2011 at 5:15 AM, Bob Pearson rpear...@systemfabricworks.com wrote: On Sat, Aug 20, 2011 at 4:47 PM, Bart Van Assche bvanass...@acm.org More in detail, my comments with regard to multicast support in ib_rxe are: 1. Using ipv6_eth_mc_map() for mapping multicast GIDs seems

Re: creating common ib_types.h for linux and windows

2011-09-20 Thread Bart Van Assche
On Mon, Sep 19, 2011 at 11:20 PM, Hefty, Sean sean.he...@intel.com wrote: It would be easier to maintain opensm on windows if it truly shared the same code base.  For now, I'd just like to start with a common ib_types.h file.   (There are currently hundreds, if not thousands, of lines that

Re: [PATCH] infiniband-diags: ibnetdisc Wrap header for use in C++ code

2011-09-21 Thread Bart Van Assche
On Tue, Sep 20, 2011 at 7:45 PM, Ira Weiny wei...@llnl.gov wrote: +#ifdef __cplusplus +extern C { +#endif +  #include stdio.h  #include infiniband/mad.h  #include iba/ib_types.h It is bad style to surround #include directives with 'extern C'. Bart. -- To unsubscribe from this list: send

Re: [PATCH] ib-diags: Add cast to fix build on windows

2011-09-22 Thread Bart Van Assche
On Thu, Sep 22, 2011 at 8:29 PM, Hefty, Sean sean.he...@intel.com wrote: Signed-off-by: Sean Hefty sean.he...@intel.com ---  libibnetdisc/src/ibnetdisc.c |    2 +-  src/ibportstate.c            |    4 ++--  2 files changed, 3 insertions(+), 3 deletions(-)  mode change 100644 = 100755

Re: [PATCH 1/4] opensm/osm_helper: Add ib_mtu_is_valid

2011-10-05 Thread Bart Van Assche
On Tue, Oct 4, 2011 at 3:53 PM, Hal Rosenstock h...@dev.mellanox.co.il wrote: +int ib_mtu_is_valid(IN const int mtu) +{ +       if (mtu IB_MIN_MTU || mtu IB_MAX_MTU) +               return 0; +       return 1; +} Not that it matters, but the above three lines can also be written as

libmlx4: Pass the argument foreign to AM_INIT_AUTOMAKE()

2011-10-10 Thread Bart Van Assche
Tell automake explicitly that the libmlx4 package is not a GNU package. This change makes it possible to regenerate the configure script via autoreconf instead of only via autogen.sh. Signed-off-by: Bart Van Assche bvanass...@acm.org --- configure.in |2 +- 1 files changed, 1 insertions

[PATCH] libibverbs: Make it easy to interpret struct ibv_gid as four 32-bit words

2011-10-10 Thread Bart Van Assche
Signed-off-by: Bart Van Assche bvanass...@acm.org --- include/infiniband/verbs.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index ad9d524..656abb8 100644 --- a/include/infiniband/verbs.h +++ b/include

[PATCH] libmlx4: Fix a compiler warning

2011-10-10 Thread Bart Van Assche
Avoid that link_local_gid() triggers the following compiler warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Bart Van Assche bvanass...@acm.org --- src/verbs.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/verbs.c b

Re: Building 3.1-rc9 in kernel infiniband support with OFED libraries

2011-10-12 Thread Bart Van Assche
On Tue, Oct 11, 2011 at 7:39 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Tue, Oct 11, 2011 at 09:02:41AM -0500, Christoph Lameter wrote: Has XRC support not been merged? How can I build the OFED libraries against Linux 3.1? I'd really like to get rid of the OFED kernel tree

Re: [PATCH] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-10-19 Thread Bart Van Assche
On Fri, Oct 14, 2011 at 3:48 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: This patch adds the kernel module ib_srpt SCSI RDMA Protocol (SRP) target implementation conforming to the SRP r16a specification for the mainline drivers/target infrastructure as requested by Christoph for an

Re: ib_srpt status

2011-10-19 Thread Bart Van Assche
On Wed, Oct 19, 2011 at 7:38 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: Btw, Roland asked me to take a look at the current set of module parameters for ib_srpt, and see which could be removed and/or converted to per SPR target endpoint configfs attributes..  So on that note, a few

Re: [PATCH] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-10-19 Thread Bart Van Assche
On Wed, Oct 19, 2011 at 8:35 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Wed, 2011-10-19 at 19:56 +0200, Bart Van Assche wrote: Not sure what you mean here.  Can you be more specific..? I'm referring to this code: sprintf(sport-port_guid, 0x%04x%04x

Re: [PATCH] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-10-20 Thread Bart Van Assche
On Wed, Oct 19, 2011 at 9:47 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Wed, Oct 19, 2011 at 12:09:01PM -0700, Nicholas A. Bellinger wrote: Are sport-gid.global.interface_id going to be different for each struct srpt_port..? Infiniband GID suffixes (interface_id) are not

Re: [PATCH] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-10-20 Thread Bart Van Assche
On Wed, Oct 19, 2011 at 9:09 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: Ok, but just to verify..  This change will still allow us to differentiate between different struct srpt_port entries from the perspective of configfs, correct..? Yes. Also, this is the same format (minus the

Re: ib_srpt status

2011-10-20 Thread Bart Van Assche
On Thu, Oct 20, 2011 at 6:51 PM, Roland Dreier rol...@purestorage.com wrote: On Wed, Oct 19, 2011 at 11:09 AM, Bart Van Assche bvanass...@acm.org wrote: *) use_port_guid_in_session_name: This appears to be a legacy compat   item, can this be safetly removed for mainline..? As far as I know

srp_transport: Fix atttribute registration race

2011-10-21 Thread Bart Van Assche
Register transport attributes after the attribute array has been set up instead of before. The current code is racy because there is no guarantee that the CPU examining the attribute container will see all values written to the container. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc

Re: [PATCH 6/9] ib_srpt: Remove legacy use_port_guid_in_session_name module parameter

2011-10-24 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: This patch removes the legacy use_port_guid_in_session_name module parameter that is no longer required in modern ib_srpt code. The patch looks fine to me but the description could be improved: the

Re: [PATCH 8/9] ib_srpt: Convert srp_max_rsp_size into per port configfs attribute

2011-10-24 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: +static ssize_t srpt_tpg_attrib_store_srp_max_rsp_size( +       struct se_portal_group *se_tpg, +       const char *page, +       size_t count) +{ +       struct srpt_port *sport = container_of(se_tpg, struct

Re: [PATCH 5/9] ib_srpt: Fix sport-port_guid formatting code

2011-10-24 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: +               snprintf(sport-port_guid, sizeof(sport-port_guid), +                               0x%016llx, +                               be64_to_cpu(sport-gid.global.interface_id)); If I

Re: [PATCH 8/9] ib_srpt: Convert srp_max_rsp_size into per port configfs attribute

2011-10-24 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 9:49 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Mon, 2011-10-24 at 21:44 +0200, Bart Van Assche wrote: On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: +static ssize_t srpt_tpg_attrib_store_srp_max_rsp_size

Re: [PATCH 8/9] ib_srpt: Convert srp_max_rsp_size into per port configfs attribute

2011-10-24 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 10:05 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Mon, 2011-10-24 at 21:58 +0200, Bart Van Assche wrote: On Mon, Oct 24, 2011 at 9:49 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Mon, 2011-10-24 at 21:44 +0200, Bart Van Assche wrote: On Mon

Re: [PATCH 8/9] ib_srpt: Convert srp_max_rsp_size into per port configfs attribute

2011-10-24 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 9:49 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Mon, 2011-10-24 at 21:44 +0200, Bart Van Assche wrote: Also, isn't kstrto*() preferred over strict_strto*() ? Not AFAIK. This is what I found in the description of commit 33ee3b2: kstrto*: converting

Re: [PATCH-v2] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-10-25 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 8:33 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: It would have been nice if you bothered to mention these in any of the pre merge window reviews, but given your delay responsed on these items they will have to be something we'll fix post merge. Sorry for that

Re: [PATCH-v2] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-10-25 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 11:01 PM, Roland Dreier rol...@purestorage.com wrote: On Mon, Oct 24, 2011 at 11:33 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: - Handle IB completion timeouts. Although the InfiniBand Architecture Manual specifies that a HCA must generate an error completion

Re: [PATCH 7/9] ib_srpt: Convert srp_max_rdma_size into per port configfs attribute

2011-10-25 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 10:29 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: @@ -114,6 +114,7 @@ enum {       MIN_SRPT_SRQ_SIZE = 4,       DEFAULT_SRPT_SRQ_SIZE = 4095,       MAX_SRPT_SRQ_SIZE = 65535, +     MAX_SRPT_RDMA_SIZE = 256U, Hey btw, what should the proper

Re: mlx4 missing completions (was Re: [PATCH-v2] ib_srpt: Initial SRP Target merge for v3.2-rc1)

2011-10-25 Thread Bart Van Assche
On Tue, Oct 25, 2011 at 1:17 PM, Roland Dreier rol...@purestorage.com wrote: On Mon, Oct 24, 2011 at 11:07 PM, Bart Van Assche bvanass...@acm.org wrote: As far as I know every HCA supported by Linux does implement this correctly.  Which class did you have in mind as not doing

Re: [PATCH-v2] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-10-26 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 7:57 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: +static int srpt_write_pending(struct se_cmd *se_cmd) +{ +       struct srpt_rdma_ch *ch; +       struct srpt_send_ioctx *ioctx; +       enum srpt_command_state new_state; +       enum rdma_ch_state ch_state;

Re: mlx4 missing completions (was Re: [PATCH-v2] ib_srpt: Initial SRP Target merge for v3.2-rc1)

2011-10-26 Thread Bart Van Assche
On Wed, Oct 26, 2011 at 12:04 AM, Roland Dreier rol...@purestorage.com wrote: Sorry, but now I confused about what the bug is.  You have a QP associated with an SRQ, and you transition the QP to error.  At some point you get a last WQE received event for that QP (which means all receive

Re: [PATCH 5/9] ib_srpt: Fix sport-port_guid formatting code

2011-10-26 Thread Bart Van Assche
On Mon, Oct 24, 2011 at 10:25 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Mon, 2011-10-24 at 21:57 +0200, Bart Van Assche wrote: On Mon, Oct 24, 2011 at 7:33 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: +               snprintf(sport-port_guid, sizeof(sport-port_guid

Re: mlx4 missing completions (was Re: [PATCH-v2] ib_srpt: Initial SRP Target merge for v3.2-rc1)

2011-10-27 Thread Bart Van Assche
On Wed, Oct 26, 2011 at 10:06 PM, Roland Dreier rol...@purestorage.com wrote: On Wed, Oct 26, 2011 at 11:05 AM, Bart Van Assche bvanass...@acm.org wrote: Can I conclude from your reply that the last WQE event refers to the SRQ only and that it does not provide any information about the send

Re: srp_transport: Fix atttribute registration race

2011-11-01 Thread Bart Van Assche
On Mon, Oct 31, 2011 at 10:33 AM, James Bottomley james.bottom...@hansenpartnership.com wrote: On Fri, 2011-10-21 at 18:57 +0200, Bart Van Assche wrote: Register transport attributes after the attribute array has been set up instead of before. The current code is racy because

Re: [GIT PULL] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-11-05 Thread Bart Van Assche
On Fri, Nov 4, 2011 at 9:10 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: This is the PULL request for an initial merge of the ib_srpt driver using mainline target infrastructure into v3.2-rc1. In case anyone is interested, the most important unaddressed comments for this version of

Re: [GIT PULL] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-11-06 Thread Bart Van Assche
On Sat, Nov 5, 2011 at 7:04 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Sat, 2011-11-05 at 08:37 +0100, Bart Van Assche wrote: On Fri, Nov 4, 2011 at 9:10 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: This is the PULL request for an initial merge of the ib_srpt driver

Re: [PATCH 2/2] ib_srpt: Make srpt_srq_size module parameter use S_IRUGO|S_IWUSR

2011-11-06 Thread Bart Van Assche
srpt_device-srq_size. Reported-by: Bart Van Assche bvanass...@acm.org Cc: Bart Van Assche bvanass...@acm.org Cc: Roland Dreier rol...@purestorage.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org ---  drivers/infiniband/ulp/srpt/ib_srpt.c |    2 +-  1 files changed, 1 insertions(+), 1

Re: [PATCH 1/2] ib_srpt: Make srp_max_req_size module parameter use S_IRUGO|S_IWUSR

2011-11-06 Thread Bart Van Assche
On Sun, Nov 6, 2011 at 12:15 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: This patch converts the srp_max_req_size module parameter to R/W access so that it's accessable when built as CONFIG_INFINIBAND_SRPT=y.  This accessible ? includes adding srpt_device-max_req_size that is

Re: [GIT PULL] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-11-06 Thread Bart Van Assche
On Sun, Nov 6, 2011 at 11:09 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: We have also discussed srpt_service_guid a bit before, which you indicated needed to stay in current code as global scope, and presumably should not change value after loading.  Looking at the actual usage, one

[PATCH] ib_srpt: Fix Last WQE handling

2011-11-06 Thread Bart Van Assche
of the completion processing thread. This patch has been generated against the LIO tree of a few weeks ago. Signed-off-by: Bart Van Assche bvanass...@acm.org --- drivers/infiniband/ulp/srpt/ib_srpt.c | 48 +++-- drivers/infiniband/ulp/srpt/ib_srpt.h |8 ++--- 2

Re: [PATCH-v3] ib_srpt: Initial SRP Target merge for v3.2-rc1

2011-11-06 Thread Bart Van Assche
On Wed, Nov 2, 2011 at 5:33 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: This v3 patch adds the kernel module ib_srpt SCSI RDMA Protocol (SRP) target Hi Nick, Sorry that it took so long before I noticed, but checkpatch complains about the code present on the for-next-merge branch. Can

Re: [PATCH] ib_srpt: Fix Last WQE handling

2011-11-07 Thread Bart Van Assche
On Mon, Nov 7, 2011 at 9:46 PM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: On Mon, 2011-11-07 at 20:00 +0100, Bart Van Assche wrote: On Mon, Nov 7, 2011 at 7:10 PM, Roland Dreier rol...@purestorage.com wrote: On Sun, Nov 6, 2011 at 9:31 AM, Bart Van Assche bvanass...@acm.org wrote

Re: [PATCH] ib_srpt: Fix Last WQE handling

2011-11-08 Thread Bart Van Assche
On Tue, Nov 8, 2011 at 11:00 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: Thanks for verifying this one.  Pushed into lio-core and will squash into a single patch for target-pending. I've had a quick look at

[PATCH] ib_srpt: Source code cleanup

2011-11-08 Thread Bart Van Assche
state. Change one occurrence of if (e) ... else WARN_ON(!e) into if (e) ... else __WARN(). Signed-off-by: Bart Van Assche bvanass...@acm.org --- drivers/infiniband/ulp/srpt/ib_srpt.c | 80 - 1 files changed, 19 insertions(+), 61 deletions(-) diff --git a/drivers

Re: libibverbs: Added the man page verbs.7

2011-11-10 Thread Bart Van Assche
On Thu, Nov 10, 2011 at 10:03 AM, Dotan Barak dot...@dev.mellanox.co.il wrote: +This library is thread safe library and verbs can be called from every thread in the process (the Looks like a is missing between is and thread safe ? +However, it is up to the user to stop working with a

Re: libibverbs: Added the man page verbs.7

2011-11-10 Thread Bart Van Assche
On Thu, Nov 10, 2011 at 10:03 AM, Dotan Barak dot...@dev.mellanox.co.il wrote: +This library is thread safe library and verbs can be called from every thread in the process (the same resource can even be handled from different threads, for example: ibv_poll_cq can be called from more than one

[PATCH 1/3] ib_srpt: Update encode_wr_id() argument type

2011-11-11 Thread Bart Van Assche
Since commit 6b7227866 the first argument passed to encode_wr_id() is always of type enum srpt_opcode. Make this explicit by updating the function declaration. Also insert a blank line between function definitions as is done in the rest of the Linux kernel. Signed-off-by: Bart Van Assche bvanass

[PATCH 2/3] ib_srpt: Spelling fixes

2011-11-11 Thread Bart Van Assche
Fix spelling in one error message and in several source code comments. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Roland Dreier rol...@purestorage.com Cc: Christoph Hellwig h...@infradead.org --- drivers/infiniband/ulp/srpt/ib_srpt.c | 10

[PATCH 3/3] ib_srpt: Simplify __srpt_lookup_port()

2011-11-11 Thread Bart Van Assche
to __srpt_lookup_port() are protected via the same spinlock that protects srpt_dev_list. Hence the sdev-device pointer is never NULL nor invalid inside __srpt_lookup_port(). That means that it is safe to remove the sdev-device test in that function. Signed-off-by: Bart Van Assche bvanass...@acm.org

Re: libibverbs: Added the man page verbs.7

2011-11-13 Thread Bart Van Assche
On Sun, Nov 13, 2011 at 12:29 PM, Dotan Barak dot...@dev.mellanox.co.il wrote: On Sun, Nov 13, 2011 at 12:23 PM, Bart Van Assche bvanass...@acm.org wrote: Maybe the text in parentheses should be changed into a sentence on its own, and maybe it's a good idea to mention that when polling

Re: SRP over high-latency IB link

2011-11-13 Thread Bart Van Assche
On Sun, Nov 13, 2011 at 5:18 AM, Bill Boas bb...@systemfabricworks.com wrote: At SC we are running a video streaming demo across a 7000 mile fiber distance using IB extension boxes from Bay Microsystems at 40 Gbps. The video streaming app uses SRP to transmit the streams across this long

Re: srp_transport: Fix atttribute registration race

2011-11-14 Thread Bart Van Assche
On Mon, Nov 14, 2011 at 10:43 PM, Or Gerlitz or.gerl...@gmail.com wrote: On Sun, Nov 13, 2011 at 11:55 PM, Dave Dillow dillo...@ornl.gov wrote: SRP uses RDMA, so you cannot use UC mode. per the IB spec, RDMA write is supported for UC Agreed. But an SRP target does not only issue RDMA write

Re: [opensm] [PATCH 1/5] Free memory from osm_subn_opt_t when osm_subn_t destroyed

2011-11-14 Thread Bart Van Assche
On Mon, Nov 14, 2011 at 11:49 PM, Albert Chu ch...@llnl.gov wrote: +       if (opt-vlarb_high) +               free(opt-vlarb_high); Those if-statements are superfluous - invoking free(NULL) is safe. See e.g. http://pubs.opengroup.org/onlinepubs/009695399/functions/free.html. Bart. -- To

Re: linux-next: Tree for Nov 16 (infiniband: ib_srpt.c)

2011-11-17 Thread Bart Van Assche
On Thu, Nov 17, 2011 at 3:34 AM, Randy Dunlap rdun...@xenotime.net wrote: On 11/15/2011 06:33 PM, Stephen Rothwell wrote: Hi all, When CONFIG_BUG is not enabled: next-2011-1116/drivers/infiniband/ulp/srpt/ib_srpt.c: In function 'srpt_cm_dreq_recv':

[PATCH] ib_srpt: Make compilation with BUG=n proceed

2011-11-17 Thread Bart Van Assche
With CONFIG_BUG=n the __WARN() macro is not defined. Avoid that building with CONFIG_BUG=n fails by replacing __WARN() with WARN_ON(true). Also make sure that each such statement is preceeded by an appropriate pr_err() statement. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Nicholas

Re: [PATCH] ib_srpt: Make compilation with BUG=n proceed

2011-11-17 Thread Bart Van Assche
On Fri, Nov 18, 2011 at 12:45 AM, Roland Dreier rol...@purestorage.com wrote: On Thu, Nov 17, 2011 at 11:25 AM, Bart Van Assche bvanass...@acm.org wrote: +               pr_err(%s[%d]: unexpected opcode %d, __func__, __LINE__, +                      opcode); +               WARN_ON(true

[PATCH] ib_srpt: Make compilation with BUG=n proceed

2011-11-18 Thread Bart Van Assche
With CONFIG_BUG=n the __WARN() macro is not defined. Avoid that building with CONFIG_BUG=n fails by changing pr_err(...); _WARN() into WARN(true, ...). Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Roland Dreier rol...@purestorage.com Cc

Re: [PATCH] ib_srpt: Make compilation with BUG=n proceed

2011-11-19 Thread Bart Van Assche
On Fri, Nov 18, 2011 at 9:10 PM, Roland Dreier rol...@purestorage.com wrote: On Thu, Nov 17, 2011 at 11:52 PM, Bart Van Assche bvanass...@acm.org wrote: As far as I can see with CONFIG_BUG=n WARN() is defined as follows: #define WARN(condition, format

[PATCH 00/14] Make ib_srp better suited for H.A. purposes

2011-12-01 Thread Bart Van Assche
This patch series makes the ib_srp driver better suited for use in a H.A. setup because: - Switchover without triggering read or write errors become possible. Such errors are bad because these can make a filesystem switch to read-only mode. - A ping mechanism has been added that allows to

[PATCH 01/14] ib_srp: Introduce pr_fmt()

2011-12-01 Thread Bart Van Assche
Make the logging code more a little more brief by replacing printk(KERN_WARNING PFX ...) by pr_warn(...) and by replacing printk(KERN_ERR PFX ...) by pr_err(...). Remove one trailing space to avoid a checkpatch warning. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David Dillow dillo

[PATCH 02/14] ib_srp: Consolidate repetitive sysfs code

2011-12-01 Thread Bart Van Assche
Remove sysfs attributes before removing a target instead of testing the target state in every sysfs attribute callback method. Note: it is safe to invoke a sysfs attribute removal method like device_remove_file() twice on the same attribute. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc

[PATCH 03/14] ib_srp: Disallow duplicate logins

2011-12-01 Thread Bart Van Assche
Currently the ib_srp driver allows to log in multiple times to the same target via its sysfs interface. This leads to each target LUN being imported multiple times at the initiator side, something that should not be allowed. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David Dillow dillo

[PATCH 04/14] ib_srp: Set block layer timeout

2011-12-01 Thread Bart Van Assche
an error completion. The block layer timeout must be larger than the transport layer timeout because otherwise it can happen that an SRP response is received after the SCSI layer has already killed a command. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David Dillow dillo...@ornl.gov Cc

[PATCH 05/14] ib_srp: Avoid that late SRP replies cause trouble

2011-12-01 Thread Bart Van Assche
If a user misconfigures the block layer timeout such that it is below the InfiniBand RC timeout it can happen that an SRP reply arrives after the SCSI error handler has already killed the associated SCSI command. Avoid that late replies cause a kernel crash. Signed-off-by: Bart Van Assche bvanass

[PATCH 06/14] ib_srp: Micro-optimize completion handlers

2011-12-01 Thread Bart Van Assche
Help the CPU branch predictor by rearranging two if-statements such that the most likely code is in the if-part instead of the else-part. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David Dillow dillo...@ornl.gov Cc: Roland Dreier rol...@purestorage.com --- drivers/infiniband/ulp/srp

[PATCH 07/14] ib_srp: Introduce srp_handle_qp_err()

2011-12-01 Thread Bart Van Assche
Factor out common code into a new function. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David Dillow dillo...@ornl.gov Cc: Roland Dreier rol...@purestorage.com --- drivers/infiniband/ulp/srp/ib_srp.c | 19 +++ 1 files changed, 11 insertions(+), 8 deletions(-) diff

[PATCH 08/14] srp_transport: Document sysfs attributes

2011-12-01 Thread Bart Van Assche
Document the srp_transport sysfs attributes according to the rules specified in Documentation/ABI/README. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Cc: Brian King brk...@linux.vnet.ibm.com --- Documentation/ABI/stable/sysfs-transport-srp

[PATCH 09/14] srp_transport: Fix attribute registration

2011-12-01 Thread Bart Van Assche
Register transport attributes after the attribute array has been set up instead of before. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Cc: Brian King brk...@linux.vnet.ibm.com Cc: David Dillow dillo...@ornl.gov Cc: Roland Dreier rol

[PATCH 10/14] srp_transport: Simplify attribute initialization code

2011-12-01 Thread Bart Van Assche
that macro when adding new attributes. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Cc: Brian King brk...@linux.vnet.ibm.com Cc: David Dillow dillo...@ornl.gov Cc: Roland Dreier rol...@purestorage.com --- drivers/scsi/scsi_transport_srp.c | 26

[PATCH 13/14] ib_srp: Implement transport layer ping

2011-12-01 Thread Bart Van Assche
a reference to a SCSI device can be deleted via the sysfs SCSI host delete attribute. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David Dillow dillo...@ornl.gov Cc: Roland Dreier rol...@purestorage.com Cc: FUJITA Tomonori fujita.tomon...@lab.ntt.co.jp Cc: Brian King brk...@linux.vnet.ibm.com

[PATCH 14/14] ib_srp: Allow SRP disconnect through sysfs

2011-12-01 Thread Bart Van Assche
Make it possible to disconnect via sysfs the IB RC connection used by the SRP protocol to communicate with a target. Let the SRP transport layer create a sysfs delete attribute for initiator drivers that support this functionality. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: David

Re: [RFC] – Proposal for new process for OFED releases

2011-12-01 Thread Bart Van Assche
On Fri, Dec 2, 2011 at 1:04 AM, Hefty, Sean sean.he...@intel.com wrote: - What should we do with modules like SDP that are not in kernel? Either remove them or carry them forward as experimental features. Wat I expect is that reworking the SDP implementation such that it can be included

Re: [RFC] – Proposal for new process for OFED releases

2011-12-02 Thread Bart Van Assche
On Fri, Dec 2, 2011 at 7:12 PM, Christoph Lameter c...@linux.com wrote: What were the issues that prevented the merging of the SDP implementation? At least AF_INET_SDP - there might have been other issues. See e.g. http://lkml.org/lkml/2006/3/6/70. Bart. -- To unsubscribe from this list: send

sparse endianness complaints for drivers/infiniband

2011-12-04 Thread Bart Van Assche
Hi, Has anyone had a look recently at the sparse endianness complaints about the code under drivers/infiniband ? I haven't analyzed these messages closely yet - these might indicate real bugs. $ make C=2 CF=-D__CHECK_ENDIAN__ M=drivers/infiniband modules [ ... ] CHECK

Re: [PATCH 2/2] rdma/core: Fix sparse errors

2011-12-07 Thread Bart Van Assche
On Tue, Dec 6, 2011 at 10:15 PM, Hefty, Sean sean.he...@intel.com wrote: Fix errors reported by sparse in the rdma core stack.  Note that these are real bugs, but don't affect any existing code to the best of my knowledge.  The mlid issue would only affect kernel users of rdma_join_multicast

Re: [PATCH 06/14] ib_srp: Micro-optimize completion handlers

2011-12-12 Thread Bart Van Assche
On Fri, Dec 2, 2011 at 12:32 AM, David Dillow dillo...@ornl.gov wrote: On Thu, 2011-12-01 at 16:35 -0500, chas williams - CONTRACTOR wrote: perhaps this should use the unlikely() macro instead:       if (unlikely(wc.status)) {               ...       } If it needs to change at all, this is

Re: [PATCH 04/14] ib_srp: Set block layer timeout

2011-12-17 Thread Bart Van Assche
On Thu, Dec 15, 2011 at 8:37 PM, David Dillow dillo...@ornl.gov wrote: +static int srp_slave_alloc(struct scsi_device *sdev) +{ +     struct Scsi_Host *shost = sdev-host; +     struct srp_target_port *target = host_to_target(shost); + +     if (!WARN_ON(target-rq_tmo_jiffies == 0)) +

<    1   2   3   4   5   6   7   8   9   10   >