From: Sapan Bhatia Date: Mon, 21 Jul 2008 20:20:30 +0000 (+0000) Subject: Optimization X-Git-Tag: linux-2.6-22-13~2 X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=commitdiff_plain;h=4f631af2dac51614fd866270ea1458416cebb223 Optimization --- diff --git a/linux-2.6-525-sknid-elevator.patch b/linux-2.6-525-sknid-elevator.patch index fedebc3aa..9d2443123 100644 --- a/linux-2.6-525-sknid-elevator.patch +++ b/linux-2.6-525-sknid-elevator.patch @@ -1,6 +1,6 @@ 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-15 11:39:32.000000000 -0400 -+++ linux-2.6.22-525/net/core/dev.c 2008-07-21 15:20:43.000000000 -0400 ++++ linux-2.6.22-525/net/core/dev.c 2008-07-21 16:22:33.000000000 -0400 @@ -1131,7 +1131,7 @@ if ((ptype->dev == dev || !ptype->dev) && (ptype->af_packet_priv == NULL || @@ -74,26 +74,29 @@ 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 -@@ -1922,6 +1941,18 @@ +@@ -1922,6 +1941,21 @@ ret = NET_RX_DROP; } -+ if (*cur_elevator) { ++ if (*cur_elevator>0) { + skb2->skb_tag = *cur_elevator; + list_for_each_entry_rcu(ptype, &ptype_all, list) { + if (!ptype->dev || ptype->dev == skb2->dev) { + ret = deliver_skb(skb2, ptype, orig_dev); + } + } ++ } ++ if (*cur_elevator) { + /* We have a packet */ + kfree_skb(skb2); + } ++ + *cur_elevator=0; + out: rcu_read_unlock(); return ret; -@@ -3780,6 +3811,7 @@ +@@ -3780,6 +3814,7 @@ EXPORT_SYMBOL(net_enable_timestamp); EXPORT_SYMBOL(net_disable_timestamp); EXPORT_SYMBOL(dev_get_flags);