]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_dsmark.c
[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
[linux-2.6-omap-h63xx.git] / net / sched / sch_dsmark.c
index d5421816f00700ca298d6b1a1dd3a5972189fb19..2c857af79a1e4cb8f6809a0f10743e3a99b1e563 100644 (file)
@@ -68,7 +68,7 @@ static inline int dsmark_valid_indices(u16 indices)
                        return 0;
                indices >>= 1;
        }
+
        return 1;
 }
 
@@ -100,7 +100,7 @@ static int dsmark_graft(struct Qdisc *sch, unsigned long arg,
        qdisc_reset(*old);
        sch_tree_unlock(sch);
 
-        return 0;
+       return 0;
 }
 
 static struct Qdisc *dsmark_leaf(struct Qdisc *sch, unsigned long arg)
@@ -151,7 +151,7 @@ static int dsmark_change(struct Qdisc *sch, u32 classid, u32 parent,
 
        if (tb[TCA_DSMARK_VALUE-1])
                p->value[*arg-1] = RTA_GET_U8(tb[TCA_DSMARK_VALUE-1]);
-               
+
        if (tb[TCA_DSMARK_MASK-1])
                p->mask[*arg-1] = mask;
 
@@ -167,7 +167,7 @@ static int dsmark_delete(struct Qdisc *sch, unsigned long arg)
 
        if (!dsmark_valid_index(p, arg))
                return -EINVAL;
-       
+
        p->mask[arg-1] = 0xff;
        p->value[arg-1] = 0;
 
@@ -193,9 +193,9 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker)
                                break;
                        }
                }
-ignore:                
+ignore:
                walker->count++;
-        }
+       }
 }
 
 static struct tcf_proto **dsmark_find_tcf(struct Qdisc *sch,unsigned long cl)
@@ -216,11 +216,11 @@ static int dsmark_enqueue(struct sk_buff *skb,struct Qdisc *sch)
                /* FIXME: Safe with non-linear skbs? --RR */
                switch (skb->protocol) {
                        case __constant_htons(ETH_P_IP):
-                               skb->tc_index = ipv4_get_dsfield(skb->nh.iph)
+                               skb->tc_index = ipv4_get_dsfield(ip_hdr(skb))
                                        & ~INET_ECN_MASK;
                                break;
                        case __constant_htons(ETH_P_IPV6):
-                               skb->tc_index = ipv6_get_dsfield(skb->nh.ipv6h)
+                               skb->tc_index = ipv6_get_dsfield(ipv6_hdr(skb))
                                        & ~INET_ECN_MASK;
                                break;
                        default:
@@ -292,11 +292,11 @@ static struct sk_buff *dsmark_dequeue(struct Qdisc *sch)
 
        switch (skb->protocol) {
                case __constant_htons(ETH_P_IP):
-                       ipv4_change_dsfield(skb->nh.iph, p->mask[index],
+                       ipv4_change_dsfield(ip_hdr(skb), p->mask[index],
                                            p->value[index]);
                        break;
                case __constant_htons(ETH_P_IPV6):
-                       ipv6_change_dsfield(skb->nh.ipv6h, p->mask[index],
+                       ipv6_change_dsfield(ipv6_hdr(skb), p->mask[index],
                                            p->value[index]);
                        break;
                default:
@@ -338,7 +338,7 @@ static unsigned int dsmark_drop(struct Qdisc *sch)
 {
        struct dsmark_qdisc_data *p = PRIV(sch);
        unsigned int len;
-       
+
        DPRINTK("dsmark_reset(sch %p,[qdisc %p])\n", sch, p);
 
        if (p->q->ops->drop == NULL)
@@ -506,7 +506,7 @@ static int __init dsmark_module_init(void)
        return register_qdisc(&dsmark_qdisc_ops);
 }
 
-static void __exit dsmark_module_exit(void) 
+static void __exit dsmark_module_exit(void)
 {
        unregister_qdisc(&dsmark_qdisc_ops);
 }