* preliminary BQL usbnet support. Testers wanted.
@ 2012-11-15 13:56 Dave Taht
2012-11-16 3:17 ` [Cerowrt-devel] " Michael Richardson
0 siblings, 1 reply; 2+ messages in thread
From: Dave Taht @ 2012-11-15 13:56 UTC (permalink / raw)
To: cerowrt-devel, bloat-devel, oneukum, codel
[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]
I do not have any usbnet devices at my disposal.
Anyone? I think the old USB ipaqs were the first to use this infrastructure...
pandaboard? rasperri pi?
---------- Forwarded message ----------
From: Oliver Neukum
On Monday 12 November 2012 15:17:13 Dave Taht wrote:
> http://www.spinics.net/lists/netdev/msg216203.html
>
> I saw your posting on net-next on the kaweth driver, saw that it was
> stopping the queue deeper, see you are presently SOL.
>
> Can we help? what usb ethernet device has this? Did you get anywhere on usbnet?
I do have a version for usbnet that does nothing for
the subdrivers doing packet aggregation. The infrastructure for
that is just not present at present.
However, I am a bit sceptic. The queuing algorithm seems
to make the implicit assumption that you can transfer data
at arbitrary times. That is just not true for USB.
For testing, you can certainly use a Pandaboard.
Perhaps it would be good to call for more testers on netdev.
I am not ready to merge this without extensive testing.
Regards
Oliver
--
Dave Täht
Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html
[-- Attachment #2: 0001-usbnet-BQL-support.patch --]
[-- Type: text/x-patch, Size: 1924 bytes --]
From 4ae735549ead84b2d0fc83dddf17e8e33ee13e36 Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@neukum.org>
Date: Tue, 13 Nov 2012 08:23:38 +0100
Subject: [PATCH] usbnet: BQL support
THis implements support for BQL for drivers that don't do frame aggregation.
The limit is necessary as there is no common infrastructure for accurate
statistics.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
---
drivers/net/usb/usbnet.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 5bf7717..cd916a2 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -776,6 +776,8 @@ int usbnet_open (struct net_device *net)
}
set_bit(EVENT_DEV_OPEN, &dev->flags);
+ if (!(dev->driver_info->flags & FLAG_MULTI_PACKET))
+ 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",
@@ -1025,11 +1027,15 @@ static void tx_complete (struct urb *urb)
struct usbnet *dev = entry->dev;
if (urb->status == 0) {
- if (!(dev->driver_info->flags & FLAG_MULTI_PACKET))
+ if (!(dev->driver_info->flags & FLAG_MULTI_PACKET)) {
dev->net->stats.tx_packets++;
+ netdev_completed_queue(dev->net, 1, skb->len);
+ }
dev->net->stats.tx_bytes += entry->length;
} else {
dev->net->stats.tx_errors++;
+ if (!(dev->driver_info->flags & FLAG_MULTI_PACKET))
+ netdev_completed_queue(dev->net, 1, skb->len);
switch (urb->status) {
case -EPIPE:
@@ -1178,6 +1184,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
case 0:
net->trans_start = jiffies;
__usbnet_queue_skb(&dev->txq, skb, tx_start);
+ if (!(info->flags & FLAG_MULTI_PACKET))
+ netdev_sent_queue(net, skb->len);
if (dev->txq.qlen >= TX_QLEN (dev))
netif_stop_queue (net);
}
--
1.7.7
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-16 3:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 13:56 preliminary BQL usbnet support. Testers wanted Dave Taht
2012-11-16 3:17 ` [Cerowrt-devel] " Michael Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox