From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA34FC433E7 for ; Wed, 14 Oct 2020 00:04:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 979BB20789 for ; Wed, 14 Oct 2020 00:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602633842; bh=r1nAnxVv/eKDQN7JToxDXPC6mg1uZBhl71AnIjFw31c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=inc0fmQkGdidLjTzMw4CXTbtzV8OrZNTlMZYMx7/kBxkAzxD6wGZ6/owt9NEzFKkw HGWgWBI2Q3MGoIszvtR+2SBsqVi7uIFBUiuSwHH3cBdUsv9uGQJXBN05ULmE7FaGSc XPNQtz/42d+i9BtJ4aOnuQ030KqFpevcfE3Yu578= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389405AbgJNAEB (ORCPT ); Tue, 13 Oct 2020 20:04:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730370AbgJNAEB (ORCPT ); Tue, 13 Oct 2020 20:04:01 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 54A9220776; Wed, 14 Oct 2020 00:04:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602633840; bh=r1nAnxVv/eKDQN7JToxDXPC6mg1uZBhl71AnIjFw31c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=p1/CPNjjc4AvlAPo4ua1mnYI/l+xmWHNyK8fIFPGsWdntkP9lIXedMaNXr723QlCU wcNZQ6RdNVEuipndhoIh6TYwmK7RFabTUhEDKscb6lAfGQ8bORlE4UlurQwtJ0M2co Xt4L/B5H91YkqrWkeevBG1fhXngb6mdiaaVcyHrk= Date: Tue, 13 Oct 2020 17:03:58 -0700 From: Jakub Kicinski To: Willy Tarreau Cc: Nicolas Ferre , Claudiu Beznea , netdev@vger.kernel.org, David Miller Subject: Re: [PATCH net-next 0/3] macb: support the 2-deep Tx queue on at91 Message-ID: <20201013170358.1a4d282a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201011090944.10607-1-w@1wt.eu> References: <20201011090944.10607-1-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sun, 11 Oct 2020 11:09:41 +0200 Willy Tarreau wrote: > while running some tests on my Breadbee board, I noticed poor network > Tx performance. I had a look at the driver (macb, at91ether variant) > and noticed that at91ether_start_xmit() immediately stops the queue > after sending a frame and waits for the interrupt to restart the queue, > causing a dead time after each packet is sent. > > The AT91RM9200 datasheet states that the controller supports two frames, > one being sent and the other one being queued, so I performed minimal > changes to support this. The transmit performance on my board has > increased by 50% on medium-sized packets (HTTP traffic), and with large > packets I can now reach line rate. > > Since this driver is shared by various platforms, I tried my best to > isolate and limit the changes as much as possible and I think it's pretty > reasonable as-is. I've run extensive tests and couldn't meet any > unexpected situation (no stall, overflow nor lockup). > > There are 3 patches in this series. The first one adds the missing > interrupt flag for RM9200 (TBRE, indicating the tx buffer is willing > to take a new packet). The second one replaces the single skb with a > 2-array and uses only index 0. It does no other change, this is just > to prepare the code for the third one. The third one implements the > queue. Packets are added at the tail of the queue, the queue is > stopped at 2 packets and the interrupt releases 0, 1 or 2 depending > on what the transmit status register reports. LGTM. There's always a chance that this will make other designs explode, but short of someone from Cadence giving us a timely review we have only one way to find that out.. :) Applied, thanks!