Updating from the mainline PL kernel
[linux-2.6.git] / linux-2.6-525-sknid-elevator.patch
index 1b42d92..2fa9133 100644 (file)
@@ -1,7 +1,7 @@
-diff -Nurb linux-2.6.22-524/include/linux/netdevice.h linux-2.6.22-525/include/linux/netdevice.h
---- linux-2.6.22-524/include/linux/netdevice.h 2008-07-27 22:06:14.000000000 -0400
-+++ linux-2.6.22-525/include/linux/netdevice.h 2008-07-27 22:17:30.000000000 -0400
-@@ -562,6 +562,7 @@
+diff -NurpP --exclude '*.orig' --exclude '*.rej' linux-2.6.27.10-vs2.3.x-PS-522-523-524/include/linux/netdevice.h linux-2.6.27.10-vs2.3.x-PS-522-523-524-525/include/linux/netdevice.h
+--- linux-2.6.27.10-vs2.3.x-PS-522-523-524/include/linux/netdevice.h   2008-10-13 14:52:09.000000000 +0200
++++ linux-2.6.27.10-vs2.3.x-PS-522-523-524-525/include/linux/netdevice.h       2009-01-21 03:38:41.000000000 +0100
+@@ -857,6 +857,7 @@ static inline void netif_napi_del(struct
  struct packet_type {
        __be16                  type;   /* This is really htons(ether_type). */
        struct net_device       *dev;   /* NULL is wildcarded here           */
@@ -9,19 +9,19 @@ diff -Nurb linux-2.6.22-524/include/linux/netdevice.h linux-2.6.22-525/include/l
        int                     (*func) (struct sk_buff *,
                                         struct net_device *,
                                         struct packet_type *,
-diff -Nurb linux-2.6.22-524/net/core/dev.c linux-2.6.22-525/net/core/dev.c
---- linux-2.6.22-524/net/core/dev.c    2008-07-27 22:06:20.000000000 -0400
-+++ linux-2.6.22-525/net/core/dev.c    2008-07-28 09:26:45.000000000 -0400
-@@ -97,6 +97,8 @@
+diff -NurpP --exclude '*.orig' --exclude '*.rej' linux-2.6.27.10-vs2.3.x-PS-522-523-524/net/core/dev.c linux-2.6.27.10-vs2.3.x-PS-522-523-524-525/net/core/dev.c
+--- linux-2.6.27.10-vs2.3.x-PS-522-523-524/net/core/dev.c      2008-12-19 12:09:14.000000000 +0100
++++ linux-2.6.27.10-vs2.3.x-PS-522-523-524-525/net/core/dev.c  2009-01-21 03:43:19.000000000 +0100
+@@ -99,6 +99,8 @@
  #include <linux/proc_fs.h>
  #include <linux/seq_file.h>
  #include <linux/stat.h>
 +#include <linux/ip.h>
 +#include <linux/tcp.h>
  #include <linux/if_bridge.h>
+ #include <linux/if_macvlan.h>
  #include <net/dst.h>
- #include <net/pkt_sched.h>
-@@ -1131,7 +1133,7 @@
+@@ -1318,7 +1320,7 @@ static void dev_queue_xmit_nit(struct sk
                if ((ptype->dev == dev || !ptype->dev) &&
                    (ptype->af_packet_priv == NULL ||
                     (struct sock *)ptype->af_packet_priv != skb->sk)) {
@@ -30,47 +30,30 @@ diff -Nurb linux-2.6.22-524/net/core/dev.c linux-2.6.22-525/net/core/dev.c
                        if (!skb2)
                                break;
  
-@@ -1803,6 +1805,7 @@
-  * the ingress scheduler, you just cant add policies on ingress.
-  *
-  */
-+
- static int ing_filter(struct sk_buff *skb)
- {
-       struct Qdisc *q;
-@@ -1832,13 +1835,20 @@
+@@ -2170,6 +2172,10 @@ void netif_nit_deliver(struct sk_buff *s
+       rcu_read_unlock();
  }
- #endif
  
 +/* The code already makes the assumption that packet handlers run
 + * sequentially on the same CPU. -Sapan */
 +DEFINE_PER_CPU(int, sknid_elevator) = 0;
 +
- int netif_receive_skb(struct sk_buff *skb)
- {
-       struct packet_type *ptype, *pt_prev;
+ /**
+  *    netif_receive_skb - process receive buffer from network
+  *    @skb: buffer to process
+@@ -2191,8 +2197,11 @@ int netif_receive_skb(struct sk_buff *sk
        struct net_device *orig_dev;
+       struct net_device *null_or_orig;
        int ret = NET_RX_DROP;
-+      int *cur_elevator=&__get_cpu_var(sknid_elevator);
++      int *cur_elevator = &__get_cpu_var(sknid_elevator);
        __be16 type;
  
 +      *cur_elevator = 0;
 +
        /* if we've gotten here through NAPI, check netpoll */
-       if (skb->dev->poll && netpoll_rx(skb))
+       if (netpoll_receive_skb(skb))
                return NET_RX_DROP;
-@@ -1873,8 +1883,9 @@
-       list_for_each_entry_rcu(ptype, &ptype_all, list) {
-               if (!ptype->dev || ptype->dev == skb->dev) {
--                      if (pt_prev)
-+                      if (pt_prev) {
-                               ret = deliver_skb(skb, pt_prev, orig_dev);
-+                      }
-                       pt_prev = ptype;
-               }
-       }
-@@ -1913,7 +1924,27 @@
+@@ -2269,7 +2278,27 @@ ncls:
        }
  
        if (pt_prev) {
@@ -98,7 +81,7 @@ diff -Nurb linux-2.6.22-524/net/core/dev.c linux-2.6.22-525/net/core/dev.c
        } else {
                kfree_skb(skb);
                /* Jamal, now you will not able to escape explaining
-@@ -3780,6 +3811,7 @@
+@@ -4892,6 +4921,7 @@ EXPORT_SYMBOL(unregister_netdevice_notif
  EXPORT_SYMBOL(net_enable_timestamp);
  EXPORT_SYMBOL(net_disable_timestamp);
  EXPORT_SYMBOL(dev_get_flags);
@@ -106,10 +89,10 @@ diff -Nurb linux-2.6.22-524/net/core/dev.c linux-2.6.22-525/net/core/dev.c
  
  #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
  EXPORT_SYMBOL(br_handle_frame_hook);
-diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/af_packet.c
---- linux-2.6.22-524/net/packet/af_packet.c    2007-07-08 19:32:17.000000000 -0400
-+++ linux-2.6.22-525/net/packet/af_packet.c    2008-07-27 22:06:27.000000000 -0400
-@@ -78,6 +78,7 @@
+diff -NurpP --exclude '*.orig' --exclude '*.rej' linux-2.6.27.10-vs2.3.x-PS-522-523-524/net/packet/af_packet.c linux-2.6.27.10-vs2.3.x-PS-522-523-524-525/net/packet/af_packet.c
+--- linux-2.6.27.10-vs2.3.x-PS-522-523-524/net/packet/af_packet.c      2008-10-13 14:52:09.000000000 +0200
++++ linux-2.6.27.10-vs2.3.x-PS-522-523-524-525/net/packet/af_packet.c  2009-01-21 03:38:41.000000000 +0100
+@@ -77,6 +77,7 @@
  #include <linux/poll.h>
  #include <linux/module.h>
  #include <linux/init.h>
@@ -117,7 +100,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
  
  #ifdef CONFIG_INET
  #include <net/inet_common.h>
-@@ -246,10 +247,53 @@
+@@ -276,10 +277,53 @@ static const struct proto_ops packet_ops
  
  static const struct proto_ops packet_ops_spkt;
  
@@ -171,7 +154,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
  
        /*
         *      When we registered the protocol we saved the socket in the data
-@@ -269,6 +313,16 @@
+@@ -299,6 +343,16 @@ static int packet_rcv_spkt(struct sk_buf
         *      so that this procedure is noop.
         */
  
@@ -188,7 +171,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
        if (skb->pkt_type == PACKET_LOOPBACK)
                goto out;
  
-@@ -324,6 +378,9 @@
+@@ -357,6 +411,9 @@ static int packet_sendmsg_spkt(struct ki
        __be16 proto=0;
        int err;
  
@@ -198,7 +181,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
        /*
         *      Get and verify the address.
         */
-@@ -416,11 +473,16 @@
+@@ -449,11 +506,16 @@ out_unlock:
        return err;
  }
  
@@ -215,7 +198,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
        rcu_read_lock_bh();
        filter = rcu_dereference(sk->sk_filter);
        if (filter != NULL)
-@@ -711,6 +773,9 @@
+@@ -773,6 +835,9 @@ static int packet_sendmsg(struct kiocb *
        unsigned char *addr;
        int ifindex, err, reserve = 0;
  
@@ -225,7 +208,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
        /*
         *      Get and verify the address.
         */
-@@ -880,6 +945,7 @@
+@@ -939,6 +1004,7 @@ static int packet_do_bind(struct sock *s
  
        po->num = protocol;
        po->prot_hook.type = protocol;
@@ -233,7 +216,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
        po->prot_hook.dev = dev;
  
        po->ifindex = dev ? dev->ifindex : 0;
-@@ -984,8 +1050,9 @@
+@@ -1037,8 +1103,9 @@ static int packet_create(struct net *net
        __be16 proto = (__force __be16)protocol; /* weird, but documented */
        int err;
  
@@ -244,7 +227,7 @@ diff -Nurb linux-2.6.22-524/net/packet/af_packet.c linux-2.6.22-525/net/packet/a
        if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&
            sock->type != SOCK_PACKET)
                return -ESOCKTNOSUPPORT;
-@@ -1016,6 +1083,7 @@
+@@ -1069,6 +1136,7 @@ static int packet_create(struct net *net
  
        spin_lock_init(&po->bind_lock);
        po->prot_hook.func = packet_rcv;