Skip to contentSkip to conversation

linux-next: build failure after merge of the block tree

PATCH Stephen Rothwell 5 participants 11 messages Jul 26, 2018 – Aug 15, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/nvme/target/rdma.c: In function 'nvmet_rdma_find_get_device':
drivers/nvme/target/rdma.c:894:26: error: 'struct ib_device_attr' has no member named 'max_sge'; did you mean 'max_cqe'?

     cm_id->device->attrs.max_sge) - 1;
                          ^
drivers/nvme/target/rdma.c:893:21: note: in expansion of macro 'max'
  inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
                     ^~~

In file included from include/linux/list.h:9:0,
from include/linux/module.h:9,
from drivers/nvme/host/rdma.c:15:
drivers/nvme/host/rdma.c: In function 'nvme_rdma_find_get_device':
drivers/nvme/host/rdma.c:381:23: error: 'struct ib_device_attr' has no member named 'max_sge'; did you mean 'max_cqe'?

      ndev->dev->attrs.max_sge - 1);
                       ^
drivers/nvme/host/rdma.c:380:30: note: in expansion of macro 'min'
  ndev->num_inline_segments = min(NVME_RDMA_MAX_INLINE_SEGMENTS,
                              ^~~

Caused by commits

64a741c1eaa8 ("nvme-rdma: support up to 4 segments of inline data") 0d5ee2b2ab4f ("nvmet-rdma: support max(16KB, PAGE_SIZE) inline data")

interacting with commit

33023fb85a42 ("IB/core: add max_send_sge and max_recv_sge attributes")

from the rdma tree.

I have applied the following merge fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Jul 2018 14:32:15 +1000
Subject: [PATCH] nvme-dma: merge fix up for replacement of max_sge

---
 drivers/nvme/host/rdma.c   | 2 +-
 drivers/nvme/target/rdma.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/rdma.c +1 -1
index cfa0319fcd1c..368fe5ac0c6b 100644
@@ -378,7 +378,7 @@ nvme_rdma_find_get_device(struct rdma_cm_id *cm_id)
 	}
 
 	ndev->num_inline_segments = min(NVME_RDMA_MAX_INLINE_SEGMENTS,
-					ndev->dev->attrs.max_sge - 1);
+					ndev->dev->attrs.max_send_sge - 1);
 	list_add(&ndev->entry, &device_list);
 out_unlock:
 	mutex_unlock(&device_list_mutex);
drivers/nvme/target/rdma.c +1 -1
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
 
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;
 	if (inline_page_count > inline_sge_count) {
 		pr_warn("inline_data_size %d cannot be supported by device %s. Reducing to %lu.\n",
 			port->inline_data_size, cm_id->device->name,
Signature · 5 lines
2.18.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id) · line 894

Quoted 10 lines · Stephen Rothwell
drivers/nvme/target/rdma.c +1 -1
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
 
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;

This should be max_recv_sge.

#2 lore raw

Hi Christoph,

Quoted 8 lines · On Thu, 26 Jul 2018 10:48:33 +0200 Christoph Hellwig <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
drivers/nvme/target/rdma.c +0 -0
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
 
Quoted 6 lines

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id) · line 894

Quoted 4 lines
drivers/nvme/target/rdma.c +1 -1
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;  

This should be max_recv_sge.

Thanks, I will fix up my resolution for tomorrow.

Signature · 2 lines
Cheers,
Stephen Rothwell
#8 lore raw
In reply to Stephen Rothwell

Hey Stephen:

Quoted 32 lines

I have applied the following merge fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Jul 2018 14:32:15 +1000
Subject: [PATCH] nvme-dma: merge fix up for replacement of max_sge

---
 drivers/nvme/host/rdma.c   | 2 +-
 drivers/nvme/target/rdma.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/rdma.c +1 -1
index cfa0319fcd1c..368fe5ac0c6b 100644
@@ -378,7 +378,7 @@ nvme_rdma_find_get_device(struct rdma_cm_id
 *cm_id)
 	}
 
 	ndev->num_inline_segments =
 min(NVME_RDMA_MAX_INLINE_SEGMENTS,
-					ndev->dev->attrs.max_sge - 1);
+					ndev->dev->attrs.max_send_sge - 1);
 	list_add(&ndev->entry, &device_list);

out_unlock:

drivers/nvme/host/rdma.c +0 -0
 	mutex_unlock(&device_list_mutex);
drivers/nvme/target/rdma.c +0 -0
index 86121a7a19b2..8c30ac7d8078 100644

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id · line 895

Quoted 6 lines
drivers/nvme/target/rdma.c +1 -1
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id
 *cm_id)
 
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;

This should actually be max_recv_sge.

Thanks!

Steve.

maintainer
#3 lore raw
In reply to Christoph Hellwig
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Stephen Rothwell
drivers/nvme/target/rdma.c +0 -0
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
 
Quoted 6 lines

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id) · line 894

Quoted 4 lines
drivers/nvme/target/rdma.c +1 -1
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;

This should be max_recv_sge.

Why do we even have this conflicts to begin with?

Signature · 1 line
Jens Axboe
#4 lore raw
Quoted 8 lines · Jens Axboe
Quoted 6 lines

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id) · line 894

Quoted 4 lines
drivers/nvme/target/rdma.c +1 -1
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;

This should be max_recv_sge.

Why do we even have this conflicts to begin with?

Because the nvme code added a new user of max_sges while the RDMA tree split it into two separate fields. We discussed this a while ago when the issue came up.

#5 lore raw
Quoted 13 lines

-----Original Message-----
From: Christoph Hellwig <[email protected]>
Sent: Thursday, July 26, 2018 12:57 PM
To: Jens Axboe <[email protected]>
Cc: Christoph Hellwig <[email protected]>; Stephen Rothwell <[email protected]>; Doug Ledford <[email protected]>; Jason Gunthorpe <[email protected]>; Linux-Next Mailing List <linux- [email protected]>; Linux Kernel Mailing List <linux- [email protected]>; Steve Wise <[email protected]>
Subject: Re: linux-next: build failure after merge of the block tree

Quoted 5 lines
Quoted 4 lines · Jens Axboe
Quoted 4 lines

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)

Quoted 4 lines
drivers/nvme/target/rdma.c +1 -1
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) -

1;

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

This should be max_recv_sge.

Why do we even have this conflicts to begin with?

Because the nvme code added a new user of max_sges while the RDMA tree split it into two separate fields. We discussed this a while ago when the issue came up.

See: https://www.spinics.net/lists/linux-rdma/msg66208.html

Steve.

#6 lore raw
In reply to Jens Axboe
Quoted 8 lines · Jens Axboe
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Stephen Rothwell
drivers/nvme/target/rdma.c +0 -0
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
 
Quoted 8 lines
Quoted 6 lines

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id) · line 894

Quoted 4 lines
drivers/nvme/target/rdma.c +1 -1
  	inline_page_count = num_pages(port->inline_data_size);
  	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;

This should be max_recv_sge.

Why do we even have this conflicts to begin with?

Hello Jens,

A detailed description of why that change is necessary is available at
https://www.spinics.net/lists/linux-rdma/msg65954.html. As far as I know the entire RDMA community supports that change.

Bart.

maintainer
#7 lore raw
Quoted 16 lines · Bart Van Assche
Quoted 15 lines · Jens Axboe
Quoted 13 lines · Christoph Hellwig

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id) · line 894

Quoted 10 lines · Stephen Rothwell
drivers/nvme/target/rdma.c +1 -1
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
 
  	inline_page_count = num_pages(port->inline_data_size);
  	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;

This should be max_recv_sge.

Quoted 7 lines
Quoted 1 line

Why do we even have this conflicts to begin with?

Hello Jens,

A detailed description of why that change is necessary is available at
https://www.spinics.net/lists/linux-rdma/msg65954.html. As far as I know the entire RDMA community supports that change.

Thanks - I'm not against the change, I just always get a little suspicious when we have merge conflicts across subsystems. But this one seems warranted.

Signature · 1 line
Jens Axboe
#9 lore raw
In reply to Steve Wise

Hi Steve,

Quoted 8 lines · On Thu, 26 Jul 2018 07:32:16 -0500 "Steve Wise" <[email protected]>…
Quoted 8 lines
drivers/nvme/target/rdma.c +0 -0
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id
 *cm_id)
 
Quoted 6 lines

drivers/nvme/target/rdma.c nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id) · line 894

Quoted 4 lines
drivers/nvme/target/rdma.c +1 -1
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;  

This should actually be max_recv_sge.

Yeah, Christoph pointed that out as well. I will correct it today.

Thanks

Signature · 2 lines
Cheers,
Stephen Rothwell
#10 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 73 lines · On Thu, 26 Jul 2018 14:56:24 +1000 Stephen Rothwell <[email protected]>…

After merging the block tree, today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/nvme/target/rdma.c: In function 'nvmet_rdma_find_get_device':
drivers/nvme/target/rdma.c:894:26: error: 'struct ib_device_attr' has no member named 'max_sge'; did you mean 'max_cqe'?

     cm_id->device->attrs.max_sge) - 1;
                          ^
drivers/nvme/target/rdma.c:893:21: note: in expansion of macro 'max'
  inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
                     ^~~

In file included from include/linux/list.h:9:0,
from include/linux/module.h:9,
from drivers/nvme/host/rdma.c:15:
drivers/nvme/host/rdma.c: In function 'nvme_rdma_find_get_device':
drivers/nvme/host/rdma.c:381:23: error: 'struct ib_device_attr' has no member named 'max_sge'; did you mean 'max_cqe'?

      ndev->dev->attrs.max_sge - 1);
                       ^
drivers/nvme/host/rdma.c:380:30: note: in expansion of macro 'min'
  ndev->num_inline_segments = min(NVME_RDMA_MAX_INLINE_SEGMENTS,
                              ^~~

Caused by commits

64a741c1eaa8 ("nvme-rdma: support up to 4 segments of inline data") 0d5ee2b2ab4f ("nvmet-rdma: support max(16KB, PAGE_SIZE) inline data")

interacting with commit

33023fb85a42 ("IB/core: add max_send_sge and max_recv_sge attributes")

from the rdma tree.

I have applied the following merge fix patch for today:

From: Stephen Rothwell <[email protected]>
Date: Thu, 26 Jul 2018 14:32:15 +1000
Subject: [PATCH] nvme-dma: merge fix up for replacement of max_sge

---
 drivers/nvme/host/rdma.c   | 2 +-
 drivers/nvme/target/rdma.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/rdma.c +1 -1
index cfa0319fcd1c..368fe5ac0c6b 100644
@@ -378,7 +378,7 @@ nvme_rdma_find_get_device(struct rdma_cm_id *cm_id)
 	}
 
 	ndev->num_inline_segments = min(NVME_RDMA_MAX_INLINE_SEGMENTS,
-					ndev->dev->attrs.max_sge - 1);
+					ndev->dev->attrs.max_send_sge - 1);
 	list_add(&ndev->entry, &device_list);
 out_unlock:
 	mutex_unlock(&device_list_mutex);
drivers/nvme/target/rdma.c +1 -1
index 86121a7a19b2..8c30ac7d8078 100644
@@ -891,7 +891,7 @@ nvmet_rdma_find_get_device(struct rdma_cm_id *cm_id)
 
 	inline_page_count = num_pages(port->inline_data_size);
 	inline_sge_count = max(cm_id->device->attrs.max_sge_rd,
-				cm_id->device->attrs.max_sge) - 1;
+				cm_id->device->attrs.max_send_sge) - 1;
 	if (inline_page_count > inline_sge_count) {
 		pr_warn("inline_data_size %d cannot be supported by device %s. Reducing to %lu.\n",
 			port->inline_data_size, cm_id->device->name,
Signature · 1 line
2.18.0

This is now needed (with the max_send_sge -> max_recv_sge update in drivers/nvme/target/rdma.c patch) when I merge the rdma tree with Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell