Lines Matching refs:mgmt_class

110 			      u8 mgmt_class);
150 static inline u8 convert_mgmt_class(u8 mgmt_class) in convert_mgmt_class() argument
153 return mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ? in convert_mgmt_class()
154 0 : mgmt_class; in convert_mgmt_class()
170 static int vendor_class_index(u8 mgmt_class) in vendor_class_index() argument
172 return mgmt_class - IB_MGMT_CLASS_VENDOR_RANGE2_START; in vendor_class_index()
175 static int is_vendor_class(u8 mgmt_class) in is_vendor_class() argument
177 if ((mgmt_class < IB_MGMT_CLASS_VENDOR_RANGE2_START) || in is_vendor_class()
178 (mgmt_class > IB_MGMT_CLASS_VENDOR_RANGE2_END)) in is_vendor_class()
215 ((hdr->mgmt_class == IB_MGMT_CLASS_BM) && in ib_response_mad()
244 u8 mgmt_class, vclass; in ib_register_mad_agent() local
279 if (mad_reg_req->mgmt_class >= MAX_MGMT_CLASS) { in ib_register_mad_agent()
284 if (mad_reg_req->mgmt_class != in ib_register_mad_agent()
288 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
291 } else if (mad_reg_req->mgmt_class == 0) { in ib_register_mad_agent()
300 } else if (is_vendor_class(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
309 mad_reg_req->mgmt_class); in ib_register_mad_agent()
314 if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
318 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
325 if ((mad_reg_req->mgmt_class != in ib_register_mad_agent()
327 (mad_reg_req->mgmt_class != in ib_register_mad_agent()
331 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
335 if ((mad_reg_req->mgmt_class == in ib_register_mad_agent()
337 (mad_reg_req->mgmt_class == in ib_register_mad_agent()
341 __func__, mad_reg_req->mgmt_class); in ib_register_mad_agent()
433 mgmt_class = convert_mgmt_class(mad_reg_req->mgmt_class); in ib_register_mad_agent()
434 if (!is_vendor_class(mgmt_class)) { in ib_register_mad_agent()
438 method = class->method_table[mgmt_class]; in ib_register_mad_agent()
446 mgmt_class); in ib_register_mad_agent()
452 vclass = vendor_class_index(mgmt_class); in ib_register_mad_agent()
830 smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in handle_outgoing_dr_smp()
1133 int ib_get_mad_data_offset(u8 mgmt_class) in ib_get_mad_data_offset() argument
1135 if (mgmt_class == IB_MGMT_CLASS_SUBN_ADM) in ib_get_mad_data_offset()
1137 else if ((mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_get_mad_data_offset()
1138 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_get_mad_data_offset()
1139 (mgmt_class == IB_MGMT_CLASS_BIS)) in ib_get_mad_data_offset()
1141 else if ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_get_mad_data_offset()
1142 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END)) in ib_get_mad_data_offset()
1149 int ib_is_mad_class_rmpp(u8 mgmt_class) in ib_is_mad_class_rmpp() argument
1151 if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) || in ib_is_mad_class_rmpp()
1152 (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_is_mad_class_rmpp()
1153 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_is_mad_class_rmpp()
1154 (mgmt_class == IB_MGMT_CLASS_BIS) || in ib_is_mad_class_rmpp()
1155 ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_is_mad_class_rmpp()
1156 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))) in ib_is_mad_class_rmpp()
1307 if (!ib_is_mad_class_rmpp(((struct ib_mad_hdr *) send_buf->mad)->mgmt_class)) { in ib_post_send_mad()
1322 if (((struct ib_mad_hdr *) send_buf->mad)->mgmt_class == in ib_post_send_mad()
1515 u8 mgmt_class) in add_nonoui_reg_req() argument
1533 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1537 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1585 vclass = vendor_class_index(mad_reg_req->mgmt_class); in add_oui_reg_req()
1679 u8 mgmt_class; in remove_mad_reg_req() local
1690 mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1696 method = class->method_table[mgmt_class]; in remove_mad_reg_req()
1704 class->method_table[mgmt_class] = NULL; in remove_mad_reg_req()
1717 if (!is_vendor_class(mgmt_class)) in remove_mad_reg_req()
1721 mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1728 vendor_class = vendor->vendor_class[mgmt_class]; in remove_mad_reg_req()
1750 vendor->vendor_class[mgmt_class] = NULL; in remove_mad_reg_req()
1803 if (!is_vendor_class(mad_hdr->mgmt_class)) { in find_mad_agent()
1808 if (convert_mgmt_class(mad_hdr->mgmt_class) >= in find_mad_agent()
1812 mad_hdr->mgmt_class)]; in find_mad_agent()
1822 mad_hdr->mgmt_class)]; in find_mad_agent()
1869 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED) || in validate_mad()
1870 (mad_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { in validate_mad()
1875 if ((mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) && in validate_mad()
1904 return ((struct ib_mad_hdr *)(wr->send_buf.mad))->mgmt_class == in rcv_has_same_class()
1905 rwc->recv_buf.mad->mad_hdr.mgmt_class; in rcv_has_same_class()
1985 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
2003 (is_direct(mad_hdr->mgmt_class) || in ib_find_send_mad()
2053 && ib_is_mad_class_rmpp(mad_recv_wc->recv_buf.mad->mad_hdr.mgmt_class) in ib_mad_complete_recv()
2161 if (recv_hdr->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in generate_unmatched_resp()
2165 if (recv_hdr->mgmt_class == in generate_unmatched_resp()
2167 recv_hdr->mgmt_class == in generate_unmatched_resp()
2331 if (((struct ib_mad_hdr *)recv->mad)->mgmt_class == in ib_mad_recv_done()