diff options
author | Holger Eitzenberger <holger@eitzenberger.org> | 2008-12-09 23:07:13 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-09 23:07:13 -0800 |
commit | 58402054264fa33b405d1abcbcd8e528507aac1a (patch) | |
tree | a3e4ce7ecdb33402d0810113e339d517b609e0b8 /drivers/net/bonding/bonding.h | |
parent | 512bb43eb5422ee69a1be05ea0d89dc074fac9a2 (diff) | |
download | blackbird-op-linux-58402054264fa33b405d1abcbcd8e528507aac1a.tar.gz blackbird-op-linux-58402054264fa33b405d1abcbcd8e528507aac1a.zip |
bonding: add and use bond_is_lb()
Introduce and use bond_is_lb(), it is usefull to shorten the repetitive
check for either ALB or TLB mode.
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 921abacc6074..b8c2462577b7 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -260,6 +260,12 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave) return (struct bonding *)netdev_priv(slave->dev->master); } +static inline bool bond_is_lb(const struct bonding *bond) +{ + return bond->params.mode == BOND_MODE_TLB + || bond->params.mode == BOND_MODE_ALB; +} + #define BOND_FOM_NONE 0 #define BOND_FOM_ACTIVE 1 #define BOND_FOM_FOLLOW 2 |