[PATCH v5 2/4] nvme-rdma: don't complete requests before a send work request has completed

Christoph Hellwig hch at lst.de
Thu Nov 23 00:08:58 PST 2017


>  static void nvme_rdma_send_done(struct ib_cq *cq, struct ib_wc *wc)
>  {
> -	if (unlikely(wc->status != IB_WC_SUCCESS))
> +	struct nvme_rdma_qe *qe;
> +	struct nvme_rdma_request *req;
> +	struct request *rq;
> +
> +	if (unlikely(wc->status != IB_WC_SUCCESS)) {
>  		nvme_rdma_wr_error(cq, wc, "SEND");
> +		return;
> +	}
> +
> +	qe = container_of(wc->wr_cqe, struct nvme_rdma_qe, cqe);
> +	req = container_of(qe, struct nvme_rdma_request, sqe);
> +	rq = blk_mq_rq_from_pdu(req);

This add least needs a comment that this is for the AEN request.

Or we'll just use a separate completion handler for the AEN.  In fact
it seems to me that we might want to just stop using nvme_rdma_post_send
for the AEN request and just open code the sending in both callers.



More information about the Linux-nvme mailing list