112-bridging_performance.patch 862 B

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