| 1 | --- a/net/core/dev.c |
| 2 | +++ b/net/core/dev.c |
| 3 | @@ -1289,6 +1289,19 @@ int netif_rx(struct sk_buff *skb) |
| 4 | local_irq_save(flags); |
| 5 | |
| 6 | netdev_rx_stat[this_cpu].total++; |
| 7 | + |
| 8 | +#ifdef CONFIG_BRIDGE |
| 9 | + /* Optimisation for framebursting (allow interleaving of pkts by |
| 10 | + * immediately processing the rx pkt instead of Qing the pkt and deferring |
| 11 | + * the processing). Only optimise for bridging and guard against non |
| 12 | + * TASKLET based netif_rx calls. |
| 13 | + */ |
| 14 | + if (!in_irq() && (skb->dev->br_port != NULL) && br_handle_frame_hook != NULL) { |
| 15 | + local_irq_restore(flags); |
| 16 | + return netif_receive_skb(skb); |
| 17 | + } |
| 18 | +#endif |
| 19 | + |
| 20 | if (queue->input_pkt_queue.qlen <= netdev_max_backlog) { |
| 21 | if (queue->input_pkt_queue.qlen) { |
| 22 | if (queue->throttle) |
| 23 | |