aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r--include/net/sch_generic.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index e7f4e21cc3e1..6eab63363e59 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -58,14 +58,12 @@ struct Qdisc {
58 * multiqueue device. 58 * multiqueue device.
59 */ 59 */
60#define TCQ_F_WARN_NONWC (1 << 16) 60#define TCQ_F_WARN_NONWC (1 << 16)
61 int padded; 61 u32 limit;
62 const struct Qdisc_ops *ops; 62 const struct Qdisc_ops *ops;
63 struct qdisc_size_table __rcu *stab; 63 struct qdisc_size_table __rcu *stab;
64 struct list_head list; 64 struct list_head list;
65 u32 handle; 65 u32 handle;
66 u32 parent; 66 u32 parent;
67 atomic_t refcnt;
68 struct gnet_stats_rate_est rate_est;
69 int (*reshape_fail)(struct sk_buff *skb, 67 int (*reshape_fail)(struct sk_buff *skb,
70 struct Qdisc *q); 68 struct Qdisc *q);
71 69
@@ -76,8 +74,9 @@ struct Qdisc {
76 */ 74 */
77 struct Qdisc *__parent; 75 struct Qdisc *__parent;
78 struct netdev_queue *dev_queue; 76 struct netdev_queue *dev_queue;
79 struct Qdisc *next_sched;
80 77
78 struct gnet_stats_rate_est64 rate_est;
79 struct Qdisc *next_sched;
81 struct sk_buff *gso_skb; 80 struct sk_buff *gso_skb;
82 /* 81 /*
83 * For performance sake on SMP, we put highly modified fields at the end 82 * For performance sake on SMP, we put highly modified fields at the end
@@ -88,8 +87,10 @@ struct Qdisc {
88 unsigned int __state; 87 unsigned int __state;
89 struct gnet_stats_queue qstats; 88 struct gnet_stats_queue qstats;
90 struct rcu_head rcu_head; 89 struct rcu_head rcu_head;
91 spinlock_t busylock; 90 int padded;
92 u32 limit; 91 atomic_t refcnt;
92
93 spinlock_t busylock ____cacheline_aligned_in_smp;
93}; 94};
94 95
95static inline bool qdisc_is_running(const struct Qdisc *qdisc) 96static inline bool qdisc_is_running(const struct Qdisc *qdisc)
@@ -679,7 +680,7 @@ static inline struct sk_buff *skb_act_clone(struct sk_buff *skb, gfp_t gfp_mask,
679#endif 680#endif
680 681
681struct psched_ratecfg { 682struct psched_ratecfg {
682 u64 rate_bps; 683 u64 rate_bytes_ps; /* bytes per second */
683 u32 mult; 684 u32 mult;
684 u16 overhead; 685 u16 overhead;
685 u8 shift; 686 u8 shift;
@@ -697,7 +698,7 @@ static inline void psched_ratecfg_getrate(struct tc_ratespec *res,
697 const struct psched_ratecfg *r) 698 const struct psched_ratecfg *r)
698{ 699{
699 memset(res, 0, sizeof(*res)); 700 memset(res, 0, sizeof(*res));
700 res->rate = r->rate_bps >> 3; 701 res->rate = r->rate_bytes_ps;
701 res->overhead = r->overhead; 702 res->overhead = r->overhead;
702} 703}
703 704