112-bridging_performance.patch 726 B

12345678910111213141516171819202122
  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. netdev_rx_stat[this_cpu].total++;
  6. +
  7. +#ifdef CONFIG_BRIDGE
  8. + /* Optimisation for framebursting (allow interleaving of pkts by
  9. + * immediately processing the rx pkt instead of Qing the pkt and deferring
  10. + * the processing). Only optimise for bridging and guard against non
  11. + * TASKLET based netif_rx calls.
  12. + */
  13. + if (!in_irq() && (skb->dev->br_port != NULL) && br_handle_frame_hook != NULL) {
  14. + local_irq_restore(flags);
  15. + return netif_receive_skb(skb);
  16. + }
  17. +#endif
  18. +
  19. if (queue->input_pkt_queue.qlen <= netdev_max_backlog) {
  20. if (queue->input_pkt_queue.qlen) {
  21. if (queue->throttle)