netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev@vger.kernel.org, linux-mm@kvack.org,
	"Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	willy@infradead.org, "Saeed Mahameed" <saeedm@mellanox.com>,
	"Alexander Duyck" <alexander.duyck@gmail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	mgorman@techsingularity.net,
	"David S. Miller" <davem@davemloft.net>,
	"Tariq Toukan" <tariqt@mellanox.com>
Subject: Re: [net-next PATCH V2 1/3] mm: add dma_addr_t to struct page
Date: Tue, 12 Feb 2019 10:23:52 -0800	[thread overview]
Message-ID: <2d0de75d-960c-6866-b396-86490ca479af@gmail.com> (raw)
In-Reply-To: <20190212191917.2ef91a88@carbon>

On 2/12/19 10:19 AM, Jesper Dangaard Brouer wrote:
> On Tue, 12 Feb 2019 10:05:39 -0800
> Florian Fainelli <f.fainelli@gmail.com> wrote:
> 
>> On 2/12/19 6:49 AM, Jesper Dangaard Brouer wrote:
>>> The page_pool API is using page->private to store DMA addresses.
>>> As pointed out by David Miller we can't use that on 32-bit architectures
>>> with 64-bit DMA
>>>
>>> This patch adds a new dma_addr_t struct to allow storing DMA addresses
>>>
>>> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
>>> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>>> Acked-by: Andrew Morton <akpm@linux-foundation.org>
>>> ---
>>>  include/linux/mm_types.h |    7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
>>> index 2c471a2c43fa..581737bd0878 100644
>>> --- a/include/linux/mm_types.h
>>> +++ b/include/linux/mm_types.h
>>> @@ -95,6 +95,13 @@ struct page {
>>>  			 */
>>>  			unsigned long private;
>>>  		};
>>> +		struct {	/* page_pool used by netstack */
>>> +			/**
>>> +			 * @dma_addr: page_pool requires a 64-bit value even on
>>> +			 * 32-bit architectures.
>>> +			 */  
>>
>> Nit: might require? dma_addr_t, as you mention in the commit may have a
>> different size based on CONFIG_ARCH_DMA_ADDR_T_64BIT.
> 
> So you want me to change the comment to be:
> 
> /**
>  * @dma_addr: might require a 64-bit value even on
>  * 32-bit architectures.
>  */
> 
> Correctly understood?

Correct, that is what I would change. The commit message is correct, but
the comment makes it sound like dma_addr_t is guaranteed to be 64-bit,
while it is actually platform dependent. Does that make it clearer?
-- 
Florian

  reply	other threads:[~2019-02-12 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12 14:48 [net-next PATCH V2 0/3] Fix page_pool API and dma address storage Jesper Dangaard Brouer
2019-02-12 14:49 ` [net-next PATCH V2 1/3] mm: add dma_addr_t to struct page Jesper Dangaard Brouer
2019-02-12 18:05   ` Florian Fainelli
2019-02-12 18:19     ` Jesper Dangaard Brouer
2019-02-12 18:23       ` Florian Fainelli [this message]
2019-02-12 14:49 ` [net-next PATCH V2 2/3] net: page_pool: don't use page->private to store dma_addr_t Jesper Dangaard Brouer
2019-02-12 14:49 ` [net-next PATCH V2 3/3] page_pool: use DMA_ATTR_SKIP_CPU_SYNC for DMA mappings Jesper Dangaard Brouer
2019-02-12 17:12   ` kbuild test robot
2019-02-12 17:58     ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d0de75d-960c-6866-b396-86490ca479af@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.duyck@gmail.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=tariqt@mellanox.com \
    --cc=toke@toke.dk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).