From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8B2BEC71135 for ; Thu, 12 Jun 2025 02:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=j4m9qzeyse7sWAVAE6b7KsyxE8k+79J/FEsxRK5Qmvk=; b=fgQkEARtdDTJGTLxM04VzG8bX/ BK7MmAgcgqdPYDyScGJgIWB1p/ZblUCWoiTJzfFNEWFNCbd9V5tmnhdglE3tEy4P89jIpK0aLT+gM ggFbAT6DfETZG3uGxgPALv6X0zBTYWE0ilZlWqe4Kl8USPmXNYRMENRqRDtWuV52he25BJlklAJHr +czgAWbNQG8+79LUThL29rtQKrijISFlwHrS01tT1yGu8IM4OBJQIF/M7VRBE3pdZT2knL7AKqAyX Ucz1iY25atjZT0OU9skSe7EKdKwY5R3Z7e4611lZ3UoCW3oxEb/6g4XtdQBBaJ51hcxALfEASomsE W//mIEOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPXv9-0000000BzlZ-3BQ7; Thu, 12 Jun 2025 02:44:03 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPVvf-0000000BnUa-4BMM; Thu, 12 Jun 2025 00:36:29 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B8CD15C649D; Thu, 12 Jun 2025 00:34:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF0CEC4CEE3; Thu, 12 Jun 2025 00:36:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749688587; bh=VX2z2/FTyVn7BQpo+/VJOHyJJYMp0fe/rlbeOnwg8S8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Gs8Ktq8oAq+gDWOf1HIkw1MKCjkvLUD34+FWmtdYgVDcMktaU8GYHoBfX87Y0SOQN j712zYHBDZbysi8LQDV6hLTiAk9E15f0PjFmRABnbS3MiBl4dqJRQAn/rnekjgX2Y1 bW+lTZ2OUHhB0IbqfqnDueXhcyWZwR1f3gt6AGEjWbRRNddUmQzB8d2eB7huh4AiQj t90s0vnkhMn3itY4Cx4MU8ENXBhHLU4L1prU3J3M7hQx0wr0W5LEgmWFt6q7edqW6k cLTKz8/faCH5zcZyM8ZKVMeadORQw6ceFG49PlUd5WCD+PMC1YLk7q0daBgwMQWK5t eQxr7fkyGGavA== Date: Wed, 11 Jun 2025 17:36:26 -0700 From: Jakub Kicinski To: Lorenzo Bianconi Cc: Eric Dumazet , Andrew Lunn , "David S. Miller" , Paolo Abeni , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next] net: airoha: Add TCP LRO support Message-ID: <20250611173626.54f2cf58@kernel.org> In-Reply-To: References: <20250610-airoha-eth-lro-v1-1-3b128c407fd8@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250611_173628_083900_BB913E73 X-CRM114-Status: GOOD ( 19.67 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Tue, 10 Jun 2025 15:39:34 +0200 Lorenzo Bianconi wrote: > > Tell us more... It seems small LRO packets will consume a lot of > > space, incurring a small skb->len/skb->truesize ratio, and bad TCP WAN > > performance. > > I think the main idea is forward to hw LRO queues (queues 24-31 in this > case) just specific protocols with mostly big packets but I completely > agree we have an issue for small packets. One possible approach would be > to define a threshold (e.g. 256B) and allocate a buffer or page from the > page allocator for small packets (something similar to what mt7601u driver > is doing[0]). What do you think? I'm not Eric but FWIW 256B is not going to help much. It's best to keep the len / truesize ratio above 50%, so with 32k buffers we're talking about copying multiple frames. > > And order-5 pages are unlikely to be available in the long run anyway. > > I agree. I guess we can reduce the order to ~ 2 (something similar to > mtk_eth_soc hw LRO implementation [1]). Would be good to test. SW GRO can "re-GRO" the partially coalesced packets, so it's going to be diminishing returns. > > LRO support would only make sense if the NIC is able to use multiple > > order-0 pages to store the payload. > > The hw supports splitting big packets over multiple order-0 pages if we > increase the MTU over one page size, but according to my understanding > hw LRO requires contiguous memory to work. Hm, you're already passing buffers smaller than normal TSO so presumably having a smaller buffers will break the sessions more often but still work? You mean want to steal some of the code from: https://lore.kernel.org/all/20250421222827.283737-1-kuba@kernel.org/ and make the buffer size user-configurable. But not a requirement. Let's at least get some understanding of the perf benefit of 32k vs 16k or 8k -- pw-bot: cr