From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH 3/3] net: hisilicon: new hip04 ethernet driver Date: Tue, 25 Mar 2014 18:57:21 +0100 Message-ID: <4392030.XayIa35sfH@wuerfel> References: <1395670496-17381-1-git-send-email-zhangfei.gao@linaro.org> <21873900.AIOr1ryy37@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Florian Fainelli Cc: Mark Rutland , "devicetree@vger.kernel.org" , Russell King - ARM Linux , Sergei Shtylyov , netdev , Zhangfei Gao , Zhangfei Gao , "David S. Miller" , linux-arm-kernel List-Id: devicetree@vger.kernel.org On Tuesday 25 March 2014 10:16:28 Florian Fainelli wrote: > > Ok, well that's really unfortunate, to achieve the best of everything, > the workaround should probably look like: > > - keep reclaiming TX buffers in ndo_start_xmit() in case you push more > packets to the NICs than your timer can free > - reclaim TX buffers in NAPI poll() context for "symetrical" workloads > where e.g: TCP ACKs received allow you to complete TX buffers > - have a timer like you suggest which should help with transmit only > workloads at a slow rate Yes, that is what I was thinking, but with orphaning the tx skbs, we can probably be a little smarter. Note that in order to check the state of the queue, we have to do a read from uncached memory, since the hardware also doesn't support cache coherent DMA. We don't want to do that too often. Arnd