Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3446806ybi; Tue, 2 Jul 2019 07:57:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPAUC1PjSV5Xmk6/w9KruEJBtY8mjpIyQ/xxgdtcaK6e/5dxfuY07HuXei2ri/wa+OiqiQ X-Received: by 2002:a17:90a:bb94:: with SMTP id v20mr6204517pjr.88.1562079475551; Tue, 02 Jul 2019 07:57:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562079475; cv=none; d=google.com; s=arc-20160816; b=JB/XYfQ579YyYVPu7zOR5ghm0sw6t5vwEXjm3zVCJ0BjKwFMxQ2G1DkMxxFS4dnXZs x5WfNcT7kyW+ztKkp7+7/OAPzahGIbGUwpBQXYuqrnkUzp3EmtpHaYvhwYB5y7UKFuqj WJyP7pFc6xZabF6qBkiVEkc0EpMWIuVv7mP7caZVIPgFTxqGrJ7Y9qmJlNZUm5Nq6Pcd hl2Jb/SZQh24vv6K/ECdzZ6HI0Z1675pslYmIP0KDCU28bbdwdzpNCgAh9IXcVGlv/Ht ctTQNz7T1p4/xKGwE/+kD8AHEQ6YlTze+klO60NKGYX8WNERq15lwDy/EcR41R7cdO9B E5Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=7rK7qDKEwGgygAo6exJfMYowjRvJTz2OfqB0lXA6Pfg=; b=UntjnZDMLU1mYf9oMThRFXM6S6j+qhAljp+IA07nXgV0V8jRGQwu6OGvOSiBsYrli5 HV7JqReys2adeBrf1TBACy0Aqql/FZg1v2vVBkI/K/v1myKjRWpEwQeIGWJRzMZCW5nY cAHeXs0uAS2sK22kzTY/fO0JQCdJ6ScmZfZTsdDvvMQsVyx1+kSWXOc6gEAmbY6kADfX CuMTybYFw8JGtBq0cIgFtLEYK3Oe9/UHSlN2IpLTbLHtTWFtUzmA7u8xaLxXcCKLb2sn HfiZ+mk7hrHLHH+9/fIrpYC+CGs5GuLrb/SthXFQK6gaoGu8hFhR9t7ZLw8gms3tWj0Q HZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PCN9X2D/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 138si14221410pfy.77.2019.07.02.07.57.37; Tue, 02 Jul 2019 07:57:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PCN9X2D/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbfGBO4R (ORCPT + 99 others); Tue, 2 Jul 2019 10:56:17 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:38879 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfGBO4R (ORCPT ); Tue, 2 Jul 2019 10:56:17 -0400 Received: by mail-lj1-f195.google.com with SMTP id r9so17212774ljg.5 for ; Tue, 02 Jul 2019 07:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7rK7qDKEwGgygAo6exJfMYowjRvJTz2OfqB0lXA6Pfg=; b=PCN9X2D/JW/E7t0T4zSJTdmG1LASGkY2AXb3iTdWBl644wY1XW1wMWZx2DP2Z/7KHI 3FJIpNnyGXhQsq+k3+NYCBfzwP9WdvqY75RlPTDw4pbqNOD/6m8H3qw/qg0N18SQ/wPt 4c4uLlo1rPSeaYy0OMQOej73UvqLzO8XZcxw5AYlPCAfA6XdXD25Or/zz8kahtocP9k1 HP6k/DoZ2d5hSz4DPGbHfR7v85tgbjBOzfay3uzxZnKkWtBdzfzfn1GjSUTwNq4YXCRj FEh7jnHkPs4vr0tyZ+XMoXSHKnN/Cf8+zUif3+xZqPp/bBUyCM7u5iwhWe6jUlRv/UeN Wf3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=7rK7qDKEwGgygAo6exJfMYowjRvJTz2OfqB0lXA6Pfg=; b=CEvsNPFCTMpH7cLGf0Lem/RcEKnJMDsZuFrtuBAAymkehZBJrOTjV6XlDaNAccdMN8 e2uteHRPoMgBg1hLNAEb3GBDQfTt1T1U3uiQmSgLxlYtkaciEuVNUi504AI8FRuaTp26 e7sqC+2JuPDyfVxL/0E9aghzZXt9tQPpntHbJl/zPnRB4b9h4NGLKgPz+rFECbWU/koq 7Ua/vI9jlfRHaGBR1mfrxyDZRzXBYefNNzffisSNXKD94fiz5kO0vY6O5H8h60KKjVlf OETEIS47BuR8RtSomncDwFfdNBm3z+RpYFJ1prrs+5RSFK1SBHNwwgNNJ0yux2JC+jwA t6Jg== X-Gm-Message-State: APjAAAWc74zaaqykE1E7Do+Le0grG9Z2sAFp+PrKEGeIY2Sm0O9c9TKo hWGfw1JKtno0n+IioAo/MM0Lrg== X-Received: by 2002:a2e:5302:: with SMTP id h2mr17005806ljb.47.1562079375922; Tue, 02 Jul 2019 07:56:15 -0700 (PDT) Received: from khorivan (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id v202sm241305lfa.28.2019.07.02.07.56.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2019 07:56:15 -0700 (PDT) Date: Tue, 2 Jul 2019 17:56:13 +0300 From: Ivan Khoronzhuk To: Jesper Dangaard Brouer Cc: netdev@vger.kernel.org, Ilias Apalodimas , grygorii.strashko@ti.com, jakub.kicinski@netronome.com, daniel@iogearbox.net, john.fastabend@gmail.com, ast@kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] net: core: page_pool: add user refcnt and reintroduce page_pool_destroy Message-ID: <20190702145612.GF4510@khorivan> Mail-Followup-To: Jesper Dangaard Brouer , netdev@vger.kernel.org, Ilias Apalodimas , grygorii.strashko@ti.com, jakub.kicinski@netronome.com, daniel@iogearbox.net, john.fastabend@gmail.com, ast@kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org References: <20190702153902.0e42b0b2@carbon> <156207778364.29180.5111562317930943530.stgit@firesoul> <20190702144426.GD4510@khorivan> <20190702165230.6caa36e3@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20190702165230.6caa36e3@carbon> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 02, 2019 at 04:52:30PM +0200, Jesper Dangaard Brouer wrote: >On Tue, 2 Jul 2019 17:44:27 +0300 >Ivan Khoronzhuk wrote: > >> On Tue, Jul 02, 2019 at 04:31:39PM +0200, Jesper Dangaard Brouer wrote: >> >From: Ivan Khoronzhuk >> > >> >Jesper recently removed page_pool_destroy() (from driver invocation) and >> >moved shutdown and free of page_pool into xdp_rxq_info_unreg(), in-order to >> >handle in-flight packets/pages. This created an asymmetry in drivers >> >create/destroy pairs. >> > >> >This patch add page_pool user refcnt and reintroduce page_pool_destroy. >> >This serves two purposes, (1) simplify drivers error handling as driver now >> >drivers always calls page_pool_destroy() and don't need to track if >> >xdp_rxq_info_reg_mem_model() was unsuccessful. (2) allow special cases >> >where a single RX-queue (with a single page_pool) provides packets for two >> >net_device'es, and thus needs to register the same page_pool twice with two >> >xdp_rxq_info structures. >> >> As I tend to use xdp level patch there is no more reason to mention (2) case >> here. XDP patch serves it better and can prevent not only obj deletion but also >> pool flush, so, this one patch I could better leave only for (1) case. > >I don't understand what you are saying. > >Do you approve this patch, or do you reject this patch? > It's not reject, it's proposition to use both, XDP and page pool patches, each having its goal. -- Regards, Ivan Khoronzhuk