net/sched: get rid of qdisc->padded
kmalloc() of sufficiently big portion of memory is cache-aligned in regular conditions. If some debugging options are used, there is no reason qdisc structures would need 64-byte alignment if most other kernel structures are not aligned. This get rid of QDISC_ALIGN and QDISC_ALIGNTO. Addition of privdata field will help implementing the reverse of qdisc_priv() and documents where the private data is. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Allen Pais <allen.lkml@gmail.com> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:

committed by
Jakub Kicinski

parent
036dfd8322
commit
846e463a70
@@ -91,7 +91,7 @@ struct Qdisc {
|
||||
struct net_rate_estimator __rcu *rate_est;
|
||||
struct gnet_stats_basic_cpu __percpu *cpu_bstats;
|
||||
struct gnet_stats_queue __percpu *cpu_qstats;
|
||||
int padded;
|
||||
int pad;
|
||||
refcount_t refcnt;
|
||||
|
||||
/*
|
||||
@@ -112,6 +112,9 @@ struct Qdisc {
|
||||
/* for NOLOCK qdisc, true if there are no enqueued skbs */
|
||||
bool empty;
|
||||
struct rcu_head rcu;
|
||||
|
||||
/* private data */
|
||||
long privdata[] ____cacheline_aligned;
|
||||
};
|
||||
|
||||
static inline void qdisc_refcount_inc(struct Qdisc *qdisc)
|
||||
|
Reference in New Issue
Block a user