Sasha Khapyorsky | 2 Jan 16:53 2011

Re: [PATCH] Further timeout paramater verification (Was: [PATCH] infiniband-diags: Verify timeout value specified to diagnostics)

On 11:47 Wed 22 Dec     , Ira Weiny wrote:
> On Mon, 20 Dec 2010 13:57:36 -0800
> Jay Fenlason <fenlason@...> wrote:
> 
> > Sorry if you get this more than once, I seem to have outgoing mail misconfiguration here.
> > 
> > On Wed, Dec 15, 2010 at 11:47:09AM -0800, Ira Weiny wrote:
> > >
> > > Verify timeout value specified to diagnostics
> > >
> > >
> > > Signed-off-by: Ira Weiny <weiny2@...>
> > > ---
> > >  infiniband-diags/src/ibdiag_common.c |   10 +++++++---
> > >  1 files changed, 7 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/infiniband-diags/src/ibdiag_common.c b/infiniband-diags/src/ibdia
> > +g_common.c
> > > index 99861f1..8ccf2fc 100644
> > > --- a/infiniband-diags/src/ibdiag_common.c
> > > +++ b/infiniband-diags/src/ibdiag_common.c
> > >  <at>  <at>  -175,9 +175,13  <at>  <at>  static int process_opt(int ch, char *optarg)
> > >               ibd_dest_type = IB_DEST_GUID;
> > >               break;
> > >       case 't':
> > > -             val = strtoul(optarg, 0, 0);
> > > -             madrpc_set_timeout(val);
> > > -             ibd_timeout = val;
> > > +             val = (int)strtol(optarg, NULL, 0);
> > > +             if (val > 0) {
(Continue reading)

Bart Van Assche | 2 Jan 18:16 2011
Picon

Re: [RFC 5/8] IB/srp: reduce local coverage for command submission and EH

On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <dillowda@...> wrote:
>
> We only need locks to protect our lists and number of credits available.
> By pre-consuming the credit for the request, we can reduce our lock
> coverage to just those areas. If we don't actually send the request,
> we'll need to put the credit back into the pool.
>
> [ ... ]
>
> -       iu->type = iu_type;
> +       list_del_init(&iu->list);

Hello Dave,

As far as I can see the above call of list_del_init() can be modified
into a list_del() call. The same holds for the other list_del_init()
call introduced by this patch.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Bart Van Assche | 2 Jan 18:27 2011
Picon

Re: [RFC 6/8] IB/srp: reduce lock coverage of command completion

On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <dillowda <at> ornl.gov> wrote:
> [ ... ]
>  <at>  <at>  -913,14 +917,6  <at>  <at>  static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
>  {
>        struct srp_request *req;
>        struct scsi_cmnd *scmnd;
> -       unsigned long flags;
> -       s32 delta;
> -
> -       delta = (s32) be32_to_cpu(rsp->req_lim_delta);
> -
> -       spin_lock_irqsave(target->scsi_host->host_lock, flags);
> -
> -       target->req_lim += delta;
>
>        if (unlikely(rsp->tag & SRP_TAG_TSK_MGMT)) {
>                target->tsk_mgmt_status = -1;
>  <at>  <at>  -948,12 +944,10  <at>  <at>  static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
>                else if (rsp->flags & (SRP_RSP_FLAG_DIOVER | SRP_RSP_FLAG_DIUNDER))
>                        scsi_set_resid(scmnd, be32_to_cpu(rsp->data_in_res_cnt));
>
> +               srp_remove_req(target, req, be32_to_cpu(rsp->req_lim_delta));
>                scmnd->host_scribble = NULL;
>                scmnd->scsi_done(scmnd);
> -               srp_remove_req(target, req);
>        }
> -
> -       spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
>  }
>
(Continue reading)

David Dillow | 3 Jan 09:44 2011
Picon

Re: [RFC 6/8] IB/srp: reduce lock coverage of command completion

On Sun, 2011-01-02 at 18:27 +0100, Bart Van Assche wrote:
> Before this patch target->req_lim was updated both when receiving a
> response for a regular SRP command and when receiving a response for
> an SRP task management command. This patch modifies that in only
> updating target->req_lim in the former case. Are you sure that's
> correct ?

No, that's a bug. Good catch, thanks.
--

-- 
Dave Dillow
National Center for Computational Science
Oak Ridge National Laboratory
(865) 241-6602 office

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

David Dillow | 3 Jan 09:45 2011
Picon

Re: [RFC 5/8] IB/srp: reduce local coverage for command submission and EH

On Sun, 2011-01-02 at 18:16 +0100, Bart Van Assche wrote:
> On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <dillowda@...> wrote:
> >
> > We only need locks to protect our lists and number of credits available.
> > By pre-consuming the credit for the request, we can reduce our lock
> > coverage to just those areas. If we don't actually send the request,
> > we'll need to put the credit back into the pool.
> >
> > [ ... ]
> >
> > -       iu->type = iu_type;
> > +       list_del_init(&iu->list);
> 
> Hello Dave,
> 
> As far as I can see the above call of list_del_init() can be modified
> into a list_del() call. The same holds for the other list_del_init()
> call introduced by this patch.

Most likely; there are several such instances that I've corrected from
by misinterpretation of the list debug code.

Thanks,

--

-- 
Dave Dillow
National Center for Computational Science
Oak Ridge National Laboratory
(865) 241-6602 office

(Continue reading)

Nir Muchtar | 3 Jan 16:33 2011

[PATCH V4 0/6] IB Netlink Interface and RDMA CM exports

IB Netlink infrastructure and module for rdma_cm

This patch set provides means for communicating internal data from
IB modules to the userspace.
It is composed of two components:
1. The main ib_netlink infrastructure which lives and is initialized by ib_core.
2. additional clients which are implemented inside existing IB modules.
   Clients are responsible for adding/removing their modules during init/exit
   to/from the infrastructure.
   They also supply an array of callbacks for the infrastructure to call
   based on the module/operation type. 

ib_netlink uses the standard Netlink module and defines a new Netlink unit
(NETLINK_INFINIBAND) in netlink.h.
Upon receiving a request from userspace, it finds the target client
using the add/remove mechanism, and then uses client's callback table to call
the callback which is associated with the requested op, using the 
netlink_dump_start helper function.
The callbacks must be of the form:
int (*dump)(struct sk_buff *skb, struct netlink_callback *cb)
and must use the netlink_callback context in order to save state when called 
multiple times.
There is no guarantee that the returned data will be consistent as data
structures can change between calls.
The exact format of the returned data is unknown to ib_netlink itself.
It is shared between the kernel and userspace in the form of common headers.

Changelog:
1. Allowing for additional callback types in the cb_table.
2. sockaddr Attributes are not passed as sockaddr_storage structs.
(Continue reading)

Nir Muchtar | 3 Jan 16:33 2011

[PATCH V4 1/6] IB Netlink Infrastructure

The basic IB netlink infrastructure.
It allows for registration of IB clients for which data is to be exported.
It supplies message construction callbacks.

Signed-off-by: Nir Muchtar <nirm@...>
---
 drivers/infiniband/core/netlink.c |  178 +++++++++++++++++++++++++++++++++++++
 include/linux/netlink.h           |    1 +
 include/rdma/ib_netlink.h         |   62 +++++++++++++
 3 files changed, 241 insertions(+), 0 deletions(-)
 create mode 100644 drivers/infiniband/core/netlink.c
 create mode 100644 include/rdma/ib_netlink.h

diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
new file mode 100644
index 0000000..66cbd45
--- /dev/null
+++ b/drivers/infiniband/core/netlink.c
 <at>  <at>  -0,0 +1,178  <at>  <at> 
+/*
+ * Copyright (c) 2010 Voltaire Inc.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
(Continue reading)

Nir Muchtar | 3 Jan 16:33 2011

[PATCH V4 2/6] IB Core: Error Handler

Added missing error handling in ib_core init. (Wasn't intentional right?)

Signed-off-by: Nir Muchtar <nirm@...>
---
 drivers/infiniband/core/device.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index a19effa..6e06e37 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
 <at>  <at>  -719,15 +719,22  <at>  <at>  static int __init ib_core_init(void)
 	int ret;

 	ret = ib_sysfs_setup();
-	if (ret)
+	if (ret) {
 		printk(KERN_WARNING "Couldn't create InfiniBand device class\n");
+		goto err;
+	}

 	ret = ib_cache_setup();
 	if (ret) {
 		printk(KERN_WARNING "Couldn't set up InfiniBand P_Key/GID cache\n");
-		ib_sysfs_cleanup();
+		goto err_sysfs;
 	}

+	return 0;
+
(Continue reading)

Nir Muchtar | 3 Jan 16:33 2011

[PATCH V4 3/6] IB Core: Run Netlink

Include and initialize IB netlink from IB core.

Signed-off-by: Nir Muchtar <nirm@...>
---
 drivers/infiniband/core/Makefile |    2 +-
 drivers/infiniband/core/device.c |   11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/core/Makefile b/drivers/infiniband/core/Makefile
index cb1ab3e..c8bbaef 100644
--- a/drivers/infiniband/core/Makefile
+++ b/drivers/infiniband/core/Makefile
 <at>  <at>  -8,7 +8,7  <at>  <at>  obj-$(CONFIG_INFINIBAND_USER_ACCESS) +=	ib_uverbs.o ib_ucm.o \
 					$(user_access-y)

 ib_core-y :=			packer.o ud_header.o verbs.o sysfs.o \
-				device.o fmr_pool.o cache.o
+				device.o fmr_pool.o cache.o netlink.o
 ib_core-$(CONFIG_INFINIBAND_USER_MEM) += umem.o

 ib_mad-y :=			mad.o smi.o agent.o mad_rmpp.o
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 6e06e37..3229102 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
 <at>  <at>  -40,6 +40,8  <at>  <at> 
 #include <linux/mutex.h>
 #include <linux/workqueue.h>

+#include <net/ib_netlink.h>
(Continue reading)

Nir Muchtar | 3 Jan 16:33 2011

[PATCH V4 4/6] RDMA CM: Export State Enum

exported enum cma_state into rdma_cm.h

Signed-off-by: Nir Muchtar <nirm@...>
---
 drivers/infiniband/core/cma.c |  166 +++++++++++++++++++----------------------
 include/rdma/rdma_cm.h        |   14 ++++
 2 files changed, 92 insertions(+), 88 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 6884da2..5821f93 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
 <at>  <at>  -89,20 +89,6  <at>  <at>  struct cma_device {
 	struct list_head	id_list;
 };

-enum cma_state {
-	CMA_IDLE,
-	CMA_ADDR_QUERY,
-	CMA_ADDR_RESOLVED,
-	CMA_ROUTE_QUERY,
-	CMA_ROUTE_RESOLVED,
-	CMA_CONNECT,
-	CMA_DISCONNECT,
-	CMA_ADDR_BOUND,
-	CMA_LISTEN,
-	CMA_DEVICE_REMOVAL,
-	CMA_DESTROYING
-};
-
(Continue reading)


Gmane