]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/bonding/bonding.h
bonding: add the debugfs facility to the bonding driver
[mirror_ubuntu-artful-kernel.git] / drivers / net / bonding / bonding.h
index 4eedb12df6caf2e4676cbe11e2134e97ec01def1..03710f8f5c49a790bfb2e4ad207b76f5ad6b989e 100644 (file)
@@ -259,6 +259,10 @@ struct bonding {
 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
        struct   in6_addr master_ipv6;
 #endif
+#ifdef CONFIG_DEBUG_FS
+       /* debugging suport via debugfs */
+       struct   dentry *debug_dir;
+#endif /* CONFIG_DEBUG_FS */
 };
 
 /**
@@ -286,7 +290,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
                return NULL;
        }
 
-       return (struct bonding *)netdev_priv(slave->dev->master);
+       return netdev_priv(slave->dev->master);
 }
 
 static inline bool bond_is_lb(const struct bonding *bond)
@@ -380,6 +384,11 @@ void bond_select_active_slave(struct bonding *bond);
 void bond_change_active_slave(struct bonding *bond, struct slave *new_active);
 void bond_register_arp(struct bonding *);
 void bond_unregister_arp(struct bonding *);
+void bond_create_debugfs(void);
+void bond_destroy_debugfs(void);
+void bond_debug_register(struct bonding *bond);
+void bond_debug_unregister(struct bonding *bond);
+void bond_debug_reregister(struct bonding *bond);
 
 struct bond_net {
        struct net *            net;    /* Associated network namespace */