aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2016-08-10 05:05:15 -0400
committerDavid S. Miller <davem@davemloft.net>2016-08-10 20:19:02 -0400
commit59cc1f61f09c26ce82c308e24b76141e1efe99f8 (patch)
treef643eab05a5617402f6f995b0304d3fbfa48570e /include/linux/netdevice.h
parente87a8f24c9151d449ab46d82a504c1ebfea210f2 (diff)
net: sched: convert qdisc linked list to hashtable
Convert the per-device linked list into a hashtable. The primary motivation for this change is that currently, we're not tracking all the qdiscs in hierarchy (e.g. excluding default qdiscs), as the lookup performed over the linked list by qdisc_match_from_root() is rather expensive. The ultimate goal is to get rid of hidden qdiscs completely, which will bring much more determinism in user experience. Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 076df5360ba5..96e0b6cd964e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -52,6 +52,7 @@
52#include <uapi/linux/netdevice.h> 52#include <uapi/linux/netdevice.h>
53#include <uapi/linux/if_bonding.h> 53#include <uapi/linux/if_bonding.h>
54#include <uapi/linux/pkt_cls.h> 54#include <uapi/linux/pkt_cls.h>
55#include <linux/hashtable.h>
55 56
56struct netpoll_info; 57struct netpoll_info;
57struct device; 58struct device;
@@ -1800,6 +1801,9 @@ struct net_device {
1800 unsigned int num_tx_queues; 1801 unsigned int num_tx_queues;
1801 unsigned int real_num_tx_queues; 1802 unsigned int real_num_tx_queues;
1802 struct Qdisc *qdisc; 1803 struct Qdisc *qdisc;
1804#ifdef CONFIG_NET_SCHED
1805 DECLARE_HASHTABLE (qdisc_hash, 4);
1806#endif
1803 unsigned long tx_queue_len; 1807 unsigned long tx_queue_len;
1804 spinlock_t tx_global_lock; 1808 spinlock_t tx_global_lock;
1805 int watchdog_timeo; 1809 int watchdog_timeo;