Article View: linux.kernel.netdev
Article #15849Re: [PATCH net-next v4 0/5] net: devmem: size TX net_iovs from the dmabuf layout
From: Stanislav Fomichev
Date: Fri, 13 Nov 2026 17:02
Date: Fri, 13 Nov 2026 17:02
78 lines
15809 bytes
15809 bytes
On 11/12, Mina Almasry wrote: > On Thu, Nov 12, 2026 at 4:42 PM Stanislav Fomichev <sdf.kernel@gmail.com> wrote: > > > > On 11/12, Stanislav Fomichev wrote: > > > On 11/12, Paolo Abeni wrote: > > > > Hi, > > > > > > > > A few (late) questions/comments to check I'm not missing relevant > > > > points, > > > > > > > > On 11/11/26 23:47, Stanislav Fomichev wrote: > > > > > TX bindings use PAGE_SIZE net_iovs, so a frag covers at most a page. > > > > > A 64KB skb needs 16 frags, and MAX_SKB_FRAGS caps devmem skbs at about > > > > > 68KB, which makes BIG TCP ineffective for devmem TX. > > > > > > > > ... with default .config. You could set MAX_SKB_FRAGS to 45 and reach > > > > ~180K... > > > > > This series picks the TX net_iov size from the dmabuf sg table instead: > > > > > the largest power of 2, up to 2MB, which aligns every DMA segment. With > > > > > a 2MB hugepage-backed udmabuf a BIG TCP skb takes a few frags. There's > > > > > no UAPI change since TX addresses are dmabuf offsets. > > > > > > > > ... still this option should be more effective because the limit would be > > > > higher and the skb would use less cachelines for the shared_info, > > > > > > > > I'm wondering if making a comparison vs MAX_SKB_FRAGS==45 would be > > > > complex and if you could do that, too. > > > > > > Originally I did not want to include bigtcp to keep it apples to apples: > > > same tso size, just 16 frags in skb vs 1 (in ideal case). > > > > > > I just tried running mlx5 with 45 frags configured and it fails to start with > > > the following error: > > > mlx5e_attach_netdev() warns "MLX5E: Max SQ WQEBBs firmware capability: 16, needed 23" and returns -EIO. > > > > > > (fwiw quick review with llm claims that mlx5 only supports up to 20 skb frags) > > > > > > What I also tried just now is `gso_max_size 524280` (on top of this series) > > > and it ups single flow throughput from 200Gbps to 240Gbps (presumably > > > by making the receiver go faster with 512K TSOs vs 64K TSOs) and halves > > > the sender softirq.. > > > > > > I hope this gives you more data, not sure running with 20 frags is worth > > > it (vs 16)? LMK if you disagree or want me to run something else. > > > > Fun fact, also setting gro_max_size on the receiver gets line rate over > > single flow: > > > > I client.c: Connected 1:cpu 39 | 1:cpu 118 > > client: == Source 2401:db00:255a:4a:bace::b > > client: Tx389.448 Gbps (2921248849920 bytes in 60008026 usec) > > client: Rx 0.000 Gbps (0 bytes in 60008026 usec) > > client: TCP retrans reord rtt rttvar d_ce snd_wnd cwnd > > client: 2 125 86 2 0 15300608 10142 > > client: net CPU 39: usr: 0.03% sys: 0.06% idle:67.39% iow: 0.00% irq: 5.69% sirq:26.81% > > client: app CPU 40: usr: 0.05% sys: 2.91% idle:95.67% iow: 0.00% irq: 0.21% sirq: 1.14% > > client: == Target 2401:db00:255a:44:bace::b > > client: Tx 0.000 Gbps (0 bytes in 60009306 usec) > > client: Rx389.438 Gbps (2921238435008 bytes in 60009306 usec) > > client: TCP retrans reord rtt rttvar d_ce snd_wnd cwnd > > client: 0 0 210 122 0 999424 10 > > client: net CPU118: usr: 0.00% sys: 0.00% idle: 1.60% iow: 0.00% irq: 0.33% sirq:98.05% > > client: app CPU119: usr: 2.75% sys:77.46% idle:18.95% iow: 0.00% irq: 0.47% sirq: 0.34% > > > > 4200MTU, 32K rx-buf-len, this patch series, gso/gro_mas_size of 524280, > > still the default number of frags (enough on rx to fill 512K GRO with 32K > > chunks). > > With 'devmem' over udmabuf? Is this possible without devmem on your > setup? How much is devmem helping I wonder. Yes, devmem+udmabuf. I think what's helping here the most is 32K rx frags and bigtcp, this makes it possible to pack 512K TSOs into a single skb on rx (which is the bottleneck). At least on mlx5 don't think there is a way currently to configure that outside of iou/devmem memory providers? FWIW, devmem socket api with the cmsgs is not supper efficient, but bigger chunks do help here as well.
Technical Details
Message-ID:
<avc_ptmBkAahiBHJ@devvm16445.scu0.facebook.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!npeer.as286.net!npeer-ng0.as286.net!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362780-linux-kernel-netdev=dewy.ruReferences:
<20261111224740.2744522-1-sdf@fomichev.me> <1b764043-2efd-4e65-adb9-a47c0136446b@redhat.com> <avZC2hp_0ODMQ4SG@devvm16445.scu0.facebook.com> <avZZ-6GGciPC0Lti@devvm16445.scu0.facebook.com> <CAHS8izOp2BpO7WnrNZRUryGQg=L3xreF8nSFp5S2_sO8HGhqpg@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer05.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!npeer.as286.net!npeer-ng0.as286.net!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362780-linux-kernel-netdev=dewy.ru
From: sdf.kernel@gmail.com (Stanislav Fomichev)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v4 0/5] net: devmem: size TX net_iovs from the
dmabuf layout
Date: Fri, 13 Nov 2026 09:02:46 -0800
Organization: Usenet Network
Message-ID: <avc_ptmBkAahiBHJ@devvm16445.scu0.facebook.com>
References: <20261111224740.2744522-1-sdf@fomichev.me>
<1b764043-2efd-4e65-adb9-a47c0136446b@redhat.com>
<avZC2hp_0ODMQ4SG@devvm16445.scu0.facebook.com>
<avZZ-6GGciPC0Lti@devvm16445.scu0.facebook.com>
<CAHS8izOp2BpO7WnrNZRUryGQg=L3xreF8nSFp5S2_sO8HGhqpg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1393858"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:c7EYTsWe7Lm9SHaWQ24+JJFAUDQ= sha256:o8C0xznkLjGGkfIj9+lfZWeJHo3O/tfzdkoNGReIFiw=
sha1:ULq9+Se4RRWOLgRKXtalfBysels= sha256:+t7CwYVCP17Kp5UC9bXxCdicW1mP6Ua8aFsAZVL2Qxs=
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 C6A7A1145C4; Fri, 13 Nov 2026 20:19:17 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.149
X-Spam-Status: No, score=-3.149 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
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=gmail.com
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 pi8RZ7pErp44;
Fri, 13 Nov 2026 20:19:14 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362780-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 8FF631145BE; Fri, 13 Nov 2026 20:19:06 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id 94C4E62580D; Fri, 13 Nov 2026 17:04:32 +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=1794589377;
b=XbNiH88mMdA23H+ghwF2zfvFqhodVamfi0I2991Y+uizrfIk1mQ3ch1Qho4+aLBMChmN
ktxsyXSiuCbQf9E2yQNd6h3LQUKr5MioON1imscrCP12x7qsnTmeDH6ig+RIv4YZINmJJ
bI4XzFprvCS9TCEgczbFnjSOWeax24Miyln29F03kAto7tjbxOi8zEOQ3rtvUGRaCTPK4
WOBx4kPIPndIxOvGmQYz7S/xxvL7BvbehAdiqfDzW9QLLNb/ucdSp2iy6dbTp6jJ8RjVr
ELrn+OA+2Ml3VSnBcYVRA8Ks9vkLl9uR16D42AB27c4OQrfyf8xGQ65erbiDsHcb2UA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794589377;
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: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=ym2hLsozA7ZSQayntiTQLoO7fGKekGn6gbjoRP5CLXE=;
b=Oapf9sn859+qSh1WYVNuKzPOu/XT2YIgn9R/uuXlJk1r0s6enHYcQHI0JtjqcugKe0fV
kRrxhV06A0ev+X7aqnvih73V5vlh3dl9oSe1sDOfSYRD5y1vGh1HDOX6D60qEajU8mJJR
MNybFkoltJ6+r3xRnTBd4U/qltkEVPUguTp4k16x3KnPUZxg5+88ohAh7ONtq2OPcMo92
f0R1W1HJYcpzRXHPMbAYFSmddpX+PAuyM7QnN6+DBDzGbcC+J/TwxGXRmERubvqxT3n+F
4PLKNBc+ox+LebvHzZywqHPkSxsYEhEqbDonrjBNWv/joDPT+7hLFMVnDV/oFTGS7vQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="wmFo/9UB";
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
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 58C22606B552;
Fri, 13 Nov 2026 17:02:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=wmFo/9UB
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.229.5
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794589372;
b=FZeZFwewf6d9sfZpRSr9+pxS1QDCfc+hCynNnSpLg5L85/NhBDukfnLoLn/UXgYxBOTo
Pj6cNXrn8URDXfr/69PlfmFV2oPM+Hbs39+skKtWfa/On0gtcLOh+K9bwC1DngBacm1EH
e2M1tpnmTBNOT/12dT3fPJ8SxyWHysHvZ3sLoNvEAW3ymUdDsPuNLp08YAnOmqqKqYm1S
KLyCZo+4BrD6Y42tqcep2E2Swi1Mc0LoEjZqOWcJsj76FYfKxGoCKS+RTnd9aG8CNtsEg
xh1IuVuEhe0GksUTK3BgPeK/e08KP1W6OnmgXHOG8sOaREeZ5vvs47eALbVNiTIIOoQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794589372;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:Content-Transfer-Encoding:
In-Reply-To;
bh=ym2hLsozA7ZSQayntiTQLoO7fGKekGn6gbjoRP5CLXE=;
b=buXO9iCK8gxPqHHkiHdFbRTF3KVNE9R2xk352zAkM/L4Y1BnBikDJE0BwLcszebMD1LO
W5tHDSCSXmYQoXP6JdO3BNXMNN7HxBcivlM/djfyrsgMh7qbInvBTnzXCHkyzurzLRsoQ
w1t1+sqP9zCZhva6rOLiT3HOQb2mccU7efVPK8SVCDIT4et27kocI8TxEj3h8xjRW4vY/
VECbrnokNPX9k4IOIQLweF/Dl7EAirAbeK2umOenl1y2rC8By13QLpZhhZa6kCSjJm7OC
D6pR9eG5xKlNaOxeOBSxseNqqPRk7qFqiOhz+5UPDhPkgSwKJN/3lHlpwtA3jAHGZCg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="wmFo/9UB";
arc=none smtp.remote-ip=74.125.229.5
X-Received: from mail-dy2-f5.google.com (mail-dy2-f5.google.com [74.125.229.5])
(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 29926606A885
for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 17:02:52 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 29926606A885
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy2-f5.google.com with SMTP id 5a478bee46e88-36caa19b0ffso538618eec.0
for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 09:02:52 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1794589371; x=1795194171; 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=ym2hLsozA7ZSQayntiTQLoO7fGKekGn6gbjoRP5CLXE=;
b=wmFo/9UBoL9/fi9B+miMvv37P7UpU2FoOc+M6Eekvn8LgLVHVIIPyoE5Jn2T9FcHcc
FOcrA4RRVYam2oSrfBtAKa/ncJHHKnjnnwru8PDAbroLSpYXXH41gpGmApzKschZ2p+r
anuv8pU9QtFRC0YPk2UmYZbQGYaxn7Z0FQURyRtEDXGd+4jEEXHxLzoJw7jcI272PcUj
J/3soGoSb9FGOc1/0EMijJx9SutbYCPnmXscokmh4r4YRcOzLG6za6668LE/hsZ1Q8JD
5z08tyNHX0GIpsRx19UL2/U9d3naDzDSMn1ys00fnNvQv1fzgCJMZgyFFh9jgJsTIxzK
IHnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794589371; x=1795194171;
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=ym2hLsozA7ZSQayntiTQLoO7fGKekGn6gbjoRP5CLXE=;
b=MugU56DWKeugTqWtYRpKyEGURXJOnv3i+eW6rKUKjQpYUHEwHpO1mxN/htY6aZ7BuT
yx5L9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EayODtw7rrOsHIVyJSldREc2s5i1OY85Ij16cpqhRCua/R4mp
YNSDqiktFYDATk2nn3PuP/Y=
X-Received: by 2002:a05:701b:280a:b0:185:b157:f271 with SMTP id a92af1059eb24-1b50310fafamr2760874c88.23.1794589370935;
Fri, 13 Nov 2026 09:02:50 -0800 (PST)
X-Received: from localhost ([2a03:2880:9ff:69::])
by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b50316e195sm9999831c88.8.2026.11.13.09.02.50
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 13 Nov 2026 09:02:50 -0800 (PST)
X-Cc: Octavian Purdila <tavip@google.com>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
michael.chan@broadcom.com, pavan.chebbi@broadcom.com, andrew+netdev@lunn.ch,
edumazet@kernel.org, horms@kernel.org, shuah@kernel.org, sdf@fomichev.me,
leitao@debian.org, dtatulea@nvidia.com, asml.silence@gmail.com,
bobbyeshleman@meta.com, daniel@iogearbox.net, razor@blackwall.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.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: <CAHS8izOp2BpO7WnrNZRUryGQg=L3xreF8nSFp5S2_sO8HGhqpg@mail.gmail.com>
X-Received-Bytes: 15510