Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4920870pxy; Tue, 27 Apr 2021 16:03:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytOzxMtCetfOcTMVdqhiCUGdQYl5njWyExOD/cSe4a/+FdmnU5EL1GNGLa7FpxRd1swS5F X-Received: by 2002:a63:fd52:: with SMTP id m18mr7274944pgj.14.1619564617692; Tue, 27 Apr 2021 16:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619564617; cv=none; d=google.com; s=arc-20160816; b=CSqMkSZkhLnO2UUnZRc4ARsEgdMFOIt/L0UnKIrZT6beps6rO0DJZaFray2aeCAVUA hgoSoLXQ/VRPTC5Nmtk0C6npmRxNWQWJN3GnGafpnHcQleslpt/oNSUPC33rnFKPahmU y4aHlII/tuHf+Yov9kUfPy7sg/lUt46lXjWNFsu0hFcNdMB62vtm7qCmM1/RE1+rZjPX 6NVa+Sk2MQYR+pokLhzCtdTx0X/yXoeExHt2SFua0mf0UlOvYdIP91GX73j49HgiLTKH SvmpQgjpDVX22uWQIZC1EuMPn+ifXZd/GuwLsF4y+LW4pd3Y1CD8cCIBwVEPd1Wuqrri qlfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Jxr5SslTLaxp6nme+gpuPJSYdMGk5MPmebdD3HwlPqc=; b=SgPw+QNRzLJw+2eZMPG0BULetip9SyJzyGzQ/L82TBGWjIw1y6CE1GfovKVBt3crAi SFfuTN4lQnEuQxp2Os940CjmjRK9Pqug4+Osi1DIh/qRcNRPnMmVyCt4L+Luok6Lwr4H Uye7d5/kZ67zOfF+YhOo4J4tMgtGrVWzSOuL+v/KJ7hkysuBOc7dwPSMyNOdB9uzbswm AutIKkU6WI4NR/kXMD/cbCIeDcfUFFkiwYbvnh1IY6OUCsQW+/IIWbityajqWqpLLyd7 IdgCg0Uh2wWwHwRyTGAVFCf0siyw7QbM+WMw/yXaVm2biuI7Y/QtypvxguU+VArLLdib G4EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=mWCFLORk; 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 u18si4767733pjy.86.2021.04.27.16.03.24; Tue, 27 Apr 2021 16:03:37 -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=@ziepe.ca header.s=google header.b=mWCFLORk; 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 S235382AbhD0XCC (ORCPT + 99 others); Tue, 27 Apr 2021 19:02:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235540AbhD0XCB (ORCPT ); Tue, 27 Apr 2021 19:02:01 -0400 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF92CC061760 for ; Tue, 27 Apr 2021 16:01:15 -0700 (PDT) Received: by mail-qk1-x72e.google.com with SMTP id z2so24801288qkb.9 for ; Tue, 27 Apr 2021 16:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Jxr5SslTLaxp6nme+gpuPJSYdMGk5MPmebdD3HwlPqc=; b=mWCFLORk/JSO5hvqnSM+Tr4f5WX2JQQfM5zw3lnOqv2hI8yuK2QY2VRA4xKcfW/BBW 7+hygn+gIdSUDWbWnu44e9xclJztFIqbTsp/9qMdRnWE354rUiO+6MGPtD09gFGZBaIy IMQtx4otwgxXJNa3cuXWog1ddYlO1lhhAgdkSaV16Mkmlj4d+AO8D+3Vib+IKn1kpnJh zB2E3oZUgKt5cnT7CqrKn19BnZSeoH4IVay80i46FytArqMCxbMFWeL7/z8Zhyn6aK1Z E+x0lqdvTXIEAWW5guabHeXg9VXM3pblwMdsknuFsYDM3IU6oHqS3nkBUCZzVKmLg6Hk fKBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Jxr5SslTLaxp6nme+gpuPJSYdMGk5MPmebdD3HwlPqc=; b=RX2VT/UMbE81xGjgYbAiL+2g6jttp38Uok9SOfNfkMAdnIHnX8pG94tM9BmmGNTEqc gxTKFU7cavSgAnKY4UyMONKyiY8dr3iGWzSO+BBYeAJc0LSVe5913LLWCZ/eg6LuBJDu nGNXA/OEIc9Ga+bTBlOgChjVVHKGgjFnhzJnB4DmzjijY6RHFYjsDHLNc9ouS3k01CXu aI7z6gCt/tknPaIo+e6252mDi00QEkMyaaiQ0zhwYQVAdyGp+Tzd3QQMQm07PQ/VizkE /z2W7NgOnVAnEZTLwcdD3YfzFTEQBp3nkRrz2zaxqN5WKKVKOUyPqwM1K4h2NTcYL0wQ xfhw== X-Gm-Message-State: AOAM5330aVazSLVGnUl6Pr+AY4XAHfarrS1DciN8+J0lcvB5pxRxyeQs ewoyVxMjK9U5BJwMZLgHdypSAQ== X-Received: by 2002:a37:a5cb:: with SMTP id o194mr13564100qke.303.1619564475032; Tue, 27 Apr 2021 16:01:15 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id t23sm3730974qkg.61.2021.04.27.16.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 16:01:14 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lbWhd-00Dl5Q-Jp; Tue, 27 Apr 2021 20:01:13 -0300 Date: Tue, 27 Apr 2021 20:01:13 -0300 From: Jason Gunthorpe To: Logan 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 , Christoph Hellwig , Dan Williams , Christian =?utf-8?B?S8O2bmln?= , 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: <20210427230113.GV2047089@ziepe.ca> References: <20210408170123.8788-1-logang@deltatee.com> <20210408170123.8788-6-logang@deltatee.com> <20210427193157.GQ2047089@ziepe.ca> <3c9ba6df-750a-3847-f1fc-8e41f533d1a2@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c9ba6df-750a-3847-f1fc-8e41f533d1a2@deltatee.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 27, 2021 at 04:55:45PM -0600, Logan Gunthorpe wrote: > > Also, I see only 8 users of this function. How about just fix them all > > to support negative returns and use this as the p2p API instead of > > adding new API? > > Well there might be 8 users of dma_map_sg_attrs() but there are a very > large number of dma_map_sg(). Seems odd to me to single out the first as > requiring these changes, but leave the latter. 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. Jason