[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR0402MB280097A09BC2CF202EF3004EE04C0@VI1PR0402MB2800.eurprd04.prod.outlook.com>
Date: Tue, 19 Nov 2019 14:09:30 +0000
From: Ioana Ciornei <ioana.ciornei@....com>
To: Laurentiu Tudor <laurentiu.tudor@....com>,
David Miller <davem@...emloft.net>
CC: "hch@....de" <hch@....de>,
"robin.murphy@....com" <robin.murphy@....com>,
"joro@...tes.org" <joro@...tes.org>,
Ioana Ciocoi Radulescu <ruxandra.radulescu@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Leo Li <leoyang.li@....com>,
Diana Madalina Craciun <diana.craciun@....com>,
Madalin Bucur <madalin.bucur@....com>,
Camelia Alexandra Groza <camelia.groza@....com>,
Roy Pledge <roy.pledge@....com>
Subject: RE: [PATCH v3 0/4] dma-mapping: introduce new dma unmap and sync
variants
> Subject: Re: [PATCH v3 0/4] dma-mapping: introduce new dma unmap and sync
> variants
>
> On 13.11.2019 22:11, David Miller wrote:
> > From: Laurentiu Tudor <laurentiu.tudor@....com>
> > Date: Wed, 13 Nov 2019 12:24:17 +0000
> >
> >> From: Laurentiu Tudor <laurentiu.tudor@....com>
> >>
> >> This series introduces a few new dma unmap and sync api variants
> >> that, on top of what the originals do, return the virtual address
> >> corresponding to the input dma address. In order to do that a new dma
> >> map op is added, .get_virt_addr that takes the input dma address and
> >> returns the virtual address backing it up.
> >> The second patch adds an implementation for this new dma map op in
> >> the generic iommu dma glue code and wires it in.
> >> The third patch updates the dpaa2-eth driver to use the new apis.
> >
> > The driver should store the mapping in it's private software state if
> > it needs this kind of conversion.
>
> On this hardware there's no way of conveying additional frame information,
> such as original va/pa behind the dma address. We have also pondered on the
> idea of keeping this in some kind of data structure but could not find a lock-less
> solution which obviously would bring performance to the ground.
> I'll let my colleagues maintaining these ethernet drivers to get into more details,
> if required.
>
As Laurentiu pointed out before, keeping a mapping in the driver's private data doesn't
seem feasible without a locking mechanism which in turn would be an immense impact
performance wise.
We also feel that instead of hacking our individual drivers we should extend the
core DMA API to also fit this use case, which is exactly what
Laurentiu's patch set is doing.
Our hope is to come to a common understanding of the next steps since this
would unblock some activities currently in the backlog.
Ioana
Powered by blists - more mailing lists