From patchwork Tue Aug 18 08:38:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 11720351 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C72714F6 for ; Tue, 18 Aug 2020 08:38:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A8EA20786 for ; Tue, 18 Aug 2020 08:38:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="ZUJfpKCC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726357AbgHRIir (ORCPT ); Tue, 18 Aug 2020 04:38:47 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:61542 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbgHRIip (ORCPT ); Tue, 18 Aug 2020 04:38:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1597739925; x=1629275925; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ePD5zyYoPayfSFLIbdK4wW57JpT+Xr5FtXiAiJVBKLE=; b=ZUJfpKCCxVa6VsaqkzNXoShwJm4ShPRP4KQIchURHtFI92y1wwVVt1H+ YcFPkGIH+mtAnwAF12ZCWS38FqHqw+Q3RSkCwx0JI1DytwMMCbgMpLdmi aaWfLHqrr60AnQ+sj+3MkKoKzwRfS+7u8WKA7eaTHhT0aAMfLQiAKxHK0 Q=; X-IronPort-AV: E=Sophos;i="5.76,326,1592870400"; d="scan'208";a="48412117" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1e-17c49630.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 18 Aug 2020 08:38:44 +0000 Received: from EX13MTAUEA002.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1e-17c49630.us-east-1.amazon.com (Postfix) with ESMTPS id 4E0FBA1199; Tue, 18 Aug 2020 08:38:43 +0000 (UTC) Received: from EX13D19EUB001.ant.amazon.com (10.43.166.229) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 Aug 2020 08:38:42 +0000 Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D19EUB001.ant.amazon.com (10.43.166.229) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 Aug 2020 08:38:41 +0000 Received: from 8c85908914bf.ant.amazon.com (10.1.213.29) by mail-relay.amazon.com (10.43.60.234) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 18 Aug 2020 08:38:39 +0000 From: Gal Pressman To: Jason Gunthorpe , Doug Ledford CC: , Gal Pressman Subject: [PATCH for-next] RDMA/core: Add a debug print when a driver is marked as non-kverbs provider Date: Tue, 18 Aug 2020 11:38:31 +0300 Message-ID: <20200818083831.92212-1-galpress@amazon.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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 --- 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; }