[openib-general] OFED-1.0-rc6 is available

Tziporet Koren tziporet at mellanox.co.il
Wed Jun 7 23:25:55 PDT 2006


We sure will.

-----Original Message-----
From: Roland Dreier [mailto:rdreier at cisco.com] 
Sent: Wednesday, June 07, 2006 11:03 PM
To: Tziporet Koren; openfabrics-ewg at openib.org; openib-general
Subject: Re: [openib-general] OFED-1.0-rc6 is available

We also just found a bug in how ibsrpdm discovers Cisco/Topspin FC
gateways.  The patch is below, and is also checked in to the trunk as
svn rev 7803.  Please include this in OFED 1.0 final.

Thanks,
  Roland

--- srptools/ChangeLog	(revision 7796)
+++ srptools/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2006-06-07  Roland Dreier  <rdreier at cisco.com>
+	* src/srp-dm.c (do_port): Use correct endianness when comparing
+	GUID against Topspin OUI.
+
+	* src/srp-dm.c (set_class_port_info): Trivial whitespace fixes.
+
 2006-05-29  Ishai Rabinovitz  <ishai at mellanox.co.il>
 
 	* src/srp-dm.c (main): The agent ID array is declared with 0
--- srptools/src/srp-dm.c	(revision 7796)
+++ srptools/src/srp-dm.c	(working copy)
@@ -52,8 +52,6 @@
 #include "ib_user_mad.h"
 #include "srp-dm.h"
 
-static const uint8_t topspin_oui[3] = { 0x00, 0x05, 0xad };
-
 static char *umad_dev   = "/dev/infiniband/umad0";
 static char *port_sysfs_path;
 static int   timeout_ms = 25000;
@@ -249,7 +247,7 @@ static int set_class_port_info(int fd, u
 
 	init_srp_dm_mad(&out_mad, agent[1], dlid,
SRP_DM_ATTR_CLASS_PORT_INFO, 0);
 
-	out_dm_mad          = (void *) out_mad.data;
+	out_dm_mad         = (void *) out_mad.data;
 	out_dm_mad->method = SRP_DM_METHOD_SET;
 
 	cpi                = (void *) out_dm_mad->data;
@@ -266,9 +264,8 @@ static int set_class_port_info(int fd, u
 		return -1;
 	}
 
-	for (i = 0; i < 8; ++i) {
+	for (i = 0; i < 8; ++i)
 		((uint16_t *) cpi->trap_gid)[i] = htons(strtol(val + i *
5, NULL, 16));
-	}
 
 	if (send_and_get(fd, &out_mad, &in_mad, 0) < 0)
 		return -1;
@@ -371,7 +368,10 @@ static int do_port(int fd, uint32_t agen
 	struct srp_dm_svc_entries	svc_entries;
 	int				i, j, k;
 
-	if (!memcmp(&guid, topspin_oui, 3) &&
+	static const uint64_t topspin_oui = 0x0005ad0000000000ull;
+	static const uint64_t oui_mask    = 0xffffff0000000000ull;
+
+	if ((guid & oui_mask) == topspin_oui &&
 	    set_class_port_info(fd, agent, dlid))
 		fprintf(stderr, "Warning: set of ClassPortInfo
failed\n");
 




More information about the general mailing list