linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/core: Add a debug print when a driver is marked as non-kverbs provider
@ 2020-08-18  8:38 Gal Pressman
  2020-08-31 16:28 ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Gal Pressman @ 2020-08-18  8:38 UTC (permalink / raw)
  To: Jason Gunthorpe, Doug Ledford; +Cc: linux-rdma, 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.

Signed-off-by: Gal Pressman <galpress@amazon.com>
---
 drivers/infiniband/core/device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index d293b826acbc..dc5896040df9 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -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;
 		}
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-01  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-18  8:38 [PATCH for-next] RDMA/core: Add a debug print when a driver is marked as non-kverbs provider Gal Pressman
2020-08-31 16:28 ` Jason Gunthorpe
2020-09-01  6:46   ` Gal Pressman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).