]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_ingress.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / net / sched / sch_ingress.c
index 1fb60aba1e6ce7e42ea9ebfd3e1726bc1c316ac1..2d32fd27496ecf8011999827f0450958d0e76486 100644 (file)
@@ -9,21 +9,14 @@
 
 #include <linux/module.h>
 #include <linux/types.h>
+#include <linux/list.h>
 #include <linux/skbuff.h>
-#include <linux/netdevice.h>
 #include <linux/rtnetlink.h>
 #include <linux/netfilter_ipv4.h>
 #include <linux/netfilter_ipv6.h>
 #include <linux/netfilter.h>
-#include <linux/smp.h>
 #include <net/netlink.h>
 #include <net/pkt_sched.h>
-#include <asm/byteorder.h>
-#include <asm/uaccess.h>
-#include <linux/kmod.h>
-#include <linux/stat.h>
-#include <linux/interrupt.h>
-#include <linux/list.h>
 
 
 #undef DEBUG_INGRESS
@@ -165,36 +158,16 @@ static int ingress_enqueue(struct sk_buff *skb,struct Qdisc *sch)
                        break;
                case TC_ACT_RECLASSIFY:
                case TC_ACT_OK:
-               case TC_ACT_UNSPEC:
-               default:
                        skb->tc_index = TC_H_MIN(res.classid);
+               default:
                        result = TC_ACT_OK;
                        break;
-       };
-/* backward compat */
-#else
-#ifdef CONFIG_NET_CLS_POLICE
-       switch (result) {
-               case TC_POLICE_SHOT:
-               result = NF_DROP;
-               sch->qstats.drops++;
-               break;
-               case TC_POLICE_RECLASSIFY: /* DSCP remarking here ? */
-               case TC_POLICE_OK:
-               case TC_POLICE_UNSPEC:
-               default:
-               sch->bstats.packets++;
-               sch->bstats.bytes += skb->len;
-               result = NF_ACCEPT;
-               break;
-       };
-
+       }
 #else
        D2PRINTK("Overriding result to ACCEPT\n");
        result = NF_ACCEPT;
        sch->bstats.packets++;
        sch->bstats.bytes += skb->len;
-#endif
 #endif
 
        return result;
@@ -248,16 +221,11 @@ ing_hook(unsigned int hook, struct sk_buff **pskb,
                skb->dev ? (*pskb)->dev->name : "(no dev)",
                skb->len);
 
-/*
-revisit later: Use a private since lock dev->queue_lock is also
-used on the egress (might slow things for an iota)
-*/
-
        if (dev->qdisc_ingress) {
-               spin_lock(&dev->queue_lock);
+               spin_lock(&dev->ingress_lock);
                if ((q = dev->qdisc_ingress) != NULL)
                        fwres = q->enqueue(skb, q);
-               spin_unlock(&dev->queue_lock);
+               spin_unlock(&dev->ingress_lock);
        }
 
        return fwres;