From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 0918C200B49; Sat, 18 Aug 2012 17:59:27 -0700 (PDT) Received: by wibhm2 with SMTP id hm2so2116306wib.10 for ; Sat, 18 Aug 2012 17:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=GkQ/KZleL7SwLEKanJQ2zwiL8E186Qtt7epXcQWD/LQ=; b=X/EldP0R9I6RF+rqGNpKOYzNn6b0+SxP/5h7qriOoUybLtqk9Xr9vVanEkpdjTDPvm Bj7DHeX5XnShnYoBji+ljsHnBDDWvHZWxe/rJmp058ONX3+2bh5lFpGCqJoXYMWI+zve krBpWNcN2rOSievSDWKWYMc5RdGbB0rqYZHTpGQUdiiwI3hhY/Fq013LJ4hA1LU1Cc7G YxK9mjr0Vk6bNnzP2ifoiCpvCsk4GLqVdff0RuY//9/EM4xnXvGSfvSi4puUTShzCxDu +xz50ZxTkgoNItZnneDEtogrV7eWii7HJW4NS1fDxcAaa+qrmzti3uavWsFJITzkYfPT KX7Q== Received: by 10.216.144.234 with SMTP id n84mr4952384wej.78.1345337964096; Sat, 18 Aug 2012 17:59:24 -0700 (PDT) Received: from [192.168.1.4] (cpc3-seac6-0-0-cust991.7-2.cable.virginmedia.com. [81.105.255.224]) by mx.google.com with ESMTPS id z11sm28301512wiv.10.2012.08.18.17.59.21 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 18 Aug 2012 17:59:22 -0700 (PDT) Message-ID: <50303A69.2070108@gmail.com> Date: Sun, 19 Aug 2012 01:59:21 +0100 From: Robert Bradley User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Dave Taht References: <502F2FA3.1000004@renta.net> <502FD9EA.6070009@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: bloat-devel , cerowrt-devel@lists.bufferbloat.net Subject: Re: [Cerowrt-devel] Raspberry Pi build X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2012 00:59:28 -0000 On 18/08/12 19:53, Dave Taht wrote: > On Sat, Aug 18, 2012 at 11:07 AM, Robert Bradley > wrote: >> I did a bit of digging, and the Raspberry Pi uses the SMSC LAN9512 chip for >> wired Ethernet >> (http://www.smsc.com/media/Downloads_Public/Data_Sheets/9512.pdf). The >> smsc95xx driver currently lacks BQL support, so that would need to be added >> first. > 22k worth of native buffering in the driver (at least at this layer) > (at 100Mbit, I usually use 3k) > > #define DEFAULT_HS_BURST_CAP_SIZE (16 * 1024 + 5 * HS_USB_PKT_SIZE) > #define DEFAULT_FS_BURST_CAP_SIZE (6 * 1024 + 33 * FS_USB_PKT_SIZE) > > And: Either this is a "yea! one abstraction to fit them all", or a > "oh, god, we need something else to track completions", as above it > uses a generic usbnet.c driver, which, sigh, does try to aggregate > too. At least USB should be relatively clean compared to wireless, so less need to check for partially-lost frames? Assuming usbnet is "one abstraction to fit them all" for the moment, I think I might possibly have a patch for BQL support, as long as I've not done anything stupid. diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index b7fbd35..04404b0 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -777,6 +777,7 @@ int usbnet_open (struct net_device *net) } set_bit(EVENT_DEV_OPEN, &dev->flags); + netdev_reset_queue(net); netif_start_queue (net); netif_info(dev, ifup, dev->net, "open: enable queueing (rx %d, tx %d) mtu %d %s framing\n", @@ -1021,11 +1022,14 @@ static void tx_complete (struct urb *urb) struct sk_buff *skb = (struct sk_buff *) urb->context; struct skb_data *entry = (struct skb_data *) skb->cb; struct usbnet *dev = entry->dev; + unsigned int bytes_compl = 0, pkts_compl = 0; if (urb->status == 0) { if (!(dev->driver_info->flags & FLAG_MULTI_PACKET)) dev->net->stats.tx_packets++; dev->net->stats.tx_bytes += entry->length; + pkts_compl++; + bytes_compl += skb->len; } else { dev->net->stats.tx_errors++; @@ -1060,6 +1064,7 @@ static void tx_complete (struct urb *urb) } } + netdev_completed_queue(dev->net, pkts_compl, bytes_compl); usb_autopm_put_interface_async(dev->intf); (void) defer_bh(dev, skb, &dev->txq, tx_done); } @@ -1195,6 +1200,7 @@ not_drop: #ifdef CONFIG_PM deferred: #endif + netdev_sent_queue(net, skb->len); return NETDEV_TX_OK; } EXPORT_SYMBOL_GPL(usbnet_start_xmit); -- Robert Bradley