bonding: move mode setting into separate function
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0a2a78c4a9
commit
72be35fee6
@@ -58,6 +58,11 @@
|
||||
#define TX_QUEUE_OVERRIDE(mode) \
|
||||
(((mode) == BOND_MODE_ACTIVEBACKUP) || \
|
||||
((mode) == BOND_MODE_ROUNDROBIN))
|
||||
|
||||
#define BOND_MODE_IS_LB(mode) \
|
||||
(((mode) == BOND_MODE_TLB) || \
|
||||
((mode) == BOND_MODE_ALB))
|
||||
|
||||
/*
|
||||
* Less bad way to call ioctl from within the kernel; this needs to be
|
||||
* done some other way to get the call out of interrupt context.
|
||||
@@ -259,8 +264,7 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
|
||||
|
||||
static inline bool bond_is_lb(const struct bonding *bond)
|
||||
{
|
||||
return (bond->params.mode == BOND_MODE_TLB ||
|
||||
bond->params.mode == BOND_MODE_ALB);
|
||||
return BOND_MODE_IS_LB(bond->params.mode);
|
||||
}
|
||||
|
||||
static inline void bond_set_active_slave(struct slave *slave)
|
||||
@@ -422,6 +426,7 @@ void bond_setup(struct net_device *bond_dev);
|
||||
unsigned int bond_get_num_tx_queues(void);
|
||||
int bond_netlink_init(void);
|
||||
void bond_netlink_fini(void);
|
||||
int bond_option_mode_set(struct bonding *bond, int mode);
|
||||
|
||||
struct bond_net {
|
||||
struct net * net; /* Associated network namespace */
|
||||
|
Reference in New Issue
Block a user