From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (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 56767253F05; Tue, 7 Apr 2026 21:04:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.13.80.246 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775595888; cv=none; b=hipWJeDXcADT6UkreILHKCzLr4YQLbV5Yaavx2jcLRxaEuxRoZYGW8Qyh4BHXHFa+FMQIVu1E1lJ7uUewH+x9FbP5Vbhai1mgiYyuCMU5I+QlWfq9RPDaNH1Um7TVP4zconkHOQ98n6y5p+a6omMUZUWlNBhHLGU08+48HYAnT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775595888; c=relaxed/simple; bh=jqvu83wfWERS+A4du18eODKc8zsl2by81Rtu32YYlg4=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=hfPMOL2uwrPxUDBRBT4nuUAWNG2hkWEI61Y6bZ2OFzPYarA2afrAWJvwzMlvxIJX1W1TAnXCCWq4olvsH8SK645dJuBNkH2ikbPgxQIj54/4muxCqGfJ4MYyL25tALbX0ONTklHOYnhnLP/FS8gHWSnvmCxaeHJKor7A0nXNO7M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b=ISEoigmC; arc=none smtp.client-ip=194.13.80.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.b="ISEoigmC" Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 41356A5884; Tue, 7 Apr 2026 23:04:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1775595874; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=9BugpWoyyC0JTlJJqIH/b68u9qMIscoqZi+/vmLrBBQ=; b=ISEoigmC7NVF6PKbXaR5JpDcFsvvZkshxXPfcT5tsbSomgIw+adXHu22jRx9+0N3YlTq12 Kjw0FJVVDwLeQeMAZiAopo48jC10J3DP6DCszP2nHKK9ZIucxOV167gPP8hfi6nH242/in z9/lL2s/YEwQddBNNeJmNLVbHu7S6bRJ2Qo9KUJ+/Zfcqf4j3Cu0cVVuUqXbPqztWS21JJ ZO/Juk8ELZRo9LiR+Te2F08dcFDFhGDseuqFeUGtfPpgV2OCQN/6un+kQrtR7pOuBPc023 317LdcMxOMUYyCJqcwRMuE3rFgsAs2qQKW18iAbjpAVT3Z9rZnSlzIoOI7AqyA== Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 07 Apr 2026 23:04:30 +0200 From: Nicolai Buchwitz To: Florian Fainelli Cc: netdev@vger.kernel.org, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Justin Chen , Vikas Gupta , Bhargava Marreddy , Rajashekar Hudumula , Arnd Bergmann , Eric Biggers , =?UTF-8?Q?Markus_Bl=C3=B6chl?= , Heiner Kallweit , Fernando Fernandez Mancera , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH net-next] net: bcmasp: Switch to page pool for RX path In-Reply-To: <20260407162658.4056141-1-florian.fainelli@broadcom.com> References: <20260407162658.4056141-1-florian.fainelli@broadcom.com> Message-ID: <028ee7c4c1073056ba11c98a7faf1f13@tipi-net.de> X-Sender: nb@tipi-net.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 On 7.4.2026 18:26, Florian Fainelli wrote: > This shows an improvement of 1.9% in reducing the CPU cycles and data > cache misses. > > Signed-off-by: Florian Fainelli > --- > [...] > > -static int bcmasp_alloc_buffers(struct bcmasp_intf *intf) > +static struct page_pool * > +bcmasp_rx_page_pool_create(struct bcmasp_intf *intf) > +{ > + struct page_pool_params pp_params = { > + .order = 0, > + /* Pages are CPU-side copy targets; no DMA mapping needed. */ > + .flags = 0, > + .pool_size = NUM_4K_BUFFERS, > + .nid = NUMA_NO_NODE, > + .dev = &intf->parent->pdev->dev, > + .dma_dir = DMA_FROM_DEVICE, Nit: .dma_dir has AFAIK no effect without PP_FLAG_DMA_MAP, so it's a bit misleading next to the "no DMA mapping needed" comment. > + .offset = 0, > + .max_len = PAGE_SIZE, > + }; Other Broadcom page pool drivers set .napi and .netdev. Adding those here would enable direct recycling and expose pool stats in ethtool -S. > [...] Thanks Nicolai