diff options
Diffstat (limited to 'net/sched/act_gact.c')
| -rw-r--r-- | net/sched/act_gact.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c index e7f796aec657..c2ed90a4c0b4 100644 --- a/net/sched/act_gact.c +++ b/net/sched/act_gact.c | |||
| @@ -152,21 +152,24 @@ static int tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result | |||
| 152 | static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) | 152 | static int tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) |
| 153 | { | 153 | { |
| 154 | unsigned char *b = skb_tail_pointer(skb); | 154 | unsigned char *b = skb_tail_pointer(skb); |
| 155 | struct tc_gact opt; | ||
| 156 | struct tcf_gact *gact = a->priv; | 155 | struct tcf_gact *gact = a->priv; |
| 156 | struct tc_gact opt = { | ||
| 157 | .index = gact->tcf_index, | ||
| 158 | .refcnt = gact->tcf_refcnt - ref, | ||
| 159 | .bindcnt = gact->tcf_bindcnt - bind, | ||
| 160 | .action = gact->tcf_action, | ||
| 161 | }; | ||
| 157 | struct tcf_t t; | 162 | struct tcf_t t; |
| 158 | 163 | ||
| 159 | opt.index = gact->tcf_index; | ||
| 160 | opt.refcnt = gact->tcf_refcnt - ref; | ||
| 161 | opt.bindcnt = gact->tcf_bindcnt - bind; | ||
| 162 | opt.action = gact->tcf_action; | ||
| 163 | NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt); | 164 | NLA_PUT(skb, TCA_GACT_PARMS, sizeof(opt), &opt); |
| 164 | #ifdef CONFIG_GACT_PROB | 165 | #ifdef CONFIG_GACT_PROB |
| 165 | if (gact->tcfg_ptype) { | 166 | if (gact->tcfg_ptype) { |
| 166 | struct tc_gact_p p_opt; | 167 | struct tc_gact_p p_opt = { |
| 167 | p_opt.paction = gact->tcfg_paction; | 168 | .paction = gact->tcfg_paction, |
| 168 | p_opt.pval = gact->tcfg_pval; | 169 | .pval = gact->tcfg_pval, |
| 169 | p_opt.ptype = gact->tcfg_ptype; | 170 | .ptype = gact->tcfg_ptype, |
| 171 | }; | ||
| 172 | |||
| 170 | NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt); | 173 | NLA_PUT(skb, TCA_GACT_PROB, sizeof(p_opt), &p_opt); |
| 171 | } | 174 | } |
| 172 | #endif | 175 | #endif |
| @@ -202,9 +205,9 @@ MODULE_LICENSE("GPL"); | |||
| 202 | static int __init gact_init_module(void) | 205 | static int __init gact_init_module(void) |
| 203 | { | 206 | { |
| 204 | #ifdef CONFIG_GACT_PROB | 207 | #ifdef CONFIG_GACT_PROB |
| 205 | printk("GACT probability on\n"); | 208 | printk(KERN_INFO "GACT probability on\n"); |
| 206 | #else | 209 | #else |
| 207 | printk("GACT probability NOT on\n"); | 210 | printk(KERN_INFO "GACT probability NOT on\n"); |
| 208 | #endif | 211 | #endif |
| 209 | return tcf_register_action(&act_gact_ops); | 212 | return tcf_register_action(&act_gact_ops); |
| 210 | } | 213 | } |
