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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 E4EABC0651F for ; Thu, 4 Jul 2019 15:09:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ABF1D20659 for ; Thu, 4 Jul 2019 15:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727520AbfGDPJf (ORCPT ); Thu, 4 Jul 2019 11:09:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41556 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727351AbfGDPJf (ORCPT ); Thu, 4 Jul 2019 11:09:35 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BA652F8BE3; Thu, 4 Jul 2019 15:09:30 +0000 (UTC) Received: from carbon (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF6B64FEE1; Thu, 4 Jul 2019 15:09:21 +0000 (UTC) Date: Thu, 4 Jul 2019 17:09:20 +0200 From: Jesper Dangaard Brouer To: Jose Abreu Cc: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , Joao Pinto , "David S . Miller" , Giuseppe Cavallaro , Alexandre Torgue , Maxime Coquelin , Maxime Ripard , Chen-Yu Tsai , brouer@redhat.com Subject: Re: [PATCH net-next 3/3] net: stmmac: Introducing support for Page Pool Message-ID: <20190704170920.1e81ed6e@carbon> In-Reply-To: References: <1b254bb7fc6044c5e6e2fdd9e00088d1d13a808b.1562149883.git.joabreu@synopsys.com> <20190704113916.665de2ec@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 Jul 2019 15:09:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Jul 2019 14:45:59 +0000 Jose Abreu wrote: > From: Jesper Dangaard Brouer > > > The page_pool_request_shutdown() API return indication if there are any > > in-flight frames/pages, to know when it is safe to call > > page_pool_free(), which you are also missing a call to. > > > > This page_pool_request_shutdown() is only intended to be called from > > xdp_rxq_info_unreg() code, that handles and schedule a work queue if it > > need to wait for in-flight frames/pages. > > So you mean I can't call it or I should implement the same deferred work > ? > > Notice that in stmmac case there will be no in-flight frames/pages > because we free them all before calling this ... You can just use page_pool_free() (p.s I'm working on reintroducing page_pool_destroy wrapper). As you say, you will not have in-flight frames/pages in this driver use-case. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 ECF57C0651F for ; Thu, 4 Jul 2019 15:09:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9BD220659 for ; Thu, 4 Jul 2019 15:09:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AdPYK4dm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9BD220659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kK8BtjLQKULDB0ODQGPmVs8666z+dUkNiSHIl+FLumI=; b=AdPYK4dmAu+W1/ RQ+25SSljnWWXULX5nMF1a/BkgFsZfHvDlBmhOOiDPbKTRUC1UFf1VVDlo1Eq1xB+InTuvx2UNhr0 Wm3wIiN0sH2IQGEUTlJ85/T8GBvoZhzXZO3LV74DX4Fd7d27d5sOF/qSNPUoJ6f8GIsI+vdqMitss dspcWlnQ/3q+NgZ96yokFgvKp3t9ir9kupl+D3jHBmqHtrvFJmOq/w0AvGVuhXPsUDNvuSqxKShC6 XiSY8gUn7NS/s2eHH4yuhSLOM/rW8xfBuH33xNIpi210CoPfq4faApQw8vOK2Jsr5lI8gIqAdBCdO YgV0L9GbRre0dJCx9I0g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hj3Mj-0006Pp-22; Thu, 04 Jul 2019 15:09:41 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hj3Mf-0006P6-RD for linux-arm-kernel@lists.infradead.org; Thu, 04 Jul 2019 15:09:39 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BA652F8BE3; Thu, 4 Jul 2019 15:09:30 +0000 (UTC) Received: from carbon (ovpn-200-17.brq.redhat.com [10.40.200.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF6B64FEE1; Thu, 4 Jul 2019 15:09:21 +0000 (UTC) Date: Thu, 4 Jul 2019 17:09:20 +0200 From: Jesper Dangaard Brouer To: Jose Abreu Subject: Re: [PATCH net-next 3/3] net: stmmac: Introducing support for Page Pool Message-ID: <20190704170920.1e81ed6e@carbon> In-Reply-To: References: <1b254bb7fc6044c5e6e2fdd9e00088d1d13a808b.1562149883.git.joabreu@synopsys.com> <20190704113916.665de2ec@carbon> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 04 Jul 2019 15:09:35 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190704_080937_901289_FF0B6971 X-CRM114-Status: GOOD ( 16.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joao Pinto , Alexandre Torgue , Maxime Ripard , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , Chen-Yu Tsai , Maxime Coquelin , brouer@redhat.com, Giuseppe Cavallaro , "David S . Miller" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 4 Jul 2019 14:45:59 +0000 Jose Abreu wrote: > From: Jesper Dangaard Brouer > > > The page_pool_request_shutdown() API return indication if there are any > > in-flight frames/pages, to know when it is safe to call > > page_pool_free(), which you are also missing a call to. > > > > This page_pool_request_shutdown() is only intended to be called from > > xdp_rxq_info_unreg() code, that handles and schedule a work queue if it > > need to wait for in-flight frames/pages. > > So you mean I can't call it or I should implement the same deferred work > ? > > Notice that in stmmac case there will be no in-flight frames/pages > because we free them all before calling this ... You can just use page_pool_free() (p.s I'm working on reintroducing page_pool_destroy wrapper). As you say, you will not have in-flight frames/pages in this driver use-case. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel