Lines Matching refs:mgmt_class

104 			      u8 mgmt_class);
144 static inline u8 convert_mgmt_class(u8 mgmt_class) in convert_mgmt_class() argument
147 return mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ? in convert_mgmt_class()
148 0 : mgmt_class; in convert_mgmt_class()
163 static int vendor_class_index(u8 mgmt_class) in vendor_class_index() argument
165 return mgmt_class - IB_MGMT_CLASS_VENDOR_RANGE2_START; in vendor_class_index()
168 static int is_vendor_class(u8 mgmt_class) in is_vendor_class() argument
170 if ((mgmt_class < IB_MGMT_CLASS_VENDOR_RANGE2_START) || in is_vendor_class()
171 (mgmt_class > IB_MGMT_CLASS_VENDOR_RANGE2_END)) in is_vendor_class()
208 ((hdr->mgmt_class == IB_MGMT_CLASS_BM) && in ib_response_mad()
237 u8 mgmt_class, vclass; in ib_register_mad_agent() local
272 if (mad_reg_req->mgmt_class >= MAX_MGMT_CLASS) { in ib_register_mad_agent()
277 if (mad_reg_req->mgmt_class != in ib_register_mad_agent()
281 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
284 } else if (mad_reg_req->mgmt_class == 0) { in ib_register_mad_agent()
293 } else if (is_vendor_class(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
302 mad_reg_req->mgmt_class); in ib_register_mad_agent()
307 if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
311 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
318 if ((mad_reg_req->mgmt_class != in ib_register_mad_agent()
320 (mad_reg_req->mgmt_class != in ib_register_mad_agent()
324 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
328 if ((mad_reg_req->mgmt_class == in ib_register_mad_agent()
330 (mad_reg_req->mgmt_class == in ib_register_mad_agent()
334 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
426 mgmt_class = convert_mgmt_class(mad_reg_req->mgmt_class); in ib_register_mad_agent()
427 if (!is_vendor_class(mgmt_class)) { in ib_register_mad_agent()
431 method = class->method_table[mgmt_class]; in ib_register_mad_agent()
439 mgmt_class); in ib_register_mad_agent()
445 vclass = vendor_class_index(mgmt_class); in ib_register_mad_agent()
615 smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in handle_outgoing_dr_smp()
916 int ib_get_mad_data_offset(u8 mgmt_class) in ib_get_mad_data_offset() argument
918 if (mgmt_class == IB_MGMT_CLASS_SUBN_ADM) in ib_get_mad_data_offset()
920 else if ((mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_get_mad_data_offset()
921 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_get_mad_data_offset()
922 (mgmt_class == IB_MGMT_CLASS_BIS)) in ib_get_mad_data_offset()
924 else if ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_get_mad_data_offset()
925 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END)) in ib_get_mad_data_offset()
932 int ib_is_mad_class_rmpp(u8 mgmt_class) in ib_is_mad_class_rmpp() argument
934 if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) || in ib_is_mad_class_rmpp()
935 (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_is_mad_class_rmpp()
936 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_is_mad_class_rmpp()
937 (mgmt_class == IB_MGMT_CLASS_BIS) || in ib_is_mad_class_rmpp()
938 ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_is_mad_class_rmpp()
939 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))) in ib_is_mad_class_rmpp()
1090 if (!ib_is_mad_class_rmpp(((struct ib_mad_hdr *) send_buf->mad)->mgmt_class)) { in ib_post_send_mad()
1105 if (((struct ib_mad_hdr *) send_buf->mad)->mgmt_class == in ib_post_send_mad()
1277 u8 mgmt_class) in add_nonoui_reg_req() argument
1295 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1299 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1347 vclass = vendor_class_index(mad_reg_req->mgmt_class); in add_oui_reg_req()
1441 u8 mgmt_class; in remove_mad_reg_req() local
1451 mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1457 method = class->method_table[mgmt_class]; in remove_mad_reg_req()
1465 class->method_table[mgmt_class] = NULL; in remove_mad_reg_req()
1478 if (!is_vendor_class(mgmt_class)) in remove_mad_reg_req()
1482 mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1489 vendor_class = vendor->vendor_class[mgmt_class]; in remove_mad_reg_req()
1511 vendor->vendor_class[mgmt_class] = NULL; in remove_mad_reg_req()
1564 if (!is_vendor_class(mad_hdr->mgmt_class)) { in find_mad_agent()
1569 if (convert_mgmt_class(mad_hdr->mgmt_class) >= in find_mad_agent()
1573 mad_hdr->mgmt_class)]; in find_mad_agent()
1583 mad_hdr->mgmt_class)]; in find_mad_agent()
1630 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED) || in validate_mad()
1631 (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { in validate_mad()
1636 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) && in validate_mad()
1665 return ((struct ib_mad_hdr *)(wr->send_buf.mad))->mgmt_class == in rcv_has_same_class()
1666 rwc->recv_buf.mad->mad_hdr.mgmt_class; in rcv_has_same_class()
1747 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
1765 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
1815 && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class) in ib_mad_complete_recv()
1922 if (recv_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in generate_unmatched_resp()
1926 if (recv_hdr->mgmt_class == in generate_unmatched_resp()
1928 recv_hdr->mgmt_class == in generate_unmatched_resp()
2089 if (((struct ib_mad_hdr *)recv->mad)->mgmt_class == in ib_mad_recv_done()