Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2948880pxy; Mon, 3 May 2021 11:29:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeXkwIxxFb22In68AxNl8te7xNvUtA+07A9XlYrm3l5AjyQCL2dKHWxxNQuwuJBA1vTOQY X-Received: by 2002:a17:90a:f3d3:: with SMTP id ha19mr22589744pjb.166.1620066585972; Mon, 03 May 2021 11:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620066585; cv=none; d=google.com; s=arc-20160816; b=Wiy+h4GktB6e5scAkyWlbZEPY0Lb9h1Y+gf/WuW9ANn9DZRH6bUGoybBt48sE7rbFl CUjRE5Z8llS8rVyvQA3QPD/WrcAa8WJj1WXwAaKxHSAWsbYTQFEir9wIEqm+4CdG5Faw Ae8xpA37JQFd4UG391aUQYMdsTqAWAPQGwTHCUiwTxQKh/yj/4hlM7G0w74yOdvjwW0I yx4l3jNS6HESpKND6hx9nhBoYh/59+nssHozGkevij4l04eYC/XHB0LnXL0a+tmjiL+w f2siK4+0idakV5zR7XZ5GxMmEHew7geXwsdPtiS/s7R280Igxgd1xiQu4xTENsFHzeL0 GS7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=d8XwvLbbE43n/ALvzFHI+Iof+YTcBaDuUh6ptHdqEd4=; b=wYiloH6QIZ9W47jobzCuC7oJ1zXgV5JQWJfo55kWK2x3nninQswaYa3cfiq3KaDJnk pTyr/Bmys2OrbkJ+Z9C2fxQDjj7IegPVRKWjPCCB6tkMXzM9c3zgP43jg5TXTZR2JvYh 15/TzsqayjPDzf4WkKBRr1pq3RB1kcET7kAQkOvc2pjHUxRqDJ6ZrzsrEm8TnR/AjNxq N+I1EZzKpyw6APqLltfdYSbInY2eVGhvDdMcJZJv9P6vKGnquCnijcl12DgCGVLI7YRJ /8SgtcRAnfLU+AfkEXJCp60RvnORHZHb166ShtxlxuH5mKmRBjDQW+rR1QtxqX4YRigW Mm9A== ARC-Authentication-Results: i=1; mx.google.com; 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 s1si449976plq.245.2021.05.03.11.29.33; Mon, 03 May 2021 11:29:45 -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; 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 S229824AbhECS3M (ORCPT + 99 others); Mon, 3 May 2021 14:29:12 -0400 Received: from verein.lst.de ([213.95.11.211]:36724 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229870AbhECS3K (ORCPT ); Mon, 3 May 2021 14:29:10 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 16D2068BEB; Mon, 3 May 2021 20:28:12 +0200 (CEST) Date: Mon, 3 May 2021 20:28:11 +0200 From: Christoph Hellwig To: Jason Gunthorpe Cc: Logan Gunthorpe , 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 , Christoph Hellwig , Dan Williams , Christian =?iso-8859-1?Q?K=F6nig?= , 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 Subject: Re: [PATCH 05/16] dma-mapping: Introduce dma_map_sg_p2pdma() Message-ID: <20210503182811.GC17174@lst.de> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210427230113.GV2047089@ziepe.ca> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. In the hopefully no too long run I plan to get rid of scatterlists in at least NVMe and other high performance devices anyway.