]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh
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/lid
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index da058f481a72ea2947ed01ed107f9154ef230fc5..d25da92864c92d525220f6088a7e67f6cb294d20 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,8 @@
 Version: 1
-Previous: 63bc8c03b4b406e0c8d69a150082e2df865037df
-Head: 20d20df9e5af8c472a9c8e019752a0f2ee082d24
+Previous: 8016c45e42492274b63f9c063aae7620286dc812
+Head: a2a153cc98530448753152015454816591ed4cea
 Applied:
   lmc: b355854c79a1e446e87684a41663ad5aae258b73
-  lid: 9bb9b96d1873adb423467ead619edde40a0e653e
-  refresh-temp: 20d20df9e5af8c472a9c8e019752a0f2ee082d24
+  lid: a2a153cc98530448753152015454816591ed4cea
 Unapplied:
 Hidden:
index 0c4e7ff8e2778c3dfa0bbd679c615da342412bbf..c9422bc56b988314a33e33bd0234fe12fd954327 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: b2af32a606dc3c3e64f150250320dc7d52426926
-Top:    93dfcd4be8bc16c920d7e571b1264983a3927e6a
+Top:    68adc0c9d48fa548f1cc79f409dba0cfd472afd3
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2010-12-13 10:35:40 -0800
 
@@ -14,7 +14,7 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 ---
 
 diff --git a/src/acm.c b/src/acm.c
-index e0f0b94..9f6a13b 100644
+index e0f0b94..ce30afc 100644
 --- a/src/acm.c
 +++ b/src/acm.c
 @@ -268,8 +268,13 @@ acm_format_name(int level, char *name, size_t name_size,
@@ -28,7 +28,7 @@ index e0f0b94..9f6a13b 100644
 +                              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:
@@ -37,9 +37,9 @@ index e0f0b94..9f6a13b 100644
        }
  }
  
-+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)
@@ -54,7 +54,7 @@ index e0f0b94..9f6a13b 100644
  
        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) {
@@ -69,7 +69,67 @@ index e0f0b94..9f6a13b 100644
        dest->ah = ibv_create_ah(ep->port->dev->pd, &dest->av);
        if (!dest->ah) {
                acm_log(0, "ERROR - failed to create ah\n");
-@@ -775,8 +799,7 @@ static uint8_t acm_resolve_path(struct acm_ep *ep, struct acm_dest *dest,
+@@ -753,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,
+@@ -775,8 +852,7 @@ static uint8_t acm_resolve_path(struct acm_ep *ep, struct acm_dest *dest,
        acm_init_path_query(mad);
  
        memcpy(mad->data, &dest->path, sizeof(dest->path));
@@ -79,7 +139,7 @@ index e0f0b94..9f6a13b 100644
  
        dest->state = ACM_QUERY_ROUTE;
        acm_post_send(&ep->sa_queue, msg);
-@@ -804,16 +827,29 @@ acm_record_acm_addr(struct acm_ep *ep, struct acm_dest *dest, struct ibv_wc *wc,
+@@ -804,16 +880,29 @@ acm_record_acm_addr(struct acm_ep *ep, struct acm_dest *dest, struct ibv_wc *wc,
        dest->av.grh.dgid = ((struct ibv_grh *) (uintptr_t) wc->wr_id)->sgid;
        
        dest->mgid = ep->mc_dest[index].mgid;
@@ -112,7 +172,7 @@ index e0f0b94..9f6a13b 100644
  static uint8_t acm_validate_addr_req(struct acm_mad *mad)
  {
        struct acm_resolve_rec *rec;
-@@ -959,10 +995,12 @@ acm_dest_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *ma
+@@ -959,10 +1048,12 @@ acm_dest_sa_resp(struct acm_send_msg *msg, struct ibv_wc *wc, struct acm_mad *ma
        if (!status) {
                memcpy(&dest->path, sa_mad->data, sizeof(dest->path));
                acm_init_path_av(msg->ep->port, dest);
@@ -129,18 +189,66 @@ index e0f0b94..9f6a13b 100644
                }
        }
        if (!status) {
-@@ -1313,9 +1351,9 @@ static uint64_t acm_path_comp_mask(struct ibv_path_record *path)
-       acm_log(2, "\n");
-       if (path->service_id)
-               comp_mask |= IB_COMP_MASK_PR_SERVICE_ID;
+@@ -1304,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 (path->dgid.global.interface_id || path->dgid.global.subnet_prefix)
-+      if (!ib_any_gid(&path->dgid))
-               comp_mask |= IB_COMP_MASK_PR_DGID;
+-              comp_mask |= IB_COMP_MASK_PR_DGID;
 -      if (path->sgid.global.interface_id || path->sgid.global.subnet_prefix)
-+      if (!ib_any_gid(&path->sgid))
-               comp_mask |= IB_COMP_MASK_PR_SGID;
-       if (path->dlid)
-               comp_mask |= IB_COMP_MASK_PR_DLID;
+-              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)
+ {
 @@ -1708,6 +1746,15 @@ static uint8_t acm_svr_query_sa(struct acm_ep *ep, struct acm_request *req)
        return ACM_STATUS_SUCCESS;
  }
@@ -149,7 +257,7 @@ index e0f0b94..9f6a13b 100644
 +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);
 +}
diff --git a/patches/refresh-temp b/patches/refresh-temp
deleted file mode 100644 (file)
index ea44eb9..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-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);
- }