Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1090604ybi; Thu, 30 May 2019 11:24:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtLQfK7YVsph0/gX+ja3d67rHeVPD7S0X4VTVeLGLX9oFnaxzmgNviCcCGvOxKfTAFhHqP X-Received: by 2002:a17:902:f215:: with SMTP id gn21mr5169923plb.194.1559240676500; Thu, 30 May 2019 11:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559240676; cv=none; d=google.com; s=arc-20160816; b=N96pkfZUItivHZXNgBv0BM3z77YE4M+mhsoEwCWgKqi77rAxuJOCbQL0GncIE8jM/u 5J2RFIzhrcfKn+E7ch32njj8dhvhOvDfzxVbQ+x+Vs3OXKCtyojMxukxvpsylEkiMjYK fMKSIDsUpm8zvq4Ud8+gLFi0lMnnb5045bScVkLrkNeGaiKpW521jJoLhaWMARbouKlR wChGZMXoCNwf59Uaz+5E06FJ0GPpxdXZzlWs46ksrNP0E9u8xv8+LREUz5tCSg83/Yt/ eOmIuHFDQ2yLSAbdCaTa669NMBkNeGh43rLk6g7gVaFOzpbmQUifW4x3DQOjfS5c4WJi EQiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=AdSMTsu+LtgUCnPNRXGwSYsCPQyqbNfQqw5/RcvDJNQ=; b=T7iVWRDzpDZ8Fqiy/Xzdv8JGGYZeF+1zwUEpOr30X3v9SWYKz309xzRZqhtVZHsnxc BbPhrbYbwc8xBiYuIRsoI1Zaln9Dpq8KdvSe0gC8FCJX8IReuFaIU1CJRxlzVDSFEgZs YdozKdWpIEhCU0vaNTx+EaIwqVwpS6L09BNTsaDfOxEHhmGtGMOYDd2yBN/bBiyDiuM+ xmEYwej3UaJ911nID9RbtU1mtLo3R3luC8OC7CITwqFDbhSNXkn0AYNSdEevorsRrn3b yIU2Fh7hgxvGq5FxRLF2Ue2ivFOfaEw2WRzryp1q+tPD/Lre2FnKZ7Y0JAmQVNgXzhpC rJ4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NTEyy87m; 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 q22si3772228pgl.124.2019.05.30.11.24.19; Thu, 30 May 2019 11:24:36 -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=NTEyy87m; 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 S1726725AbfE3SUz (ORCPT + 99 others); Thu, 30 May 2019 14:20:55 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36249 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfE3SUx (ORCPT ); Thu, 30 May 2019 14:20:53 -0400 Received: by mail-lj1-f194.google.com with SMTP id m22so6787279ljc.3 for ; Thu, 30 May 2019 11:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AdSMTsu+LtgUCnPNRXGwSYsCPQyqbNfQqw5/RcvDJNQ=; b=NTEyy87mbpZennf/zO3UY3SG/jU34eWt9oBeag4D8YjahXlGpvo7jFJ45TsemIdnir GDDTpbKLurGeDuALSvM6j7s2xNdezurfEaq3Do0FdVu1zSrcVUfBnzEjlX9CPvMPhzYJ syvG28Ahiha6P8q/z1kIyl0178d00DQHN+sX/j5wk8ko44/63zLEGfJyi7VPUdIJ0LKG TgaTpYJ6tpJG3xAZrI95TMKLk8q+WGk0L19nUTHjuhUVz5EeWBCSPoZe7eWVxtRSZtYW kYjH1/WFTyKdQ+VO2y6VV9nuGp1SruffgOv8KjxhvVfDhLZ+qlpEcUfBKzBd6xbaakTA 2nxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AdSMTsu+LtgUCnPNRXGwSYsCPQyqbNfQqw5/RcvDJNQ=; b=ZXKmn5oJ3RdxFXn7L45+qx3OR9LYg+lkNjAjsoI7YEbhClxvDQKdTo5qM+uaf6JtCX TnwXaFZ+kxTns3ZbJtqTomkOgYXbGoNJbJhvp7YFj6fOexA9Q6rmpdqM4StFZdc/IZY4 /KzsUo6uwmd49Kjr245wb/SLi5vs4b+rCXIv10BITYM7q+1bvGU/YPj12x5IgWlJZpEH jdo1mhZq+Uf16sBrZcvKa3JlSkQlXQLC9vgIUUEYU70p12riYcZPVOnGEL0R3aQMgC9n esXMo87jmINpB5wioVd5101twCZsKPyeBohBZp1EHlKEHyD82Bsm8QHPVIXagnVe1Ydf 0g4A== X-Gm-Message-State: APjAAAWnkrI97YA/D4UxSxkR86ufAA/OO5e5YaVoWvx0mK3TRCYRbE5G dX/4+un9QEZkeINWt6PiN1wrve6Tq6U= X-Received: by 2002:a2e:9756:: with SMTP id f22mr3083605ljj.30.1559240451067; Thu, 30 May 2019 11:20:51 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id v7sm388946lfe.11.2019.05.30.11.20.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 May 2019 11:20:50 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com, hawk@kernel.org, davem@davemloft.net Cc: ast@kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, xdp-newbies@vger.kernel.org, ilias.apalodimas@linaro.org, netdev@vger.kernel.org, daniel@iogearbox.net, jakub.kicinski@netronome.com, john.fastabend@gmail.com, Jesper Dangaard Brouer , Ivan Khoronzhuk Subject: [PATCH v2 net-next 1/7] net: page_pool: add helper function to retrieve dma addresses Date: Thu, 30 May 2019 21:20:33 +0300 Message-Id: <20190530182039.4945-2-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190530182039.4945-1-ivan.khoronzhuk@linaro.org> References: <20190530182039.4945-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 Signed-off-by: Ivan Khoronzhuk --- 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 -- 2.17.1