From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F2F811CAF; Sun, 26 Jan 2025 11:35:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737891352; cv=none; b=j5iK0+r+l+z6Pu3oeqJjM25VgalMKkbNGpcFLoIT/h5ZXxosTxXJ0uPQ7JKNmH95CKU6X9/8gSIspcObDHPXUffZ7dI056vqx+BojF52+RiyXkHEpB/owHTRaVuYAxKpYwLmBLo1tpV108qkj1vqKfTI8Si08NjJiNVFn9dazco= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737891352; c=relaxed/simple; bh=P98X3lXb6oGuf0A58L4BzbEIatU970RoY6EwMDHaiH0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nsbxdxAUILJVjfxVmO48G2eXscZKi7bk0T//swXvDiTAGYj9/AIpfNAxtodERMnl5nYdE7xmsrAPCHp/dyvKhFMvWTIpVmd1AldIA7rl1mjbW4d11Uumu1bBl09tVEqC6PZJvNADaclaesp6e8FVbcAmxGN1VTe3XvD2FCjvj1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org; spf=none smtp.mailfrom=idosch.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Y8tmgiwr; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=idosch.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Y8tmgiwr" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id B9F90254015C; Sun, 26 Jan 2025 06:35:49 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Sun, 26 Jan 2025 06:35:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1737891349; x=1737977749; bh=/spJSHqIQvCifSPNA5IORZa7iILcSbhvBOG PaB29zc0=; b=Y8tmgiwrz6KcJXnRZjLSOg+mPrFgoJjHoRFJ90cUjs7pBizfn31 JSTsv+sqG5ucSP+iXM83meBKt1kDutS/Sut2VTfg19vExS73lsIYnBmudDLDHIDw fWTUNKW3br6oYNEDlSVEdLAk744nvdTUVvxXF8N2BwwlWwKhFYxluqk3y3iytkL/ 0R5HvA7eIGpCcG7oepVIo9+n+n2VzdWOBDtfeM0o5SLgkWiC2JyV59KoIvbpOtyC qCN8/ZJ3BfTpBNzjJ2gyaN6yGikklG9GQP7uE2WVOXPG8nf9Cn2tqMwEFJL6ZI8L 0X6pDgHkXEYIOcPcr7QMsYtRJ6urHVDQtPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedguddtudehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddt vdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgthh drohhrgheqnecuggftrfgrthhtvghrnhepvddufeevkeehueegfedtvdevfefgudeifedu ieefgfelkeehgeelgeejjeeggefhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrghdpnhgspghrtghp thhtohepudekpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopedtgiduvddtjeesgh hmrghilhdrtghomhdprhgtphhtthhopegrnhgurhgvfieslhhunhhnrdgthhdprhgtphht thhopegsghhrihhffhhishesnhhvihguihgrrdgtohhmpdhrtghpthhtohepjhhonhgrth hhrghnhhesnhhvihguihgrrdgtohhmpdhrtghpthhtohepnhgvthguvghvsehvghgvrhdr khgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqshhtmhefvdesshhtqdhmug dqmhgrihhlmhgrnhdrshhtohhrmhhrvghplhihrdgtohhmpdhrtghpthhtoheplhhinhhu gidqrghrmhdqkhgvrhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtg hpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhr tghpthhtoheprghlvghkshgrnhguvghrrdhlohgsrghkihhnsehinhhtvghlrdgtohhm X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 26 Jan 2025 06:35:47 -0500 (EST) Date: Sun, 26 Jan 2025 13:35:45 +0200 From: Ido Schimmel To: Furong Xu <0x1207@gmail.com> Cc: Andrew Lunn , Brad Griffis , Jon Hunter , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexander Lobakin , Joe Damato , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , xfr@outlook.com, "linux-tegra@vger.kernel.org" Subject: Re: [PATCH net-next v3 1/4] net: stmmac: Switch to zero-copy in non-XDP RX path Message-ID: References: <20250124003501.5fff00bc@orangepi5-plus> <20250124104256.00007d23@gmail.com> <20250125224342.00006ced@gmail.com> <20250126183714.00005068@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250126183714.00005068@gmail.com> On Sun, Jan 26, 2025 at 06:37:14PM +0800, Furong Xu wrote: > The "SPH feature" splits header into buf->page (non-zero offset) and > splits payload into buf->sec_page (zero offset). > > For buf->page, pp_params.max_len should be the size of L3/L4 header, > and with a offset of NET_SKB_PAD. > > For buf->sec_page, pp_params.max_len should be dma_conf->dma_buf_sz, > and with a offset of 0. > > This is always true: > sizeof(L3/L4 header) + NET_SKB_PAD < dma_conf->dma_buf_sz + 0 Thanks, understood, but are there situations where the device is unable to split a packet? For example, a large L2 packet. I am trying to understand if there are situations where the device will write more than "dma_conf->dma_buf_sz - NET_SKB_PAD" to the head buffer.