🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21166

Re: [PATCH v3 03/24] dma-buf: Add the SGT DMA mapping type

#21166
From: Jason Gunthorpe
Date: Mon, 23 Nov 2026 16:57
40 lines
13892 bytes
On Mon, Nov 23, 2026 at 02:36:46PM +0100, Christian König wrote:
> On 11/20/26 06:55, Alistair Popple wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > 
> > The SGT (Scatter Gather Table) DMA mapping type represents the existing
> > sg_table/scatterlist based DMA mapping. For now it continues to use a
> > sg_table for map/unmap, but this will allow a future patch series to
> > convert to using a different data structure for importers without having
> > to convert all at once.
> 
> I strongly think we shouldn't have an SGT mapping type in the new DMA-buf mapping API.
> 
> Instead we should have something like either an array or an xarray
> of DMA addresses.

My plan was always to get there, but I don't think it is reasonable to
start there? There are too many places all over the place that are
just hardwired to do SGT right now.

Part of the design of this series was to allow the conversion away
from SGT to be done incrementally without breaking compatibility.

So it is effectively this:

> The framework should then either connect the SGT directly if both
> importer and export are using the "classic" interface 

And this:

> or convert
> from DMA-addr array to SGT and back if either of them are using this
> new interface.

Is something I imagined as a followup series.

As this is actually quite complicated and needs discussion exactly
what it will look like.

Jason
Technical Details
Message-ID: <20261123165716.GM179082@ziepe.ca>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369593-linux-kernel-netdev=dewy.ru
References: <20261120-dma_mapping_type_v4-v3-0-c0183a409bdf@nvidia.com> <20261120-dma_mapping_type_v4-v3-3-c0183a409bdf@nvidia.com> <ad46d60a-189d-4dd5-9ad8-ecfd3c90f9d9@amd.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369593-linux-kernel-netdev=dewy.ru
From: jgg@ziepe.ca (Jason Gunthorpe)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH v3 03/24] dma-buf: Add the SGT DMA mapping type
Date: Mon, 23 Nov 2026 12:57:16 -0400
Organization: Usenet Network
Message-ID: <20261123165716.GM179082@ziepe.ca>
References: <20261120-dma_mapping_type_v4-v3-0-c0183a409bdf@nvidia.com>
 <20261120-dma_mapping_type_v4-v3-3-c0183a409bdf@nvidia.com>
 <ad46d60a-189d-4dd5-9ad8-ecfd3c90f9d9@amd.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3932779"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Lxb84+lCREzIo68lvvAsWkuWy9A= sha256:jjDWbsqzI+BEuIXHCsANv5rxezpc7So45atFkQ5KJhM=
	sha1:2BXz3lj1CgbKYiEowUq2nHn5es4= sha256:DvOxM9CFd5bNUyjXM2GDO6l67EI9EpX6rAi9yg6xrso=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 91098125DBF; Mon, 23 Nov 2026 19:57:47 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=ziepe.ca
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id S0DfM3PhjrkU;
	Mon, 23 Nov 2026 19:57:44 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-369593-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=ziepe.ca
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id C881A125DB9; Mon, 23 Nov 2026 19:57:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 7D92826F40; Mon, 23 Nov 2026 16:57:28 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795453045;
	b=5ZEDVfiAd7O4nATSKn6qPcDipygfQUnruQOVdhPXAB/o9EGmyvJj5ZFrNfdZae0DdZ76
	 OmiD9yTWipDIBhKJ+rO23ZGv83ie9gBjTG4OSQuxBrF8bfj2LBeOy6K6GmwjyaKdstnFo
	 5sQAcdYQEWd7c3mFup0LSsGQP3+xCc4t+rUemzNIH6D2xTg9raVeKqLjywOV6waoVIR3q
	 9x8QC7uhsJ4ppEjxJAoXM9lw5Rq45+GgQ3boLH0eAtqOia9zPvWXDatBy0qO2IiJtumSP
	 MC2Pq2kSrIm43sLAQn4K0jCVp1hzt5xgAkAwpXP5NYkiDnzfymAq8kgxqwY3ikukrQg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795453045;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Disposition:Content-Transfer-Encoding:
	 In-Reply-To;
	bh=j5i4WU3qjrhh//MRl3wcVLLT33h5NdpwdC0V5dWlBjs=;
	b=z2jt8MZKfh2Kj5AyUAi3U8QEwRtBb7jJpibcOMvRHHoJWfILPcjJnf50WvH0FhxOHafR
	 dLTTwg9hIfcOVb5iKyVbdrFDz5cHPUkFMd/UbqIr1wcDDpXFq8cFDBNxwnHtw04JBPymZ
	 m2UqcNej3AJanZgaMDeLGm5bImy4E1jlO8RApSu5Y5Rralmu8IjlS+myFjGHcmcXAbPoV
	 1vdSNbUqvBD8e0/ZgTyCJPXZabfdsUSMj2SRyE/Dicgj0ZMvu8oeXgDBfHG0+iZAOH9/1
	 wIMc+X3Wij7QsU2SxClzbjuC8jLFr8UzGrcdpx0xRv20aJWVPvR9HwAkQZgUvDndNkQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=AhgqFtUx;
	dmarc=none header.from=ziepe.ca;
	spf=pass smtp.mailfrom=ziepe.ca;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 23A50606A334;
	Mon, 23 Nov 2026 16:57:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=AhgqFtUx
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.51
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795453039;
	b=XrY1nEi79uHXN/f9UvQC828uHOSazfoMpOnK4I2nKH9YpvKXeF73GBuBvgEpaNBXgvrl
	 bZ+Mas40yaS9PgJ0O1WGvqXbTxu5dwSOZ3RPvRXp0aFRGzbvBNEnoURwPtG2GFfPc63ks
	 ZaaSBrK0hOLJDoHfyq9NEb3U+udqIe3Eb7xtdDnNEK64eT1+K+2+EznfpJwtkF3rQ+BNM
	 4XaXSjX32Q833Cu1Jd0BJA+7547gxcpHP6uisylyKaqLVJ/WHVjdEYq9Y3PUdGxyp1uB/
	 NQnsX+6UD5D201zNB4XqiZZnUW4mIJ3pk/1UtTyEddrWxsc8z+xLqUWGV1RVpLb8Hlg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795453039;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:Content-Transfer-Encoding:
	 In-Reply-To;
	bh=j5i4WU3qjrhh//MRl3wcVLLT33h5NdpwdC0V5dWlBjs=;
	b=EoRfJX6EEowZ5VcHxrCAnzcic/qD12uQlcdfQimK3Y36B7J2hqMjZTkuCRvu/CI+Sa9c
	 9DblpuBprYjgQZWO4+cyS1GGtS+MOyXQmFxUf83LMGWJpRd7HJDGEeIumpIM6W/PBktnO
	 LJWieZUGQTNfYsGEyXDk+LZG8ayWrEahuyYEFilZRbdpcuVYfIedbtK/5IHDK/CgYdbNA
	 Ec0e50KGaT8tNMYk2h3f9lRyXbnCrKOL8gsClxkRfGsWdgpgOFb6AQXBsJ3c4+mAn4VUs
	 3Kjq7OEuTWrGmQ5gQCIyZ2fxxqqPsOu1E6elXr/pAkI28WEtPXX5XnoiLvOJzv6jqmA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=ziepe.ca;
	spf=pass smtp.mailfrom=ziepe.ca;
	dkim=pass header.d=ziepe.ca header.i=@ziepe.ca header.a=rsa-sha256 header.s=google header.b=AhgqFtUx;
	arc=none smtp.remote-ip=209.85.219.51
X-Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD50E606A32C
	for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 16:57:18 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BD50E606A32C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca
X-Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-9212dac247aso37819616d6.1
        for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 08:57:18 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=ziepe.ca; s=google; t=1795453038; x=1796057838; darn=vger.kernel.org;
        h=in-reply-to:content-transfer-encoding:content-disposition
         :content-type:mime-version:references:message-id:subject:cc:to:from
         :date:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=j5i4WU3qjrhh//MRl3wcVLLT33h5NdpwdC0V5dWlBjs=;
        b=AhgqFtUxAkQppOlVHwr4sQwZVIp7IUGPtjYW1ZgPhelHowbnMq5+k5GDnpyrMpQ4QH
         cxZM8Neiv/9bH/kPoiZH3Aoqwr3PKOqe03k6A9rEDhNNu8cE7bMZ7ZN6cn5HMRCbglkh
         6TGicHFpPHiQmGNvl0XwYRDUPffckFT6Cr3T/FR9P3kqO8+q9ZGHdE4Escfknhdbv2XG
         UcS4CezJjEIVbAEerPQiNY3R8W6TDU8Dv5YeHcYf3//QXv8tVGMKplyYb2NJ13wU11xy
         39d11YeHjPmMuE/v7rn/Kn6ypXu+5QEE1j5feAfp5FK3hNt3swguJ5rblF+gM/EtT00g
         E1Vw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1795453038; x=1796057838;
        h=in-reply-to:content-transfer-encoding:content-disposition
         :content-type:mime-version:references:message-id:subject:cc:to:from
         :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id
         :reply-to:content-type;
        bh=j5i4WU3qjrhh//MRl3wcVLLT33h5NdpwdC0V5dWlBjs=;
        b=OE7qVWHGroeAd69r782tQGOv8Lnuo0SggnlOqa7g/h4vI1VqLPuo64xVrmz1con7dJ
         tjZKYEXZ/lYzLJT09QW95njM6gtLEX6h32VTWUQs94zwPwbxFYgDhyK2nmkUvtE9oX/e
         H8m7WrfoFyDxUV/zJjdNf7RzmKaRY2SNQXygX0lUWK/lpXRZk1ohqve8sQ77oOkX2Q69
         VuuboFIRIABpMQZcxSHaoGBOB+/RjTrCBbG2Yj0kjSJC4Sp5ynQRVST82TaTN+wKyJhQ
         NahRnjLqxtq30NIpio/t2/3OMkb0eFfUGNq3wKXVSN+08gaLOBxBubXGbE2eI3GYxkr0
         PMTQ==
X-Forwarded-Encrypted: i=1; AL+hErGqR/HRcQvEzU+lK1PhZ5cgK+wFtuTVfuu5qsECItUYw6iiBz4zVD+V3tyqU60vDGJsDhFLtFw=@vger.kernel.org
X-Gm-Message-State: APuU4Z/VvYV+NPu6Cx3owrT98xA1CICLRdsRZmo8XgY1zfE5urDQVRcF
	e/uYdYbbCPtVlptuknDwKE9FCbFiCqKT6ZGKYAWlPHFByexZ8yLBFaRtnYlOwPAEuVc=
X-Gm-Gg: AZFdTZeUhx9xq8EBy5y8OmEy2uW9sS3d+ZYcHO8TbW9QHDjGJJt0Gs38inGRzqt0lBH
	2JifL18WTmWGatxgDGgp2IRcRYxL10uRWbQ8wU8ctoI7orKJfwowCYQmvtCVsyn9xBs5HIauNQ7
	Rep3i86CVRFAuJG01ca3gZp/r/AodhvIpx7hjZkBxuKRtAtnxg4wAOSqMZwL2KrjCCWi6b90JUJ
	tSYDAZsz9b1D5l2VVuQnxN9JS55lNHg8eBb6Geb2uCCHD4zZBjdy7t8vyRmCLMGVbpUgn9Kvo1t
	Xh0qf10kaD0uUOxSJgHxZFCsJWi8gIKd1P/QtM0gxm9e2f+/mRKijm/52jIWO4KrEWcKFWJPmz4
	wZV8cRsXmxmrP2a4y5U3vlDFu5raUGHemW222/DiAymu+d6j0/DLiyoCR1ndJaC3vtsIxKMe4UT
	zGIhrrQNnoko/l0pgWI4G/DIBv/IBz9KJJllw2LP559XUHhNW/e967zcBzLVazNATSPcqDLMH/b
	1CewqTkTQDYxbWo3gQF57RKNZy8S2027PZmTITTghuJGS7BvVDjwm+sWay04XsnzlGJNzKgBVDV
	YSFFhM0IUlWPV7XAG2UcTvwro3VdLrUOyfnlnkCJAwOSdxMtdTxH2mJ8irtlOy6NlyD5a01qq+R
	EJfJ6280BKsfI7uQd6BG07prs
X-Received: by 2002:a05:620a:270d:b0:949:8109:8bcd with SMTP id af79cd13be357-949bab6d24dmr1950593985a.77.1795453037117;
        Mon, 23 Nov 2026 08:57:17 -0800 (PST)
X-Received: from ziepe.ca (stjhnbsu6iw-159-2-142-59.dhcp-dynamic.fibreop.nb.bellaliant.net. [159.2.142.59])
        by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb031601sm844162485a.6.2026.11.23.08.57.16
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 23 Nov 2026 08:57:16 -0800 (PST)
X-Received: from jgg by wakko with local (Exim 4.97)
	(envelope-from <jgg@ziepe.ca>)
	id 1xVXLw-00000000woc-0Jy7;
	Mon, 23 Nov 2026 12:57:16 -0400
X-Cc: Alistair Popple <apopple@nvidia.com>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Thomas Hellström <thomas.hellstrom@linux.intel.com>,
	Simona Vetter <simona.vetter@ffwll.ch>,
	Matthew Brost <matthew.brost@intel.com>,
	Vivek Kasireddy <vivek.kasireddy@intel.com>,
	Dongwon Kim <dongwon.kim@intel.com>,
	Kevin Tian <kevin.tian@intel.com>,
	Xu Yilun <yilun.xu@linux.intel.com>,
	Karl Mehltretter <kmehltretter@gmail.com>,
	Baolu Lu <baolu.lu@linux.intel.com>,
	Felix Kuehling <felix.kuehling@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org,
	linux-rdma@vger.kernel.org, iommu@lists.linux.dev,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Mina Almasry <almasrymina@google.com>, netdev@vger.kernel.org,
	Alexey Kardashevskiy <aik@amd.com>, zhipingz@meta.com,
	treding@nvidia.com, jhubbard@nvidia.com, chaitanyak@nvidia.com,
	Leon Romanovsky <leon@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <ad46d60a-189d-4dd5-9ad8-ecfd3c90f9d9@amd.com>