]> git.hungrycats.org Git - linux/commitdiff
[NET]: Kill NET_FASTROUTE, does nothing and suffers from major bitrot.
authorDavid S. Miller <davem@nuts.davemloft.net>
Fri, 30 Jul 2004 07:23:29 +0000 (00:23 -0700)
committerDavid S. Miller <davem@nuts.davemloft.net>
Fri, 30 Jul 2004 07:23:29 +0000 (00:23 -0700)
Based up suggestion/changes from Jeff Garzik.

Signed-off-by: David S. Miller <davem@redhat.com>
arch/ia64/hp/sim/simeth.c
drivers/net/bonding/bond_main.c
drivers/net/dummy.c
include/linux/netdevice.h
net/core/dev.c
net/core/sysctl_net_core.c
net/ipv4/route.c

index 93f4d190c4b689e51f2afb330d9204d5ece96f59..3c9c3072b68cde2457b7a737e03df75a9cb2742e 100644 (file)
@@ -527,13 +527,4 @@ set_multicast_list(struct net_device *dev)
        printk(KERN_WARNING "%s: set_multicast_list called\n", dev->name);
 }
 
-#ifdef CONFIG_NET_FASTROUTE
-static int
-simeth_accept_fastpath(struct net_device *dev, struct dst_entry *dst)
-{
-       printk(KERN_WARNING "%s: simeth_accept_fastpath called\n", dev->name);
-       return -1;
-}
-#endif
-
 __initcall(simeth_probe);
index 6e57c143423081e110652de974d5dfe6a340aef9..6917b665b65a481ef109e8a3760d38904fbb8158 100644 (file)
@@ -4214,13 +4214,6 @@ out:
        return 0;
 }
 
-#ifdef CONFIG_NET_FASTROUTE
-static int bond_accept_fastpath(struct net_device *bond_dev, struct dst_entry *dst)
-{
-       return -1;
-}
-#endif
-
 /*------------------------- Device initialization ---------------------------*/
 
 /*
@@ -4294,9 +4287,6 @@ static int __init bond_init(struct net_device *bond_dev, struct bond_params *par
        bond_set_mode_ops(bond_dev, bond->params.mode);
 
        bond_dev->destructor = free_netdev;
-#ifdef CONFIG_NET_FASTROUTE
-       bond_dev->accept_fastpath = bond_accept_fastpath;
-#endif
 
        /* Initialize the device options */
        bond_dev->tx_queue_len = 0;
index fc0a851a93f977cebb45d63d432fa6e619991592..7e15c51afd435d217299d8d23496af16ac170365 100644 (file)
@@ -57,13 +57,6 @@ static void set_multicast_list(struct net_device *dev)
 {
 }
 
-#ifdef CONFIG_NET_FASTROUTE
-static int dummy_accept_fastpath(struct net_device *dev, struct dst_entry *dst)
-{
-       return -1;
-}
-#endif
-
 static void __init dummy_setup(struct net_device *dev)
 {
        /* Initialize the device structure. */
@@ -71,9 +64,6 @@ static void __init dummy_setup(struct net_device *dev)
        dev->hard_start_xmit = dummy_xmit;
        dev->set_multicast_list = set_multicast_list;
        dev->set_mac_address = dummy_set_address;
-#ifdef CONFIG_NET_FASTROUTE
-       dev->accept_fastpath = dummy_accept_fastpath;
-#endif
 
        /* Fill in device structure with ethernet-generic values. */
        ether_setup(dev);
index e9375f3ad5c417cc1f7348eb7772058d28620cc1..53c73157ed749c45dbcc2436d4387c11148ba272 100644 (file)
@@ -472,12 +472,6 @@ struct net_device
        /* bridge stuff */
        struct net_bridge_port  *br_port;
 
-#ifdef CONFIG_NET_FASTROUTE
-#define NETDEV_FASTROUTE_HMASK 0xF
-       /* Semi-private data. Keep it at the end of device struct. */
-       rwlock_t                fastpath_lock;
-       struct dst_entry        *fastpath[NETDEV_FASTROUTE_HMASK+1];
-#endif
 #ifdef CONFIG_NET_DIVERT
        /* this will get initialized at each interface type init routine */
        struct divert_blk       *divert;
@@ -947,11 +941,6 @@ extern unsigned long       netdev_fc_xoff;
 extern atomic_t netdev_dropping;
 extern int             netdev_set_master(struct net_device *dev, struct net_device *master);
 extern int skb_checksum_help(struct sk_buff **pskb, int inward);
-#ifdef CONFIG_NET_FASTROUTE
-extern int             netdev_fastroute;
-extern int             netdev_fastroute_obstacles;
-extern void            dev_clear_fastroute(struct net_device *dev);
-#endif
 
 #ifdef CONFIG_SYSCTL
 extern char *net_sysctl_strdup(const char *s);
index 93a145c4d9ab651523b0d3e300ba7d62249a2548..547469d2ac6fe49500ccf643b223eca9d4029150 100644 (file)
@@ -216,11 +216,6 @@ static struct notifier_block *netdev_chain;
  */
 DEFINE_PER_CPU(struct softnet_data, softnet_data) = { 0, };
 
-#ifdef CONFIG_NET_FASTROUTE
-int netdev_fastroute;
-int netdev_fastroute_obstacles;
-#endif
-
 #ifdef CONFIG_SYSFS
 extern int netdev_sysfs_init(void);
 extern int netdev_register_sysfs(struct net_device *);
@@ -278,12 +273,6 @@ void dev_add_pack(struct packet_type *pt)
        int hash;
 
        spin_lock_bh(&ptype_lock);
-#ifdef CONFIG_NET_FASTROUTE
-       if (pt->af_packet_priv) {
-               netdev_fastroute_obstacles++;
-               dev_clear_fastroute(pt->dev);
-       }
-#endif
        if (pt->type == htons(ETH_P_ALL)) {
                netdev_nit++;
                list_add_rcu(&pt->list, &ptype_all);
@@ -326,10 +315,6 @@ void __dev_remove_pack(struct packet_type *pt)
 
        list_for_each_entry(pt1, head, list) {
                if (pt == pt1) {
-#ifdef CONFIG_NET_FASTROUTE
-                       if (pt->af_packet_priv)
-                               netdev_fastroute_obstacles--;
-#endif
                        list_del_rcu(&pt->list);
                        goto out;
                }
@@ -971,39 +956,6 @@ int dev_open(struct net_device *dev)
        return ret;
 }
 
-#ifdef CONFIG_NET_FASTROUTE
-
-static void dev_do_clear_fastroute(struct net_device *dev)
-{
-       if (dev->accept_fastpath) {
-               int i;
-
-               for (i = 0; i <= NETDEV_FASTROUTE_HMASK; i++) {
-                       struct dst_entry *dst;
-
-                       write_lock_irq(&dev->fastpath_lock);
-                       dst = dev->fastpath[i];
-                       dev->fastpath[i] = NULL;
-                       write_unlock_irq(&dev->fastpath_lock);
-
-                       dst_release(dst);
-               }
-       }
-}
-
-void dev_clear_fastroute(struct net_device *dev)
-{
-       if (dev) {
-               dev_do_clear_fastroute(dev);
-       } else {
-               read_lock(&dev_base_lock);
-               for (dev = dev_base; dev; dev = dev->next)
-                       dev_do_clear_fastroute(dev);
-               read_unlock(&dev_base_lock);
-       }
-}
-#endif
-
 /**
  *     dev_close - shutdown an interface.
  *     @dev: device to shutdown
@@ -1056,9 +1008,6 @@ int dev_close(struct net_device *dev)
         */
 
        dev->flags &= ~IFF_UP;
-#ifdef CONFIG_NET_FASTROUTE
-       dev_clear_fastroute(dev);
-#endif
 
        /*
         * Tell people we are down
@@ -1827,13 +1776,6 @@ int netif_receive_skb(struct sk_buff *skb)
 
        __get_cpu_var(netdev_rx_stat).total++;
 
-#ifdef CONFIG_NET_FASTROUTE
-       if (skb->pkt_type == PACKET_FASTROUTE) {
-               __get_cpu_var(netdev_rx_stat).fastroute_deferred_out++;
-               return dev_queue_xmit(skb);
-       }
-#endif
-
        skb->h.raw = skb->nh.raw = skb->data;
        skb->mac_len = skb->nh.raw - skb->mac.raw;
 
@@ -2373,13 +2315,6 @@ void dev_set_promiscuity(struct net_device *dev, int inc)
        if ((dev->promiscuity += inc) == 0)
                dev->flags &= ~IFF_PROMISC;
        if (dev->flags ^ old_flags) {
-#ifdef CONFIG_NET_FASTROUTE
-               if (dev->flags & IFF_PROMISC) {
-                       netdev_fastroute_obstacles++;
-                       dev_clear_fastroute(dev);
-               } else
-                       netdev_fastroute_obstacles--;
-#endif
                dev_mc_upload(dev);
                printk(KERN_INFO "device %s %s promiscuous mode\n",
                       dev->name, (dev->flags & IFF_PROMISC) ? "entered" :
@@ -2932,10 +2867,6 @@ int register_netdevice(struct net_device *dev)
        spin_lock_init(&dev->ingress_lock);
 #endif
 
-#ifdef CONFIG_NET_FASTROUTE
-       dev->fastpath_lock = RW_LOCK_UNLOCKED;
-#endif
-
        ret = alloc_divert_blk(dev);
        if (ret)
                goto out;
@@ -3254,10 +3185,6 @@ int unregister_netdevice(struct net_device *dev)
 
        synchronize_net();
 
-#ifdef CONFIG_NET_FASTROUTE
-       dev_clear_fastroute(dev);
-#endif
-
        /* Shutdown queueing discipline. */
        dev_shutdown(dev);
 
@@ -3460,10 +3387,6 @@ EXPORT_SYMBOL(netdev_fc_xoff);
 EXPORT_SYMBOL(netdev_register_fc);
 EXPORT_SYMBOL(netdev_unregister_fc);
 #endif
-#ifdef CONFIG_NET_FASTROUTE
-EXPORT_SYMBOL(netdev_fastroute);
-EXPORT_SYMBOL(netdev_fastroute_obstacles);
-#endif
 
 #ifdef CONFIG_NET_CLS_ACT
 EXPORT_SYMBOL(ing_filter);
index 6889e4306f94b44900393fee01343a47ddd8a5f6..c8be646cb1911e30c9c607f5f64d5a8b1f859b23 100644 (file)
@@ -130,16 +130,6 @@ ctl_table core_table[] = {
                .mode           = 0644,
                .proc_handler   = &proc_dointvec
        },
-#ifdef CONFIG_NET_FASTROUTE
-       {
-               .ctl_name       = NET_CORE_FASTROUTE,
-               .procname       = "netdev_fastroute",
-               .data           = &netdev_fastroute,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-#endif
        {
                .ctl_name       = NET_CORE_MSG_COST,
                .procname       = "message_cost",
index 5d2cf030ea44bd91ac3c6b0dcba728b44b215174..37c9d31c3880243b8303fbddb4abba4f6bc042de 100644 (file)
@@ -1729,17 +1729,6 @@ static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr,
 
        rth->rt_flags = flags;
 
-#ifdef CONFIG_NET_FASTROUTE
-       if (netdev_fastroute && !(flags&(RTCF_NAT|RTCF_MASQ|RTCF_DOREDIRECT))) {
-               struct net_device *odev = rth->u.dst.dev;
-               if (odev != dev &&
-                   dev->accept_fastpath &&
-                   odev->mtu >= dev->mtu &&
-                   dev->accept_fastpath(dev, &rth->u.dst) == 0)
-                       rth->rt_flags |= RTCF_FAST;
-       }
-#endif
-
 intern:
        err = rt_intern_hash(hash, rth, (struct rtable**)&skb->dst);
 done: