linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: michal.simek@xilinx.com (Michal Simek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/12] net: axienet: Handle 0 packet receive gracefully
Date: Tue, 5 May 2015 20:49:53 +0200	[thread overview]
Message-ID: <554910D1.1030706@xilinx.com> (raw)
In-Reply-To: <1430834264.7191.9.camel@perches.com>

On 05/05/2015 03:57 PM, Joe Perches wrote:
> On Tue, 2015-05-05 at 11:25 +0200, Michal Simek wrote:
>> From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>
>> The AXI-DMA rx-delay interrupt can sometimes be triggered
>> when there are 0 outstanding packets received. This is due
>> to the fact that the receive function will greedily consume
>> as many packets as possible on interrupt. So if two packets
>> (with a very particular timing) arrive in succession they
>> will each cause the rx-delay interrupt, but the first interrupt
>> will consume both packets.
>> This means the second interrupt is a 0 packet receive.
>>
>> This is mostly OK, except that the tail pointer register is
>> updated unconditionally on receive. Currently the tail pointer
>> is always set to the current bd-ring descriptor under
>> the assumption that the hardware has moved onto the next
>> descriptor. What this means for length 0 recv is the current
>> descriptor that the hardware is potentially yet to use will
>> be marked as the tail. This causes the hardware to think
>> its run out of descriptors deadlocking the whole rx path.
>>
>> Fixed by updating the tail pointer to the most recent
>> successfully consumed descriptor.
> 
> I think some of this would be good to have as comments
> in the code instead of just in the changelog.


Is it really needed? If yes, no problem to add it but git blame can
point you to that.

Thanks,
Michal

  reply	other threads:[~2015-05-05 18:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05  9:25 [PATCH 01/12] net: axienet: Support for RGMII Michal Simek
2015-05-05  9:25 ` [PATCH 02/12] net: axienet: Handle 0 packet receive gracefully Michal Simek
2015-05-05  9:58   ` Shubhrajyoti Datta
2015-05-05 13:57   ` Joe Perches
2015-05-05 18:49     ` Michal Simek [this message]
2015-05-05 18:53       ` Joe Perches
2015-05-05  9:25 ` [PATCH 03/12] net: axienet: Service completion interrupts ASAP Michal Simek
2015-05-05  9:25 ` [PATCH 04/12] net: axienet: Handle jumbo frames for lesser frame sizes Michal Simek
2015-05-05  9:25 ` [PATCH 05/12] net: axienet: Support phy-less mode of operation Michal Simek
2015-05-05  9:25 ` [PATCH 06/12] net: axienet: Removed coding style errors and warnings Michal Simek
2015-05-05  9:26 ` [PATCH 07/12] net: axienet: Fix comments blocks Michal Simek
2015-05-05  9:26 ` [PATCH 08/12] net: axienet: Use pdev instead of op Michal Simek
2015-05-05  9:26 ` [PATCH 09/12] net: axienet: Use devm_* calls Michal Simek
2015-05-05  9:26 ` [PATCH 10/12] net: axienet: Use of_property_* calls Michal Simek
2015-05-05  9:26 ` [PATCH 11/12] net: axienet: Removed _of_ prefix in probe and remove functions Michal Simek
2015-05-05  9:26 ` [PATCH 12/12] net: axienet: Fix kernel-doc warnings Michal Simek
2015-05-05 23:35 ` [PATCH 01/12] net: axienet: Support for RGMII David Miller
2015-05-06  5:29   ` Michal Simek

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=554910D1.1030706@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).