diff options
author | Veaceslav Falico <vfalico@gmail.com> | 2014-05-15 21:39:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-16 16:34:32 -0400 |
commit | 267bed777a5f8a8f5acd50a9134c7341fc46d822 (patch) | |
tree | d80c9e21d1a2b5a64717ec41f9a86244f86c038a /drivers/net/bonding/bonding.h | |
parent | d1e2e5cd4f8ed2ac7c43ce44feeb9ebc7d27cb4b (diff) | |
download | op-kernel-dev-267bed777a5f8a8f5acd50a9134c7341fc46d822.zip op-kernel-dev-267bed777a5f8a8f5acd50a9134c7341fc46d822.tar.gz |
bonding: make BOND_NO_USES_ARP an inline function
Also, change its name to better reflect its scope, and skip the "no"
part.
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@gmail.com>
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 | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index dca3dfd..105c552 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -60,11 +60,6 @@ ((mode) == BOND_MODE_TLB) || \ ((mode) == BOND_MODE_ALB)) -#define BOND_NO_USES_ARP(mode) \ - (((mode) == BOND_MODE_8023AD) || \ - ((mode) == BOND_MODE_TLB) || \ - ((mode) == BOND_MODE_ALB)) - #define IS_IP_TARGET_UNUSABLE_ADDRESS(a) \ ((htonl(INADDR_BROADCAST) == a) || \ ipv4_is_zeronet(a)) @@ -292,6 +287,12 @@ static inline bool bond_is_lb(const struct bonding *bond) bond->params.mode == BOND_MODE_ALB; } +static inline bool bond_mode_uses_arp(int mode) +{ + return mode != BOND_MODE_8023AD && mode != BOND_MODE_TLB && + mode != BOND_MODE_ALB; +} + static inline void bond_set_active_slave(struct slave *slave) { if (slave->backup) { |