aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_sfq.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-23 01:11:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:11:10 -0500
commit1e90474c377e92db7262a8968a45c1dd980ca9e5 (patch)
tree645af56dcb17cf1a76fd3b7f1a8b833a3fffc3d7 /net/sched/sch_sfq.c
parent01480e1cf5e2118eba8a8968239f3242072f9563 (diff)
[NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API
Convert packet schedulers to use the netlink API. Unfortunately a gradual conversion is not possible without breaking compilation in the middle or adding lots of casts, so this patch converts them all in one step. The patch has been mostly generated automatically with some minor edits to at least allow seperate conversion of classifiers and actions. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_sfq.c')
-rw-r--r--net/sched/sch_sfq.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 25afe0f1d83a..91af539ab6e6 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -397,13 +397,13 @@ static void sfq_perturbation(unsigned long arg)
397 mod_timer(&q->perturb_timer, jiffies + q->perturb_period); 397 mod_timer(&q->perturb_timer, jiffies + q->perturb_period);
398} 398}
399 399
400static int sfq_change(struct Qdisc *sch, struct rtattr *opt) 400static int sfq_change(struct Qdisc *sch, struct nlattr *opt)
401{ 401{
402 struct sfq_sched_data *q = qdisc_priv(sch); 402 struct sfq_sched_data *q = qdisc_priv(sch);
403 struct tc_sfq_qopt *ctl = RTA_DATA(opt); 403 struct tc_sfq_qopt *ctl = nla_data(opt);
404 unsigned int qlen; 404 unsigned int qlen;
405 405
406 if (opt->rta_len < RTA_LENGTH(sizeof(*ctl))) 406 if (opt->nla_len < nla_attr_size(sizeof(*ctl)))
407 return -EINVAL; 407 return -EINVAL;
408 408
409 sch_tree_lock(sch); 409 sch_tree_lock(sch);
@@ -426,7 +426,7 @@ static int sfq_change(struct Qdisc *sch, struct rtattr *opt)
426 return 0; 426 return 0;
427} 427}
428 428
429static int sfq_init(struct Qdisc *sch, struct rtattr *opt) 429static int sfq_init(struct Qdisc *sch, struct nlattr *opt)
430{ 430{
431 struct sfq_sched_data *q = qdisc_priv(sch); 431 struct sfq_sched_data *q = qdisc_priv(sch);
432 int i; 432 int i;
@@ -481,11 +481,11 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)
481 opt.divisor = SFQ_HASH_DIVISOR; 481 opt.divisor = SFQ_HASH_DIVISOR;
482 opt.flows = q->limit; 482 opt.flows = q->limit;
483 483
484 RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); 484 NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
485 485
486 return skb->len; 486 return skb->len;
487 487
488rtattr_failure: 488nla_put_failure:
489 nlmsg_trim(skb, b); 489 nlmsg_trim(skb, b);
490 return -1; 490 return -1;
491} 491}