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

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

On Tue, Aug 18, 2020 at 11:38:31AM +0300, Gal Pressman wrote:
> 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(+)

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

Jason

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

* Re: [PATCH for-next] RDMA/core: Add a debug print when a driver is marked as non-kverbs provider
  2020-08-31 16:28 ` Jason Gunthorpe
@ 2020-09-01  6:46   ` Gal Pressman
  0 siblings, 0 replies; 3+ messages in thread
From: Gal Pressman @ 2020-09-01  6:46 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: Doug Ledford, linux-rdma

On 31/08/2020 19:28, Jason Gunthorpe wrote:
> On Tue, Aug 18, 2020 at 11:38:31AM +0300, Gal Pressman wrote:
>> 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(+)
> 
> 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.

^ permalink raw reply	[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).