Lines Matching refs:recv

2031 				     struct ib_mad_private *recv,
2035 struct ib_smp *smp = (struct ib_smp *)recv->mad;
2058 memcpy(response, recv, mad_priv_size(response));
2076 static bool generate_unmatched_resp(const struct ib_mad_private *recv,
2080 const struct ib_mad_hdr *recv_hdr = (const struct ib_mad_hdr *)recv->mad;
2085 memcpy(response, recv, mad_priv_size(response));
2100 (const struct opa_smp *)recv->mad);
2116 struct ib_mad_private *recv,
2120 struct opa_smp *smp = (struct opa_smp *)recv->mad;
2145 memcpy(response, recv, mad_priv_size(response));
2156 recv->header.wc.byte_len,
2170 struct ib_mad_private *recv,
2174 struct ib_mad_hdr *mad_hdr = (struct ib_mad_hdr *)recv->mad;
2178 return handle_opa_smi(port_priv, qp_info, wc, port_num, recv,
2181 return handle_ib_smi(port_priv, qp_info, wc, port_num, recv, response);
2191 struct ib_mad_private *recv, *response = NULL;
2218 recv = container_of(mad_priv_hdr, struct ib_mad_private, header);
2220 recv->header.mapping,
2221 mad_priv_dma_size(recv),
2225 recv->header.wc = *wc;
2226 recv->header.recv_wc.wc = &recv->header.wc;
2228 if (opa && ((struct ib_mad_hdr *)(recv->mad))->base_version == OPA_MGMT_BASE_VERSION) {
2229 recv->header.recv_wc.mad_len = wc->byte_len - sizeof(struct ib_grh);
2230 recv->header.recv_wc.mad_seg_size = sizeof(struct opa_mad);
2232 recv->header.recv_wc.mad_len = sizeof(struct ib_mad);
2233 recv->header.recv_wc.mad_seg_size = sizeof(struct ib_mad);
2236 recv->header.recv_wc.recv_buf.mad = (struct ib_mad *)recv->mad;
2237 recv->header.recv_wc.recv_buf.grh = &recv->grh;
2240 snoop_recv(qp_info, &recv->header.recv_wc, IB_MAD_SNOOP_RECVS);
2243 if (!validate_mad((const struct ib_mad_hdr *)recv->mad, qp_info, opa))
2246 mad_size = recv->mad_size;
2259 if (((struct ib_mad_hdr *)recv->mad)->mgmt_class ==
2261 if (handle_smi(port_priv, qp_info, wc, port_num, recv,
2271 wc, &recv->grh,
2272 (const struct ib_mad_hdr *)recv->mad,
2273 recv->mad_size,
2285 &recv->grh, wc,
2295 mad_agent = find_mad_agent(port_priv, (const struct ib_mad_hdr *)recv->mad);
2297 ib_mad_complete_recv(mad_agent, &recv->header.recv_wc);
2299 * recv is freed up in error cases in ib_mad_complete_recv
2302 recv = NULL;
2304 generate_unmatched_resp(recv, response, &mad_size, opa)) {
2305 agent_send_response((const struct ib_mad_hdr *)response->mad, &recv->grh, wc,
2314 kfree(recv);
2316 ib_mad_post_receive_mads(qp_info, recv);
2931 struct ib_mad_private *recv;
2944 recv = container_of(mad_priv_hdr, struct ib_mad_private,
2951 recv->header.mapping,
2952 mad_priv_dma_size(recv),
2954 kfree(recv);