Lines Matching refs:mgmt_class
87 u8 mgmt_class);
127 static inline u8 convert_mgmt_class(u8 mgmt_class) in convert_mgmt_class() argument
130 return mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ? in convert_mgmt_class()
131 0 : mgmt_class; in convert_mgmt_class()
147 static int vendor_class_index(u8 mgmt_class) in vendor_class_index() argument
149 return mgmt_class - IB_MGMT_CLASS_VENDOR_RANGE2_START; in vendor_class_index()
152 static int is_vendor_class(u8 mgmt_class) in is_vendor_class() argument
154 if ((mgmt_class < IB_MGMT_CLASS_VENDOR_RANGE2_START) || in is_vendor_class()
155 (mgmt_class > IB_MGMT_CLASS_VENDOR_RANGE2_END)) in is_vendor_class()
192 ((hdr->mgmt_class == IB_MGMT_CLASS_BM) && in ib_response_mad()
221 u8 mgmt_class, vclass; in ib_register_mad_agent() local
252 if (mad_reg_req->mgmt_class >= MAX_MGMT_CLASS) { in ib_register_mad_agent()
257 if (mad_reg_req->mgmt_class != in ib_register_mad_agent()
261 mad_reg_req->mgmt_class); in ib_register_mad_agent()
264 } else if (mad_reg_req->mgmt_class == 0) { in ib_register_mad_agent()
272 } else if (is_vendor_class(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
280 mad_reg_req->mgmt_class); in ib_register_mad_agent()
285 if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
289 mad_reg_req->mgmt_class); in ib_register_mad_agent()
296 if ((mad_reg_req->mgmt_class != in ib_register_mad_agent()
298 (mad_reg_req->mgmt_class != in ib_register_mad_agent()
302 mad_reg_req->mgmt_class); in ib_register_mad_agent()
306 if ((mad_reg_req->mgmt_class == in ib_register_mad_agent()
308 (mad_reg_req->mgmt_class == in ib_register_mad_agent()
312 mad_reg_req->mgmt_class); in ib_register_mad_agent()
405 mgmt_class = convert_mgmt_class(mad_reg_req->mgmt_class); in ib_register_mad_agent()
406 if (!is_vendor_class(mgmt_class)) { in ib_register_mad_agent()
410 method = class->method_table[mgmt_class]; in ib_register_mad_agent()
418 mgmt_class); in ib_register_mad_agent()
424 vclass = vendor_class_index(mgmt_class); in ib_register_mad_agent()
804 smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in handle_outgoing_dr_smp()
1103 int ib_get_mad_data_offset(u8 mgmt_class) in ib_get_mad_data_offset() argument
1105 if (mgmt_class == IB_MGMT_CLASS_SUBN_ADM) in ib_get_mad_data_offset()
1107 else if ((mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_get_mad_data_offset()
1108 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_get_mad_data_offset()
1109 (mgmt_class == IB_MGMT_CLASS_BIS)) in ib_get_mad_data_offset()
1111 else if ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_get_mad_data_offset()
1112 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END)) in ib_get_mad_data_offset()
1119 int ib_is_mad_class_rmpp(u8 mgmt_class) in ib_is_mad_class_rmpp() argument
1121 if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) || in ib_is_mad_class_rmpp()
1122 (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_is_mad_class_rmpp()
1123 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_is_mad_class_rmpp()
1124 (mgmt_class == IB_MGMT_CLASS_BIS) || in ib_is_mad_class_rmpp()
1125 ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_is_mad_class_rmpp()
1126 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))) in ib_is_mad_class_rmpp()
1276 if (!ib_is_mad_class_rmpp(((struct ib_mad_hdr *) send_buf->mad)->mgmt_class)) { in ib_post_send_mad()
1291 if (((struct ib_mad_hdr *) send_buf->mad)->mgmt_class == in ib_post_send_mad()
1484 u8 mgmt_class) in add_nonoui_reg_req() argument
1502 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1506 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1554 vclass = vendor_class_index(mad_reg_req->mgmt_class); in add_oui_reg_req()
1648 u8 mgmt_class; in remove_mad_reg_req() local
1659 mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1665 method = class->method_table[mgmt_class]; in remove_mad_reg_req()
1673 class->method_table[mgmt_class] = NULL; in remove_mad_reg_req()
1686 if (!is_vendor_class(mgmt_class)) in remove_mad_reg_req()
1690 mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1697 vendor_class = vendor->vendor_class[mgmt_class]; in remove_mad_reg_req()
1719 vendor->vendor_class[mgmt_class] = NULL; in remove_mad_reg_req()
1772 if (!is_vendor_class(mad_hdr->mgmt_class)) { in find_mad_agent()
1777 if (convert_mgmt_class(mad_hdr->mgmt_class) >= in find_mad_agent()
1781 mad_hdr->mgmt_class)]; in find_mad_agent()
1791 mad_hdr->mgmt_class)]; in find_mad_agent()
1838 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED) || in validate_mad()
1839 (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { in validate_mad()
1844 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) && in validate_mad()
1873 return ((struct ib_mad_hdr *)(wr->send_buf.mad))->mgmt_class == in rcv_has_same_class()
1874 rwc->recv_buf.mad->mad_hdr.mgmt_class; in rcv_has_same_class()
1954 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
1972 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
2022 && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class) in ib_mad_complete_recv()
2128 if (recv_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in generate_unmatched_resp()
2132 if (recv_hdr->mgmt_class == in generate_unmatched_resp()
2134 recv_hdr->mgmt_class == in generate_unmatched_resp()
2293 if (((struct ib_mad_hdr *)recv->mad)->mgmt_class == in ib_mad_recv_done()