aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-07-16 09:31:20 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-08-09 07:54:54 +0200
commitdc1cbd145eecf21209d0322874e1766bcbce3e3f (patch)
tree6b49d9b1b47af18984ff769f7b2d94a98a113521 /net/batman-adv/types.h
parentbatman-adv: Keep batadv netdev when hardif disappears (diff)
downloadlinux-dev-dc1cbd145eecf21209d0322874e1766bcbce3e3f.tar.xz
linux-dev-dc1cbd145eecf21209d0322874e1766bcbce3e3f.zip
batman-adv: Allow to disable debugfs support
The files provided by batman-adv via debugfs are currently converted to netlink. Tools which are not yet converted to use the netlink interface may still rely on the old debugfs files. But systems which already upgraded their tools can save some space by disabling this feature. The default configuration of batman-adv on amd64 can reduce the size of the module by around 11% when this feature is disabled. $ size net/batman-adv/batman-adv.ko* text data bss dec hex filename 150507 10395 4160 165062 284c6 net/batman-adv/batman-adv.ko.y 137106 7099 2112 146317 23b8d net/batman-adv/batman-adv.ko.n Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r--net/batman-adv/types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index b5f01a36ec34..b3dd1a381aad 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1431,7 +1431,9 @@ struct batadv_algo_neigh_ops {
struct batadv_hard_iface *if_outgoing1,
struct batadv_neigh_node *neigh2,
struct batadv_hard_iface *if_outgoing2);
+#ifdef CONFIG_BATMAN_ADV_DEBUGFS
void (*print)(struct batadv_priv *priv, struct seq_file *seq);
+#endif
void (*dump)(struct sk_buff *msg, struct netlink_callback *cb,
struct batadv_priv *priv,
struct batadv_hard_iface *hard_iface);
@@ -1453,8 +1455,10 @@ struct batadv_algo_orig_ops {
int (*add_if)(struct batadv_orig_node *orig_node, int max_if_num);
int (*del_if)(struct batadv_orig_node *orig_node, int max_if_num,
int del_if_num);
+#ifdef CONFIG_BATMAN_ADV_DEBUGFS
void (*print)(struct batadv_priv *priv, struct seq_file *seq,
struct batadv_hard_iface *hard_iface);
+#endif
void (*dump)(struct sk_buff *msg, struct netlink_callback *cb,
struct batadv_priv *priv,
struct batadv_hard_iface *hard_iface);
@@ -1480,7 +1484,9 @@ struct batadv_algo_gw_ops {
bool (*is_eligible)(struct batadv_priv *bat_priv,
struct batadv_orig_node *curr_gw_orig,
struct batadv_orig_node *orig_node);
+#ifdef CONFIG_BATMAN_ADV_DEBUGFS
void (*print)(struct batadv_priv *bat_priv, struct seq_file *seq);
+#endif
void (*dump)(struct sk_buff *msg, struct netlink_callback *cb,
struct batadv_priv *priv);
};