]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Fri, 17 Dec 2010 16:20:41 +0000 (08:20 -0800)
committerSean Hefty <sean.hefty@intel.com>
Fri, 17 Dec 2010 16:20:41 +0000 (08:20 -0800)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 32cbacc636aca06bb71fcf6b8a04991cf5c33d1f..da058f481a72ea2947ed01ed107f9154ef230fc5 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,9 @@
 Version: 1
-Previous: 39d650dedc2a88e0426ee2a4b60c6f39acee60fa
-Head: 9bb9b96d1873adb423467ead619edde40a0e653e
+Previous: 63bc8c03b4b406e0c8d69a150082e2df865037df
+Head: 20d20df9e5af8c472a9c8e019752a0f2ee082d24
 Applied:
   lmc: b355854c79a1e446e87684a41663ad5aae258b73
   lid: 9bb9b96d1873adb423467ead619edde40a0e653e
+  refresh-temp: 20d20df9e5af8c472a9c8e019752a0f2ee082d24
 Unapplied:
 Hidden:
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..ea44eb9
--- /dev/null
@@ -0,0 +1,172 @@
+Bottom: 93dfcd4be8bc16c920d7e571b1264983a3927e6a
+Top:    68adc0c9d48fa548f1cc79f409dba0cfd472afd3
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2010-12-17 08:20:41 -0800
+
+Refresh of lid
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index 9f6a13b..ce30afc 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -273,7 +273,7 @@ acm_format_name(int level, char *name, size_t name_size,
+                               ntohs(path->slid), ntohs(path->dlid));
+               } else {
+                       acm_format_name(level, name, name_size, ACM_ADDRESS_GID,
+-                                      &path->dgid, sizeof path->dgid);
++                                      &path->dgid.raw, sizeof path->dgid);
+               }
+               break;
+       case ACM_ADDRESS_LID:
+@@ -285,9 +285,9 @@ acm_format_name(int level, char *name, size_t name_size,
+       }
+ }
+-static int ib_gid_any(union ibv_gid *gid)
++static int ib_any_gid(union ibv_gid *gid)
+ {
+-      return ((gid->subnet_prefix | gid->interface_id) == 0);
++      return ((gid->global.subnet_prefix | gid->global.interface_id) == 0);
+ }
+ static int acm_compare_dest(const void *dest1, const void *dest2)
+@@ -741,7 +741,7 @@ acm_record_acm_route(struct acm_ep *ep, struct acm_dest *dest)
+       acm_log(2, "\n");
+       for (i = 0; i < MAX_EP_MC; i++) {
+-              if (dest->mgid == ep->mc_dest[i].mgid)
++              if (!memcmp(&dest->mgid, &ep->mc_dest[i].mgid, sizeof dest->mgid))
+                       break;
+       }
+       if (i == MAX_EP_MC) {
+@@ -777,6 +777,59 @@ static void acm_init_path_query(struct ib_sa_mad *mad)
+       mad->attr_id = IB_SA_ATTR_PATH_REC;
+ }
++static uint64_t acm_path_comp_mask(struct ibv_path_record *path)
++{
++      uint32_t fl_hop;
++      uint16_t qos_sl;
++      uint64_t comp_mask = 0;
++
++      acm_log(2, "\n");
++      if (path->service_id)
++              comp_mask |= IB_COMP_MASK_PR_SERVICE_ID;
++      if (!ib_any_gid(&path->dgid))
++              comp_mask |= IB_COMP_MASK_PR_DGID;
++      if (!ib_any_gid(&path->sgid))
++              comp_mask |= IB_COMP_MASK_PR_SGID;
++      if (path->dlid)
++              comp_mask |= IB_COMP_MASK_PR_DLID;
++      if (path->slid)
++              comp_mask |= IB_COMP_MASK_PR_SLID;
++
++      fl_hop = ntohl(path->flowlabel_hoplimit);
++      if (fl_hop >> 8)
++              comp_mask |= IB_COMP_MASK_PR_FLOW_LABEL;
++      if (fl_hop & 0xFF)
++              comp_mask |= IB_COMP_MASK_PR_HOP_LIMIT;
++
++      if (path->tclass)
++              comp_mask |= IB_COMP_MASK_PR_TCLASS;
++      if (path->reversible_numpath & 0x80)
++              comp_mask |= IB_COMP_MASK_PR_REVERSIBLE;
++      if (path->pkey)
++              comp_mask |= IB_COMP_MASK_PR_PKEY;
++
++      qos_sl = ntohs(path->qosclass_sl);
++      if (qos_sl >> 4)
++              comp_mask |= IB_COMP_MASK_PR_QOS_CLASS;
++      if (qos_sl & 0xF)
++              comp_mask |= IB_COMP_MASK_PR_SL;
++
++      if (path->mtu & 0xC0)
++              comp_mask |= IB_COMP_MASK_PR_MTU_SELECTOR;
++      if (path->mtu & 0x3F)
++              comp_mask |= IB_COMP_MASK_PR_MTU;
++      if (path->rate & 0xC0)
++              comp_mask |= IB_COMP_MASK_PR_RATE_SELECTOR;
++      if (path->rate & 0x3F)
++              comp_mask |= IB_COMP_MASK_PR_RATE;
++      if (path->packetlifetime & 0xC0)
++              comp_mask |= IB_COMP_MASK_PR_PACKET_LIFETIME_SELECTOR;
++      if (path->packetlifetime & 0x3F)
++              comp_mask |= IB_COMP_MASK_PR_PACKET_LIFETIME;
++
++      return comp_mask;
++}
++
+ /* Caller must hold dest lock */
+ static uint8_t acm_resolve_path(struct acm_ep *ep, struct acm_dest *dest,
+       void (*resp_handler)(struct acm_send_msg *req,
+@@ -1342,59 +1395,6 @@ static void acm_format_mgid(union ibv_gid *mgid, uint16_t pkey, uint8_t tos,
+       mgid->raw[15] = 0;
+ }
+-static uint64_t acm_path_comp_mask(struct ibv_path_record *path)
+-{
+-      uint32_t fl_hop;
+-      uint16_t qos_sl;
+-      uint64_t comp_mask = 0;
+-
+-      acm_log(2, "\n");
+-      if (path->service_id)
+-              comp_mask |= IB_COMP_MASK_PR_SERVICE_ID;
+-      if (!ib_any_gid(&path->dgid))
+-              comp_mask |= IB_COMP_MASK_PR_DGID;
+-      if (!ib_any_gid(&path->sgid))
+-              comp_mask |= IB_COMP_MASK_PR_SGID;
+-      if (path->dlid)
+-              comp_mask |= IB_COMP_MASK_PR_DLID;
+-      if (path->slid)
+-              comp_mask |= IB_COMP_MASK_PR_SLID;
+-
+-      fl_hop = ntohl(path->flowlabel_hoplimit);
+-      if (fl_hop >> 8)
+-              comp_mask |= IB_COMP_MASK_PR_FLOW_LABEL;
+-      if (fl_hop & 0xFF)
+-              comp_mask |= IB_COMP_MASK_PR_HOP_LIMIT;
+-
+-      if (path->tclass)
+-              comp_mask |= IB_COMP_MASK_PR_TCLASS;
+-      if (path->reversible_numpath & 0x80)
+-              comp_mask |= IB_COMP_MASK_PR_REVERSIBLE;
+-      if (path->pkey)
+-              comp_mask |= IB_COMP_MASK_PR_PKEY;
+-
+-      qos_sl = ntohs(path->qosclass_sl);
+-      if (qos_sl >> 4)
+-              comp_mask |= IB_COMP_MASK_PR_QOS_CLASS;
+-      if (qos_sl & 0xF)
+-              comp_mask |= IB_COMP_MASK_PR_SL;
+-
+-      if (path->mtu & 0xC0)
+-              comp_mask |= IB_COMP_MASK_PR_MTU_SELECTOR;
+-      if (path->mtu & 0x3F)
+-              comp_mask |= IB_COMP_MASK_PR_MTU;
+-      if (path->rate & 0xC0)
+-              comp_mask |= IB_COMP_MASK_PR_RATE_SELECTOR;
+-      if (path->rate & 0x3F)
+-              comp_mask |= IB_COMP_MASK_PR_RATE;
+-      if (path->packetlifetime & 0xC0)
+-              comp_mask |= IB_COMP_MASK_PR_PACKET_LIFETIME_SELECTOR;
+-      if (path->packetlifetime & 0x3F)
+-              comp_mask |= IB_COMP_MASK_PR_PACKET_LIFETIME;
+-
+-      return comp_mask;
+-}
+-
+ static void acm_init_join(struct ib_sa_mad *mad, union ibv_gid *port_gid,
+       uint16_t pkey, uint8_t tos, uint8_t tclass, uint8_t sl, uint8_t rate, uint8_t mtu)
+ {
+@@ -1750,7 +1750,7 @@ static int
+ acm_is_path_from_port(struct acm_port *port, struct ibv_path_record *path)
+ {
+       if (ib_any_gid(&path->sgid)) {
+-              return (port->lid == (ntohs(path.slid) & port->lid_mask));
++              return (port->lid == (ntohs(path->slid) & port->lid_mask));
+       }
+       return (acm_gid_index(port, &path->sgid) < port->gid_cnt);
+ }