From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751526AbdBDWjm (ORCPT ); Sat, 4 Feb 2017 17:39:42 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:39369 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750955AbdBDWjk (ORCPT ); Sat, 4 Feb 2017 17:39:40 -0500 Subject: Re: [PATCH net-next 5/9] sunvnet: add memory barrier before check for tx enable To: Eric Dumazet References: <1486143755-192532-1-git-send-email-shannon.nelson@oracle.com> <1486143755-192532-6-git-send-email-shannon.nelson@oracle.com> <1486144585.21871.92.camel@edumazet-glaptop3.roam.corp.google.com> <1486159919.21871.104.camel@edumazet-glaptop3.roam.corp.google.com> Cc: netdev@vger.kernel.org, davem@davemloft.net, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org From: Shannon Nelson Organization: Oracle Corporation Message-ID: <884c76d5-4881-05b4-582e-bc97a0538586@oracle.com> Date: Sat, 4 Feb 2017 14:39:53 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1486159919.21871.104.camel@edumazet-glaptop3.roam.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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