Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-05 Thread David Miller
From: Ilias Apalodimas Date: Thu, 4 Jul 2019 17:46:09 +0300 > Quoting Arnd, > > We have to do a sync_single_for_device /somewhere/ before the > buffer is given to the device. On a non-cache-coherent machine with > a write-back cache, there may be dirty cache lines that get written back > after

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Ilias Apalodimas
On Thu, Jul 04, 2019 at 08:52:50PM +0300, Ilias Apalodimas wrote: > On Thu, Jul 04, 2019 at 07:39:44PM +0200, Jesper Dangaard Brouer wrote: > > On Thu, 4 Jul 2019 17:46:09 +0300 > > Ilias Apalodimas wrote: > > > > > Quoting Arnd, > > > > > > We have to do a sync_single_for_device /somewhere/ be

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Ilias Apalodimas
On Thu, Jul 04, 2019 at 07:39:44PM +0200, Jesper Dangaard Brouer wrote: > On Thu, 4 Jul 2019 17:46:09 +0300 > Ilias Apalodimas wrote: > > > Quoting Arnd, > > > > We have to do a sync_single_for_device /somewhere/ before the > > buffer is given to the device. On a non-cache-coherent machine with

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Jesper Dangaard Brouer
On Thu, 4 Jul 2019 17:46:09 +0300 Ilias Apalodimas wrote: > Quoting Arnd, > > We have to do a sync_single_for_device /somewhere/ before the > buffer is given to the device. On a non-cache-coherent machine with > a write-back cache, there may be dirty cache lines that get written back > after th

Re: [net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Arnd Bergmann
On Thu, Jul 4, 2019 at 4:46 PM Ilias Apalodimas wrote: > diff --git a/drivers/net/ethernet/socionext/netsec.c > b/drivers/net/ethernet/socionext/netsec.c > index 5544a722543f..ada7626bf3a2 100644 > --- a/drivers/net/ethernet/socionext/netsec.c > > + dma_start = page_pool_get_dma_addr(page);

[net-next, PATCH, v2] net: netsec: Sync dma for device on buffer allocation

2019-07-04 Thread Ilias Apalodimas
Quoting Arnd, We have to do a sync_single_for_device /somewhere/ before the buffer is given to the device. On a non-cache-coherent machine with a write-back cache, there may be dirty cache lines that get written back after the device DMA's data into it (e.g. from a previous memset from before the