Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992911AbbEEN56 (ORCPT ); Tue, 5 May 2015 09:57:58 -0400 Received: from smtprelay0119.hostedemail.com ([216.40.44.119]:60849 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2992488AbbEEN5s (ORCPT ); Tue, 5 May 2015 09:57:48 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2559:2562:2693:2729:2828:2895:2904:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3870:3871:3874:4225:4321:5007:6261:7576:7903:10004:10400:10848:11232:11658:11914:12043:12517:12519:12740:13069:13311:13357:13972:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: eyes62_26ad919680850 X-Filterd-Recvd-Size: 2491 Message-ID: <1430834264.7191.9.camel@perches.com> Subject: Re: [PATCH 02/12] net: axienet: Handle 0 packet receive gracefully From: Joe Perches To: Michal Simek Cc: netdev@vger.kernel.org, Peter Crosthwaite , =?ISO-8859-1?Q?S=F6ren?= Brinkmann , monstr@monstr.eu, John Linn , Anirudha Sarangi , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Tue, 05 May 2015 06:57:44 -0700 In-Reply-To: <55b3c89b3549c61d62b8440636516fd572870842.1430817941.git.michal.simek@xilinx.com> References: <7fb84f65a61bbe0fdb4b61a871cf4d4f7910955d.1430817941.git.michal.simek@xilinx.com> <55b3c89b3549c61d62b8440636516fd572870842.1430817941.git.michal.simek@xilinx.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1505 Lines: 33 On Tue, 2015-05-05 at 11:25 +0200, Michal Simek wrote: > From: Peter Crosthwaite > > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/