diff options
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r-- | net/sched/sch_dsmark.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 60f4bdd4408e..4970d56b4aa7 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -137,10 +137,10 @@ static int dsmark_change(struct Qdisc *sch, u32 classid, u32 parent, | |||
137 | mask = nla_get_u8(tb[TCA_DSMARK_MASK]); | 137 | mask = nla_get_u8(tb[TCA_DSMARK_MASK]); |
138 | 138 | ||
139 | if (tb[TCA_DSMARK_VALUE]) | 139 | if (tb[TCA_DSMARK_VALUE]) |
140 | p->value[*arg-1] = nla_get_u8(tb[TCA_DSMARK_VALUE]); | 140 | p->value[*arg - 1] = nla_get_u8(tb[TCA_DSMARK_VALUE]); |
141 | 141 | ||
142 | if (tb[TCA_DSMARK_MASK]) | 142 | if (tb[TCA_DSMARK_MASK]) |
143 | p->mask[*arg-1] = mask; | 143 | p->mask[*arg - 1] = mask; |
144 | 144 | ||
145 | err = 0; | 145 | err = 0; |
146 | 146 | ||
@@ -155,8 +155,8 @@ static int dsmark_delete(struct Qdisc *sch, unsigned long arg) | |||
155 | if (!dsmark_valid_index(p, arg)) | 155 | if (!dsmark_valid_index(p, arg)) |
156 | return -EINVAL; | 156 | return -EINVAL; |
157 | 157 | ||
158 | p->mask[arg-1] = 0xff; | 158 | p->mask[arg - 1] = 0xff; |
159 | p->value[arg-1] = 0; | 159 | p->value[arg - 1] = 0; |
160 | 160 | ||
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |
@@ -175,7 +175,7 @@ static void dsmark_walk(struct Qdisc *sch, struct qdisc_walker *walker) | |||
175 | if (p->mask[i] == 0xff && !p->value[i]) | 175 | if (p->mask[i] == 0xff && !p->value[i]) |
176 | goto ignore; | 176 | goto ignore; |
177 | if (walker->count >= walker->skip) { | 177 | if (walker->count >= walker->skip) { |
178 | if (walker->fn(sch, i+1, walker) < 0) { | 178 | if (walker->fn(sch, i + 1, walker) < 0) { |
179 | walker->stop = 1; | 179 | walker->stop = 1; |
180 | break; | 180 | break; |
181 | } | 181 | } |
@@ -304,9 +304,8 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch) | |||
304 | * and don't need yet another qdisc as a bypass. | 304 | * and don't need yet another qdisc as a bypass. |
305 | */ | 305 | */ |
306 | if (p->mask[index] != 0xff || p->value[index]) | 306 | if (p->mask[index] != 0xff || p->value[index]) |
307 | printk(KERN_WARNING | 307 | pr_warning("dsmark_dequeue: unsupported protocol %d\n", |
308 | "dsmark_dequeue: unsupported protocol %d\n", | 308 | ntohs(skb->protocol)); |
309 | ntohs(skb->protocol)); | ||
310 | break; | 309 | break; |
311 | } | 310 | } |
312 | 311 | ||
@@ -424,14 +423,14 @@ static int dsmark_dump_class(struct Qdisc *sch, unsigned long cl, | |||
424 | if (!dsmark_valid_index(p, cl)) | 423 | if (!dsmark_valid_index(p, cl)) |
425 | return -EINVAL; | 424 | return -EINVAL; |
426 | 425 | ||
427 | tcm->tcm_handle = TC_H_MAKE(TC_H_MAJ(sch->handle), cl-1); | 426 | tcm->tcm_handle = TC_H_MAKE(TC_H_MAJ(sch->handle), cl - 1); |
428 | tcm->tcm_info = p->q->handle; | 427 | tcm->tcm_info = p->q->handle; |
429 | 428 | ||
430 | opts = nla_nest_start(skb, TCA_OPTIONS); | 429 | opts = nla_nest_start(skb, TCA_OPTIONS); |
431 | if (opts == NULL) | 430 | if (opts == NULL) |
432 | goto nla_put_failure; | 431 | goto nla_put_failure; |
433 | NLA_PUT_U8(skb, TCA_DSMARK_MASK, p->mask[cl-1]); | 432 | NLA_PUT_U8(skb, TCA_DSMARK_MASK, p->mask[cl - 1]); |
434 | NLA_PUT_U8(skb, TCA_DSMARK_VALUE, p->value[cl-1]); | 433 | NLA_PUT_U8(skb, TCA_DSMARK_VALUE, p->value[cl - 1]); |
435 | 434 | ||
436 | return nla_nest_end(skb, opts); | 435 | return nla_nest_end(skb, opts); |
437 | 436 | ||