Article View: linux.kernel.netdev
Article #15016Re: [PATCH net-next V2 07/13] net/mlx5e: SHAMPO, Use page_pool DMA sync helper for SKB frags
From: netdev-bot+sashiko
Date: Thu, 12 Nov 2026 09:40
Date: Thu, 12 Nov 2026 09:40
91 lines
11600 bytes
11600 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message describes this patch as preparation for data
direct only.
--
net/mlx5e: SHAMPO, Use page_pool DMA sync helper for SKB frags
This patch changes mlx5e_add_skb_frag() to call
page_pool_dma_sync_netmem_for_cpu() instead of calling
dma_sync_single_for_cpu() on rq->pdev directly. The stated reason is the
upcoming data direct support, where SHAMPO payload netmem is mapped
against the data direct device rather than rq->pdev.
> Switch to the page_pool DMA API which takes care of not calling
> dma_sync_* for unreadable netmem. Do it only for the place where it
> makes sense: SHAMPO payloads, the only RX buffers that can be
> unreadable.
>
> Until now it was ok to call the dma_sync_* API directly. But with the
> introduction of data direct it will no longer be correct: the payload
> netmem of a data direct RQ is mapped against the data direct device,
> not rq->pdev.
[Severity: Low]
Is "Until now it was ok to call the dma_sync_* API directly" accurate?
Since commit db3010bb5a01 ("net/mlx5e: Add support for UNREADABLE netmem
page pools"), mlx5e_alloc_rq() allows unreadable netmem for SHAMPO RQs:
drivers/net/ethernet/mellanox/mlx5/core/en_main.c:mlx5e_alloc_rq() {
...
/* Shampo header data split allow for unreadable netmem */
if (test_bit(MLX5E_RQ_STATE_SHAMPO, &rq->state))
pp_params.flags |= PP_FLAG_ALLOW_UNREADABLE_NETMEM;
...
}
This means these RQs can be backed by the dma-buf devmem memory provider,
which does this:
net/core/devmem.c:mp_dmabuf_devmem_init() {
...
/* dma-buf dma addresses do not need and should not be used with
* dma_sync_for_cpu/device. Force disable dma_sync.
*/
pool->dma_sync = false;
pool->dma_sync_for_cpu = false;
...
}
That rule was added by commit 7dba339faae9 ("page_pool: disable sync for
cpu for dmabuf memory provider"), before mlx5 supported unreadable
netmem. Its commit message asks drivers to switch to this helper when
they add netmem support.
Before this patch, mlx5e_add_skb_frag() always called
dma_sync_single_for_cpu(rq->pdev, addr + frag_offset, ...) on these
dma-buf addresses.
At this commit, pp_params.dev is rq->pdev and pp_params.dma_dir is
rq->buff.map_dir. For regular page pools the new helper therefore does
the same thing as the old code. The only functional change is that the
sync is now skipped for dma-buf devmem pools, and that fixes the
existing behaviour.
Should the commit message say that this also fixes the devmem case? It
could also carry a Fixes: db3010bb5a01 tag, so backporters don't treat it
as prep work for data direct only.
A smaller point: page_pool_dma_sync_netmem_for_cpu() does not check for
unreadable netmem in general. It checks a per-pool flag:
if (!pool->dma_sync_for_cpu)
return;
Only the dma-buf provider clears that flag. io_uring zcrx pools are also
unreadable, but they leave it set and are still synced through
pool->p.dev.
Could the wording "takes care of not calling dma_sync_* for unreadable
netmem" be made more precise?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110183826.2927274-1-tariqt%40nvidia.com
Technical Details
Message-ID:
<179447640791.2199510.16646668257000691425@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361661-linux-kernel-netdev=dewy.ruReferences:
<20261110183826.2927274-8-tariqt@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361661-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next V2 07/13] net/mlx5e: SHAMPO, Use page_pool DMA sync helper for SKB frags Date: Thu, 12 Nov 2026 09:40:07 +0000 Organization: Usenet Network Message-ID: <179447640791.2199510.16646668257000691425@kernel.org> References: <20261110183826.2927274-8-tariqt@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1054382"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:v4T649oAclDm7iPoMuk5O5zmkbk= sha256:cofTB+hrxyK0L42PbBhHF7lccbMswn7vP4psPC8m48E= sha1:u8g01/sdW6JZpgEw5V9oL9vXcVk= sha256:KY7/kD6yAD9dD7R4m77JlEC5ljG6ZX7AhdJyZOSPhJA= 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 8AC9F11419C; Thu, 12 Nov 2026 12:55:26 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, 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 2qvCb4xX1OTl; Thu, 12 Nov 2026 12:55:23 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-361661-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id ACC77114196; Thu, 12 Nov 2026 12:55:14 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 3A767104202; Thu, 12 Nov 2026 09:41:45 +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=1794476421; b=a0w5YoxrwB9WS62Vsze2N5kokjuHZzhU3e8aYWBoHIlos0iiURPEFvV+5iv6L7o2GNIO MaHqFaX0sYntUol7W2CD2FaceBdVlrN1iOjUxTMjQr1mOBjKAbly+Byg+1l2adUHdwXpS ZaU0KNYDCECuffIBDnlb5XWy+/8kztVZRqLr0zXEuSH61PDflYT9TbZrwt4cRr+ZIjQrq /CbwE/Si/U0zPAh3ZNBeTuRqThoKkUUf1zX7rfxoDBD+a1h/pFnKwtr/GCj5Ti1CHViMw 963EuTcpIKS0w/4czX0P+NBhY71bET/E7IbNGFUFDo2enscsHWS07dJDsPAJOobcEtg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794476421; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=AdcPgdUCX5fSaySPrdWMpwkUGc9cjfG0AEC73tSRupw=; b=G4e3wAcvJipi2w4uHOEnan3Bq3IIZo5KpaPVEqQh0oNUIByIO3SYB46o9ekT3SHGtkx0 HiGy26oXHw6LVYd700A9W+vu4aytQWsn3IrReLsRosxcM/tqMjKCYVpv3jO6v75zCWgvb /lCAFxUKBSqRPeckRjlnlylbAH8Oq67H/JLyURH2DYMyj6GfVwVSLU6t5J0eCKdmiDzDB RG1f1RdgarFlITV9Wjbnu9OBbgRR4iHAYZFK6BdWcXx6AW1qwg6Wp6o0cdDPeCQQWg2El q8yHqHl7aNwkH8zZT4xVTX6AkHVja9Aj3exSBJKXr09v9i9XLBCs6efMGHEBl44aZmA== 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=ZvUn6CH3; 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 1939E60A5BE3; Thu, 12 Nov 2026 09:40:21 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ZvUn6CH3 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=1794476410; b=xwAUD3lEN0von1NbTO5OsNoY2NEFJ8KhBlzxzOpxaQ+LyFpqYG8qwPpO33OcRCjHVe6j zYT7C+nWJAiOkLuPx9EMd2upqISk0njhVcdkMaV2fNPvREFYcPW3iHhp06MawSxE/QDSh OgG07oOuebDGudvbFTNZaqwjzTQuGbNyAljwZSVCzsL2bIxqAdMGZJ1sKXZAgcCf7mczK V8I1mc4HlERKUC2h0nkGzd0H+cK8TzONWUIunpE4TqqOVr5k5pPVofyfGyXEeshVseZFh CNyfIzVPAvVu2QyQD53Ewkqt3KFvPc8cdHi2KfCovPYaA51vVaN9kibCY5ED/re9EBA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794476410; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=AdcPgdUCX5fSaySPrdWMpwkUGc9cjfG0AEC73tSRupw=; b=FhKviu2tzQCvyhL8GB7iMN8aMRuXAbf03PwUZNAYBYcA17kDnOc5XL+HJLrIZ1KWUlTk OfqOGQ02FdAxJqPif6vF01YxIJngWhyHrVCM9sF914BwnKR5fdrzlUSd4F4/C/pipKVsl 9tQRuXSrRCMF+kdmvpcxVSwUqxtTrIU/pRnroHXm0oHHPO6Jc5L0rkEOJJkj7uOmwt25S 9N2iGPrq89R4yfJ3aTI3Pd2zoPeMZ4O6NeB7kQdoHT9nH+nr8geM/TVbMBdgKv8je+1Ny jG7cbAJJ9r7DOGzncD9tKt2TpvHi/bf2ZR7F2bp/4Vhlk3mKgDCTMb/Qr1jEqqNXr4g== 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=ZvUn6CH3; 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 384DF60A2629; Thu, 12 Nov 2026 09:40:10 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 603BD1F00AD8; Thu, 12 Nov 2026 09:40:08 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794476410; bh=AdcPgdUCX5fSaySPrdWMpwkUGc9cjfG0AEC73tSRupw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ZvUn6CH3DHzkDjxn5lm7LrDVoxik/Pv+ut0lWEqGG8f0rcYFYeMuX19NGsu6TIyR4 GHEeRG2nwdBIButTc5JRZD1aaJwmbaQGpDJ9ZrFcSgdKOtB7CM8JzKwZ75zpjgZIhM f115JXOnqIvx4YCSmaqW0pV01osU4PnDCxmeBeN1QtxGYklzzKzTCMowMqG0XmalFB 5yKLLjxorN7cARrf4nI6WQ+1fXaAdUOUTaSQbLnY8KIfLTTkq7vDInIgT/n7K1QhXP LSxmc9O50XWYObXLGNtOQaiT622nMi1m+FyLB6Qh3rBAJHoNbwl1Nl9t130aRXFgF+ Oj3Wu/3v7/5aQ== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, bobbyeshleman@meta.com, cjubran@nvidia.com, cratiu@nvidia.com, daniel@iogearbox.net, dw@davidwei.uk, dtatulea@nvidia.com, erfansh@meta.com, gal@nvidia.com, Jacob.e.keller@intel.com, kaifengw@google.com, leon@kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, mbloch@nvidia.com, mfleming@cloudflare.com, almasrymina@google.com, razor@blackwall.org, saeedm@nvidia.com, horms@kernel.org, sdf@fomichev.me, sdf.kernel@gmail.com, witu@nvidia.com X-In-Reply-To: <20261110183826.2927274-8-tariqt@nvidia.com> X-sashiko-severity: Low 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