Skip to contentSkip to conversation

bonding: move procfs into bond_procfs.c

PATCH Superseded Amerigo Wang 2 participants 3 messages Feb 28, 2011 – Mar 4, 2011

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: move procfs into bond_procfs.c

bond_main.c is bloating, separate the procfs code out, move them to bond_procfs.c

---

drivers/net/bonding/Makefile +1 -1
index 0e2737e..1d8de09 100644
@@ -4,7 +4,7 @@
 
 obj-$(CONFIG_BONDING) += bonding.o
 
-bonding-objs := bond_main.o bond_3ad.o bond_alb.o bond_sysfs.o bond_debugfs.o
+bonding-objs := bond_main.o bond_3ad.o bond_alb.o bond_sysfs.o bond_debugfs.o bond_procfs.o
 
 ipv6-$(subst m,y,$(CONFIG_IPV6)) += bond_ipv6.o
 bonding-objs += $(ipv6-y)
drivers/net/bonding/bond_main.c +2 -300

332 lines not on this page · raw message

drivers/net/bonding/bond_procfs.c new file +297 -0

297 lines not on this page · raw message

drivers/net/bonding/bonding.h +7 -0
index a401b8d..dfe41df 100644
@@ -29,6 +29,8 @@
 #define DRV_NAME	"bonding"
 #define DRV_DESCRIPTION	"Ethernet Channel Bonding Driver"
 
+#define bond_version DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"
+
 #define BOND_MAX_ARP_TARGETS	16
 
 #define IS_UP(dev)					   \
@@ -413,6 +415,11 @@ struct bond_net {
 #endif
 };
 
+void bond_create_proc_entry(struct bonding *bond);
+void bond_remove_proc_entry(struct bonding *bond);
+void bond_create_proc_dir(struct bond_net *bn);
+void bond_destroy_proc_dir(struct bond_net *bn);
+
 /* exported from bond_main.c */
 extern int bond_net_id;
 extern const struct bond_parm_tbl bond_lacp_tbl[];
maintainer
#1 lore raw

From: Amerigo Wang <[email protected]>
Date: Mon, 28 Feb 2011 20:30:04 +0800

Quoted 4 lines

bond_main.c is bloating, separate the procfs code out, move them to bond_procfs.c

Please use Makefile rules to conditionally compile the new bond_procfs.o file, instead of wrapping almost the entire file with an ifdef.

Put the dummy no-PROC_FS function stubs, as inlines, in bonding.h

Thanks!

author
#2 lore raw
Quoted 6 lines · David Miller

From: Amerigo Wang<[email protected]>
Date: Mon, 28 Feb 2011 20:30:04 +0800

Quoted 3 lines

bond_main.c is bloating, separate the procfs code out, move them to bond_procfs.c

Quoted 7 lines
Quoted 1 line

Please use Makefile rules to conditionally compile the new bond_procfs.o file, instead of wrapping almost the entire file with an ifdef.

Put the dummy no-PROC_FS function stubs, as inlines, in bonding.h

Ok, will do it in the next update.

Thanks!