1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-13 14:03:41 +03:00
openwrt-xburst/target/linux/generic-2.4/patches/112-bridging_performance.patch
juhosg f3016ce71f [kernel] refresh generic-2.4 patches
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11213 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-05-19 13:44:11 +00:00

25 lines
862 B
Diff

Index: linux-2.4.35.4/net/core/dev.c
===================================================================
--- linux-2.4.35.4.orig/net/core/dev.c
+++ linux-2.4.35.4/net/core/dev.c
@@ -1289,6 +1289,19 @@ int netif_rx(struct sk_buff *skb)
local_irq_save(flags);
netdev_rx_stat[this_cpu].total++;
+
+#ifdef CONFIG_BRIDGE
+ /* Optimisation for framebursting (allow interleaving of pkts by
+ * immediately processing the rx pkt instead of Qing the pkt and deferring
+ * the processing). Only optimise for bridging and guard against non
+ * TASKLET based netif_rx calls.
+ */
+ if (!in_irq() && (skb->dev->br_port != NULL) && br_handle_frame_hook != NULL) {
+ local_irq_restore(flags);
+ return netif_receive_skb(skb);
+ }
+#endif
+
if (queue->input_pkt_queue.qlen <= netdev_max_backlog) {
if (queue->input_pkt_queue.qlen) {
if (queue->throttle)