From e69d8c0d8fbac180aaba30c8a3cdda0770cd8427 Mon Sep 17 00:00:00 2001 From: wbx Date: Sat, 26 Mar 2005 10:33:32 +0000 Subject: uncompress patches, requested by Kaloz git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@460 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../kernel-patches/103-net_core_dev-performance | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/linux/kernel-patches/103-net_core_dev-performance (limited to 'package/linux/kernel-patches/103-net_core_dev-performance') diff --git a/package/linux/kernel-patches/103-net_core_dev-performance b/package/linux/kernel-patches/103-net_core_dev-performance new file mode 100644 index 0000000000..e58e0c3448 --- /dev/null +++ b/package/linux/kernel-patches/103-net_core_dev-performance @@ -0,0 +1,45 @@ +--- linux-mips-cvs-21012005/net/core/dev.c 2004-04-16 05:14:21.000000000 +0200 ++++ linux-bridge/net/core/dev.c 2005-01-25 08:15:53.000000000 +0100 +@@ -1289,6 +1289,19 @@ + local_irq_save(flags); + + netdev_rx_stat[this_cpu].total++; ++ ++#if defined(CONFIG_BCM4710) && defined(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) +@@ -2053,6 +2066,7 @@ + { + struct net_device *dev; + int err; ++ struct net_device_stats *stats; + + if ((dev = __dev_get_by_name(ifr->ifr_name)) == NULL) + return -ENODEV; +@@ -2167,6 +2181,14 @@ + ifr->ifr_ifindex = dev->ifindex; + return 0; + ++#ifdef PERFORMANCE_SUPPORT ++ case SIOCGIFSTATS: ++ if (!dev->get_stats || !(stats = dev->get_stats(dev))) ++ return -ENODEV; ++ if (copy_to_user(ifr->ifr_data, stats, sizeof(struct net_device_stats))) ++ return -EFAULT; ++ return 0; ++#endif + case SIOCGIFTXQLEN: + ifr->ifr_qlen = dev->tx_queue_len; + return 0; -- cgit v1.2.3