From: Robert Bradley <robert.bradley1@gmail.com>
To: Dave Taht <dave.taht@gmail.com>
Cc: bloat-devel <bloat-devel@lists.bufferbloat.net>,
cerowrt-devel@lists.bufferbloat.net
Subject: Re: [Cerowrt-devel] Raspberry Pi build
Date: Sun, 19 Aug 2012 01:59:21 +0100 [thread overview]
Message-ID: <50303A69.2070108@gmail.com> (raw)
In-Reply-To: <CAA93jw4-82Kq7zzkPRNWhWOw54rcawLjrdDVB8bXvXjOH6Z0Sw@mail.gmail.com>
On 18/08/12 19:53, Dave Taht wrote:
> On Sat, Aug 18, 2012 at 11:07 AM, Robert Bradley
> <robert.bradley1@gmail.com> 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
next prev parent reply other threads:[~2012-08-19 0:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-18 6:01 Mark Constable
2012-08-18 17:38 ` Dave Taht
2012-08-18 18:07 ` Robert Bradley
2012-08-18 18:53 ` Dave Taht
2012-08-19 0:59 ` Robert Bradley [this message]
2012-08-22 12:15 ` Mark Constable
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
List information: https://lists.bufferbloat.net/postorius/lists/cerowrt-devel.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50303A69.2070108@gmail.com \
--to=robert.bradley1@gmail.com \
--cc=bloat-devel@lists.bufferbloat.net \
--cc=cerowrt-devel@lists.bufferbloat.net \
--cc=dave.taht@gmail.com \
/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