summaryrefslogtreecommitdiffstats
path: root/include/net/bonding.h
diff options
context:
space:
mode:
authorDebabrata Banerjee <dbanerje@akamai.com>2018-05-14 20:48:09 +0200
committerDavid S. Miller <davem@davemloft.net>2018-05-16 18:15:11 +0200
commite79c1055749e3183a2beee04a24da378623329c5 (patch)
treeec2dd225e1fac1840d0690beb7382451276be9d9 /include/net/bonding.h
parentbonding: use common mac addr checks (diff)
downloadlinux-e79c1055749e3183a2beee04a24da378623329c5.tar.xz
linux-e79c1055749e3183a2beee04a24da378623329c5.zip
bonding: allow use of tx hashing in balance-alb
The rx load balancing provided by balance-alb is not mutually exclusive with using hashing for tx selection, and should provide a decent speed increase because this eliminates spinlocks and cache contention. Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/bonding.h')
-rw-r--r--include/net/bonding.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/net/bonding.h b/include/net/bonding.h
index b52235158836..808f1d167349 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -285,8 +285,15 @@ static inline bool bond_needs_speed_duplex(const struct bonding *bond)
static inline bool bond_is_nondyn_tlb(const struct bonding *bond)
{
- return (BOND_MODE(bond) == BOND_MODE_TLB) &&
- (bond->params.tlb_dynamic_lb == 0);
+ return (bond_is_lb(bond) && bond->params.tlb_dynamic_lb == 0);
+}
+
+static inline bool bond_mode_can_use_xmit_hash(const struct bonding *bond)
+{
+ return (BOND_MODE(bond) == BOND_MODE_8023AD ||
+ BOND_MODE(bond) == BOND_MODE_XOR ||
+ BOND_MODE(bond) == BOND_MODE_TLB ||
+ BOND_MODE(bond) == BOND_MODE_ALB);
}
static inline bool bond_mode_uses_xmit_hash(const struct bonding *bond)