Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1573766

Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable

From Shannon Nelson <shannon.nelson@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable
Date 2017-02-04 23:40 +0100
Message-ID <t7h9T-75V-11@gated-at.bofh.it> (permalink)
References <t6Q9H-4Ln-7@gated-at.bofh.it> <t6Q9H-4Ln-15@gated-at.bofh.it> <t6Qjo-4OT-17@gated-at.bofh.it> <t6TAB-7il-13@gated-at.bofh.it> <t6UmZ-7Sg-9@gated-at.bofh.it>
Organization Oracle Corporation

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-03 18:50 +0100
  Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check  for tx enable Eric Dumazet <eric.dumazet@gmail.com> - 2017-02-03 19:00 +0100
    Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for  tx enable Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-03 22:30 +0100
      Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check  for tx enable David Miller <davem@davemloft.net> - 2017-02-03 23:00 +0100
      Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check  for tx enable Eric Dumazet <eric.dumazet@gmail.com> - 2017-02-03 23:20 +0100
        Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for  tx enable Shannon Nelson <shannon.nelson@oracle.com> - 2017-02-04 23:40 +0100

csiph-web