diff options
Diffstat (limited to 'net/sched/cls_rsvp.h')
-rw-r--r-- | net/sched/cls_rsvp.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h index b1d3ce5c5ff8..4f25c2ac825b 100644 --- a/net/sched/cls_rsvp.h +++ b/net/sched/cls_rsvp.h | |||
@@ -116,11 +116,6 @@ static inline unsigned int hash_src(__be32 *src) | |||
116 | return h & 0xF; | 116 | return h & 0xF; |
117 | } | 117 | } |
118 | 118 | ||
119 | static struct tcf_ext_map rsvp_ext_map = { | ||
120 | .police = TCA_RSVP_POLICE, | ||
121 | .action = TCA_RSVP_ACT | ||
122 | }; | ||
123 | |||
124 | #define RSVP_APPLY_RESULT() \ | 119 | #define RSVP_APPLY_RESULT() \ |
125 | { \ | 120 | { \ |
126 | int r = tcf_exts_exec(skb, &f->exts, res); \ | 121 | int r = tcf_exts_exec(skb, &f->exts, res); \ |
@@ -440,7 +435,8 @@ static int rsvp_change(struct net *net, struct sk_buff *in_skb, | |||
440 | if (err < 0) | 435 | if (err < 0) |
441 | return err; | 436 | return err; |
442 | 437 | ||
443 | err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &e, &rsvp_ext_map); | 438 | tcf_exts_init(&e, TCA_RSVP_ACT, TCA_RSVP_POLICE); |
439 | err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &e); | ||
444 | if (err < 0) | 440 | if (err < 0) |
445 | return err; | 441 | return err; |
446 | 442 | ||
@@ -471,7 +467,7 @@ static int rsvp_change(struct net *net, struct sk_buff *in_skb, | |||
471 | if (f == NULL) | 467 | if (f == NULL) |
472 | goto errout2; | 468 | goto errout2; |
473 | 469 | ||
474 | tcf_exts_init(&f->exts); | 470 | tcf_exts_init(&f->exts, TCA_RSVP_ACT, TCA_RSVP_POLICE); |
475 | h2 = 16; | 471 | h2 = 16; |
476 | if (tb[TCA_RSVP_SRC]) { | 472 | if (tb[TCA_RSVP_SRC]) { |
477 | memcpy(f->src, nla_data(tb[TCA_RSVP_SRC]), sizeof(f->src)); | 473 | memcpy(f->src, nla_data(tb[TCA_RSVP_SRC]), sizeof(f->src)); |
@@ -634,12 +630,12 @@ static int rsvp_dump(struct tcf_proto *tp, unsigned long fh, | |||
634 | nla_put(skb, TCA_RSVP_SRC, sizeof(f->src), f->src)) | 630 | nla_put(skb, TCA_RSVP_SRC, sizeof(f->src), f->src)) |
635 | goto nla_put_failure; | 631 | goto nla_put_failure; |
636 | 632 | ||
637 | if (tcf_exts_dump(skb, &f->exts, &rsvp_ext_map) < 0) | 633 | if (tcf_exts_dump(skb, &f->exts) < 0) |
638 | goto nla_put_failure; | 634 | goto nla_put_failure; |
639 | 635 | ||
640 | nla_nest_end(skb, nest); | 636 | nla_nest_end(skb, nest); |
641 | 637 | ||
642 | if (tcf_exts_dump_stats(skb, &f->exts, &rsvp_ext_map) < 0) | 638 | if (tcf_exts_dump_stats(skb, &f->exts) < 0) |
643 | goto nla_put_failure; | 639 | goto nla_put_failure; |
644 | return skb->len; | 640 | return skb->len; |
645 | 641 | ||