Skip to contentSkip to conversation

RDMA/core: Add a debug print when a driver is marked as non-kverbs provider

PATCH In review Gal Pressman 2 participants 3 messages Aug 18, 2020 – Sep 1, 2020 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/core: Add a debug print when a driver is marked as non-kverbs provider

Add a debug print which is emitted when a certain driver is marked as non-kverbs provider. This allows for easier understanding of why kverbs functionality isn't working in such cases.

In addition, print the name of the first mandatory verb that is missing. This brings back use for the unused name field.

---
 drivers/infiniband/core/device.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/infiniband/core/device.c +4 -0
index d293b826acbc..dc5896040df9 100644
@@ -293,6 +293,10 @@ static void ib_device_check_mandatory(struct ib_device *device)
 	for (i = 0; i < ARRAY_SIZE(mandatory_table); ++i) {
 		if (!*(void **) ((void *) &device->ops +
 				 mandatory_table[i].offset)) {
+			ibdev_dbg(
+				device,
+				"Marking as non-kverbs provider due to missing mandatory verb %s",
+				mandatory_table[i].name);
 			device->kverbs_provider = false;
 			break;
 		}
Signature · 1 line
2.28.0
#1 lore raw
Quoted 11 lines · Gal Pressman

Add a debug print which is emitted when a certain driver is marked as non-kverbs provider. This allows for easier understanding of why kverbs functionality isn't working in such cases.

In addition, print the name of the first mandatory verb that is missing. This brings back use for the unused name field.

---
 drivers/infiniband/core/device.c | 4 ++++
 1 file changed, 4 insertions(+)

Kinda wondering why here? The debug level doesn't print by default does it?

Jason

#2 lore raw
Quoted 8 lines · Jason Gunthorpe
Quoted 7 lines · Gal Pressman

Add a debug print which is emitted when a certain driver is marked as non-kverbs provider. This allows for easier understanding of why kverbs functionality isn't working in such cases.

In addition, print the name of the first mandatory verb that is missing. This brings back use for the unused name field.

Quoted 7 lines
Quoted 4 lines
---
 drivers/infiniband/core/device.c | 4 ++++
 1 file changed, 4 insertions(+)

Kinda wondering why here? The debug level doesn't print by default does it?

Nope, I assume that a user that wants to debug why things aren't working is going to enable debug prints. What do you mean by where here? Do you have a more appropriate place in mind?

I thought this could be helpful, I can remove the print and the name field if you prefer.