summaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2011-11-28 16:33:09 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-29 12:46:19 -0500
commit114cf5802165ee93e3ab461c9c505cd94a08b800 (patch)
tree88208dddd7c1e90f5e1a840ad0ad7afcea991050 /net/core/dev.c
parent927fbec13e40648d3c87cbb1daaac5b1fb9c8775 (diff)
downloadlinux-3.10-114cf5802165ee93e3ab461c9c505cd94a08b800.tar.gz
linux-3.10-114cf5802165ee93e3ab461c9c505cd94a08b800.tar.bz2
linux-3.10-114cf5802165ee93e3ab461c9c505cd94a08b800.zip
bql: Byte queue limits
Networking stack support for byte queue limits, uses dynamic queue limits library. Byte queue limits are maintained per transmit queue, and a dql structure has been added to netdev_queue structure for this purpose. Configuration of bql is in the tx-<n> sysfs directory for the queue under the byte_queue_limits directory. Configuration includes: limit_min, bql minimum limit limit_max, bql maximum limit hold_time, bql slack hold time Also under the directory are: limit, current byte limit inflight, current number of bytes on the queue Signed-off-by: Tom Herbert <therbert@google.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index cb8f753b423..91a59912207 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5470,6 +5470,9 @@ static void netdev_init_one_queue(struct net_device *dev,
queue->xmit_lock_owner = -1;
netdev_queue_numa_node_write(queue, NUMA_NO_NODE);
queue->dev = dev;
+#ifdef CONFIG_BQL
+ dql_init(&queue->dql, HZ);
+#endif
}
static int netif_alloc_netdev_queues(struct net_device *dev)