/* 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;
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);
*/
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 *);
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);
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;
}
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
*/
dev->flags &= ~IFF_UP;
-#ifdef CONFIG_NET_FASTROUTE
- dev_clear_fastroute(dev);
-#endif
/*
* Tell people we are down
__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;
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" :
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;
synchronize_net();
-#ifdef CONFIG_NET_FASTROUTE
- dev_clear_fastroute(dev);
-#endif
-
/* Shutdown queueing discipline. */
dev_shutdown(dev);
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);