Lines Matching refs:mgmt_class
81 u8 mgmt_class);
118 static inline u8 convert_mgmt_class(u8 mgmt_class) in convert_mgmt_class() argument
121 return mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE ? in convert_mgmt_class()
122 0 : mgmt_class; in convert_mgmt_class()
138 static int vendor_class_index(u8 mgmt_class) in vendor_class_index() argument
140 return mgmt_class - IB_MGMT_CLASS_VENDOR_RANGE2_START; in vendor_class_index()
143 static int is_vendor_class(u8 mgmt_class) in is_vendor_class() argument
145 if ((mgmt_class < IB_MGMT_CLASS_VENDOR_RANGE2_START) || in is_vendor_class()
146 (mgmt_class > IB_MGMT_CLASS_VENDOR_RANGE2_END)) in is_vendor_class()
183 ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_BM) && in ib_response_mad()
210 u8 mgmt_class, vclass; in ib_register_mad_agent() local
226 if (mad_reg_req->mgmt_class >= MAX_MGMT_CLASS) { in ib_register_mad_agent()
231 if (mad_reg_req->mgmt_class != in ib_register_mad_agent()
234 } else if (mad_reg_req->mgmt_class == 0) { in ib_register_mad_agent()
240 } else if (is_vendor_class(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
249 if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) { in ib_register_mad_agent()
255 if ((mad_reg_req->mgmt_class != in ib_register_mad_agent()
257 (mad_reg_req->mgmt_class != in ib_register_mad_agent()
261 if ((mad_reg_req->mgmt_class == in ib_register_mad_agent()
263 (mad_reg_req->mgmt_class == in ib_register_mad_agent()
338 mgmt_class = convert_mgmt_class(mad_reg_req->mgmt_class); in ib_register_mad_agent()
339 if (!is_vendor_class(mgmt_class)) { in ib_register_mad_agent()
343 method = class->method_table[mgmt_class]; in ib_register_mad_agent()
351 mgmt_class); in ib_register_mad_agent()
357 vclass = vendor_class_index(mgmt_class); in ib_register_mad_agent()
693 smp->mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in handle_outgoing_dr_smp()
927 int ib_get_mad_data_offset(u8 mgmt_class) in ib_get_mad_data_offset() argument
929 if (mgmt_class == IB_MGMT_CLASS_SUBN_ADM) in ib_get_mad_data_offset()
931 else if ((mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_get_mad_data_offset()
932 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_get_mad_data_offset()
933 (mgmt_class == IB_MGMT_CLASS_BIS)) in ib_get_mad_data_offset()
935 else if ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_get_mad_data_offset()
936 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END)) in ib_get_mad_data_offset()
943 int ib_is_mad_class_rmpp(u8 mgmt_class) in ib_is_mad_class_rmpp() argument
945 if ((mgmt_class == IB_MGMT_CLASS_SUBN_ADM) || in ib_is_mad_class_rmpp()
946 (mgmt_class == IB_MGMT_CLASS_DEVICE_MGMT) || in ib_is_mad_class_rmpp()
947 (mgmt_class == IB_MGMT_CLASS_DEVICE_ADM) || in ib_is_mad_class_rmpp()
948 (mgmt_class == IB_MGMT_CLASS_BIS) || in ib_is_mad_class_rmpp()
949 ((mgmt_class >= IB_MGMT_CLASS_VENDOR_RANGE2_START) && in ib_is_mad_class_rmpp()
950 (mgmt_class <= IB_MGMT_CLASS_VENDOR_RANGE2_END))) in ib_is_mad_class_rmpp()
1087 if (!ib_is_mad_class_rmpp(((struct ib_mad_hdr *) send_buf->mad)->mgmt_class)) { in ib_post_send_mad()
1102 if (((struct ib_mad_hdr *) send_buf->mad)->mgmt_class == in ib_post_send_mad()
1300 u8 mgmt_class) in add_nonoui_reg_req() argument
1320 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1324 method = &(*class)->method_table[mgmt_class]; in add_nonoui_reg_req()
1372 vclass = vendor_class_index(mad_reg_req->mgmt_class); in add_oui_reg_req()
1469 u8 mgmt_class; in remove_mad_reg_req() local
1480 mgmt_class = convert_mgmt_class(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1486 method = class->method_table[mgmt_class]; in remove_mad_reg_req()
1494 class->method_table[mgmt_class] = NULL; in remove_mad_reg_req()
1507 if (!is_vendor_class(mgmt_class)) in remove_mad_reg_req()
1511 mgmt_class = vendor_class_index(agent_priv->reg_req->mgmt_class); in remove_mad_reg_req()
1518 vendor_class = vendor->vendor_class[mgmt_class]; in remove_mad_reg_req()
1540 vendor->vendor_class[mgmt_class] = NULL; in remove_mad_reg_req()
1595 if (!is_vendor_class(mad->mad_hdr.mgmt_class)) { in find_mad_agent()
1600 if (convert_mgmt_class(mad->mad_hdr.mgmt_class) >= in find_mad_agent()
1604 mad->mad_hdr.mgmt_class)]; in find_mad_agent()
1614 mad->mad_hdr.mgmt_class)]; in find_mad_agent()
1658 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED) || in validate_mad()
1659 (mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE)) { in validate_mad()
1687 return ((struct ib_mad *)(wr->send_buf.mad))->mad_hdr.mgmt_class == in rcv_has_same_class()
1688 rwc->recv_buf.mad->mad_hdr.mgmt_class; in rcv_has_same_class()
1763 (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || in ib_find_send_mad()
1781 (is_direct(wc->recv_buf.mad->mad_hdr.mgmt_class) || in ib_find_send_mad()
1857 if (recv->mad.mad.mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in generate_unmatched_resp()
1915 if (recv->mad.mad.mad_hdr.mgmt_class == in ib_mad_recv_done_handler()