diff options
Diffstat (limited to 'net/sched/sch_fifo.c')
-rw-r--r-- | net/sched/sch_fifo.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c index c264308f17c1..95ed48221652 100644 --- a/net/sched/sch_fifo.c +++ b/net/sched/sch_fifo.c | |||
@@ -43,7 +43,7 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc* sch) | |||
43 | return qdisc_reshape_fail(skb, sch); | 43 | return qdisc_reshape_fail(skb, sch); |
44 | } | 44 | } |
45 | 45 | ||
46 | static int fifo_init(struct Qdisc *sch, struct rtattr *opt) | 46 | static int fifo_init(struct Qdisc *sch, struct nlattr *opt) |
47 | { | 47 | { |
48 | struct fifo_sched_data *q = qdisc_priv(sch); | 48 | struct fifo_sched_data *q = qdisc_priv(sch); |
49 | 49 | ||
@@ -55,9 +55,9 @@ static int fifo_init(struct Qdisc *sch, struct rtattr *opt) | |||
55 | 55 | ||
56 | q->limit = limit; | 56 | q->limit = limit; |
57 | } else { | 57 | } else { |
58 | struct tc_fifo_qopt *ctl = RTA_DATA(opt); | 58 | struct tc_fifo_qopt *ctl = nla_data(opt); |
59 | 59 | ||
60 | if (RTA_PAYLOAD(opt) < sizeof(*ctl)) | 60 | if (nla_len(opt) < sizeof(*ctl)) |
61 | return -EINVAL; | 61 | return -EINVAL; |
62 | 62 | ||
63 | q->limit = ctl->limit; | 63 | q->limit = ctl->limit; |
@@ -71,14 +71,14 @@ static int fifo_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
71 | struct fifo_sched_data *q = qdisc_priv(sch); | 71 | struct fifo_sched_data *q = qdisc_priv(sch); |
72 | struct tc_fifo_qopt opt = { .limit = q->limit }; | 72 | struct tc_fifo_qopt opt = { .limit = q->limit }; |
73 | 73 | ||
74 | RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); | 74 | NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); |
75 | return skb->len; | 75 | return skb->len; |
76 | 76 | ||
77 | rtattr_failure: | 77 | nla_put_failure: |
78 | return -1; | 78 | return -1; |
79 | } | 79 | } |
80 | 80 | ||
81 | struct Qdisc_ops pfifo_qdisc_ops = { | 81 | struct Qdisc_ops pfifo_qdisc_ops __read_mostly = { |
82 | .id = "pfifo", | 82 | .id = "pfifo", |
83 | .priv_size = sizeof(struct fifo_sched_data), | 83 | .priv_size = sizeof(struct fifo_sched_data), |
84 | .enqueue = pfifo_enqueue, | 84 | .enqueue = pfifo_enqueue, |
@@ -91,8 +91,9 @@ struct Qdisc_ops pfifo_qdisc_ops = { | |||
91 | .dump = fifo_dump, | 91 | .dump = fifo_dump, |
92 | .owner = THIS_MODULE, | 92 | .owner = THIS_MODULE, |
93 | }; | 93 | }; |
94 | EXPORT_SYMBOL(pfifo_qdisc_ops); | ||
94 | 95 | ||
95 | struct Qdisc_ops bfifo_qdisc_ops = { | 96 | struct Qdisc_ops bfifo_qdisc_ops __read_mostly = { |
96 | .id = "bfifo", | 97 | .id = "bfifo", |
97 | .priv_size = sizeof(struct fifo_sched_data), | 98 | .priv_size = sizeof(struct fifo_sched_data), |
98 | .enqueue = bfifo_enqueue, | 99 | .enqueue = bfifo_enqueue, |
@@ -105,6 +106,4 @@ struct Qdisc_ops bfifo_qdisc_ops = { | |||
105 | .dump = fifo_dump, | 106 | .dump = fifo_dump, |
106 | .owner = THIS_MODULE, | 107 | .owner = THIS_MODULE, |
107 | }; | 108 | }; |
108 | |||
109 | EXPORT_SYMBOL(bfifo_qdisc_ops); | 109 | EXPORT_SYMBOL(bfifo_qdisc_ops); |
110 | EXPORT_SYMBOL(pfifo_qdisc_ops); | ||