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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C01FC433B4 for ; Fri, 2 Apr 2021 12:36:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3B7D661002 for ; Fri, 2 Apr 2021 12:36:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235386AbhDBMgj (ORCPT ); Fri, 2 Apr 2021 08:36:39 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:60172 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229599AbhDBMgh (ORCPT ); Fri, 2 Apr 2021 08:36:37 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lSJ2P-00EUvM-Ac; Fri, 02 Apr 2021 14:36:33 +0200 Date: Fri, 2 Apr 2021 14:36:33 +0200 From: Andrew Lunn To: Ioana Ciornei Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, ruxandra.radulescu@nxp.com, Ioana Ciornei Subject: Re: [PATCH net-next v2 2/3] dpaa2-eth: add rx copybreak support Message-ID: References: <20210402095532.925929-1-ciorneiioana@gmail.com> <20210402095532.925929-3-ciorneiioana@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210402095532.925929-3-ciorneiioana@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Apr 02, 2021 at 12:55:31PM +0300, Ioana Ciornei wrote: > From: Ioana Ciornei > > DMA unmapping, allocating a new buffer and DMA mapping it back on the > refill path is really not that efficient. Proper buffer recycling (page > pool, flipping the page and using the other half) cannot be done for > DPAA2 since it's not a ring based controller but it rather deals with > multiple queues which all get their buffers from the same buffer pool on > Rx. > > To circumvent these limitations, add support for Rx copybreak. For small > sized packets instead of creating a skb around the buffer in which the > frame was received, allocate a new sk buffer altogether, copy the > contents of the frame and release the initial page back into the buffer > pool. > > Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Andrew