Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3696756pxf; Mon, 22 Mar 2021 12:41:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUno9mn7XLLOOq9teewQI9HKE0WLCBzQTYJeirpc+zOUmxzx6wngqnJazC+w20OB7iyTSd X-Received: by 2002:a17:906:e16:: with SMTP id l22mr1349229eji.173.1616442074805; Mon, 22 Mar 2021 12:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616442074; cv=none; d=google.com; s=arc-20160816; b=J2oXGOk5o+3TFVmts8zRL1+rB1vCpru08C0gbadLKA7QwuctKE/Hir24QRXiI+h3GD h4QsIGQCLZZMNG77AoZTWQ30CMeRt2OJ9EgcPAn+X64vC+s3QUtyLqCZ8Qg4mLrMONbU 1HDPFcvKunCgtKgb3jg8OJ9bSrvRBMyiF/n9iSI4lY7Ed6wvyQuGkaB/DQ4YWcASXE9a 7nugXij8e07lldon9XX56NvI//JvJdVZTKl/JYZ56dfADOnVUV2PumGg/S6iSDmuGRsi Mjp/Db9ydkswEyBXcnn9JEVoiBPBxQjkLoEq+4NgeevhV9ZO/4EeXAcob87LmXlwrvWQ UkAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=zXWBEachdkTaURsAl/ZePmAtpLfOIIadK6i3iNDA+W0=; b=Eg5G0gVRpB+2kpuAoG6jApUxbWwxn4gloI2SR2qkxrgfT9lqRVQyHCo6acuNkyBUU6 Nu1xnRYUDVKRNUcJbk6PnYJP3BMmpNDKHt9bLXph+DzDY7RK5/kbHOhLpEDFvA8H9K0V vDAVTClU1v5qkg4+uq81jjV/np7a/GFvQDQ42hSdfEs/bia5r2EaAvA3BIeU7MYwvJKt TDN1yFIzM7TtUKHw0xWtU/M0XbBRREE2NFFVzYkVRYJOa8FVQOfKna6yIFnxQCcrBIHY EJwJwK030D4NH/lZlVWU6eHGPqPdWR5OZgQoEblweJ/zpCwvqMp4u7OV5j+xEjlzkAPi f7qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=UB6A5o+p; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si12514041eju.371.2021.03.22.12.40.52; Mon, 22 Mar 2021 12:41:14 -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=@linux.microsoft.com header.s=default header.b=UB6A5o+p; 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=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232237AbhCVTjr (ORCPT + 99 others); Mon, 22 Mar 2021 15:39:47 -0400 Received: from linux.microsoft.com ([13.77.154.182]:35200 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232401AbhCVTjR (ORCPT ); Mon, 22 Mar 2021 15:39:17 -0400 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by linux.microsoft.com (Postfix) with ESMTPSA id BABF120B5681; Mon, 22 Mar 2021 12:39:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BABF120B5681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1616441956; bh=zXWBEachdkTaURsAl/ZePmAtpLfOIIadK6i3iNDA+W0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UB6A5o+pWt4aw+6YdIBgb55kYIOI9yb+IN4NygtGhrCY9Ugs4/7VklwuomKdH+yW7 f+Od18T9fgOYGKReTtiz4NMQijLb3EnuTFETAKM/YyvZgScmXBwvrbKYG7xvVB/A1J LgPzgLgG8OeLMZJVqJCqkH9jKRPQU4YGvfdriU3Y= Received: by mail-pj1-f49.google.com with SMTP id w8so9023950pjf.4; Mon, 22 Mar 2021 12:39:16 -0700 (PDT) X-Gm-Message-State: AOAM532+G3b4uk0Kohg7IyJua5ztd9Be5Q4EyfJkJ/1EQQ2rvwb7Xa/8 hfH0AWh6W12SKcywfThzRUoA+Xbi0Esa/Wd+Yx8= X-Received: by 2002:a17:90a:f190:: with SMTP id bv16mr620021pjb.187.1616441956295; Mon, 22 Mar 2021 12:39:16 -0700 (PDT) MIME-Version: 1.0 References: <20210322170301.26017-1-mcroce@linux.microsoft.com> <20210322170301.26017-4-mcroce@linux.microsoft.com> In-Reply-To: <20210322170301.26017-4-mcroce@linux.microsoft.com> From: Matteo Croce Date: Mon, 22 Mar 2021 20:38:40 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net-next 3/6] page_pool: DMA handling and allow to recycles frames via SKB To: netdev@vger.kernel.org Cc: 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 6:03 PM Matteo Croce wrote: > > From: Ilias Apalodimas > > During skb_release_data() intercept the packet and if it's a buffer > coming from our page_pool API recycle it back to the pool for further > usage. > To achieve that we introduce a bit in struct sk_buff (pp_recycle:1) and > store the xdp_mem_info in page->private. The SKB bit is needed since > page->private is used by skb_copy_ubufs, so we can't rely solely on > page->private to trigger recycling. > > The driver has to take care of the sync operations on it's own > during the buffer recycling since the buffer is never unmapped. > > In order to enable recycling the driver must call skb_mark_for_recycle() > to store the information we need for recycling in page->private and > enabling the recycling bit > > Storing the information in page->private allows us to recycle both SKBs > and their fragments > > Signed-off-by: Ilias Apalodimas > Signed-off-by: Jesper Dangaard Brouer > Signed-off-by: Matteo Croce > --- Hi, the patch title really should be: page_pool: DMA handling and frame recycling via SKBs As in the previous RFC. Sorry, -- per aspera ad upstream