[openib-general] [PATCH] SMI/MAD: Fix a couple of SMI cases
Hal Rosenstock
halr at voltaire.com
Tue Nov 16 10:35:29 PST 2004
smi/mad: In smi_handle_dr_smp_send, handle hop_ptr 0 (C14-13:4). Also,
in ib_mad_recv_handler_done, 0 return from smi_check_forward_dr_smp
means local rather than discard.
Index: smi.c
===================================================================
--- smi.c (revision 1247)
+++ smi.c (working copy)
@@ -98,6 +98,9 @@
}
/* C14-13:4 -- hop_ptr = 0 -> should have gone to SM */
+ if (hop_ptr == 0)
+ return 1;
+
/* C14-13:5 -- Check for unreasonable hop pointer */
return 0;
}
Index: mad.c
===================================================================
--- mad.c (revision 1245)
+++ mad.c (working copy)
@@ -1121,7 +1121,7 @@
port_priv->device->phys_port_cnt))
goto out;
if (!smi_check_forward_dr_smp(smp))
- goto out;
+ goto local;
if (!smi_handle_dr_smp_send(smp,
port_priv->device->node_type,
port_priv->port_num))
@@ -1132,6 +1132,7 @@
goto out;
}
+local:
/* Give driver "right of first refusal" on incoming MAD */
if (port_priv->device->process_mad) {
int ret;
More information about the general
mailing list