Lines Matching refs:mgmt_class
84 u8 mgmt_class);
121 static inline u8 convert_mgmt_class(u8 mgmt_class) in convert_mgmt_class() argument
124 return mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ? in convert_mgmt_class()
125 0 : mgmt_class; in convert_mgmt_class()
141 static int vendor_class_index(u8 mgmt_class) in vendor_class_index() argument
143 return mgmt_class - IB_MGMT_CLASS_VENDOR_RANGE2_START; in vendor_class_index()
146 static int is_vendor_class(u8 mgmt_class) in is_vendor_class() argument
148 if ((mgmt_class < IB_MGMT_CLASS_VENDOR_RANGE2_START) || in is_vendor_class()
149 (mgmt_class > IB_MGMT_CLASS_VENDOR_RANGE2_END)) in is_vendor_class()
186 ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_BM) && in ib_response_mad()
214 u8 mgmt_class, vclass; in ib_register_mad_agent() local
245 if (mad_reg_req->mgmt_class >= MAX_MGMT_CLASS) { in ib_register_mad_agent()
250 if (mad_reg_req->mgmt_class != in ib_register_mad_agent()
254 mad_reg_req->mgmt_class); in ib_register_mad_agent()
257 } else if (mad_reg_req->mgmt_class == 0) { in ib_register_mad_agent()
265 } else if (is_vendor_class(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
273 mad_reg_req->mgmt_class); in ib_register_mad_agent()
278 if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
282 mad_reg_req->mgmt_class); in ib_register_mad_agent()
289 if ((mad_reg_req->mgmt_class != in ib_register_mad_agent()
291 (mad_reg_req->mgmt_class != in ib_register_mad_agent()
295 mad_reg_req->mgmt_class); in ib_register_mad_agent()
299 if ((mad_reg_req->mgmt_class == in ib_register_mad_agent()
301 (mad_reg_req->mgmt_class == in ib_register_mad_agent()
305 mad_reg_req->mgmt_class); in ib_register_mad_agent()
386 mgmt_class = convert_mgmt_class(mad_reg_req->mgmt_class); in ib_register_mad_agent()
387 if (!is_vendor_class(mgmt_class)) { in ib_register_mad_agent()
391 method = class->method_table[mgmt_class]; in ib_register_mad_agent()
399 mgmt_class); in ib_register_mad_agent()
405 vclass = vendor_class_index(mgmt_class); in ib_register_mad_agent()
741 smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in handle_outgoing_dr_smp()
983 int ib_get_mad_data_offset(u8 mgmt_class) in ib_get_mad_data_offset() argument
985 if (mgmt_class == IB_MGMT_CLASS_SUBN_ADM) in ib_get_mad_data_offset()
987 else if ((mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_get_mad_data_offset()
988 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_get_mad_data_offset()
989 (mgmt_class == IB_MGMT_CLASS_BIS)) in ib_get_mad_data_offset()
991 else if ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_get_mad_data_offset()
992 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END)) in ib_get_mad_data_offset()
999 int ib_is_mad_class_rmpp(u8 mgmt_class) in ib_is_mad_class_rmpp() argument
1001 if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) || in ib_is_mad_class_rmpp()
1002 (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_is_mad_class_rmpp()
1003 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_is_mad_class_rmpp()
1004 (mgmt_class == IB_MGMT_CLASS_BIS) || in ib_is_mad_class_rmpp()
1005 ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_is_mad_class_rmpp()
1006 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))) in ib_is_mad_class_rmpp()
1152 if (!ib_is_mad_class_rmpp(((struct ib_mad_hdr *) send_buf->mad)->mgmt_class)) { in ib_post_send_mad()
1167 if (((struct ib_mad_hdr *) send_buf->mad)->mgmt_class == in ib_post_send_mad()
1365 u8 mgmt_class) in add_nonoui_reg_req() argument
1385 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1389 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1437 vclass = vendor_class_index(mad_reg_req->mgmt_class); in add_oui_reg_req()
1534 u8 mgmt_class; in remove_mad_reg_req() local
1545 mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1551 method = class->method_table[mgmt_class]; in remove_mad_reg_req()
1559 class->method_table[mgmt_class] = NULL; in remove_mad_reg_req()
1572 if (!is_vendor_class(mgmt_class)) in remove_mad_reg_req()
1576 mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1583 vendor_class = vendor->vendor_class[mgmt_class]; in remove_mad_reg_req()
1605 vendor->vendor_class[mgmt_class] = NULL; in remove_mad_reg_req()
1660 if (!is_vendor_class(mad->mad_hdr.mgmt_class)) { in find_mad_agent()
1665 if (convert_mgmt_class(mad->mad_hdr.mgmt_class) >= in find_mad_agent()
1669 mad->mad_hdr.mgmt_class)]; in find_mad_agent()
1679 mad->mad_hdr.mgmt_class)]; in find_mad_agent()
1723 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED) || in validate_mad()
1724 (mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { in validate_mad()
1753 return ((struct ib_mad *)(wr->send_buf.mad))->mad_hdr.mgmt_class == in rcv_has_same_class()
1754 rwc->recv_buf.mad->mad_hdr.mgmt_class; in rcv_has_same_class()
1829 (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || in ib_find_send_mad()
1847 (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || in ib_find_send_mad()
1888 && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class) in ib_mad_complete_recv()
1939 if (recv->mad.mad.mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in generate_unmatched_resp()
1997 if (recv->mad.mad.mad_hdr.mgmt_class == in ib_mad_recv_done_handler()