[ofa-general] [GIT PULL] 2.6.22: please pull rdma-dev.git

2007-05-09 Thread Sean Hefty
Roland, please pull from:

git://git.openfabrics.org/~shefty/rdma-dev.git for-roland

This will cleanup device removal synchronization in the rdma_cm.  The changes
are based on 2.6.21.

Sean Hefty (3):
  rdma/cm: simplify device removal handling code
  rdma/cm: Fix synchronization with device removal in cma_iw_handler
  rdma/cm: Add check to validate that cm_id is bound to a device.

 drivers/infiniband/core/cma.c |  106 +++--
 1 files changed, 59 insertions(+), 47 deletions(-)
___
general mailing list
general@lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general


[ofa-general] [GIT PULL] 2.6.22: please pull rdma-dev.git

2007-04-05 Thread Sean Hefty
Roland, please review and pull patches from

git.openfabrics.org/~shefty/rdma-dev.git for-roland

This will pull in some patches that I would like queued for 2.6.22.

Sean Hefty (6):
  rdma_ucm: simplify ucma_get_event code
  ib_ucm: simplify ib_ucm_event code
  ib_sa: set src_path_bits correctly in ib_init_ah_from_path
  IB/cm: limit cm message timeout
  IB/mad: Fix GRH handling for sent/received MADs
  IB/ipoib: use ib_init_ah_from_path to initialize ah_attr

Patch details are listed below for easier review / feedback.

- Sean


commit 6042f5b86a92af4392c85949049f237396447d69
Author: Sean Hefty [EMAIL PROTECTED]
Date:   Thu Apr 5 11:50:11 2007 -0700

IB/ipoib: use ib_init_ah_from_path to initialize ah_attr

To support destinations that are not on the local IB subnet,
IPoIB should include the GRH information when constructing an
address handle.  Using the existing ib_init_ah_from_path call
will do this for us.

Signed-off-by: Sean Hefty [EMAIL PROTECTED]

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c
b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 0741c6d..5a9ff7f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -395,14 +395,10 @@ static void path_rec_completion(int status,
skb_queue_head_init(skqueue);
 
if (!status) {
-   struct ib_ah_attr av = {
-   .dlid  = be16_to_cpu(pathrec-dlid),
-   .sl= pathrec-sl,
-   .port_num  = priv-port,
-   .static_rate   = pathrec-rate
-   };
-
-   ah = ipoib_create_ah(dev, priv-pd, av);
+   struct ib_ah_attr av;
+
+   if (!ib_init_ah_from_path(priv-ca, priv-port, pathrec, av))
+   ah = ipoib_create_ah(dev, priv-pd, av);
}
 
spin_lock_irqsave(priv-lock, flags);

commit 86cbcbb332b85501df98a7dccd8e2d40d1c2ffa0
Author: Sean Hefty [EMAIL PROTECTED]
Date:   Thu Apr 5 11:49:21 2007 -0700

IB/mad: Fix GRH handling for sent/received MADs

We need to set the SGID index for routed MADs and pass received
GRH information to userspace when a MAD is received.

Signed-off-by: Sean Hefty [EMAIL PROTECTED]

diff --git a/drivers/infiniband/core/user_mad.c 
b/drivers/infiniband/core/user_mad.c
index c069ebe..7774cf5 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -231,12 +231,17 @@ static void recv_handler(struct ib_mad_agent *agent,
packet-mad.hdr.path_bits = mad_recv_wc-wc-dlid_path_bits;
packet-mad.hdr.grh_present = !!(mad_recv_wc-wc-wc_flags  IB_WC_GRH);
if (packet-mad.hdr.grh_present) {
-   /* XXX parse GRH */
-   packet-mad.hdr.gid_index   = 0;
-   packet-mad.hdr.hop_limit   = 0;
-   packet-mad.hdr.traffic_class   = 0;
-   memset(packet-mad.hdr.gid, 0, 16);
-   packet-mad.hdr.flow_label  = 0;
+   struct ib_ah_attr ah_attr;
+
+   ib_init_ah_from_wc(agent-device, agent-port_num,
+  mad_recv_wc-wc, mad_recv_wc-recv_buf.grh,
+  ah_attr);
+
+   packet-mad.hdr.gid_index = ah_attr.grh.sgid_index;
+   packet-mad.hdr.hop_limit = ah_attr.grh.hop_limit;
+   packet-mad.hdr.traffic_class = ah_attr.grh.traffic_class;
+   memcpy(packet-mad.hdr.gid, ah_attr.grh.dgid, 16);
+   packet-mad.hdr.flow_label = 
cpu_to_be32(ah_attr.grh.flow_label);
}
 
if (queue_packet(file, agent, packet))
@@ -473,6 +478,7 @@ static ssize_t ib_umad_write(struct file *filp, const char 
__user
*buf,
if (packet-mad.hdr.grh_present) {
ah_attr.ah_flags = IB_AH_GRH;
memcpy(ah_attr.grh.dgid.raw, packet-mad.hdr.gid, 16);
+   ah_attr.grh.sgid_index = packet-mad.hdr.gid_index;
ah_attr.grh.flow_label = 
be32_to_cpu(packet-mad.hdr.flow_label);
ah_attr.grh.hop_limit  = packet-mad.hdr.hop_limit;
ah_attr.grh.traffic_class  = packet-mad.hdr.traffic_class;

commit 3bed3bb2d0bb02ca8a590111c57fc1843624d2a4
Author: Sean Hefty [EMAIL PROTECTED]
Date:   Thu Apr 5 10:51:16 2007 -0700

IB/cm: limit cm message timeout

Limit the timeout that the ib_cm will wait to receive a response to a
message, to avoid excessively large (on the order of hours) timeout
values.  This prevents consuming resources tracking requests for
extended periods of time, and allows quicker retries.

This helps correct for a bug in an SRP Engenio target sending a large
value ( 1 hour) as a service timeout.

Signed-off-by: Sean Hefty [EMAIL PROTECTED]

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 842cd0b..706fdbf