mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: soren.brinkmann@xilinx.com
Cc: michal.simek@xilinx.com, nicolas.ferre@atmel.com, git@xilinx.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH 5/5] net: macb: Fix race between HW and driver
Date: Mon, 05 May 2014 16:56:53 -0400 (EDT)	[thread overview]
Message-ID: <20140505.165653.1184059074645793091.davem@davemloft.net> (raw)
In-Reply-To: <1399243382-12528-6-git-send-email-soren.brinkmann@xilinx.com>

From: Soren Brinkmann <soren.brinkmann@xilinx.com>
Date: Sun,  4 May 2014 15:43:02 -0700

> Under "heavy" RX load, the driver cannot handle the descriptors fast
> enough. In detail, when a descriptor is consumed, its used flag is
> cleared and once the RX budget is consumed all descriptors with a
> cleared used flag are prepared to receive more data. Under load though,
> the HW may constantly receive more data and use those descriptors with a
> cleared used flag before they are actually prepared for next usage.
> 
> The head and tail pointers into the RX-ring should always be valid and
> we can omit clearing and checking of the used flag.
> 
> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>

Isn't the RX_USED bit the only thing that controls what RX entries
the chip will try to use?

I can't see how you can just remove the RX_USED bit handling
altogether.

The problem actually seems to be that in the current code we clear the
RX_USED bit before we actually reallocate the buffer and set it up.

It should be a bug to see the RX_USED bit set in gem_rx_refill(), and
the only reason why it can happen is exactly because you're clearing it
too early in gem_rx().

This change doesn't seem to be correct, I'm not applying this series
sorry.

  reply	other threads:[~2014-05-05 20:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-04 22:42 [PATCH 0/5] net: macb: Fixes Soren Brinkmann
2014-05-04 22:42 ` [PATCH 1/5] net: macb: Pass same size to DMA_UNMAP as used for DMA_MAP Soren Brinkmann
2014-05-04 22:42 ` [PATCH 2/5] net: macb: Clear interrupt flags Soren Brinkmann
2014-05-04 22:43 ` [PATCH 3/5] net: macb: Re-enable RX interrupt only when RX is done Soren Brinkmann
2014-05-04 22:43 ` [PATCH 4/5] net: macb: Remove 'unlikely' optimization Soren Brinkmann
2014-05-04 22:43 ` [PATCH 5/5] net: macb: Fix race between HW and driver Soren Brinkmann
2014-05-05 20:56   ` David Miller [this message]
2014-05-05 21:05     ` Sören Brinkmann
2014-05-05 21:09       ` David Miller
2014-05-05 21:10         ` Sören Brinkmann
2014-05-05 21:12           ` David Miller
2014-05-22 13:18 ` [PATCH 0/5] net: macb: Fixes Alexandre Belloni

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=20140505.165653.1184059074645793091.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=git@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=soren.brinkmann@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®