From patchwork Thu Jun 13 18:28:07 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: 166721 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1084568ilk; Thu, 13 Jun 2019 11:28:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtqucqf2OVO/440LLVzu53EPD2pgQe/CtmSU5BLhI1d8Qa3m40Zd6PE6Ey7u9tTFipVbto X-Received: by 2002:a17:90a:9bca:: with SMTP id b10mr6926490pjw.90.1560450493540; Thu, 13 Jun 2019 11:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560450493; cv=none; d=google.com; s=arc-20160816; b=bbpck5HTqY2LB3DZi0h/kylRC1oz9sTdvwBCsI9XN77nmhWwVXX8EvHAwuuEUbLKN6 QAlfn+R0EkiA+MX2mQ0RJ03q5aR8GSA3ngKUVOpS0n9L6kbq6/Aq8tgpjulnDwuLhsei QvjvBrBKMiqPdyhMhdlL1D9g1itDngY9oZAkY+Hs56NsR8lat7kpdHmmVKy6E8RSEOjh n46VVLWKXj6v1+J6Xq+AmsHqK3a0f/V+pYOEOHs37sxJ2lfwPJRPJCHb6xkKT4C/zjTJ UO4H5gm3INa7m+JrlSYFzFYO8X5tzb/JQNM1QAL+MG37QnHimy5Xwx5UdV1Pvh2ktS92 gNXQ== 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=I8NU2HJSUEKKDjVxochfQ6k2gDpZ59mg1XszHonhvxnKyTiOc2r4iHazcC5Oa1fwHP MYm32qnrkxiI4lMhofNJDX27opdnrob72yNRkawWonQCzxQU7//ZfF+fPiGcX0ta3cKN oteVcL2YCUPqYmHDFfdfw8bMmWs11ucuUE6F2GPs7sINm/EQe2Y7iqFGswq9TSsd5ENl 6DLkqu955/KvUiFhe0PvwG9B8OQ7WQdBXwb/VK6mzzSNZivLvpd5eK9wcRlacSS0llap Spi3B58wsNNXqyMi1S4yTIQRMYVMiZeGdhmsdcsZhoTNfPuLwA0NoLZKMcIKdTEa54qu 4ntA== 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 o6si326481pju.19.2019.06.13.11.28.13; Thu, 13 Jun 2019 11:28:13 -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 S1728719AbfFMS2M (ORCPT + 9 others); Thu, 13 Jun 2019 14:28:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36082 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727179AbfFMS2L (ORCPT ); Thu, 13 Jun 2019 14:28:11 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 497E55D60F; Thu, 13 Jun 2019 18:28:11 +0000 (UTC) Received: from firesoul.localdomain (ovpn-200-44.brq.redhat.com [10.40.200.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id D826254213; Thu, 13 Jun 2019 18:28:07 +0000 (UTC) Received: from [192.168.5.1] (localhost [IPv6:::1]) by firesoul.localdomain (Postfix) with ESMTP id 084EE31256FCA; Thu, 13 Jun 2019 20:28:07 +0200 (CEST) Subject: [PATCH net-next v1 01/11] 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: Thu, 13 Jun 2019 20:28:07 +0200 Message-ID: <156045048696.29115.1338915143858015398.stgit@firesoul> In-Reply-To: <156045046024.29115.11802895015973488428.stgit@firesoul> References: <156045046024.29115.11802895015973488428.stgit@firesoul> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 13 Jun 2019 18:28:11 +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