提交 12479f9a 编写于 作者: M Mitch Williams 提交者: John W. Linville

[PATCH] bonding: expose some structs

The sysfs code needs to know what these structs look like, so make them
not static, and move the definition to the header.
Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
Acked-by: NJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b76850ab
...@@ -557,6 +557,7 @@ static char *lacp_rate = NULL; ...@@ -557,6 +557,7 @@ static char *lacp_rate = NULL;
static char *xmit_hash_policy = NULL; static char *xmit_hash_policy = NULL;
static int arp_interval = BOND_LINK_ARP_INTERV; static int arp_interval = BOND_LINK_ARP_INTERV;
static char *arp_ip_target[BOND_MAX_ARP_TARGETS] = { NULL, }; static char *arp_ip_target[BOND_MAX_ARP_TARGETS] = { NULL, };
struct bond_params bonding_defaults;
module_param(max_bonds, int, 0); module_param(max_bonds, int, 0);
MODULE_PARM_DESC(max_bonds, "Max number of bonded devices"); MODULE_PARM_DESC(max_bonds, "Max number of bonded devices");
...@@ -593,7 +594,7 @@ MODULE_PARM_DESC(arp_ip_target, "arp targets in n.n.n.n form"); ...@@ -593,7 +594,7 @@ MODULE_PARM_DESC(arp_ip_target, "arp targets in n.n.n.n form");
static const char *version = static const char *version =
DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"; DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n";
static LIST_HEAD(bond_dev_list); LIST_HEAD(bond_dev_list);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static struct proc_dir_entry *bond_proc_dir = NULL; static struct proc_dir_entry *bond_proc_dir = NULL;
...@@ -605,18 +606,14 @@ static int bond_mode = BOND_MODE_ROUNDROBIN; ...@@ -605,18 +606,14 @@ static int bond_mode = BOND_MODE_ROUNDROBIN;
static int xmit_hashtype= BOND_XMIT_POLICY_LAYER2; static int xmit_hashtype= BOND_XMIT_POLICY_LAYER2;
static int lacp_fast = 0; static int lacp_fast = 0;
struct bond_parm_tbl {
char *modename;
int mode;
};
static struct bond_parm_tbl bond_lacp_tbl[] = { struct bond_parm_tbl bond_lacp_tbl[] = {
{ "slow", AD_LACP_SLOW}, { "slow", AD_LACP_SLOW},
{ "fast", AD_LACP_FAST}, { "fast", AD_LACP_FAST},
{ NULL, -1}, { NULL, -1},
}; };
static struct bond_parm_tbl bond_mode_tbl[] = { struct bond_parm_tbl bond_mode_tbl[] = {
{ "balance-rr", BOND_MODE_ROUNDROBIN}, { "balance-rr", BOND_MODE_ROUNDROBIN},
{ "active-backup", BOND_MODE_ACTIVEBACKUP}, { "active-backup", BOND_MODE_ACTIVEBACKUP},
{ "balance-xor", BOND_MODE_XOR}, { "balance-xor", BOND_MODE_XOR},
...@@ -627,7 +624,7 @@ static struct bond_parm_tbl bond_mode_tbl[] = { ...@@ -627,7 +624,7 @@ static struct bond_parm_tbl bond_mode_tbl[] = {
{ NULL, -1}, { NULL, -1},
}; };
static struct bond_parm_tbl xmit_hashtype_tbl[] = { struct bond_parm_tbl xmit_hashtype_tbl[] = {
{ "layer2", BOND_XMIT_POLICY_LAYER2}, { "layer2", BOND_XMIT_POLICY_LAYER2},
{ "layer3+4", BOND_XMIT_POLICY_LAYER34}, { "layer3+4", BOND_XMIT_POLICY_LAYER34},
{ NULL, -1}, { NULL, -1},
......
...@@ -152,6 +152,11 @@ struct bond_params { ...@@ -152,6 +152,11 @@ struct bond_params {
u32 arp_targets[BOND_MAX_ARP_TARGETS]; u32 arp_targets[BOND_MAX_ARP_TARGETS];
}; };
struct bond_parm_tbl {
char *modename;
int mode;
};
struct vlan_entry { struct vlan_entry {
struct list_head vlan_list; struct list_head vlan_list;
u32 vlan_ip; u32 vlan_ip;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册