Skip to contentSkip to conversation

linux-next: manual merge of the block tree with the rdma tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Jul 26, 2018 – Aug 15, 2018 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the block tree got a conflict in:

drivers/nvme/target/rdma.c

between commit:

23f96d1f15a7 ("nvmet-rdma: Simplify ib_post_(send|recv|srq_recv)() calls") 202093848cac ("nvmet-rdma: add an error flow for post_recv failures")

from the rdma tree and commits:

2fc464e2162c ("nvmet-rdma: add unlikely check in the fast path")

from the block tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 44 lines
Cheers,
Stephen Rothwell

diff --cc drivers/nvme/target/rdma.c
index 1a642e214a4c,e7f43d1e1779..000000000000
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@@ -382,13 -435,22 +435,21 @@@ static void nvmet_rdma_free_rsps(struc
  static int nvmet_rdma_post_recv(struct nvmet_rdma_device *ndev,
  		struct nvmet_rdma_cmd *cmd)
  {
 -	struct ib_recv_wr *bad_wr;
+ 	int ret;
+ 
  	ib_dma_sync_single_for_device(ndev->device,
  		cmd->sge[0].addr, cmd->sge[0].length,
  		DMA_FROM_DEVICE);
  
  	if (ndev->srq)
- 		return ib_post_srq_recv(ndev->srq, &cmd->wr, NULL);
- 	return ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, NULL);
 -		ret = ib_post_srq_recv(ndev->srq, &cmd->wr, &bad_wr);
++		ret = ib_post_srq_recv(ndev->srq, &cmd->wr, NULL);
+ 	else
 -		ret = ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, &bad_wr);
++		ret = ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, NULL);
+ 
+ 	if (unlikely(ret))
+ 		pr_err("post_recv cmd failed\n");
+ 
+ 	return ret;
  }
  
  static void nvmet_rdma_process_wr_wait_list(struct nvmet_rdma_queue *queue)
@@@ -491,7 -553,7 +552,7 @@@ static void nvmet_rdma_queue_response(s
  		rsp->send_sge.addr, rsp->send_sge.length,
  		DMA_TO_DEVICE);
  
- 	if (ib_post_send(cm_id->qp, first_wr, NULL)) {
 -	if (unlikely(ib_post_send(cm_id->qp, first_wr, &bad_wr))) {
++	if (unlikely(ib_post_send(cm_id->qp, first_wr, NULL))) {
  		pr_err("sending cmd response failed\n");
  		nvmet_rdma_release_rsp(rsp);
  	}
#1 lore raw

Hi all,

Quoted 59 lines · On Thu, 26 Jul 2018 13:58:04 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the block tree got a conflict in:

drivers/nvme/target/rdma.c

between commit:

23f96d1f15a7 ("nvmet-rdma: Simplify ib_post_(send|recv|srq_recv)() calls") 202093848cac ("nvmet-rdma: add an error flow for post_recv failures")

from the rdma tree and commits:

2fc464e2162c ("nvmet-rdma: add unlikely check in the fast path")

from the block tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 2 lines
Cheers,
Stephen Rothwell
drivers/nvme/target/rdma.c +10 -2
diff --cc drivers/nvme/target/rdma.c
index 1a642e214a4c,e7f43d1e1779..000000000000
@@@ -382,13 -435,22 +435,21 @@@ static void nvmet_rdma_free_rsps(struc
  static int nvmet_rdma_post_recv(struct nvmet_rdma_device *ndev,
  		struct nvmet_rdma_cmd *cmd)
  {
 -	struct ib_recv_wr *bad_wr;
+ 	int ret;
+ 
  	ib_dma_sync_single_for_device(ndev->device,
  		cmd->sge[0].addr, cmd->sge[0].length,
  		DMA_FROM_DEVICE);
 
  	if (ndev->srq)
- 		return ib_post_srq_recv(ndev->srq, &cmd->wr, NULL);
- 	return ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, NULL);
 -		ret = ib_post_srq_recv(ndev->srq, &cmd->wr, &bad_wr);
++		ret = ib_post_srq_recv(ndev->srq, &cmd->wr, NULL);
+ 	else
 -		ret = ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, &bad_wr);
++		ret = ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, NULL);
+ 
+ 	if (unlikely(ret))
+ 		pr_err("post_recv cmd failed\n");
+ 
+ 	return ret;
  }
 
  static void nvmet_rdma_process_wr_wait_list(struct nvmet_rdma_queue *queue)

drivers/nvme/target/rdma.c

Quoted 9 lines
drivers/nvme/target/rdma.c +1 -1
@@@ -491,7 -553,7 +552,7 @@@ static void nvmet_rdma_queue_response(s
  		rsp->send_sge.addr, rsp->send_sge.length,
  		DMA_TO_DEVICE);
 
- 	if (ib_post_send(cm_id->qp, first_wr, NULL)) {
 -	if (unlikely(ib_post_send(cm_id->qp, first_wr, &bad_wr))) {
++	if (unlikely(ib_post_send(cm_id->qp, first_wr, NULL))) {
  		pr_err("sending cmd response failed\n");
  		nvmet_rdma_release_rsp(rsp);
  	}

This is now a conflict between Linus' tree and the rdma tree.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
Quoted 27 lines · Stephen Rothwell

Hi all,

Quoted 14 lines · On Thu, 26 Jul 2018 13:58:04 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the block tree got a conflict in:

drivers/nvme/target/rdma.c

between commit:

23f96d1f15a7 ("nvmet-rdma: Simplify ib_post_(send|recv|srq_recv)() calls") 202093848cac ("nvmet-rdma: add an error flow for post_recv failures")

from the rdma tree and commits:

2fc464e2162c ("nvmet-rdma: add unlikely check in the fast path")

Quoted 9 lines

from the block tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Quoted 1 line

This is now a conflict between Linus' tree and the rdma tree.

Yes, I expect this.. good thing we had linux-next as several of these needed non-obvious changes.

I keep track of your postings and build a conflict resolution for Linus to refer to. netdev is the last conflicting tree I expect, and it hasn't been sent yet..

Thanks,
Jason