Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4356791pxf; Tue, 23 Mar 2021 08:43:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMFC6tYCGpXkDdh5uocf1x777VItIFz76SWB8r92K7uxb8mdT8Y37kV65NWCNNm62/6zXV X-Received: by 2002:a17:907:d10:: with SMTP id gn16mr5453550ejc.304.1616514210278; Tue, 23 Mar 2021 08:43:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616514210; cv=none; d=google.com; s=arc-20160816; b=GmZTCvLj5Bge9vqWRCAp2JogiDcdeab5dYDYMS6ILe4PUdFJadrKiiWtKHmPUvffrX o6QtO8OncNfjuc/JqNj8SPP4GnWZjATnvL88zg8q3Jb70295GsvivKr0AZa5qXa0I6Zn tstSei0GsbmxYK/7LCQK5dHf7/z55wj8XaZjge/5nLG4Kial8xbIcAb0uDAD4DiZQ7LO 3bgM8ywgorv2Xxdto17oxP5friaCKNznQprrteCw5xzpXw+7htYN3lhkbAqLwCvvz2qO lDuqm82GAQ179tTFOVkL9i1Eq2OSZghghhxYXK1In0TBy6rsdHbdipAygIdkfxXsZnr7 TPsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=KaWZVmNX+s6QYfI2KYune+mRKLP3TY75MHKPJja3S2M=; b=yn3OqdaxeExIZIYpiomb/k7I+1qcetmCvUs3iFH0pDz9qtD/edGTdjPLiJinGeJ8pX UEZ9NTfzSlynQS1qyV98/faxXlU5aYXTaokA/ETlPDL8FA8h9ALOK8UyA6njivpVXnRw xRTnq51SVSoUaymQMTrXGVYdLYkT16MuE1Gk7fmzcdTCZ+L3UqKQpLpIQsmELmNxX8nF +qZBvI0wrFHaUDITz33WKVRDLFqpH1346Sq0R2Svax5nWN+h4MRarzEKKlBMx3EvZpcx WpTOa6nNVcuvYY1VKV41EsL+GUKT+b++BB4sb+ctsrISsQInrag6av8krsm5LMJmWMa6 Fkgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=dp5Sd5AQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr30si13488868ejc.545.2021.03.23.08.43.07; Tue, 23 Mar 2021 08:43:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=dp5Sd5AQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233018AbhCWPlt (ORCPT + 99 others); Tue, 23 Mar 2021 11:41:49 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:17216 "EHLO mail-40134.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233014AbhCWPl3 (ORCPT ); Tue, 23 Mar 2021 11:41:29 -0400 Date: Tue, 23 Mar 2021 15:41:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1616514087; bh=KaWZVmNX+s6QYfI2KYune+mRKLP3TY75MHKPJja3S2M=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=dp5Sd5AQuwA0b9Qs8DJ2n3JzCPArI+MsOouma4x+ZCxNtwfvJFSCKA2ucG9bRTydJ 2N647yAo7GlJvzMxUY4t9L98/M75M2kXAP//dvYDWjg7LD2sfPM5PnC7OTjg7SHnVC /q1ZGblusLM4B4Cx4sNLhm7l5+xSnEzfeGr9S9NOWeo3T8idoZWijY/tladMQwqbpf cAk/AUZ0Bu8WHuDTN8mHzWYZvRtobcljBdmyd9ph8eZ7/fcS5I+VMLjkWxSADXo4MA ABDiBdnydWeO14VJX1JhSCbDxEmaQ0EriuxPuoDtxGER9tBSaZsigjU7fqSoO0KfAb OcZY5VsfmfjSQ== To: Matteo Croce From: Alexander Lobakin Cc: Alexander Lobakin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Lemon , "David S. Miller" , Ilias Apalodimas , Jesper Dangaard Brouer , Lorenzo Bianconi , Saeed Mahameed , David Ahern , Saeed Mahameed , Andrew Lunn Reply-To: Alexander Lobakin Subject: Re: [PATCH net-next 0/6] page_pool: recycle buffers Message-ID: <20210323154112.131110-1-alobakin@pm.me> In-Reply-To: <20210322170301.26017-1-mcroce@linux.microsoft.com> References: <20210322170301.26017-1-mcroce@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matteo Croce Date: Mon, 22 Mar 2021 18:02:55 +0100 > From: Matteo Croce > > This series enables recycling of the buffers allocated with the page_pool= API. > The first two patches are just prerequisite to save space in a struct and > avoid recycling pages allocated with other API. > Patch 2 was based on a previous idea from Jonathan Lemon. > > The third one is the real recycling, 4 fixes the compilation of __skb_fra= g_unref > users, and 5,6 enable the recycling on two drivers. > > In the last two patches I reported the improvement I have with the series= . > > The recycling as is can't be used with drivers like mlx5 which do page sp= lit, > but this is documented in a comment. > In the future, a refcount can be used so to support mlx5 with no changes. > > Ilias Apalodimas (2): > page_pool: DMA handling and allow to recycles frames via SKB > net: change users of __skb_frag_unref() and add an extra argument > > Jesper Dangaard Brouer (1): > xdp: reduce size of struct xdp_mem_info > > Matteo Croce (3): > mm: add a signature in struct page > mvpp2: recycle buffers > mvneta: recycle buffers > > .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 2 +- > drivers/net/ethernet/marvell/mvneta.c | 4 +- > .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 17 +++---- > drivers/net/ethernet/marvell/sky2.c | 2 +- > drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 +- > include/linux/mm_types.h | 1 + > include/linux/skbuff.h | 33 +++++++++++-- > include/net/page_pool.h | 15 ++++++ > include/net/xdp.h | 5 +- > net/core/page_pool.c | 47 +++++++++++++++++++ > net/core/skbuff.c | 20 +++++++- > net/core/xdp.c | 14 ++++-- > net/tls/tls_device.c | 2 +- > 13 files changed, 138 insertions(+), 26 deletions(-) Just for the reference, I've performed some tests on 1G SoC NIC with this patchset on, here's direct link: [0] > -- > 2.30.2 [0] https://lore.kernel.org/netdev/20210323153550.130385-1-alobakin@pm.me Thanks, Al