[IBAL] Only route GET/SET IB_MCLASS_PERF requests to the HW - all other
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 25 Jul 2006 18:04:45 +0000 (18:04 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 25 Jul 2006 18:04:45 +0000 (18:04 +0000)
requests get dispatched to mad services.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@430 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/kernel/al_smi.c

index d863910..2ebced7 100644 (file)
@@ -2257,7 +2257,7 @@ process_mad_recv(
                                                 ( p_smp->dr_dlid >= p_spl_qp_svc->base_lid +\r
                                                        ( 1 << p_spl_qp_svc->lmc ) ) )\r
                                {\r
-                                               route = ROUTE_DISCARD;\r
+                                       route = ROUTE_DISCARD;\r
                                }\r
                        }\r
 \r
@@ -2269,13 +2269,28 @@ process_mad_recv(
                        break;\r
 \r
                case IB_MCLASS_PERF:\r
-                       route = ROUTE_LOCAL;\r
+                       /* Process the received GMP. */\r
+                       switch( p_mad_element->p_mad_buf->method )\r
+                       {\r
+                       case IB_MAD_METHOD_GET:\r
+                       case IB_MAD_METHOD_SET:\r
+                               route = ROUTE_LOCAL;\r
+                               break;\r
+                       default:\r
+                               break;\r
+                       }\r
                        break;\r
 \r
                case IB_MCLASS_BM:\r
                        route = route_recv_gmp( p_mad_element );\r
                        break;\r
 \r
+               case IB_MCLASS_SUBN_ADM:\r
+               case IB_MCLASS_DEV_MGMT:\r
+               case IB_MCLASS_COMM_MGMT:\r
+               case IB_MCLASS_SNMP:\r
+                       break;\r
+\r
                default:\r
                        /* Route vendor specific MADs to the HCA provider. */\r
                        if( ib_class_is_vendor_specific(\r
@@ -2288,7 +2303,7 @@ process_mad_recv(
        }\r
 \r
        /* Route the MAD. */\r
-       if ( is_discard( route ) )\r
+       if( is_discard( route ) )\r
                status = IB_ERROR;\r
        else if( is_dispatcher( route ) )\r
                status = mad_disp_recv_done( p_spl_qp_svc->h_mad_disp, p_mad_element );\r