From patchwork Wed Aug 14 18:08:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Henrique Cerri X-Patchwork-Id: 1147169 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 467yHp3LN6z9sDQ; Thu, 15 Aug 2019 04:08:22 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1hxxh1-0002wg-P1; Wed, 14 Aug 2019 18:08:15 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1hxxgz-0002wN-GM for kernel-team@lists.ubuntu.com; Wed, 14 Aug 2019 18:08:13 +0000 Received: from mail-qt1-f199.google.com ([209.85.160.199]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hxxgz-0005Wk-6b for kernel-team@lists.ubuntu.com; Wed, 14 Aug 2019 18:08:13 +0000 Received: by mail-qt1-f199.google.com with SMTP id t5so103938618qtd.21 for ; Wed, 14 Aug 2019 11:08:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q85TEXBuulcHk7+hR0aBoVfWVY/k5w/V1bGpjX/tBf0=; b=Bt9BrBtvV4aIgA+yJRKmNMnYWXnQU7WHgW6K32/1B9PDd9P64ACG43Y4ZURuykfcy3 3F4tzMu7IvlNWuj1CS5NNJiID8r0pVjHJuc998uEdpjfjVMBd9ZtnhQiPlVRj/rGQBM+ GunqYMqMWZIz/0PTiKphT0zhxQYIH8EMksMuWbvTas2BL2MmZlSQEAIqbvzVfp9qyUQo V8fsG/P2XQXSg26L+LpnUnXE2INHIKDT1l9FoJIgZpggV6nKNwzyNtHzAC8TBQPnOAwO qpa1p4QL4XSu42Z0BcSXTjNjOAq2eI3CHM2obEOoSo3ffcjUtxlYG8Fo7JPcADFb/18y G4Jg== X-Gm-Message-State: APjAAAU4aHplFEYXVkPbVuk9ab9h0C4ydJGGMu6/TacTyh1jqLXtRLj/ dEV7dw+gezHL7sfXZkI0mo3HwfHXq81DWmIs2hlFHJMIk3tk7TFH0iNWdzMy0RbQNWzQckyU6yO Bb48EkQxRfzgp5QYAR/DIirULOzLBdJCX5nvp/Wqf X-Received: by 2002:ad4:4974:: with SMTP id p20mr719243qvy.29.1565806091912; Wed, 14 Aug 2019 11:08:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZDN1b7MJAJjo0EnaPAjLbQEppwM7QAAtgQr5HK49cmDW9PDfRF19bwfBGtlMx7ahh1rb1dg== X-Received: by 2002:ad4:4974:: with SMTP id p20mr719221qvy.29.1565806091680; Wed, 14 Aug 2019 11:08:11 -0700 (PDT) Received: from gallifrey.lan ([2804:14c:4e3:5580:2c77:8a85:ea59:4f17]) by smtp.gmail.com with ESMTPSA id q73sm229004qke.90.2019.08.14.11.08.10 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 14 Aug 2019 11:08:10 -0700 (PDT) From: Marcelo Henrique Cerri To: kernel-team@lists.ubuntu.com Subject: [d/azure][PATCH 2/2] UBUNTU: SAUCE: Expose extended attributes for user IB verbs QUERY_DEVICE, CREATE_CQ and CREATE_QP Date: Wed, 14 Aug 2019 15:08:04 -0300 Message-Id: <20190814180804.6019-2-marcelo.cerri@canonical.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190814180804.6019-1-marcelo.cerri@canonical.com> References: <20190814180804.6019-1-marcelo.cerri@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Long Li BugLink: https://bugs.launchpad.net/bugs/1839673 The user-mode driver may call this IB verbs to get extended data. The RDMA layer checks if those data are available in lower layer, and copy those data back to user mode. There is no need to change lower layer driver as those data have already been returned in RDMA-lower driver interfaces. Signed-off-by: Long Li Signed-off-by: Marcelo Henrique Cerri Acked-by: Sultan Alsawaf --- drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c index 3ad27e9d6a5d..1877cf60853b 100644 --- a/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c +++ b/drivers/infiniband/hw/vmbus-rdma/vmbus-rdma-144.0/provider.c @@ -2669,6 +2669,11 @@ int hvnd_register_device(struct hvnd_dev *dev, char *ip_addr, char *mac_addr) dev->ibdev.ops.get_port_immutable = hvnd_get_port_immutable; + dev->ibdev.uverbs_ex_cmd_mask |= + (1ull << IB_USER_VERBS_EX_CMD_QUERY_DEVICE) | + (1ull << IB_USER_VERBS_EX_CMD_CREATE_CQ) | + (1ull << IB_USER_VERBS_EX_CMD_CREATE_QP); + //DMA ops for mapping all possible addresses dev->ibdev.dev.parent = &(dev->hvdev->device); dev->ibdev.dev.dma_ops = &vmbus_dma_ops;