All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	romieu@fr.zoreil.com, netdev@vger.kernel.org, nix@esperi.org.uk,
	rl@hellgate.ch, gurligebis@gentoo.org
Subject: Re: [PATCH net-next 1/4] via-rhine: commit receive buffer address before descriptor status update.
Date: Tue, 07 Apr 2015 16:20:49 -0700	[thread overview]
Message-ID: <55246651.3000007@redhat.com> (raw)
In-Reply-To: <1428445367.25985.214.camel@edumazet-glaptop2.roam.corp.google.com>


On 04/07/2015 03:22 PM, Eric Dumazet wrote:
> On Tue, 2015-04-07 at 15:12 -0700, Alexander Duyck wrote:
>> On 04/07/2015 02:54 PM, Eric Dumazet wrote:
>>> To be fair, only 2 drivers currently use dma_wmb()
>> Hey, I got at least 4..  :-)  I only got around to patching 3 Intel
>> drivers and one RealTek since that is what I had to test with.  I was
>> honestly hoping there would be more interest from other developers to
>> pick this up and update their drivers to avoid unnecessary barriers but
>> it doesn't look like I have had much luck on that front.
> Strange I see only 2 drivers here, and no Intel ones :
>
> # git grep -l dma_wmb drivers/net
> drivers/net/ethernet/amd/xgbe/xgbe-dev.c
> drivers/net/ethernet/realtek/r8169.c
>
> I probably missed something ;)

Yeah, I was thinking of the dma_rmb more than the dma_wmb, they are 
essentially just two sides to the same coin.

dma_rmb - read descriptor status for ownership, then dma_rmb, then if we 
own it process rest of descriptor
dma_wmb - write descriptor fields, then dma_wmb, then update status bit 
to release ownership

A wmb is still needed if a PIO doorbell must be used to notify the 
device of additional descriptors.

- Alex

  reply	other threads:[~2015-04-07 23:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-06 18:01 [PATCH RFT net-next 0/4] via-rhine receive buffers rework Francois Romieu
2015-04-06 18:01 ` [PATCH net-next 1/4] via-rhine: commit receive buffer address before descriptor status update Francois Romieu
2015-04-07 19:52   ` David Miller
2015-04-07 21:02     ` Francois Romieu
2015-04-07 21:19       ` Alexander Duyck
2015-04-07 21:27       ` David Miller
2015-04-07 21:54         ` Eric Dumazet
2015-04-07 22:12           ` Alexander Duyck
2015-04-07 22:22             ` Eric Dumazet
2015-04-07 23:20               ` Alexander Duyck [this message]
2015-04-08 11:40                 ` David Laight
2015-04-07 19:54   ` Alexander Duyck
2015-04-06 18:01 ` [PATCH net-next 2/4] via-rhine: add allocation helpers Francois Romieu
2015-04-06 18:01 ` [PATCH net-next 3/4] via-rhine: gotoize rhine_open error path Francois Romieu
2015-04-06 18:01 ` [PATCH net-next 4/4] via-rhine: forbid holes in the receive descriptor ring Francois Romieu
2015-04-06 21:46 ` [PATCH RFT net-next 0/4] via-rhine receive buffers rework Nix
2015-04-07 10:46   ` Nix
2015-04-07 19:31     ` Francois Romieu
2015-04-07 19:41       ` Nix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55246651.3000007@redhat.com \
    --to=alexander.h.duyck@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=gurligebis@gentoo.org \
    --cc=netdev@vger.kernel.org \
    --cc=nix@esperi.org.uk \
    --cc=rl@hellgate.ch \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.