Article View: linux.kernel.netdev
Article #7801Re: [RFC 00/11] dma-mapping: add dma_alloc_attrs_node() and dma_alloc_coherent_node()
From: Björn Töpel
Date: Tue, 27 Oct 2026 09:03
Date: Tue, 27 Oct 2026 09:03
45 lines
9352 bytes
9352 bytes
Jakub Kicinski <kuba@kernel.org> writes: > Hi! > > I want to add NUMA-awareness to a networking driver (bnxt) and > I run into the inexistence of dma_alloc_coherent_node(). > > On NUMA systems networking drivers want to allocate rings > and buffers close to the NAPI-handling core rather than > allocating all from where the device is connected. > > Looks like we have accumulated 6 drivers which do: > > set_dev_node(dma_dev, numa_node); > va = dma_alloc_coherent(...); > set_dev_node(dma_dev, old_node); > > IMHO this looks like an ugly hack. Can we add an API > with the Node ID explicitly passed in? > > > In the unlikely case anyone feels the urgent need to merge > this please pull (so that we can also pull this into net-next): > > git://git.kernel.org/pub/scm/linux/kernel/git/kuba/linux.git tags/dma_alloc_coherent_node > > Jakub Kicinski (11): > dma-contiguous: pass the NUMA node to dma_alloc_contiguous() > dma-direct: pass the NUMA node to dma_direct_alloc() > iommu/dma: pass the NUMA node to iommu_dma_alloc() > dma-mapping: add dma_alloc_attrs_node() and dma_alloc_coherent_node() > eth: libwx: restore the device's NUMA node after ring allocation > eth: libwx: use dma_alloc_coherent_node() > eth: ixgbe: use dma_alloc_coherent_node() > eth: xgbe: use dma_alloc_coherent_node() > eth: fungible: use dma_alloc_coherent_node() > eth: mlx5: use dma_alloc_coherent_node() > eth: mlx4: use dma_alloc_coherent_node() Nice clean up on the driver side! I have some questions/nits for some patches. Regardless, for the series: Reviewed-by: Björn Töpel <bjorn@kernel.org>
Technical Details
Message-ID:
<87ld7j5xdh.fsf@all.your.base.are.belong.to.us>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352300-linux-kernel-netdev=dewy.ruReferences:
<20261027022528.633359-1-kuba@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352300-linux-kernel-netdev=dewy.ru From: bjorn@kernel.org (Björn Töpel) Newsgroups: linux.kernel.netdev Subject: Re: [RFC 00/11] dma-mapping: add dma_alloc_attrs_node() and dma_alloc_coherent_node() Date: Tue, 27 Oct 2026 10:03:06 +0100 Organization: Usenet Network Message-ID: <87ld7j5xdh.fsf@all.your.base.are.belong.to.us> References: <20261027022528.633359-1-kuba@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1498265"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:tJcJEDWE0VX9KIFETpUOkK0mO7E= sha256:ltJ1asqkn+3RLhyisC9rLUg6HmCeR6wCGSQgfYONb00= sha1:D7deW+MZvSGzKcS/rsrX+CCUsds= sha256:AWyw2luriBTjAFfGsKTC2k6F1ikwoaLAnP7upU6UYS4= 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 132CF125BE0; Tue, 27 Oct 2026 12:03:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.739 X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 yFqexvFk-7U1; Tue, 27 Oct 2026 12:03:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-352300-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 3FF6C125BDE; Tue, 27 Oct 2026 12:03:24 +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 07898241E0; Tue, 27 Oct 2026 09:03:19 +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=1793091796; b=hvmHsshyHscCBcu6n5F4bJXCLjSMyiwxfbyEy93pXQzncs5SdoNbNpPPLRYFkYwtVw52 W+kD7w3nwYO86ZhKq/sQlGIEhVdv7XapsmjxPP/2n/Fp/VoNt6R8bx2HkXCOCyDmSFTam 2TSdjb5uWTmF9lmv8EWiRSFo0UaGkdoQMRuKPzYaS8hQpaDR7htqI4BpjKdS4JgiH0ZJo Zr/uPPdR8wo/9bIiMHNZM1r3zBTPNAAUCMTZvab9oDqA2QovmWoXN8UXc0KY2BzlKXjM6 PB/xkPljbsKrx/QvfFV+WFQMdi8NM+3vJpYYC/3jit8wXAu8nie95EBcNCr0VnMVAUg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793091796; h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject: In-Reply-To:References:Date:Message-ID:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=iqtlHRoEM0vvXdiN1pSChQEoJkPogWICgssyXwrbAuY=; b=dNxGHODl2/+K5Ct7I7gmbu9TpNUpoAquATbj5rZmorHtfqh5KioF+UEqNp2OQI+NCvqO cg89XNDSk3E+lqNZR4s49zxtwlpjoSsjTLR3/DoQ9le3pZJepC83qVOlHMODVvUrsj3W1 hc3gp99IuxHyMTP+pGt44g60CMP7TQaS95/EzBN/CvTT2IXrUSyVwlwYwnkyNeBmKzClR Rdh9dqkfZyiYIdyeUNowyyvFxH9b0MK3DUyLffvIl7K8LFsRcsHHfSV9V43vDS4T70E/O 6KDrzAn86o606LMjGsLb6uXZn/9Xyp84BZAbvVuzOR9m5YpTbAvIlz3DFG22gHiwukA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Kmxod7cL; 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 7E121606A323; Tue, 27 Oct 2026 09:03:16 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Kmxod7cL X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793091790; b=0Qa3kfnVO74EB0VbYQo6f+zAfUsjOc6qUUAVSE3aPLFahj+XGja7+Nhqr0+0oSrIqrgE aJaVqtucITxR/Ggfa3aA2lglpOgnbXW1Ca2BK8H4BRndG72/Hm08pNYMGz0WHVs+tNRSz GuvFJiQWmuMvRcRImOrlx7m/oKxucNMZviYN1rvGV0S0pidkvrr4v0sOiRPjp9ErHktsI t2Vd9TlEt8AE9hEqqB9SnXxXb0kLxjOZqTLydsF9gUdDMKCHTVHDH9QTfyQoAsRw58vWg t/AJuAqRT7cy+ndIqaFaW9C8KlOhdJtbsAtowMHaGlMnPliVf4hvaHXMomPRcPGSoPw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793091790; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=iqtlHRoEM0vvXdiN1pSChQEoJkPogWICgssyXwrbAuY=; b=0Vt4tZoDg9QlunNQa8hIbV7SuY9hW6B7Ou6amMPcu1NyR7oB5w5VFQsu8quZfkxSZLmr /+lbhA3o3Kcn79g2Ahd8HVW1h82UVYouHpPCVdXa1CQM782O3mVWc1KaQrYfdOC3/NyDx 8YcJ4uOzQUnGCVFbIE13WpcZlJF3P3vuX7FnfuR0hViFk70/+TRr+dvsEYKs9VlEen7K7 FuBMMnvJUxZkyvdn8jwWoXusJfacph+nqf1Qs8l5UpQkis/Ou74ZfSMT6HYL9ySyeuTru acFZOFwlcDoS5Ph9dM4coLJlYh9CMrXQR51LYCW44vrLLRTOmkE4Q4agg1HZffCV0tQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Kmxod7cL; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54365606A31B; Tue, 27 Oct 2026 09:03:10 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5104E1F01825; Tue, 27 Oct 2026 09:03:09 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793091789; bh=iqtlHRoEM0vvXdiN1pSChQEoJkPogWICgssyXwrbAuY=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Kmxod7cL73elr6Mi/EzJm1COPARU19GsRzhJvGFXU2mKmaB29AJi21VM7hnSBk3eX +94VXqgU6n3Z0GO3PqdafD+Q1IVq4LlT6TABQaORBYaDBmGwT+dxCD3KQftUw2z0+v u8eOJsEipZNPnIJg5dJX0dh12gKT80223EUJi3UVOGEqUGZMEw+xpFx7CgKO2bj1DY jU9GYAk7TindClTNltb3YSovFcHNZkivaW2fYQX/Hj8AO0nrKwta8gncCK3HiQGxIi FNwCkgOpT161jXTQNSdKsNp5TiZxp+H0jvSsp3pyzXVFx+Mv2YjrB5xSry5wJzjYRm +hPAYTK+gF7Jw== X-Cc: tglx@kernel.org, dave.hansen@linux.intel.com, x86@kernel.org, joro@8bytes.org, will@kernel.org, leon@kernel.org, mbloch@nvidia.com, iommu@lists.linux.dev, netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org> X-In-Reply-To: <20261027022528.633359-1-kuba@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