[ofw] [PATCH] [IBAL]: use default LID of 1 for SA AV

Sean Hefty sean.hefty at intel.com
Thu Dec 11 11:55:01 PST 2008


The 'SA request' code creates an AV for the SA.  It wants to use a default LID
of 1, but does not byte-swap the value.  Swap the value.

Because the AV is modified later to use the real SM LID, the value used here is
irrelevant, but using a non-swapped value looks like a bug to anyone reading it.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
Index: al_sa_req.c
===================================================================
--- al_sa_req.c	(revision 1722)
+++ al_sa_req.c	(working copy)
@@ -507,7 +507,7 @@
 	/* Create an address vector for the SA. */
 	av_attr.port_num = p_sa_req_svc->port_num;
 	av_attr.sl = p_sa_req_svc->sm_sl;
-	av_attr.dlid = 1;
+	av_attr.dlid = cl_hton16(1);
 	av_attr.grh_valid = FALSE;
 	av_attr.static_rate = IB_PATH_RECORD_RATE_10_GBS;
 	av_attr.path_bits = 0;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sa_req_lid_1.patch
Type: application/octet-stream
Size: 453 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081211/57cefab1/attachment.obj>


More information about the ofw mailing list