Lines Matching refs:mad
151 static void smp_snoop(struct ib_device *ibdev, u8 port_num, struct ib_mad *mad,
156 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
157 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
158 mad->mad_hdr.method == IB_MGMT_METHOD_SET) {
159 if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PORT_INFO) {
161 (struct ib_port_info *) ((struct ib_smp *) mad)->data;
182 if (mad->mad_hdr.attr_id == IB_SMP_ATTR_PKEY_TABLE) {
192 struct ib_mad *mad)
194 if ((mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_LID_ROUTED ||
195 mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE) &&
196 mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP &&
197 mad->mad_hdr.attr_id == IB_SMP_ATTR_NODE_DESC) {
199 memcpy(((struct ib_smp *) mad)->data, dev->node_desc, 64);
204 static void forward_trap(struct mlx4_ib_dev *dev, u8 port_num, struct ib_mad *mad)
206 int qpn = mad->mad_hdr.mgmt_class != IB_MGMT_CLASS_SUBN_LID_ROUTED;
221 memcpy(send_buf->mad, mad, sizeof *mad);