aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.4/patches/112-bridging_performance.patch
blob: 953154959b69c4684fa201fdaf70ce95405fc343 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Index: linux-2.4.35.4/net/core/dev.c
===================================================================
--- linux-2.4.35.4.orig/net/core/dev.c	2007-12-15 05:19:51.651364482 +0100
+++ linux-2.4.35.4/net/core/dev.c	2007-12-15 05:19:54.483525877 +0100
@@ -1289,6 +1289,19 @@
 	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)