summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bonding.h
diff options
context:
space:
mode:
authorMahesh Bandewar2014-10-05 02:44:44 +0200
committerDavid S. Miller2014-10-06 23:13:07 +0200
commitd7021325a2ea5aaf4458097341c988f9dc93491f (patch)
tree91b4f16185ebc7ec1c76aebeebde0ea6244f45e7 /drivers/net/bonding/bonding.h
parentMerge branch 'mlx4-next' (diff)
downloadkernel-qcow2-linux-d7021325a2ea5aaf4458097341c988f9dc93491f.tar.gz
kernel-qcow2-linux-d7021325a2ea5aaf4458097341c988f9dc93491f.tar.xz
kernel-qcow2-linux-d7021325a2ea5aaf4458097341c988f9dc93491f.zip
bonding: display xmit_hash_policy for non-dynamic-tlb mode
It's a trivial fix to display xmit_hash_policy for this new TLB mode since it uses transmit-hash-poilicy as part of bonding-master info (/proc/net/bonding/<bonding-interface). Signed-off-by: Mahesh Bandewar <maheshb@google.com> Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 57917e63b4e6..5b022da9cad2 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -274,6 +274,13 @@ static inline bool bond_is_nondyn_tlb(const struct bonding *bond)
(bond->params.tlb_dynamic_lb == 0);
}
+static inline bool bond_mode_uses_xmit_hash(const struct bonding *bond)
+{
+ return (BOND_MODE(bond) == BOND_MODE_8023AD ||
+ BOND_MODE(bond) == BOND_MODE_XOR ||
+ bond_is_nondyn_tlb(bond));
+}
+
static inline bool bond_mode_uses_arp(int mode)
{
return mode != BOND_MODE_8023AD && mode != BOND_MODE_TLB &&