[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
[safe/jmp/linux-2.6] / net / sched / sch_sfq.c
index 8284480..02081bc 100644 (file)
@@ -53,7 +53,7 @@
        Queuing using Deficit Round Robin", Proc. SIGCOMM 95.
 
 
-       This is not the thing that is usually called (W)FQ nowadays. 
+       This is not the thing that is usually called (W)FQ nowadays.
        It does not use any timestamp mechanism, but instead
        processes queues in round-robin order.
 
@@ -63,7 +63,7 @@
 
        DRAWBACKS:
 
-       - "Stochastic" -> It is not 100% fair. 
+       - "Stochastic" -> It is not 100% fair.
        When hash collisions occur, several flows are considered as one.
 
        - "Round-robin" -> It introduces larger delays than virtual clock
@@ -137,7 +137,7 @@ static unsigned sfq_hash(struct sfq_sched_data *q, struct sk_buff *skb)
        switch (skb->protocol) {
        case __constant_htons(ETH_P_IP):
        {
-               struct iphdr *iph = skb->nh.iph;
+               const struct iphdr *iph = ip_hdr(skb);
                h = iph->daddr;
                h2 = iph->saddr^iph->protocol;
                if (!(iph->frag_off&htons(IP_MF|IP_OFFSET)) &&
@@ -501,7 +501,7 @@ static int __init sfq_module_init(void)
 {
        return register_qdisc(&sfq_qdisc_ops);
 }
-static void __exit sfq_module_exit(void) 
+static void __exit sfq_module_exit(void)
 {
        unregister_qdisc(&sfq_qdisc_ops);
 }