[openib-general] [PATCH] OpenSM/SA: In some SA records, send ERR_REQ_INVALID response on LID out of range error

Hal Rosenstock halr at voltaire.com
Mon Jun 19 03:23:36 PDT 2006


OpenSM/SA: In some SA records, send ERR_REQ_INVALID response on LID out
of range error

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_sa_vlarb_record.c
===================================================================
--- opensm/osm_sa_vlarb_record.c	(revision 8105)
+++ opensm/osm_sa_vlarb_record.c	(working copy)
@@ -413,10 +413,14 @@ osm_vlarb_rec_rcv_process(
     }
     else
     { /*  port out of range */
+      cl_plock_release( p_rcv->p_lock );
+
       osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                "osm_vlarb_rec_rcv_process: ERR 2A01: "
                "Given LID (0x%X) is out of range:0x%X\n",
                cl_ntoh16(p_rcvd_rec->lid), cl_ptr_vector_get_size(p_tbl) );
+      osm_sa_send_error( p_rcv->p_resp, p_madw, IB_SA_MAD_STATUS_REQ_INVALID );
+      goto Exit;
     }
   }
 
Index: opensm/osm_sa_pkey_record.c
===================================================================
--- opensm/osm_sa_pkey_record.c	(revision 8105)
+++ opensm/osm_sa_pkey_record.c	(working copy)
@@ -425,10 +425,14 @@ osm_pkey_rec_rcv_process(
     }
     else
     { /* port out of range */
+      cl_plock_release( p_rcv->p_lock );
+
       osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                "osm_pkey_rec_rcv_process: ERR 4609: "
                "Given LID (0x%X) is out of range:0x%X\n",
                cl_ntoh16(p_rcvd_rec->lid), cl_ptr_vector_get_size(p_tbl) );
+      osm_sa_send_error( p_rcv->p_resp, p_madw, IB_SA_MAD_STATUS_REQ_INVALID );
+      goto Exit;
     }
   }
 
Index: opensm/osm_sa_slvl_record.c
===================================================================
--- opensm/osm_sa_slvl_record.c	(revision 8105)
+++ opensm/osm_sa_slvl_record.c	(working copy)
@@ -393,10 +393,14 @@ osm_slvl_rec_rcv_process(
     }
     else
     { /*  port out of range */
+      cl_plock_release( p_rcv->p_lock );
+
       osm_log( p_rcv->p_log, OSM_LOG_ERROR,
                "osm_slvl_rec_rcv_process: ERR 2601: "
                "Given LID (0x%X) is out of range:0x%X\n",
                cl_ntoh16(p_rcvd_rec->lid), cl_ptr_vector_get_size(p_tbl));
+      osm_sa_send_error( p_rcv->p_resp, p_madw, IB_SA_MAD_STATUS_REQ_INVALID );
+      goto Exit;
     }
   }
 







More information about the general mailing list