/* The application asks for a RDMA transfer. Extract all arguments and set up the rdma_op  */
int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg)
/* The application asks for a RDMA transfer. Extract all arguments and set up the rdma_op  */
int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm, struct cmsghdr *cmsg)
{
	struct rds_rdma_op *op;
	if (cmsg->cmsg_len < CMSG_LEN(sizeof(struct rds_rdma_args)) ||
	    rm->m_rdma_op != NULL)
		return -EINVAL;
	op = rds_rdma_prepare(rs, CMSG_DATA(cmsg));
	if (IS_ERR(op))
		return PTR_ERR(op);
	rds_stats_inc(s_send_rdma);
	rm->m_rdma_op = op;
	return 0;
}