Lines Matching refs:in_mad

45 		 const void *in_mad, void *response_mad)  in mlx5_MAD_IFC()  argument
57 return mlx5_core_mad_ifc(dev->mdev, in_mad, response_mad, op_modifier, port); in mlx5_MAD_IFC()
68 const struct ib_mad *in_mad = (const struct ib_mad *)in; in mlx5_ib_process_mad() local
71 if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) || in mlx5_ib_process_mad()
77 if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP && slid == 0) in mlx5_ib_process_mad()
80 if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED || in mlx5_ib_process_mad()
81 in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) { in mlx5_ib_process_mad()
82 if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in mlx5_ib_process_mad()
83 in_mad->mad_hdr.method != IB_MGMT_METHOD_SET && in mlx5_ib_process_mad()
84 in_mad->mad_hdr.method != IB_MGMT_METHOD_TRAP_REPRESS) in mlx5_ib_process_mad()
89 if (in_mad->mad_hdr.attr_id == IB_SMP_ATTR_SM_INFO) in mlx5_ib_process_mad()
91 } else if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT || in mlx5_ib_process_mad()
92 in_mad->mad_hdr.mgmt_class == MLX5_IB_VENDOR_CLASS1 || in mlx5_ib_process_mad()
93 in_mad->mad_hdr.mgmt_class == MLX5_IB_VENDOR_CLASS2 || in mlx5_ib_process_mad()
94 in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_CONG_MGMT) { in mlx5_ib_process_mad()
95 if (in_mad->mad_hdr.method != IB_MGMT_METHOD_GET && in mlx5_ib_process_mad()
96 in_mad->mad_hdr.method != IB_MGMT_METHOD_SET) in mlx5_ib_process_mad()
105 port_num, in_wc, in_grh, in_mad, out_mad); in mlx5_ib_process_mad()
110 if (in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) in mlx5_ib_process_mad()
113 if (in_mad->mad_hdr.method == IB_MGMT_METHOD_TRAP_REPRESS) in mlx5_ib_process_mad()
122 struct ib_smp *in_mad = NULL; in mlx5_query_ext_port_caps() local
127 in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in mlx5_query_ext_port_caps()
129 if (!in_mad || !out_mad) in mlx5_query_ext_port_caps()
132 init_query_mad(in_mad); in mlx5_query_ext_port_caps()
133 in_mad->attr_id = MLX5_ATTR_EXTENDED_PORT_INFO; in mlx5_query_ext_port_caps()
134 in_mad->attr_mod = cpu_to_be32(port); in mlx5_query_ext_port_caps()
136 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_ext_port_caps()
144 kfree(in_mad); in mlx5_query_ext_port_caps()
152 struct ib_smp *in_mad = NULL; in mlx5_query_mad_ifc_smp_attr_node_info() local
155 in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in mlx5_query_mad_ifc_smp_attr_node_info()
156 if (!in_mad) in mlx5_query_mad_ifc_smp_attr_node_info()
159 init_query_mad(in_mad); in mlx5_query_mad_ifc_smp_attr_node_info()
160 in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in mlx5_query_mad_ifc_smp_attr_node_info()
162 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, 1, NULL, NULL, in_mad, in mlx5_query_mad_ifc_smp_attr_node_info()
165 kfree(in_mad); in mlx5_query_mad_ifc_smp_attr_node_info()
237 struct ib_smp *in_mad = NULL; in mlx5_query_mad_ifc_node_desc() local
241 in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_desc()
243 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_desc()
246 init_query_mad(in_mad); in mlx5_query_mad_ifc_node_desc()
247 in_mad->attr_id = IB_SMP_ATTR_NODE_DESC; in mlx5_query_mad_ifc_node_desc()
249 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_desc()
255 kfree(in_mad); in mlx5_query_mad_ifc_node_desc()
262 struct ib_smp *in_mad = NULL; in mlx5_query_mad_ifc_node_guid() local
266 in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in mlx5_query_mad_ifc_node_guid()
268 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_node_guid()
271 init_query_mad(in_mad); in mlx5_query_mad_ifc_node_guid()
272 in_mad->attr_id = IB_SMP_ATTR_NODE_INFO; in mlx5_query_mad_ifc_node_guid()
274 err = mlx5_MAD_IFC(dev, 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_node_guid()
280 kfree(in_mad); in mlx5_query_mad_ifc_node_guid()
288 struct ib_smp *in_mad = NULL; in mlx5_query_mad_ifc_pkey() local
292 in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in mlx5_query_mad_ifc_pkey()
294 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_pkey()
297 init_query_mad(in_mad); in mlx5_query_mad_ifc_pkey()
298 in_mad->attr_id = IB_SMP_ATTR_PKEY_TABLE; in mlx5_query_mad_ifc_pkey()
299 in_mad->attr_mod = cpu_to_be32(index / 32); in mlx5_query_mad_ifc_pkey()
301 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, in mlx5_query_mad_ifc_pkey()
309 kfree(in_mad); in mlx5_query_mad_ifc_pkey()
317 struct ib_smp *in_mad = NULL; in mlx5_query_mad_ifc_gids() local
321 in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in mlx5_query_mad_ifc_gids()
323 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_gids()
326 init_query_mad(in_mad); in mlx5_query_mad_ifc_gids()
327 in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in mlx5_query_mad_ifc_gids()
328 in_mad->attr_mod = cpu_to_be32(port); in mlx5_query_mad_ifc_gids()
330 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, in mlx5_query_mad_ifc_gids()
337 init_query_mad(in_mad); in mlx5_query_mad_ifc_gids()
338 in_mad->attr_id = IB_SMP_ATTR_GUID_INFO; in mlx5_query_mad_ifc_gids()
339 in_mad->attr_mod = cpu_to_be32(index / 8); in mlx5_query_mad_ifc_gids()
341 err = mlx5_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, in mlx5_query_mad_ifc_gids()
349 kfree(in_mad); in mlx5_query_mad_ifc_gids()
359 struct ib_smp *in_mad = NULL; in mlx5_query_mad_ifc_port() local
369 in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL); in mlx5_query_mad_ifc_port()
371 if (!in_mad || !out_mad) in mlx5_query_mad_ifc_port()
376 init_query_mad(in_mad); in mlx5_query_mad_ifc_port()
377 in_mad->attr_id = IB_SMP_ATTR_PORT_INFO; in mlx5_query_mad_ifc_port()
378 in_mad->attr_mod = cpu_to_be32(port); in mlx5_query_mad_ifc_port()
380 err = mlx5_MAD_IFC(dev, 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
424 init_query_mad(in_mad); in mlx5_query_mad_ifc_port()
425 in_mad->attr_id = MLX5_ATTR_EXTENDED_PORT_INFO; in mlx5_query_mad_ifc_port()
426 in_mad->attr_mod = cpu_to_be32(port); in mlx5_query_mad_ifc_port()
429 NULL, NULL, in_mad, out_mad); in mlx5_query_mad_ifc_port()
440 kfree(in_mad); in mlx5_query_mad_ifc_port()