Article View: linux.kernel.netdev
Article #15891Re: [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:20
Date: Fri, 13 Nov 2026 12:20
25 lines
9954 bytes
9954 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:
<avcAe3FIG0Jcd6SG@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362624-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!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362624-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:20:28 -0800 Organization: Usenet Network Message-ID: <avcAe3FIG0Jcd6SG@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="1407634"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:w16gF7AHuFx7yqVo81X9rXFAavc= sha256:bS94BkR31hb/nypyzIALxZWXigoTq9f1rB8ieqqEbSw= sha1:aJD/HGaLvFXTC+MO6dpAKKar7CE= sha256:Hx8ZzvGHX8I4vlaC7zJoNVQkz09bY09j4jpKOP8PEPU= 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 9BF1D1145F9; Fri, 13 Nov 2026 21:38:37 +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 tQzc-27hO1WQ; Fri, 13 Nov 2026 21:38:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-362624-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 8AEAA1145F6; Fri, 13 Nov 2026 21:38:15 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 2487428A859; Fri, 13 Nov 2026 12:21:01 +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=1794572439; b=nBhPoxH/MMLhpJEFQI2DHiDoZ/G7GsmnNHl3aH2A/nucQOsTpaxJ6224x3H6hFuxenFi Y8u7mt5PQmrjmg5XFdQPuLCVq1DMnyJO3P2nKMagFexSWV4KriEFeihl7VUU7IHzmtGy5 YRszkDZuGdo5bAnGFw6jTG1tYJElsI9yK0phEwM+wF8PTj4AfasV8edk/FvXEQl187V6v K9LhpKlohbJ8Sp5L+qHrrFJYltfgZrt/H0Wa9WI/PshfOt2tvJmO8580jsEQMdB66mB1+ A8BvR/OLxiWMArQbNqpb/Vs72ELXWBN9QasX2X59na1mPtz23eUUfWJEqohMZNDFIQA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794572439; 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=VLFYt/XtTdzcINT1/2K45ezITJXAHty/Fvn35y2POIgUQgvXbSRJii/+2u4PEH1MQTM0 EddGHM52ml30HJ+PFFnL7vt/nDV7B87L411bd7wtuTOl9/tKrxQzpRazjuNoXkrHWlyU6 AIwK5NaEiqTwd9YIZm+/PGfcxaP4r4Agli9eeTCrWTuYOqeWIDHaBZ/DyNIDpXJxbKgRv Te0xLMZTdakJxbHje+GhOsr6Y2rVC6htbb+B/pFtCKT/TS6leua/9pZeA4RyFqYlkTqh3 swXOORUxrG5r4jYcErtRcIVg/NiOEGFmwua8iOokPgEA1Z60om7KwQ+bpxObliTlBEg== 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=LV76iNPN; 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 BB763606A33F; Fri, 13 Nov 2026 12:20:39 +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=LV76iNPN 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=1794572438; b=kakD4lTse4haDD3Nf72OuWMLeVHPqw0bcP6mTkibyKYBpIPjjmwyj2Or/gFyqj9sS4oL 8wXGyrqhlQIqgDOLUW8c1MdACVUOi4pUbtw8j6dQsZLbHEK1MepSg7UPTYOP0NP3zqhv2 GdfWMtrcAnSaFhIHAO+w5I9a0N88BjKfYOuMxUUq/hJSoA4Fz4Z4BLmIysqk6qqbZpZ+W /nKn0K2SxqOFWlBhdO80q0IKIYSCXLt0iRpi2jga9p8joAMa3KjAGrzx885kJnQRmm5PS UIxCyLgRCUuFhqFeZb1NAcrhKMWTjuYqAe7oScleJcSNJJ1dz3ExdL92HwBsYHgvqbQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794572438; 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=cvEBxqHqs5eoMJV6qCnRmtPw9dYxhyxM3x0h6xyRxq9vax0XCtbqNvGUu3hfdD3sCbNY H6YMk8uTlfIRBXG+sKmTCIuk+Gg6++yjeuHPyGYjNohn+1WMjbQY/Sui9sIQD1m9Za5RN 7L2kObkX1pe8gq+tG/QauZdjCGggx+dNOQ5nIdXMLrHYA6yYxEUWLmt51Y2o1xeuJFGlE Aiu33EqVXCC1oX/7umSDgnp+S58CbmgCeJkp06hdCPfAsi2FQYphpiy7r9uldqk6qvpRG bT1k5A+KgnEFdvlwoACJB2q9NzFb9ONTsUPzT4+9kTC6hGMHht1j5TaVwqxiQcDQ6lw== 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=LV76iNPN; 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 494FB606A321; Fri, 13 Nov 2026 12:20:38 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 494FB606A321 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=LV76iNPNBMcd0qJJRkYRcfwVCz tIm4KhERPVogG0EAGaPQyOot5Y0RAGojYX/2zOr0KNQVR09wsh3Jw6p8dwzoJkil4BhRMm9bhd0Re AqsjB635Z+H1ebDqM0WSkvL5TTiAhIYEdwxKOhNo+Lu5V9Ia+uL+PpQGYPmHgy0d+SSTZfqIswEdX aZMzMWvAwFk9zUjUj7uaTO6LeQ+W7UKa7pkoA/B3nWhhaMavU/s77VuBM6PUfhlY2uKYsBPoN5ajo Hsdz76wj3syeTF/nTpd8BiOLxHghUAbs1/9mmUM9aGLPkIZ3o5haaWZxjvgUfRYiy4JLImg6UfoWZ ksmLHmxw==; 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 1xRqGg-00EkJu-1f; Fri, 13 Nov 2026 12:20:34 +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