@@ -804,16 +804,25 @@ static int svc_rdma_send_reply_msg(struct svcxprt_rdma *rdma,
804
804
return svc_rdma_send (rdma , & sctxt -> sc_send_wr );
805
805
}
806
806
807
- /* Given the client-provided Write and Reply chunks, the server was not
808
- * able to form a complete reply. Return an RDMA_ERROR message so the
809
- * client can retire this RPC transaction.
810
- *
811
- * Remote Invalidation is skipped for simplicity.
807
+ /**
808
+ * svc_rdma_send_error_msg - Send an RPC/RDMA v1 error response
809
+ * @rdma: controlling transport context
810
+ * @sctxt: Send context for the response
811
+ * @rctxt: Receive context for incoming bad message
812
+ * @status: negative errno indicating error that occurred
813
+ *
814
+ * Given the client-provided Read, Write, and Reply chunks, the
815
+ * server was not able to parse the Call or form a complete Reply.
816
+ * Return an RDMA_ERROR message so the client can retire the RPC
817
+ * transaction.
818
+ *
819
+ * The caller does not have to release @sctxt. It is released by
820
+ * Send completion, or by this function on error.
812
821
*/
813
- static void svc_rdma_send_error_msg (struct svcxprt_rdma * rdma ,
814
- struct svc_rdma_send_ctxt * sctxt ,
815
- struct svc_rdma_recv_ctxt * rctxt ,
816
- int status )
822
+ void svc_rdma_send_error_msg (struct svcxprt_rdma * rdma ,
823
+ struct svc_rdma_send_ctxt * sctxt ,
824
+ struct svc_rdma_recv_ctxt * rctxt ,
825
+ int status )
817
826
{
818
827
__be32 * rdma_argp = rctxt -> rc_recv_buf ;
819
828
__be32 * p ;
@@ -852,6 +861,7 @@ static void svc_rdma_send_error_msg(struct svcxprt_rdma *rdma,
852
861
trace_svcrdma_err_chunk (* rdma_argp );
853
862
}
854
863
864
+ /* Remote Invalidation is skipped for simplicity. */
855
865
sctxt -> sc_send_wr .num_sge = 1 ;
856
866
sctxt -> sc_send_wr .opcode = IB_WR_SEND ;
857
867
sctxt -> sc_sges [0 ].length = sctxt -> sc_hdrbuf .len ;
0 commit comments