Skip to content

Commit d702132

Browse files
Mahesh Bandewardavem330
authored andcommitted
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>
1 parent 4e62ccd commit d702132

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

drivers/net/bonding/bond_procfs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ static void bond_info_show_master(struct seq_file *seq)
7373

7474
seq_printf(seq, "\n");
7575

76-
if (BOND_MODE(bond) == BOND_MODE_XOR ||
77-
BOND_MODE(bond) == BOND_MODE_8023AD) {
76+
if (bond_mode_uses_xmit_hash(bond)) {
7877
optval = bond_opt_get_val(BOND_OPT_XMIT_HASH,
7978
bond->params.xmit_policy);
8079
seq_printf(seq, "Transmit Hash Policy: %s (%d)\n",

drivers/net/bonding/bonding.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,13 @@ static inline bool bond_is_nondyn_tlb(const struct bonding *bond)
274274
(bond->params.tlb_dynamic_lb == 0);
275275
}
276276

277+
static inline bool bond_mode_uses_xmit_hash(const struct bonding *bond)
278+
{
279+
return (BOND_MODE(bond) == BOND_MODE_8023AD ||
280+
BOND_MODE(bond) == BOND_MODE_XOR ||
281+
bond_is_nondyn_tlb(bond));
282+
}
283+
277284
static inline bool bond_mode_uses_arp(int mode)
278285
{
279286
return mode != BOND_MODE_8023AD && mode != BOND_MODE_TLB &&

0 commit comments

Comments
 (0)