Commit 20fea08b authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

[NET]: Move Qdisc_class_ops and Qdisc_ops in appropriate sections.

Qdisc_class_ops are const, and Qdisc_ops are mostly read.

Using "const" and "__read_mostly" qualifiers helps to reduce false
sharing.
Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a8cc6c8
...@@ -86,7 +86,7 @@ struct Qdisc_class_ops ...@@ -86,7 +86,7 @@ struct Qdisc_class_ops
struct Qdisc_ops struct Qdisc_ops
{ {
struct Qdisc_ops *next; struct Qdisc_ops *next;
struct Qdisc_class_ops *cl_ops; const struct Qdisc_class_ops *cl_ops;
char id[IFNAMSIZ]; char id[IFNAMSIZ];
int priv_size; int priv_size;
......
...@@ -527,7 +527,7 @@ static struct tcf_proto ** wme_classop_find_tcf(struct Qdisc *qd, ...@@ -527,7 +527,7 @@ static struct tcf_proto ** wme_classop_find_tcf(struct Qdisc *qd,
/* this qdisc is classful (i.e. has classes, some of which may have leaf qdiscs attached) /* this qdisc is classful (i.e. has classes, some of which may have leaf qdiscs attached)
* - these are the operations on the classes */ * - these are the operations on the classes */
static struct Qdisc_class_ops class_ops = static const struct Qdisc_class_ops class_ops =
{ {
.graft = wme_classop_graft, .graft = wme_classop_graft,
.leaf = wme_classop_leaf, .leaf = wme_classop_leaf,
...@@ -547,7 +547,7 @@ static struct Qdisc_class_ops class_ops = ...@@ -547,7 +547,7 @@ static struct Qdisc_class_ops class_ops =
/* queueing discipline operations */ /* queueing discipline operations */
static struct Qdisc_ops wme_qdisc_ops = static struct Qdisc_ops wme_qdisc_ops __read_mostly =
{ {
.next = NULL, .next = NULL,
.cl_ops = &class_ops, .cl_ops = &class_ops,
......
...@@ -130,7 +130,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -130,7 +130,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
struct tcf_proto **back, **chain; struct tcf_proto **back, **chain;
struct tcf_proto *tp; struct tcf_proto *tp;
struct tcf_proto_ops *tp_ops; struct tcf_proto_ops *tp_ops;
struct Qdisc_class_ops *cops; const struct Qdisc_class_ops *cops;
unsigned long cl; unsigned long cl;
unsigned long fh; unsigned long fh;
int err; int err;
...@@ -382,7 +382,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -382,7 +382,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
struct tcf_proto *tp, **chain; struct tcf_proto *tp, **chain;
struct tcmsg *tcm = (struct tcmsg*)NLMSG_DATA(cb->nlh); struct tcmsg *tcm = (struct tcmsg*)NLMSG_DATA(cb->nlh);
unsigned long cl = 0; unsigned long cl = 0;
struct Qdisc_class_ops *cops; const struct Qdisc_class_ops *cops;
struct tcf_dump_args arg; struct tcf_dump_args arg;
if (cb->nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*tcm))) if (cb->nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*tcm)))
......
...@@ -195,7 +195,7 @@ static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid) ...@@ -195,7 +195,7 @@ static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
{ {
unsigned long cl; unsigned long cl;
struct Qdisc *leaf; struct Qdisc *leaf;
struct Qdisc_class_ops *cops = p->ops->cl_ops; const struct Qdisc_class_ops *cops = p->ops->cl_ops;
if (cops == NULL) if (cops == NULL)
return NULL; return NULL;
...@@ -373,7 +373,7 @@ dev_graft_qdisc(struct net_device *dev, struct Qdisc *qdisc) ...@@ -373,7 +373,7 @@ dev_graft_qdisc(struct net_device *dev, struct Qdisc *qdisc)
void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n) void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
{ {
struct Qdisc_class_ops *cops; const struct Qdisc_class_ops *cops;
unsigned long cl; unsigned long cl;
u32 parentid; u32 parentid;
...@@ -417,7 +417,7 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, ...@@ -417,7 +417,7 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
*old = dev_graft_qdisc(dev, new); *old = dev_graft_qdisc(dev, new);
} }
} else { } else {
struct Qdisc_class_ops *cops = parent->ops->cl_ops; const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
err = -EINVAL; err = -EINVAL;
...@@ -581,7 +581,7 @@ static int ...@@ -581,7 +581,7 @@ static int
check_loop_fn(struct Qdisc *q, unsigned long cl, struct qdisc_walker *w) check_loop_fn(struct Qdisc *q, unsigned long cl, struct qdisc_walker *w)
{ {
struct Qdisc *leaf; struct Qdisc *leaf;
struct Qdisc_class_ops *cops = q->ops->cl_ops; const struct Qdisc_class_ops *cops = q->ops->cl_ops;
struct check_loop_arg *arg = (struct check_loop_arg *)w; struct check_loop_arg *arg = (struct check_loop_arg *)w;
leaf = cops->leaf(q, cl); leaf = cops->leaf(q, cl);
...@@ -924,7 +924,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -924,7 +924,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
struct rtattr **tca = arg; struct rtattr **tca = arg;
struct net_device *dev; struct net_device *dev;
struct Qdisc *q = NULL; struct Qdisc *q = NULL;
struct Qdisc_class_ops *cops; const struct Qdisc_class_ops *cops;
unsigned long cl = 0; unsigned long cl = 0;
unsigned long new_cl; unsigned long new_cl;
u32 pid = tcm->tcm_parent; u32 pid = tcm->tcm_parent;
...@@ -1039,7 +1039,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q, ...@@ -1039,7 +1039,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,
struct nlmsghdr *nlh; struct nlmsghdr *nlh;
unsigned char *b = skb_tail_pointer(skb); unsigned char *b = skb_tail_pointer(skb);
struct gnet_dump d; struct gnet_dump d;
struct Qdisc_class_ops *cl_ops = q->ops->cl_ops; const struct Qdisc_class_ops *cl_ops = q->ops->cl_ops;
nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);
tcm = NLMSG_DATA(nlh); tcm = NLMSG_DATA(nlh);
......
...@@ -668,7 +668,7 @@ static int atm_tc_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -668,7 +668,7 @@ static int atm_tc_dump(struct Qdisc *sch, struct sk_buff *skb)
return 0; return 0;
} }
static struct Qdisc_class_ops atm_class_ops = { static const struct Qdisc_class_ops atm_class_ops = {
.graft = atm_tc_graft, .graft = atm_tc_graft,
.leaf = atm_tc_leaf, .leaf = atm_tc_leaf,
.get = atm_tc_get, .get = atm_tc_get,
...@@ -683,7 +683,7 @@ static struct Qdisc_class_ops atm_class_ops = { ...@@ -683,7 +683,7 @@ static struct Qdisc_class_ops atm_class_ops = {
.dump_stats = atm_tc_dump_class_stats, .dump_stats = atm_tc_dump_class_stats,
}; };
static struct Qdisc_ops atm_qdisc_ops = { static struct Qdisc_ops atm_qdisc_ops __read_mostly = {
.cl_ops = &atm_class_ops, .cl_ops = &atm_class_ops,
.id = "atm", .id = "atm",
.priv_size = sizeof(struct atm_qdisc_data), .priv_size = sizeof(struct atm_qdisc_data),
......
...@@ -28,7 +28,7 @@ static struct sk_buff *blackhole_dequeue(struct Qdisc *sch) ...@@ -28,7 +28,7 @@ static struct sk_buff *blackhole_dequeue(struct Qdisc *sch)
return NULL; return NULL;
} }
static struct Qdisc_ops blackhole_qdisc_ops = { static struct Qdisc_ops blackhole_qdisc_ops __read_mostly = {
.id = "blackhole", .id = "blackhole",
.priv_size = 0, .priv_size = 0,
.enqueue = blackhole_enqueue, .enqueue = blackhole_enqueue,
......
...@@ -2045,7 +2045,7 @@ static void cbq_walk(struct Qdisc *sch, struct qdisc_walker *arg) ...@@ -2045,7 +2045,7 @@ static void cbq_walk(struct Qdisc *sch, struct qdisc_walker *arg)
} }
} }
static struct Qdisc_class_ops cbq_class_ops = { static const struct Qdisc_class_ops cbq_class_ops = {
.graft = cbq_graft, .graft = cbq_graft,
.leaf = cbq_leaf, .leaf = cbq_leaf,
.qlen_notify = cbq_qlen_notify, .qlen_notify = cbq_qlen_notify,
...@@ -2061,7 +2061,7 @@ static struct Qdisc_class_ops cbq_class_ops = { ...@@ -2061,7 +2061,7 @@ static struct Qdisc_class_ops cbq_class_ops = {
.dump_stats = cbq_dump_class_stats, .dump_stats = cbq_dump_class_stats,
}; };
static struct Qdisc_ops cbq_qdisc_ops = { static struct Qdisc_ops cbq_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = &cbq_class_ops, .cl_ops = &cbq_class_ops,
.id = "cbq", .id = "cbq",
......
...@@ -461,7 +461,7 @@ static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -461,7 +461,7 @@ static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb)
return RTA_NEST_CANCEL(skb, opts); return RTA_NEST_CANCEL(skb, opts);
} }
static struct Qdisc_class_ops dsmark_class_ops = { static const struct Qdisc_class_ops dsmark_class_ops = {
.graft = dsmark_graft, .graft = dsmark_graft,
.leaf = dsmark_leaf, .leaf = dsmark_leaf,
.get = dsmark_get, .get = dsmark_get,
...@@ -475,7 +475,7 @@ static struct Qdisc_class_ops dsmark_class_ops = { ...@@ -475,7 +475,7 @@ static struct Qdisc_class_ops dsmark_class_ops = {
.dump = dsmark_dump_class, .dump = dsmark_dump_class,
}; };
static struct Qdisc_ops dsmark_qdisc_ops = { static struct Qdisc_ops dsmark_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = &dsmark_class_ops, .cl_ops = &dsmark_class_ops,
.id = "dsmark", .id = "dsmark",
......
...@@ -78,7 +78,7 @@ static int fifo_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -78,7 +78,7 @@ static int fifo_dump(struct Qdisc *sch, struct sk_buff *skb)
return -1; return -1;
} }
struct Qdisc_ops pfifo_qdisc_ops = { struct Qdisc_ops pfifo_qdisc_ops __read_mostly = {
.id = "pfifo", .id = "pfifo",
.priv_size = sizeof(struct fifo_sched_data), .priv_size = sizeof(struct fifo_sched_data),
.enqueue = pfifo_enqueue, .enqueue = pfifo_enqueue,
...@@ -92,7 +92,7 @@ struct Qdisc_ops pfifo_qdisc_ops = { ...@@ -92,7 +92,7 @@ struct Qdisc_ops pfifo_qdisc_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
struct Qdisc_ops bfifo_qdisc_ops = { struct Qdisc_ops bfifo_qdisc_ops __read_mostly = {
.id = "bfifo", .id = "bfifo",
.priv_size = sizeof(struct fifo_sched_data), .priv_size = sizeof(struct fifo_sched_data),
.enqueue = bfifo_enqueue, .enqueue = bfifo_enqueue,
......
...@@ -287,7 +287,7 @@ static int noop_requeue(struct sk_buff *skb, struct Qdisc* qdisc) ...@@ -287,7 +287,7 @@ static int noop_requeue(struct sk_buff *skb, struct Qdisc* qdisc)
return NET_XMIT_CN; return NET_XMIT_CN;
} }
struct Qdisc_ops noop_qdisc_ops = { struct Qdisc_ops noop_qdisc_ops __read_mostly = {
.id = "noop", .id = "noop",
.priv_size = 0, .priv_size = 0,
.enqueue = noop_enqueue, .enqueue = noop_enqueue,
...@@ -304,7 +304,7 @@ struct Qdisc noop_qdisc = { ...@@ -304,7 +304,7 @@ struct Qdisc noop_qdisc = {
.list = LIST_HEAD_INIT(noop_qdisc.list), .list = LIST_HEAD_INIT(noop_qdisc.list),
}; };
static struct Qdisc_ops noqueue_qdisc_ops = { static struct Qdisc_ops noqueue_qdisc_ops __read_mostly = {
.id = "noqueue", .id = "noqueue",
.priv_size = 0, .priv_size = 0,
.enqueue = noop_enqueue, .enqueue = noop_enqueue,
...@@ -406,7 +406,7 @@ static int pfifo_fast_init(struct Qdisc *qdisc, struct rtattr *opt) ...@@ -406,7 +406,7 @@ static int pfifo_fast_init(struct Qdisc *qdisc, struct rtattr *opt)
return 0; return 0;
} }
static struct Qdisc_ops pfifo_fast_ops = { static struct Qdisc_ops pfifo_fast_ops __read_mostly = {
.id = "pfifo_fast", .id = "pfifo_fast",
.priv_size = PFIFO_FAST_BANDS * sizeof(struct sk_buff_head), .priv_size = PFIFO_FAST_BANDS * sizeof(struct sk_buff_head),
.enqueue = pfifo_fast_enqueue, .enqueue = pfifo_fast_enqueue,
...@@ -472,7 +472,7 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, ...@@ -472,7 +472,7 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops,
void qdisc_reset(struct Qdisc *qdisc) void qdisc_reset(struct Qdisc *qdisc)
{ {
struct Qdisc_ops *ops = qdisc->ops; const struct Qdisc_ops *ops = qdisc->ops;
if (ops->reset) if (ops->reset)
ops->reset(qdisc); ops->reset(qdisc);
...@@ -491,7 +491,7 @@ static void __qdisc_destroy(struct rcu_head *head) ...@@ -491,7 +491,7 @@ static void __qdisc_destroy(struct rcu_head *head)
void qdisc_destroy(struct Qdisc *qdisc) void qdisc_destroy(struct Qdisc *qdisc)
{ {
struct Qdisc_ops *ops = qdisc->ops; const struct Qdisc_ops *ops = qdisc->ops;
if (qdisc->flags & TCQ_F_BUILTIN || if (qdisc->flags & TCQ_F_BUILTIN ||
!atomic_dec_and_test(&qdisc->refcnt)) !atomic_dec_and_test(&qdisc->refcnt))
......
...@@ -577,7 +577,7 @@ static void gred_destroy(struct Qdisc *sch) ...@@ -577,7 +577,7 @@ static void gred_destroy(struct Qdisc *sch)
} }
} }
static struct Qdisc_ops gred_qdisc_ops = { static struct Qdisc_ops gred_qdisc_ops __read_mostly = {
.id = "gred", .id = "gred",
.priv_size = sizeof(struct gred_sched), .priv_size = sizeof(struct gred_sched),
.enqueue = gred_enqueue, .enqueue = gred_enqueue,
......
...@@ -1698,7 +1698,7 @@ hfsc_drop(struct Qdisc *sch) ...@@ -1698,7 +1698,7 @@ hfsc_drop(struct Qdisc *sch)
return 0; return 0;
} }
static struct Qdisc_class_ops hfsc_class_ops = { static const struct Qdisc_class_ops hfsc_class_ops = {
.change = hfsc_change_class, .change = hfsc_change_class,
.delete = hfsc_delete_class, .delete = hfsc_delete_class,
.graft = hfsc_graft_class, .graft = hfsc_graft_class,
...@@ -1714,7 +1714,7 @@ static struct Qdisc_class_ops hfsc_class_ops = { ...@@ -1714,7 +1714,7 @@ static struct Qdisc_class_ops hfsc_class_ops = {
.walk = hfsc_walk .walk = hfsc_walk
}; };
static struct Qdisc_ops hfsc_qdisc_ops = { static struct Qdisc_ops hfsc_qdisc_ops __read_mostly = {
.id = "hfsc", .id = "hfsc",
.init = hfsc_init_qdisc, .init = hfsc_init_qdisc,
.change = hfsc_change_qdisc, .change = hfsc_change_qdisc,
......
...@@ -1529,7 +1529,7 @@ static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg) ...@@ -1529,7 +1529,7 @@ static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg)
} }
} }
static struct Qdisc_class_ops htb_class_ops = { static const struct Qdisc_class_ops htb_class_ops = {
.graft = htb_graft, .graft = htb_graft,
.leaf = htb_leaf, .leaf = htb_leaf,
.qlen_notify = htb_qlen_notify, .qlen_notify = htb_qlen_notify,
...@@ -1545,7 +1545,7 @@ static struct Qdisc_class_ops htb_class_ops = { ...@@ -1545,7 +1545,7 @@ static struct Qdisc_class_ops htb_class_ops = {
.dump_stats = htb_dump_class_stats, .dump_stats = htb_dump_class_stats,
}; };
static struct Qdisc_ops htb_qdisc_ops = { static struct Qdisc_ops htb_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = &htb_class_ops, .cl_ops = &htb_class_ops,
.id = "htb", .id = "htb",
......
...@@ -338,7 +338,7 @@ static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -338,7 +338,7 @@ static int ingress_dump(struct Qdisc *sch, struct sk_buff *skb)
return -1; return -1;
} }
static struct Qdisc_class_ops ingress_class_ops = { static const struct Qdisc_class_ops ingress_class_ops = {
.graft = ingress_graft, .graft = ingress_graft,
.leaf = ingress_leaf, .leaf = ingress_leaf,
.get = ingress_get, .get = ingress_get,
...@@ -352,7 +352,7 @@ static struct Qdisc_class_ops ingress_class_ops = { ...@@ -352,7 +352,7 @@ static struct Qdisc_class_ops ingress_class_ops = {
.dump = NULL, .dump = NULL,
}; };
static struct Qdisc_ops ingress_qdisc_ops = { static struct Qdisc_ops ingress_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = &ingress_class_ops, .cl_ops = &ingress_class_ops,
.id = "ingress", .id = "ingress",
......
...@@ -544,7 +544,7 @@ static int tfifo_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -544,7 +544,7 @@ static int tfifo_dump(struct Qdisc *sch, struct sk_buff *skb)
return -1; return -1;
} }
static struct Qdisc_ops tfifo_qdisc_ops = { static struct Qdisc_ops tfifo_qdisc_ops __read_mostly = {
.id = "tfifo", .id = "tfifo",
.priv_size = sizeof(struct fifo_sched_data), .priv_size = sizeof(struct fifo_sched_data),
.enqueue = tfifo_enqueue, .enqueue = tfifo_enqueue,
...@@ -705,7 +705,7 @@ static struct tcf_proto **netem_find_tcf(struct Qdisc *sch, unsigned long cl) ...@@ -705,7 +705,7 @@ static struct tcf_proto **netem_find_tcf(struct Qdisc *sch, unsigned long cl)
return NULL; return NULL;
} }
static struct Qdisc_class_ops netem_class_ops = { static const struct Qdisc_class_ops netem_class_ops = {
.graft = netem_graft, .graft = netem_graft,
.leaf = netem_leaf, .leaf = netem_leaf,
.get = netem_get, .get = netem_get,
...@@ -717,7 +717,7 @@ static struct Qdisc_class_ops netem_class_ops = { ...@@ -717,7 +717,7 @@ static struct Qdisc_class_ops netem_class_ops = {
.dump = netem_dump_class, .dump = netem_dump_class,
}; };
static struct Qdisc_ops netem_qdisc_ops = { static struct Qdisc_ops netem_qdisc_ops __read_mostly = {
.id = "netem", .id = "netem",
.cl_ops = &netem_class_ops, .cl_ops = &netem_class_ops,
.priv_size = sizeof(struct netem_sched_data), .priv_size = sizeof(struct netem_sched_data),
......
...@@ -468,7 +468,7 @@ static struct tcf_proto ** prio_find_tcf(struct Qdisc *sch, unsigned long cl) ...@@ -468,7 +468,7 @@ static struct tcf_proto ** prio_find_tcf(struct Qdisc *sch, unsigned long cl)
return &q->filter_list; return &q->filter_list;
} }
static struct Qdisc_class_ops prio_class_ops = { static const struct Qdisc_class_ops prio_class_ops = {
.graft = prio_graft, .graft = prio_graft,
.leaf = prio_leaf, .leaf = prio_leaf,
.get = prio_get, .get = prio_get,
...@@ -483,7 +483,7 @@ static struct Qdisc_class_ops prio_class_ops = { ...@@ -483,7 +483,7 @@ static struct Qdisc_class_ops prio_class_ops = {
.dump_stats = prio_dump_class_stats, .dump_stats = prio_dump_class_stats,
}; };
static struct Qdisc_ops prio_qdisc_ops = { static struct Qdisc_ops prio_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = &prio_class_ops, .cl_ops = &prio_class_ops,
.id = "prio", .id = "prio",
...@@ -500,7 +500,7 @@ static struct Qdisc_ops prio_qdisc_ops = { ...@@ -500,7 +500,7 @@ static struct Qdisc_ops prio_qdisc_ops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
static struct Qdisc_ops rr_qdisc_ops = { static struct Qdisc_ops rr_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = &prio_class_ops, .cl_ops = &prio_class_ops,
.id = "rr", .id = "rr",
......
...@@ -359,7 +359,7 @@ static struct tcf_proto **red_find_tcf(struct Qdisc *sch, unsigned long cl) ...@@ -359,7 +359,7 @@ static struct tcf_proto **red_find_tcf(struct Qdisc *sch, unsigned long cl)
return NULL; return NULL;
} }
static struct Qdisc_class_ops red_class_ops = { static const struct Qdisc_class_ops red_class_ops = {
.graft = red_graft, .graft = red_graft,
.leaf = red_leaf, .leaf = red_leaf,
.get = red_get, .get = red_get,
...@@ -371,7 +371,7 @@ static struct Qdisc_class_ops red_class_ops = { ...@@ -371,7 +371,7 @@ static struct Qdisc_class_ops red_class_ops = {
.dump = red_dump_class, .dump = red_dump_class,
}; };
static struct Qdisc_ops red_qdisc_ops = { static struct Qdisc_ops red_qdisc_ops __read_mostly = {
.id = "red", .id = "red",
.priv_size = sizeof(struct red_sched_data), .priv_size = sizeof(struct red_sched_data),
.cl_ops = &red_class_ops, .cl_ops = &red_class_ops,
......
...@@ -480,7 +480,7 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb) ...@@ -480,7 +480,7 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)
return -1; return -1;
} }
static struct Qdisc_ops sfq_qdisc_ops = { static struct Qdisc_ops sfq_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = NULL, .cl_ops = NULL,
.id = "sfq", .id = "sfq",
......
...@@ -469,7 +469,7 @@ static struct tcf_proto **tbf_find_tcf(struct Qdisc *sch, unsigned long cl) ...@@ -469,7 +469,7 @@ static struct tcf_proto **tbf_find_tcf(struct Qdisc *sch, unsigned long cl)
return NULL; return NULL;
} }
static struct Qdisc_class_ops tbf_class_ops = static const struct Qdisc_class_ops tbf_class_ops =
{ {
.graft = tbf_graft, .graft = tbf_graft,
.leaf = tbf_leaf, .leaf = tbf_leaf,
...@@ -482,7 +482,7 @@ static struct Qdisc_class_ops tbf_class_ops = ...@@ -482,7 +482,7 @@ static struct Qdisc_class_ops tbf_class_ops =
.dump = tbf_dump_class, .dump = tbf_dump_class,
}; };
static struct Qdisc_ops tbf_qdisc_ops = { static struct Qdisc_ops tbf_qdisc_ops __read_mostly = {
.next = NULL, .next = NULL,
.cl_ops = &tbf_class_ops, .cl_ops = &tbf_class_ops,
.id = "tbf", .id = "tbf",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment