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 ((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()
379 mgmt_class = convert_mgmt_class(mad_reg_req->mgmt_class); in ib_register_mad_agent()
380 if (!is_vendor_class(mgmt_class)) { in ib_register_mad_agent()
384 method = class->method_table[mgmt_class]; in ib_register_mad_agent()
392 mgmt_class); in ib_register_mad_agent()
398 vclass = vendor_class_index(mgmt_class); in ib_register_mad_agent()
763 smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in handle_outgoing_dr_smp()
1065 int ib_get_mad_data_offset(u8 mgmt_class) in ib_get_mad_data_offset() argument
1067 if (mgmt_class == IB_MGMT_CLASS_SUBN_ADM) in ib_get_mad_data_offset()
1069 else if ((mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_get_mad_data_offset()
1070 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_get_mad_data_offset()
1071 (mgmt_class == IB_MGMT_CLASS_BIS)) in ib_get_mad_data_offset()
1073 else if ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_get_mad_data_offset()
1074 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END)) in ib_get_mad_data_offset()
1081 int ib_is_mad_class_rmpp(u8 mgmt_class) in ib_is_mad_class_rmpp() argument
1083 if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) || in ib_is_mad_class_rmpp()
1084 (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_is_mad_class_rmpp()
1085 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_is_mad_class_rmpp()
1086 (mgmt_class == IB_MGMT_CLASS_BIS) || in ib_is_mad_class_rmpp()
1087 ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_is_mad_class_rmpp()
1088 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))) in ib_is_mad_class_rmpp()
1234 if (!ib_is_mad_class_rmpp(((struct ib_mad_hdr *) send_buf->mad)->mgmt_class)) { in ib_post_send_mad()
1249 if (((struct ib_mad_hdr *) send_buf->mad)->mgmt_class == in ib_post_send_mad()
1447 u8 mgmt_class) in add_nonoui_reg_req() argument
1467 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1471 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1519 vclass = vendor_class_index(mad_reg_req->mgmt_class); in add_oui_reg_req()
1616 u8 mgmt_class; in remove_mad_reg_req() local
1627 mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1633 method = class->method_table[mgmt_class]; in remove_mad_reg_req()
1641 class->method_table[mgmt_class] = NULL; in remove_mad_reg_req()
1654 if (!is_vendor_class(mgmt_class)) in remove_mad_reg_req()
1658 mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1665 vendor_class = vendor->vendor_class[mgmt_class]; in remove_mad_reg_req()
1687 vendor->vendor_class[mgmt_class] = NULL; in remove_mad_reg_req()
1742 if (!is_vendor_class(mad_hdr->mgmt_class)) { in find_mad_agent()
1747 if (convert_mgmt_class(mad_hdr->mgmt_class) >= in find_mad_agent()
1751 mad_hdr->mgmt_class)]; in find_mad_agent()
1761 mad_hdr->mgmt_class)]; in find_mad_agent()
1809 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED) || in validate_mad()
1810 (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { in validate_mad()
1815 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) && in validate_mad()
1844 return ((struct ib_mad_hdr *)(wr->send_buf.mad))->mgmt_class == in rcv_has_same_class()
1845 rwc->recv_buf.mad->mad_hdr.mgmt_class; in rcv_has_same_class()
1920 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
1938 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
1979 && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class) in ib_mad_complete_recv()
2082 if (recv_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in generate_unmatched_resp()
2086 if (recv_hdr->mgmt_class == in generate_unmatched_resp()
2088 recv_hdr->mgmt_class == in generate_unmatched_resp()
2239 if (((struct ib_mad_hdr *)recv->mad)->mgmt_class == in ib_mad_recv_done_handler()