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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham 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 1D57CC43381 for ; Thu, 14 Feb 2019 06:02:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E99E421934 for ; Thu, 14 Feb 2019 06:02:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392987AbfBNGCo (ORCPT ); Thu, 14 Feb 2019 01:02:44 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:48994 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726407AbfBNGCo (ORCPT ); Thu, 14 Feb 2019 01:02:44 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 74E6614CF8240; Wed, 13 Feb 2019 22:02:42 -0800 (PST) Date: Wed, 13 Feb 2019 22:02:38 -0800 (PST) Message-Id: <20190213.220238.72067832020194055.davem@davemloft.net> To: brouer@redhat.com Cc: netdev@vger.kernel.org, linux-mm@kvack.org, toke@toke.dk, ilias.apalodimas@linaro.org, willy@infradead.org, saeedm@mellanox.com, alexander.duyck@gmail.com, akpm@linux-foundation.org, mgorman@techsingularity.net, tariqt@mellanox.com Subject: Re: [net-next PATCH V3 0/3] Fix page_pool API and dma address storage From: David Miller In-Reply-To: <155002290134.5597.6544755780651689517.stgit@firesoul> References: <155002290134.5597.6544755780651689517.stgit@firesoul> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 13 Feb 2019 22:02:42 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jesper Dangaard Brouer Date: Wed, 13 Feb 2019 02:55:34 +0100 > As pointed out by David Miller in [1] the current page_pool implementation > stores dma_addr_t in page->private. This won't work on 32-bit platforms with > 64-bit DMA addresses since the page->private is an unsigned long and the > dma_addr_t a u64. > > Since no driver is yet using the DMA mapping capabilities of the API let's > fix this by storing the information in 'struct page' and use that to store > and retrieve DMA addresses from network drivers. > > As long as the addresses returned from dma_map_page() are aligned the first > bit, used by the compound pages code should not be set. > > Ilias tested the first two patches on Espressobin driver mvneta, for which > we have patches for using the DMA API of page_pool. > > [1]: https://lore.kernel.org/netdev/20181207.230655.1261252486319967024.davem@davemloft.net/ > > Signed-off-by: Jesper Dangaard Brouer > Signed-off-by: Ilias Apalodimas Series applied, thanks Jesper.