Article View: linux.kernel.netdev
Article #15710Re: [PATCH net-next v4 4/5] net: devmem: size TX net_iovs from the dmabuf sg table
From: Breno Leitao
Date: Fri, 13 Nov 2026 12:10
Date: Fri, 13 Nov 2026 12:10
25 lines
9975 bytes
9975 bytes
On Wed, Nov 11, 2026 at 02:47:39PM -0800, Stanislav Fomichev wrote: > PAGE_SIZE TX net_iovs cap devmem skbs at MAX_SKB_FRAGS pages (~68KB), > which makes BIG TCP ineffective. > > TX net_iovs only need to be DMA contiguous. Use the largest power of 2, > from PAGE_SIZE up to 2MB, which aligns every DMA segment of the dmabuf: > - 2MB hugepage-backed udmabufs get 2MB net_iovs > - no UAPI change, TX addresses are dmabuf offsets > - skbs keep their size, only the frags get larger > > The net_iov size doesn't depend on the device. A frag is never larger > than its skb, and the skb is never larger than the device's > gso_max_size. TCP sizes skbs to fit, and validate_xmit_skb() segments > bigger ones. gso_max_size is 64KB unless BIG TCP is enabled. With BIG > TCP, page frags can already be 64KB or larger, for example with > MSG_ZEROCOPY from huge pages or with 64KB pages. So drivers that > enable BIG TCP already have to handle them. bnxt doesn't handle them > yet. It has a 16-bit BD length and needs a separate fix. > > Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> > Reviewed-by: Mina Almasry <almasrymina@google.com> > Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Breno Leitao <leitao@debian.org>
Technical Details
Message-ID:
<avb-Ht-gnlZGphU7@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362612-linux-kernel-netdev=dewy.ruReferences:
<20261111224740.2744522-1-sdf@fomichev.me> <20261111224740.2744522-5-sdf@fomichev.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362612-linux-kernel-netdev=dewy.ru From: leitao@debian.org (Breno Leitao) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 4/5] net: devmem: size TX net_iovs from the dmabuf sg table Date: Fri, 13 Nov 2026 04:10:17 -0800 Organization: Usenet Network Message-ID: <avb-Ht-gnlZGphU7@gmail.com> References: <20261111224740.2744522-1-sdf@fomichev.me> <20261111224740.2744522-5-sdf@fomichev.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1335094"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:E36r2jH14cDlQaMFKP98bwtwUrs= sha256:I85p+IrfgsqBzsZUTwpspDTVO6xqwE42sNHjxuk7vR8= sha1:yCKSd9KxwjjINbtk9lCmO6Efd6Q= sha256:g5bNhjtXN6IYGvO9WHCPzRfVqtuWJjlADSPqDOO3MTc= 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 9E1E811451E; Fri, 13 Nov 2026 15:19:09 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.152 X-Spam-Status: No, score=-3.152 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, 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=debian.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 SEui8_bEcB_c; Fri, 13 Nov 2026 15:19:06 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362612-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=debian.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 749FF11451D; Fri, 13 Nov 2026 15:18:58 +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 CD337744F0A; Fri, 13 Nov 2026 12:10: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=1794571827; b=nUFmfxw3E9EzYNG2G/y/sbcygRRY/NlJIxFvF4nGAiJ6LAzZuKIyjUkt1/Wx0fKIERCM y2+3P3JCiGsQTiPilTt2GyUdcSboBZUxtvOFQ0qwZL7KtnaqwFYAwyIllpi9nxPYM1O7w UnGGmghz7iStu7BSLA7GtWubI4ncEp86vhSHNNX+0hIlZtby5cdLV78EE+8YjLHQfCKvu aGkkETPAeD3g/6qMc0lJcEJ/0xruEAtPIxTgTAW/tPTygpmg4FQuNenBojffJG9j1e5m3 eF46UW2Z0P+OTsXleU+8UsC92EmK/kV8+98q446aUGeNKs/pE0kiJarg8pUcihtlGfg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794571827; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature: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:In-Reply-To: X-Debian-User; bh=04zbQXN/fHm4yeapTB6+tJQ1+SULWzSbJ0NuXZMwrbc=; b=cBstHcXwo8VAj4H34kdgLMkOP8+xRUO2FsBnLX8mri9wQsntARee0rjh2pre9fjKtmPD 0uVQ7BHkCh6znXXalcKON0NTNHx+GfrDUWXPtaKuF9GewvtIbdjdgVO9TXMb3yzbSI3Xi pTg9FWxQC/XVU7n9wurlsQ+w2ghD5aYljJGjTGampUTMPP2OrVSDs/93OazJK/CR09+D8 veGaAwadEndSZSmjHB6sq6JmBW4lyLS5ML9tbKlpYFXomjjt3fRoMk5ClnbnT56VJWYib BitNnlH2cBM68mYcSFeo1lZCukhcoJKmrwLP0cErt8PtBiXxYxYh9Z0UTSAzbR5CFBg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b="c2oce/rP"; dmarc=pass header.from=debian.org; spf=pass smtp.mailfrom=debian.org; 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 9F4E2606A332; Fri, 13 Nov 2026 12:10:27 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b=c2oce/rP X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=82.195.75.108 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794571826; b=EZgiPSDqXUzK7CbOiX+sduMkIfxoAQARJG6hH5cBBaef5csT5OjPwoSx9W5BNlaAzRWG z95qhio17YRlWDAXlbfHli/eF9EWawNl7CMQ3C+tyqzS7Vvg4s3yhUE7yeLKGocNkBAcu ZDxJ9buEP2z0q81HYkvq/ndziOMLJQN2GKdX/0so+I4b/+5NocGVVE1FfIdH4KWCJVpPZ X0e+yNGOTBFTlRgc9XAPOJZ+G0wAtKOWq+pZmIB3JNthJjfq43IWfCGEfGG2LDV53mcVl zT/C7opPHOptEijwCdddJBnJWf5LUjSR1FuVMzLe6uDLRAcMa2dpjQvgLWSN+39L3HQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794571826; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:X-Debian-User; bh=04zbQXN/fHm4yeapTB6+tJQ1+SULWzSbJ0NuXZMwrbc=; b=lSqdk9w7bN5O6y9tH/cP4zR0F1Wy7f0EP3Zho7+AgBTQqMnpYTuwaAdDw/rS4HB+DAQE kKCqdnVmYFpJw4eqkQbl54AN+z6gCbw5vUFHCDXNVCcYt0XDhBcSjFZDPIIji8uB48XCJ rktizut2iBGS7y7XWEV8LNFMgKewbPsuFo5KU7248oGs9zyisggbVHgG+BBiBka/bsED9 MCBoIVxnFerMg4Fpg9OmijdH0IQOvACtj0Z8/6HlAGK0AjlIH0S+TA4VrBQ8w5MztaJYT +hFdnCFklk2z00z6ZnEWAU+NbzuTh/iEzBdrOvqDXVxXNhuU3QoudVZ3g/oxxc1S1Ng== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b="c2oce/rP"; arc=none smtp.remote-ip=82.195.75.108 X-Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63F39606A31C; Fri, 13 Nov 2026 12:10:26 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 63F39606A31C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=04zbQXN/fHm4yeapTB6+tJQ1+SULWzSbJ0NuXZMwrbc=; b=c2oce/rPJNWnisCDUkozaSclIB w6QME3aQOrGCJkhSPpvujUQbjc98/6hj3OHVNFg0tzX1FUAgD9X87gQJgjwjWy//AGLPbeRkiPh65 r8nJ5HTRNYdWAoJE7LxsiozW1EPFkFAMf3R0l3+YrYRDLIafTS2RjBzI3naBO60U9MQwkb2E8yGd1 BGQ5q7dUk3YumGrOec+QBYV1+qu4saV+k9B1AO2A8lP1YqFKT8cFuKeHLbW2lbENBNgXrZdx4GGX4 Yxr/m0ni+cgNwXrjt+T8wLk2Kc3m1wB9zethnG/jL0olA9fPA9JsfBepQ4TXNFIM/qdo3dKGURJJK 0ZyvzaYg==; X-Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from <leitao@debian.org>) id 1xRq6p-00Ejxr-14; Fri, 13 Nov 2026 12:10:23 +0000 X-Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, michael.chan@broadcom.com, pavan.chebbi@broadcom.com, andrew+netdev@lunn.ch, edumazet@kernel.org, horms@kernel.org, shuah@kernel.org, almasrymina@google.com, sdf@fomichev.me, 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: <20261111224740.2744522-5-sdf@fomichev.me> X-Debian-User: leitao