Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2951265pxy; Mon, 3 May 2021 11:32:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7OI1Qhew6HLhW5EiDb9nAaHoJbK9vvSxEUchK5CeFA7GYgeJwj4OJQ6vK5g/YQcI0+tNq X-Received: by 2002:a17:90a:bc94:: with SMTP id x20mr31907261pjr.107.1620066766254; Mon, 03 May 2021 11:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620066766; cv=none; d=google.com; s=arc-20160816; b=E76qkxFE1MTtgH82boCZP66P/ALwnIZYxfIw3V6IrC2oZuxJcD/o4Uc2OwQxTsLFDK +GUkOSZEvO1YxemSg0l2gJuEkhd6ZTp5zGVlBhmP62SHGtKAumVcfhGiaPAjJAEQaoKx y5VI3f1+Lr5PZvJxB1FoebRY0zd8px4qZ1oasVO6kflphnJUM6/X7V7OqxVN1GT+V50r eLs+/6GLkTtJm+OPBLUP70dVMA119IKWYzoJenGpS1qw/LEDD56rkBCb1KVBtVVBQiJY h6TbP65Zha/RHiaV0LcWIJnVOoXYEUCG/jKZzLgiXyzxT33j9OnZzjKgg4Pxsy3HK5G5 5BJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:dkim-signature; bh=4PPTHdFwsG/FNijX7QmJQU5iOiwqKMFkAEJmwyjdEcs=; b=l1AuabMo4Dsql3ikTdVJdARMz8wKp5+Ej+gbetvjJi/24wqYzN5w3Ui7GJSxogpMqo EqbktUb5ZZ092Z/6MA6v+hWhGlp7PlF6Wqkg7aidZcM51ncEKVWKdh1Ra2MHd3xkGkJB dch2Iujm4hvKl+hkCQNhxTmZu+t95eazNgwBFaUU74j7oVrkbue8bPMWP62TkEIBxaey +14REO2Yu9pTwn3ul50ygDPUvcYYRRHU3ZP07yz5gOSVjbMBBOsYQ5osdVRVkRzzYRED FKxHCtDeOKGrlgt+1RBElcM8xg+RbQZTtXw52pnxQo4pc4u+3dXtM1n4ZLjpmLkcpuqK IGxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=pWmTqC5U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t7si6435658pfh.14.2021.05.03.11.32.33; Mon, 03 May 2021 11:32:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=pWmTqC5U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229836AbhECScL (ORCPT + 99 others); Mon, 3 May 2021 14:32:11 -0400 Received: from ale.deltatee.com ([204.191.154.188]:60494 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbhECScI (ORCPT ); Mon, 3 May 2021 14:32:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=4PPTHdFwsG/FNijX7QmJQU5iOiwqKMFkAEJmwyjdEcs=; b=pWmTqC5UhoOtIRbROwzaB+ZWE1 wHkLmyIDKJxZsZDLxgnD6Z1lbkZNPwtAHMVRKSMIIb9/0maQTAXw7MDfHeL1hFkcrZtGYsLBetLNw j+7qzrbqYPpPmJ23hX6P0ls4TPaV0WkGh5DsW1oxoRADWAdB3nzhINiIOs20KiGt0t0Ss/9SfTKjF xUcrvgRWw6/OrYVY9rAMPwOmac3o7/upKHt34JkI38fv0Z+DSNGGCnloayK7gr2BXlP4k3imBeIB9 +aWQrrtNiOEqAn3BuRX+uctRRjVm2wQnywiNbH3clIsf9tjw46NnASc/POq5RagQrKSkmCqLwk8Y4 wNygqJ9g==; Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.92) (envelope-from ) id 1lddLV-0000jc-25; Mon, 03 May 2021 12:31:05 -0600 To: Christoph Hellwig , Jason Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Stephen Bates , Dan Williams , =?UTF-8?Q?Christian_K=c3=b6nig?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Jakowski Andrzej , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy References: <20210408170123.8788-1-logang@deltatee.com> <20210408170123.8788-6-logang@deltatee.com> <20210427193157.GQ2047089@ziepe.ca> <3c9ba6df-750a-3847-f1fc-8e41f533d1a2@deltatee.com> <20210427230113.GV2047089@ziepe.ca> <20210503182811.GC17174@lst.de> From: Logan Gunthorpe Message-ID: Date: Mon, 3 May 2021 12:31:03 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210503182811.GC17174@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: robin.murphy@arm.com, ira.weiny@intel.com, helgaas@kernel.org, jianxin.xiong@intel.com, dave.hansen@linux.intel.com, jason@jlekstrand.net, dave.b.minturn@intel.com, andrzej.jakowski@intel.com, daniel.vetter@ffwll.ch, willy@infradead.org, ddutile@redhat.com, jhubbard@nvidia.com, christian.koenig@amd.com, dan.j.williams@intel.com, sbates@raithlin.com, iommu@lists.linux-foundation.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, jgg@ziepe.ca, hch@lst.de X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH 05/16] dma-mapping: Introduce dma_map_sg_p2pdma() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-05-03 12:28 p.m., Christoph Hellwig wrote: > On Tue, Apr 27, 2021 at 08:01:13PM -0300, Jason Gunthorpe wrote: >> At a high level I'm OK with it. dma_map_sg_attrs() is the extra >> extended version of dma_map_sg(), it already has a different >> signature, a different return code is not out of the question. >> >> dma_map_sg() is just the simple easy to use interface that can't do >> advanced stuff. >> >>> I'm not that opposed to this. But it will make this series a fair bit >>> longer to change the 8 map_sg_attrs() usages. >> >> Yes, but the result seems much nicer to not grow the DMA API further. > > We already have a mapping function that can return errors: > dma_map_sgtable. > > I think it might make more sense to piggy back on that, as the sg_table > abstraction is pretty useful basically everywhere that we deal with > scatterlists anyway. Oh, I didn't even realize that existed. I'll use dma_map_sgtable() for v2. Thanks, Logan