[openib-general] [PATCH] Problem with directed route SMPs withbeginning or ending LID routed parts
Hal Rosenstock
halr at voltaire.com
Tue Jan 17 09:00:52 PST 2006
Hi Ralph,
This is much simpler :-)
Thanks! Applied.
I tested this both in an operational network with some different topologies as well as passing the previously failed compliance C14-11.
-- Hal
________________________________
From: openib-general-bounces at openib.org on behalf of Ralph Campbell
Sent: Mon 1/16/2006 2:17 PM
To: openib-general at openib.org
Subject: [openib-general] [PATCH] Problem with directed route SMPs withbeginning or ending LID routed parts
OK. Here is a much simplified patch which fixes the problem of a
directed route SMP with a with beginning or ending LID routed part.
Signed-off-by: Ralph Campbell <ralphc at pathscale.com>
Index: core/mad.c
===================================================================
--- core/mad.c (revision 5030)
+++ core/mad.c (working copy)
@@ -665,7 +665,15 @@
struct ib_wc mad_wc;
struct ib_send_wr *send_wr = &mad_send_wr->send_wr;
- if (!smi_handle_dr_smp_send(smp, device->node_type, port_num)) {
+ /*
+ * Directed route handling starts if the initial LID routed part of
+ * a request or the ending LID routed part of a response is empty.
+ * If we are at the start of the LID routed part, don't update the
+ * hop_ptr or hop_cnt. See section 14.2.2, Vol 1 IB spec.
+ */
+ if ((ib_get_smp_direction(smp) ? smp->dr_dlid : smp->dr_slid) ==
+ IB_LID_PERMISSIVE &&
+ !smi_handle_dr_smp_send(smp, device->node_type, port_num)) {
ret = -EINVAL;
printk(KERN_ERR PFX "Invalid directed route\n");
goto out;
--
Ralph Campbell <ralphc at pathscale.com>
_______________________________________________
openib-general mailing list
openib-general at openib.org
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list