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

[PATCH] bonding: make functions not static

The sysfs code needs access these functions, so make them
not static, and move the protos to the header file.
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>
上级 12479f9a
...@@ -632,12 +632,11 @@ struct bond_parm_tbl xmit_hashtype_tbl[] = { ...@@ -632,12 +632,11 @@ struct bond_parm_tbl xmit_hashtype_tbl[] = {
/*-------------------------- Forward declarations ---------------------------*/ /*-------------------------- Forward declarations ---------------------------*/
static inline void bond_set_mode_ops(struct bonding *bond, int mode);
static void bond_send_gratuitous_arp(struct bonding *bond); static void bond_send_gratuitous_arp(struct bonding *bond);
/*---------------------------- General routines -----------------------------*/ /*---------------------------- General routines -----------------------------*/
static const char *bond_mode_name(int mode) const char *bond_mode_name(int mode)
{ {
switch (mode) { switch (mode) {
case BOND_MODE_ROUNDROBIN : case BOND_MODE_ROUNDROBIN :
...@@ -1453,7 +1452,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond) ...@@ -1453,7 +1452,7 @@ static struct slave *bond_find_best_slave(struct bonding *bond)
* *
* Warning: Caller must hold curr_slave_lock for writing. * Warning: Caller must hold curr_slave_lock for writing.
*/ */
static void bond_change_active_slave(struct bonding *bond, struct slave *new_active) void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
{ {
struct slave *old_active = bond->curr_active_slave; struct slave *old_active = bond->curr_active_slave;
...@@ -1527,7 +1526,7 @@ static void bond_change_active_slave(struct bonding *bond, struct slave *new_act ...@@ -1527,7 +1526,7 @@ static void bond_change_active_slave(struct bonding *bond, struct slave *new_act
* *
* Warning: Caller must hold curr_slave_lock for writing. * Warning: Caller must hold curr_slave_lock for writing.
*/ */
static void bond_select_active_slave(struct bonding *bond) void bond_select_active_slave(struct bonding *bond)
{ {
struct slave *best_slave; struct slave *best_slave;
...@@ -1595,7 +1594,7 @@ static void bond_detach_slave(struct bonding *bond, struct slave *slave) ...@@ -1595,7 +1594,7 @@ static void bond_detach_slave(struct bonding *bond, struct slave *slave)
/*---------------------------------- IOCTL ----------------------------------*/ /*---------------------------------- IOCTL ----------------------------------*/
static int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev) int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev)
{ {
dprintk("bond_dev=%p\n", bond_dev); dprintk("bond_dev=%p\n", bond_dev);
dprintk("slave_dev=%p\n", slave_dev); dprintk("slave_dev=%p\n", slave_dev);
...@@ -1635,7 +1634,7 @@ static int bond_compute_features(struct bonding *bond) ...@@ -1635,7 +1634,7 @@ static int bond_compute_features(struct bonding *bond)
} }
/* enslave device <slave> to bond device <master> */ /* enslave device <slave> to bond device <master> */
static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
{ {
struct bonding *bond = bond_dev->priv; struct bonding *bond = bond_dev->priv;
struct slave *new_slave = NULL; struct slave *new_slave = NULL;
...@@ -2002,7 +2001,7 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de ...@@ -2002,7 +2001,7 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de
* for Bonded connections: * for Bonded connections:
* The first up interface should be left on and all others downed. * The first up interface should be left on and all others downed.
*/ */
static int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
{ {
struct bonding *bond = bond_dev->priv; struct bonding *bond = bond_dev->priv;
struct slave *slave, *oldcurrent; struct slave *slave, *oldcurrent;
...@@ -2403,7 +2402,7 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in ...@@ -2403,7 +2402,7 @@ static int bond_slave_info_query(struct net_device *bond_dev, struct ifslave *in
/*-------------------------------- Monitoring -------------------------------*/ /*-------------------------------- Monitoring -------------------------------*/
/* this function is called regularly to monitor each slave's link. */ /* this function is called regularly to monitor each slave's link. */
static void bond_mii_monitor(struct net_device *bond_dev) void bond_mii_monitor(struct net_device *bond_dev)
{ {
struct bonding *bond = bond_dev->priv; struct bonding *bond = bond_dev->priv;
struct slave *slave, *oldcurrent; struct slave *slave, *oldcurrent;
...@@ -2834,7 +2833,7 @@ static void bond_send_gratuitous_arp(struct bonding *bond) ...@@ -2834,7 +2833,7 @@ static void bond_send_gratuitous_arp(struct bonding *bond)
* arp is transmitted to generate traffic. see activebackup_arp_monitor for * arp is transmitted to generate traffic. see activebackup_arp_monitor for
* arp monitoring in active backup mode. * arp monitoring in active backup mode.
*/ */
static void bond_loadbalance_arp_mon(struct net_device *bond_dev) void bond_loadbalance_arp_mon(struct net_device *bond_dev)
{ {
struct bonding *bond = bond_dev->priv; struct bonding *bond = bond_dev->priv;
struct slave *slave, *oldcurrent; struct slave *slave, *oldcurrent;
...@@ -2972,7 +2971,7 @@ static void bond_loadbalance_arp_mon(struct net_device *bond_dev) ...@@ -2972,7 +2971,7 @@ static void bond_loadbalance_arp_mon(struct net_device *bond_dev)
* may have received. * may have received.
* see loadbalance_arp_monitor for arp monitoring in load balancing mode * see loadbalance_arp_monitor for arp monitoring in load balancing mode
*/ */
static void bond_activebackup_arp_mon(struct net_device *bond_dev) void bond_activebackup_arp_mon(struct net_device *bond_dev)
{ {
struct bonding *bond = bond_dev->priv; struct bonding *bond = bond_dev->priv;
struct slave *slave; struct slave *slave;
...@@ -4448,7 +4447,7 @@ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *bond_dev) ...@@ -4448,7 +4447,7 @@ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *bond_dev)
/* /*
* set bond mode specific net device operations * set bond mode specific net device operations
*/ */
static inline void bond_set_mode_ops(struct bonding *bond, int mode) void bond_set_mode_ops(struct bonding *bond, int mode)
{ {
struct net_device *bond_dev = bond->dev; struct net_device *bond_dev = bond->dev;
...@@ -4583,7 +4582,7 @@ static int __init bond_init(struct net_device *bond_dev, struct bond_params *par ...@@ -4583,7 +4582,7 @@ static int __init bond_init(struct net_device *bond_dev, struct bond_params *par
/* De-initialize device specific data. /* De-initialize device specific data.
* Caller must hold rtnl_lock. * Caller must hold rtnl_lock.
*/ */
static inline void bond_deinit(struct net_device *bond_dev) void bond_deinit(struct net_device *bond_dev)
{ {
struct bonding *bond = bond_dev->priv; struct bonding *bond = bond_dev->priv;
...@@ -4619,7 +4618,7 @@ static void bond_free_all(void) ...@@ -4619,7 +4618,7 @@ static void bond_free_all(void)
* Convert string input module parms. Accept either the * Convert string input module parms. Accept either the
* number of the mode or its string name. * number of the mode or its string name.
*/ */
static inline int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl) int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl)
{ {
int i; int i;
......
...@@ -260,6 +260,18 @@ extern inline void bond_set_slave_active_flags(struct slave *slave) ...@@ -260,6 +260,18 @@ extern inline void bond_set_slave_active_flags(struct slave *slave)
struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr);
int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
void bond_deinit(struct net_device *bond_dev);
int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev);
int bond_release(struct net_device *bond_dev, struct net_device *slave_dev);
int bond_sethwaddr(struct net_device *bond_dev, struct net_device *slave_dev);
void bond_mii_monitor(struct net_device *bond_dev);
void bond_loadbalance_arp_mon(struct net_device *bond_dev);
void bond_activebackup_arp_mon(struct net_device *bond_dev);
void bond_set_mode_ops(struct bonding *bond, int mode);
int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl);
const char *bond_mode_name(int mode);
void bond_select_active_slave(struct bonding *bond);
void bond_change_active_slave(struct bonding *bond, struct slave *new_active);
#endif /* _LINUX_BONDING_H */ #endif /* _LINUX_BONDING_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册