summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorEric Dumazet <dada1@cosmosbay.com>2007-11-14 01:44:41 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:53:58 -0800
commit20fea08b5fb639c4c175b5c74a2bb346c5c5bc2e (patch)
tree3ffa7e1e82051c6772fc2a01d561e4a5a29bb138 /net/sched/sch_api.c
parent2a8cc6c89039e0530a3335954253b76ed0f9339a (diff)
downloadop-kernel-dev-20fea08b5fb639c4c175b5c74a2bb346c5c5bc2e.zip
op-kernel-dev-20fea08b5fb639c4c175b5c74a2bb346c5c5bc2e.tar.gz
[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: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r--net/sched/sch_api.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 8ae137e..259321b 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -195,7 +195,7 @@ static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
{
unsigned long cl;
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)
return NULL;
@@ -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)
{
- struct Qdisc_class_ops *cops;
+ const struct Qdisc_class_ops *cops;
unsigned long cl;
u32 parentid;
@@ -417,7 +417,7 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
*old = dev_graft_qdisc(dev, new);
}
} else {
- struct Qdisc_class_ops *cops = parent->ops->cl_ops;
+ const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
err = -EINVAL;
@@ -581,7 +581,7 @@ static int
check_loop_fn(struct Qdisc *q, unsigned long cl, struct qdisc_walker *w)
{
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;
leaf = cops->leaf(q, cl);
@@ -924,7 +924,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
struct rtattr **tca = arg;
struct net_device *dev;
struct Qdisc *q = NULL;
- struct Qdisc_class_ops *cops;
+ const struct Qdisc_class_ops *cops;
unsigned long cl = 0;
unsigned long new_cl;
u32 pid = tcm->tcm_parent;
@@ -1039,7 +1039,7 @@ static int tc_fill_tclass(struct sk_buff *skb, struct Qdisc *q,
struct nlmsghdr *nlh;
unsigned char *b = skb_tail_pointer(skb);
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);
tcm = NLMSG_DATA(nlh);
OpenPOWER on IntegriCloud