Received: by 10.223.185.116 with SMTP id b49csp7815093wrg; Thu, 1 Mar 2018 11:35:11 -0800 (PST) X-Google-Smtp-Source: AG47ELuMpwUNxAXi00L39npDc6pD/CN2XJSC3y9LuaP+jeIPOKKW1Q+vaBFe84tqs66CNPujrLlN X-Received: by 10.99.116.67 with SMTP id e3mr2373503pgn.265.1519932910903; Thu, 01 Mar 2018 11:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519932910; cv=none; d=google.com; s=arc-20160816; b=oycyhpb117JZ6H7fEBub0w0GaMt08jwh4wQoGGIoFJ8j2hJrkP56NS/djBGl4PSfcW fkCJEE42wRnQEdRSJUCNvNi63wH3vdUnqs8FiSoDeVqpGiJ/igdVI/b6J+6X90ZCK2xJ aZLJQ2oXeJoPIBhm/MZ0U1tvtWfMroms7lk+aWYKFLTyiPeZBfwMlYvzDspFizFJQSP/ 4kgjMyaVckxLSvjU93OQpV74JRv72hDdn1XmbnrYUjRrcWyk6SbbXedXBUmWuNG6f/pT 94935Np3l/nSaS5q3ohmX9B0zL9ak/NWDiwRJuuCDX2/gZtZxykoYV3RG3O0QqZecRjs MtvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:arc-authentication-results; bh=wvDPfPleVYH5MJXzFmvY7gZXV/Zjs05IJdAy1+SlkiE=; b=WFJMAjdxedgrCCpTbgCXR99HLhY06j2xz63lwNUS1x3ueWLYekS4kYx541y0toIxCM Pmy8r5LrDEI9yPePrtnjxakYBCcAquCpYJSeb3cnJO+L5lARXBzPD4LdqZCtUaySUv7h tCLV39p1GQHxSOUaQYeEQZlXFwdIpgPArrrMnrMIq+U8EBvfibwOzvvh2QHAHOG71Fzq 6MCgAKJLyeLNhcM5qFhw2IkLXMwVvgE7Y1ffATcEqO3Rl14n9uxrK97AKTpaVj0AH1S+ vqgwAmu8oBcij2ACp52AvSIVLVNgVXFkQ91Fisof0lIlDv8rEOxVIYFerD+O4iDUd9OG WTfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l137si2814104pga.525.2018.03.01.11.34.54; Thu, 01 Mar 2018 11:35:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161350AbeCATeP (ORCPT + 99 others); Thu, 1 Mar 2018 14:34:15 -0500 Received: from ale.deltatee.com ([207.54.116.67]:37762 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161195AbeCATeJ (ORCPT ); Thu, 1 Mar 2018 14:34:09 -0500 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1erTxo-0000Jo-JV; Thu, 01 Mar 2018 12:34:01 -0700 To: Sagi Grimberg , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org Cc: Stephen Bates , Christoph Hellwig , Jens Axboe , Keith Busch , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson References: <20180228234006.21093-1-logang@deltatee.com> <90b658d9-da8a-af36-ad8f-a72ef0c6e3c1@grimberg.me> From: Logan Gunthorpe Message-ID: <112b6d99-8aac-3d45-486e-ebea62fb8670@deltatee.com> Date: Thu, 1 Mar 2018 12:33:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <90b658d9-da8a-af36-ad8f-a72ef0c6e3c1@grimberg.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: alex.williamson@redhat.com, benh@kernel.crashing.org, jglisse@redhat.com, dan.j.williams@intel.com, maxg@mellanox.com, jgg@mellanox.com, bhelgaas@google.com, keith.busch@intel.com, axboe@kernel.dk, hch@lst.de, sbates@raithlin.com, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, sagi@grimberg.me X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v2 00/10] Copy Offload in NVMe Fabrics with P2P PCI Memory X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/03/18 03:31 AM, Sagi Grimberg wrote: >> * We also reject using devices that employ 'dma_virt_ops' which should >>    fairly simply handle Jason's concerns that this work might break with >>    the HFI, QIB and rxe drivers that use the virtual ops to implement >>    their own special DMA operations. > > That's good, but what would happen for these devices? simply fail the > mapping causing the ulp to fail its rdma operation? I would think > that we need a capability flag for devices that support it. pci_p2pmem_find() will simply not return any devices when any client that uses dma_virt_ops. So in the NVMe target case it simply will not use P2P memory. And just in case, pci_p2pdma_map_sg() will also return 0 if the device passed to it uses dma_virt_ops as well. So if someone bypasses pci_p2pmem_find() they will get a failure during map. Logan