From patchwork Tue Jun 18 13:05:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 167150 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp4197165ilk; Tue, 18 Jun 2019 06:05:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHy1d3WTfoR+jcESD4Axd7E5NRkkkTHXjWlQMc8RfZckQljsJD9arIdJpAZiA879YH2LZV X-Received: by 2002:a17:902:24c:: with SMTP id 70mr112987402plc.2.1560863121145; Tue, 18 Jun 2019 06:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560863121; cv=none; d=google.com; s=arc-20160816; b=AL1UJTfh9dz2nZqwAIyUTJWDAyiST1t3tBLoH62bibVm+2vHx3w3bcditRdDdsF+oY poLx5BxVP6KqjdpjsIKSoVLGTCLgm/HIs1Ah+vs99dD2r+wSFlkkKcw0alOvXkLb5wSl 58WDF5uqWVf9lAV2Dyedy19x7w79SRUnB/rj7Hp5dUEU82Hsz4pTiPujlwoO7lkOolBC M35TI4hkiaPMoCe9w2vRTQprSooNP0sJUDVi/QxwnruqR38ci3NWBBynfwqUtQapPjOR xOdxzzYRneYZ5yhqEr/C7bQZn3xNhYpiG4+23UqYwf4CeLurP+8I8Nsni8aWpZrvA68e E1Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject; bh=BmWe/qrZpHqckw3ywSc2HEpjgw38Hi93R9qlekkAbus=; b=zZ79EoH5rn4nlibvVkFMGFBqoeoJWcqZMSx8D6bkcyZfo1RZ827tRdi+tzJCpQbvib rEAee02k27hB3p6QazRrFDbXmfCFF+w7Cdm6aDUhJhXg0agGJOnmzRB9XGPlJZ0itEB2 j5pCGXoc7wVhY+WW0aKyQwjI2llKLbhYJ8wazW6Xt3ekgThROJfPr1Fk7g5cgNe0dAWo si43Ruz88dnc79uMsKeS1fJaIdVnHtz1r3wpl2IQo548dmzvC7/bkZxz+f9Gy8GQwBkp JcxBY55B7hCy48NTcDdy6sE4whRQdAi0p9/ih5Fr05L3tZJmTaK7hkYqKUaWBTfxEKL2 oH7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si150284pgy.541.2019.06.18.06.05.20; Tue, 18 Jun 2019 06:05:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726158AbfFRNFT (ORCPT + 9 others); Tue, 18 Jun 2019 09:05:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51542 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbfFRNFT (ORCPT ); Tue, 18 Jun 2019 09:05:19 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66F65C05B1CD; Tue, 18 Jun 2019 13:05:19 +0000 (UTC) Received: from firesoul.localdomain (ovpn-200-41.brq.redhat.com [10.40.200.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 42A5D7FD44; Tue, 18 Jun 2019 13:05:13 +0000 (UTC) Received: from [192.168.5.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 6A3FE31256FCB; Tue, 18 Jun 2019 15:05:12 +0200 (CEST) Subject: [PATCH net-next v2 01/12] net: page_pool: add helper function to retrieve dma addresses From: Jesper Dangaard Brouer To: netdev@vger.kernel.org, Ilias Apalodimas , Toke =?utf-8?q?H=C3=B8iland-J=C3=B8rgensen?= , Tariq Toukan , Jesper Dangaard Brouer Cc: toshiaki.makita1@gmail.com, grygorii.strashko@ti.com, ivan.khoronzhuk@linaro.org, mcroce@redhat.com Date: Tue, 18 Jun 2019 15:05:12 +0200 Message-ID: <156086311236.27760.10158530288130730889.stgit@firesoul> In-Reply-To: <156086304827.27760.11339786046465638081.stgit@firesoul> References: <156086304827.27760.11339786046465638081.stgit@firesoul> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 18 Jun 2019 13:05:19 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ilias Apalodimas On a previous patch dma addr was stored in 'struct page'. Use that to retrieve DMA addresses used by network drivers Signed-off-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer --- include/net/page_pool.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/net/page_pool.h b/include/net/page_pool.h index 694d055e01ef..b885d86cb7a1 100644 --- a/include/net/page_pool.h +++ b/include/net/page_pool.h @@ -132,6 +132,11 @@ static inline void page_pool_recycle_direct(struct page_pool *pool, __page_pool_put_page(pool, page, true); } +static inline dma_addr_t page_pool_get_dma_addr(struct page *page) +{ + return page->dma_addr; +} + static inline bool is_page_pool_compiled_in(void) { #ifdef CONFIG_PAGE_POOL