lkml.org 
[lkml]   [2017]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable
From
Date
On 2/3/2017 2:11 PM, Eric Dumazet wrote:
>
> Transmit completion might happen on another cpu, regardless of ldom.
>
> Therefore you need smp_rmb() here ( like mellanox/mlx4/en_tx.c) , or
> even smp_mb() as bnx2x does.
>
> dma_rmb() is never used in this context.
>

In that case, it looks like there are a couple other similar issues in
this code that need attention, that cropped up when the new dma_*mb()
interface was added. I'll see what I can do with those as well.

The comments and code a few lines above, some of DaveM's original driver
code, seem to dissuade us from the SMP version and originally used the
bare wmb(). Perhaps the bare rmb() should be used here? Again, I
suppose it doesn't matter much as it looks like they all boil down to
the same bit of asm, at least on sparc, which is all that matters for
this driver.

Thanks,
sln

\
 
 \ /
  Last update: 2017-02-04 23:40    [W:0.041 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site