[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211020152312.6a7a9ffb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 20 Oct 2021 15:23:12 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Claudiu Manoil <claudiu.manoil@....com>,
Tim Gardner <tim.gardner@...onical.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Po Liu <po.liu@....com>
Subject: Re: [PATCH][linux-next] net: enetc: unmap DMA in enetc_send_cmd()
On Tue, 19 Oct 2021 19:47:17 +0000 Claudiu Manoil wrote:
> > I am curious why you do not need to call dma_sync_single_for_device()
> > before enetc_send_cmd()
> > in order to flush the contents of CPU cache to RAM. Is it because
> > __GFP_DMA marks
> > that page as uncached ? Or is it because of the SOC this runs on ?
> >
>
> Not sure how it works like this, but I think dma_alloc_coherent() should have
> been used here instead of the kmalloc + dma_map scheme.
Using dma_alloc_coherent() seems simpler and more correct,
let's do that instead.
Powered by blists - more mailing lists