git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag linux-2.6-32-1
[linux-2.6.git]
/
linux-2.6-525-sknid-elevator.patch
diff --git
a/linux-2.6-525-sknid-elevator.patch
b/linux-2.6-525-sknid-elevator.patch
index
87d88fc
..
99cca2a
100644
(file)
--- a/
linux-2.6-525-sknid-elevator.patch
+++ b/
linux-2.6-525-sknid-elevator.patch
@@
-1,14
+1,19
@@
-commit a57d715bc58005cfae0fdf1626ebf11b11508025
-Author: root <root@rhel6.(none)>
-Date: Thu Apr 29 10:01:21 2010 -0400
+From f5cda6cb8da57f20cb58e5d8e8bf41b9e155c06c Mon Sep 17 00:00:00 2001
+From: S.Çağlar Onur <caglar@cs.princeton.edu>
+Date: Tue, 7 Dec 2010 11:07:40 -0500
+Subject: [PATCH] linux-2.6-525-sknid-elevator.patch
- linux-2.6-525-sknid-elevator.patch
+---
+ include/linux/netdevice.h | 1 +
+ net/core/dev.c | 30 +++++++++++++++++++
+ net/packet/af_packet.c | 71 +++++++++++++++++++++++++++++++++++++++++++-
+ 3 files changed, 100 insertions(+), 2 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
-index
4267c8b..3f36a91
100644
+index
17b0c3c..186d772
100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -10
57,6 +1057
,7 @@ struct napi_gro_cb {
+@@ -10
99,6 +1099
,7 @@ struct napi_gro_cb {
struct packet_type {
__be16 type; /* This is really htons(ether_type). */
struct net_device *dev; /* NULL is wildcarded here */
struct packet_type {
__be16 type; /* This is really htons(ether_type). */
struct net_device *dev; /* NULL is wildcarded here */
@@
-17,7
+22,7
@@
index 4267c8b..3f36a91 100644
struct net_device *,
struct packet_type *,
diff --git a/net/core/dev.c b/net/core/dev.c
struct net_device *,
struct packet_type *,
diff --git a/net/core/dev.c b/net/core/dev.c
-index
8b6b941..651a1c3
100644
+index
32a2b7e..7fda319
100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -99,6 +99,8 @@
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -99,6 +99,8 @@
@@
-29,7
+34,7
@@
index 8b6b941..651a1c3 100644
#include <linux/if_bridge.h>
#include <linux/if_macvlan.h>
#include <net/dst.h>
#include <linux/if_bridge.h>
#include <linux/if_macvlan.h>
#include <net/dst.h>
-@@ -2
275,6 +2277
,10 @@ void netif_nit_deliver(struct sk_buff *skb)
+@@ -2
333,6 +2335
,10 @@ void netif_nit_deliver(struct sk_buff *skb)
rcu_read_unlock();
}
rcu_read_unlock();
}
@@
-40,9
+45,9
@@
index 8b6b941..651a1c3 100644
/**
* netif_receive_skb - process receive buffer from network
* @skb: buffer to process
/**
* netif_receive_skb - process receive buffer from network
* @skb: buffer to process
-@@ -2296,8 +2302,11 @@ int netif_receive_skb(struct sk_buff *skb)
- struct net_device *orig_dev;
+@@ -2355,8 +2361,11 @@ int netif_receive_skb(struct sk_buff *skb)
struct net_device *null_or_orig;
struct net_device *null_or_orig;
+ struct net_device *null_or_bond;
int ret = NET_RX_DROP;
+ int *cur_elevator = &__get_cpu_var(sknid_elevator);
__be16 type;
int ret = NET_RX_DROP;
+ int *cur_elevator = &__get_cpu_var(sknid_elevator);
__be16 type;
@@
-52,7
+57,7
@@
index 8b6b941..651a1c3 100644
if (!skb->tstamp.tv64)
net_timestamp(skb);
if (!skb->tstamp.tv64)
net_timestamp(skb);
-@@ -2
373,7 +2382
,27 @@ ncls:
+@@ -2
456,7 +2465
,27 @@ ncls:
}
if (pt_prev) {
}
if (pt_prev) {
@@
-80,7
+85,7
@@
index 8b6b941..651a1c3 100644
} else {
kfree_skb(skb);
/* Jamal, now you will not able to escape explaining
} else {
kfree_skb(skb);
/* Jamal, now you will not able to escape explaining
-@@ -4
127,6 +4156
,7 @@ unsigned dev_get_flags(const struct net_device *dev)
+@@ -4
210,6 +4239
,7 @@ unsigned dev_get_flags(const struct net_device *dev)
return flags;
}
EXPORT_SYMBOL(dev_get_flags);
return flags;
}
EXPORT_SYMBOL(dev_get_flags);
@@
-89,7
+94,7
@@
index 8b6b941..651a1c3 100644
/**
* dev_change_flags - change device settings
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
/**
* dev_change_flags - change device settings
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
-index
1bd109e..5c2e9ad
100644
+index
b4bf950..cbf8d22
100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -78,6 +78,7 @@
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -78,6 +78,7 @@
@@
-98,13
+103,13
@@
index 1bd109e..5c2e9ad 100644
#include <linux/init.h>
+#include <linux/vs_network.h>
#include <linux/mutex.h>
#include <linux/init.h>
+#include <linux/vs_network.h>
#include <linux/mutex.h>
+ #include <linux/if_vlan.h>
- #ifdef CONFIG_INET
-@@ -337,12 +338,54 @@ static const struct proto_ops packet_ops;
+@@ -338,12 +339,54 @@ static const struct proto_ops packet_ops;
static const struct proto_ops packet_ops_spkt;
static const struct proto_ops packet_ops_spkt;
-+
extern DEFIN
E_PER_CPU(int, sknid_elevator);
++
DECLAR
E_PER_CPU(int, sknid_elevator);
+
+static inline unsigned int slice_check_and_elevate(struct sk_buff *skb, struct sock *sk) {
+ /* This mechanism is quite involved, and caused us a lot of pain
+
+static inline unsigned int slice_check_and_elevate(struct sk_buff *skb, struct sock *sk) {
+ /* This mechanism is quite involved, and caused us a lot of pain
@@
-151,12
+156,12
@@
index 1bd109e..5c2e9ad 100644
struct sock *sk;
struct sockaddr_pkt *spkt;
-
struct sock *sk;
struct sockaddr_pkt *spkt;
-
-+
int tag = skb->skb_tag;
++
+
/*
* When we registered the protocol we saved the socket in the data
* field for just this event.
+
/*
* When we registered the protocol we saved the socket in the data
* field for just this event.
-@@ -36
1,6 +404
,16 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,
+@@ -36
2,6 +405
,16 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,
* so that this procedure is noop.
*/
* so that this procedure is noop.
*/
@@
-173,7
+178,7
@@
index 1bd109e..5c2e9ad 100644
if (skb->pkt_type == PACKET_LOOPBACK)
goto out;
if (skb->pkt_type == PACKET_LOOPBACK)
goto out;
-@@ -4
19,6 +472
,9 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
+@@ -4
20,6 +473
,9 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
__be16 proto = 0;
int err;
__be16 proto = 0;
int err;
@@
-183,7
+188,7
@@
index 1bd109e..5c2e9ad 100644
/*
* Get and verify the address.
*/
/*
* Get and verify the address.
*/
-@@ -5
09,11 +565
,16 @@ out_unlock:
+@@ -5
10,11 +566
,16 @@ out_unlock:
return err;
}
return err;
}
@@
-200,7
+205,7
@@
index 1bd109e..5c2e9ad 100644
rcu_read_lock_bh();
filter = rcu_dereference(sk->sk_filter);
if (filter != NULL)
rcu_read_lock_bh();
filter = rcu_dereference(sk->sk_filter);
if (filter != NULL)
-@@ -10
63,6 +112
4,9 @@ static int packet_snd(struct socket *sock,
+@@ -10
73,6 +113
4,9 @@ static int packet_snd(struct socket *sock,
unsigned char *addr;
int ifindex, err, reserve = 0;
unsigned char *addr;
int ifindex, err, reserve = 0;
@@
-210,7
+215,7
@@
index 1bd109e..5c2e9ad 100644
/*
* Get and verify the address.
*/
/*
* Get and verify the address.
*/
-@@ -12
48,6 +131
2,7 @@ static int packet_do_bind(struct sock *sk, struct net_device *dev, __be16 protoc
+@@ -12
58,6 +132
2,7 @@ static int packet_do_bind(struct sock *sk, struct net_device *dev, __be16 protoc
po->num = protocol;
po->prot_hook.type = protocol;
po->num = protocol;
po->prot_hook.type = protocol;
@@
-218,7
+223,7
@@
index 1bd109e..5c2e9ad 100644
po->prot_hook.dev = dev;
po->ifindex = dev ? dev->ifindex : 0;
po->prot_hook.dev = dev;
po->ifindex = dev ? dev->ifindex : 0;
-@@ -13
48,8 +141
3,9 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
+@@ -13
58,8 +142
3,9 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
__be16 proto = (__force __be16)protocol; /* weird, but documented */
int err;
__be16 proto = (__force __be16)protocol; /* weird, but documented */
int err;
@@
-229,7
+234,7
@@
index 1bd109e..5c2e9ad 100644
if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&
sock->type != SOCK_PACKET)
return -ESOCKTNOSUPPORT;
if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&
sock->type != SOCK_PACKET)
return -ESOCKTNOSUPPORT;
-@@ -13
81,6 +144
7,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
+@@ -13
91,6 +145
7,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol,
spin_lock_init(&po->bind_lock);
mutex_init(&po->pg_vec_lock);
po->prot_hook.func = packet_rcv;
spin_lock_init(&po->bind_lock);
mutex_init(&po->pg_vec_lock);
po->prot_hook.func = packet_rcv;
@@
-237,3
+242,6
@@
index 1bd109e..5c2e9ad 100644
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
+--
+1.5.4.3
+