All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 net-next 1/2] bonding: display xmit_hash_policy for non-dynamic-tlb mode
@ 2014-10-05  0:44 Mahesh Bandewar
  2014-10-06  4:58 ` David Miller
  2014-10-06 21:13 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Mahesh Bandewar @ 2014-10-05  0:44 UTC (permalink / raw)
  To: Jay Vosburgh, Andy Gospodarek, Veaceslav Falico,
	Nikolay Aleksandrov, David Miller
  Cc: netdev, Mahesh Bandewar, Eric Dumazet, Maciej Zenczykowski

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>
---
v1
 Rebase
v2
 Added bond_mode_uses_xmit_hash() inline function
v3-v8
 Rebase

 drivers/net/bonding/bond_procfs.c | 3 +--
 drivers/net/bonding/bonding.h     | 7 +++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index bb09d0442aa8..a3948f8d1e53 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -73,8 +73,7 @@ static void bond_info_show_master(struct seq_file *seq)
 
 	seq_printf(seq, "\n");
 
-	if (BOND_MODE(bond) == BOND_MODE_XOR ||
-		BOND_MODE(bond) == BOND_MODE_8023AD) {
+	if (bond_mode_uses_xmit_hash(bond)) {
 		optval = bond_opt_get_val(BOND_OPT_XMIT_HASH,
 					  bond->params.xmit_policy);
 		seq_printf(seq, "Transmit Hash Policy: %s (%d)\n",
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 &&
-- 
2.1.0.rc2.206.gedb03e5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v8 net-next 1/2] bonding: display xmit_hash_policy for non-dynamic-tlb mode
  2014-10-05  0:44 [PATCH v8 net-next 1/2] bonding: display xmit_hash_policy for non-dynamic-tlb mode Mahesh Bandewar
@ 2014-10-06  4:58 ` David Miller
  2014-10-06  8:35   ` Nikolay Aleksandrov
  2014-10-06 21:13 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2014-10-06  4:58 UTC (permalink / raw)
  To: maheshb; +Cc: j.vosburgh, andy, vfalico, nikolay, netdev, edumazet, maze


After 8 revisions, I want to see some ACKs before applying these
two changes :)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v8 net-next 1/2] bonding: display xmit_hash_policy for non-dynamic-tlb mode
  2014-10-06  4:58 ` David Miller
@ 2014-10-06  8:35   ` Nikolay Aleksandrov
  0 siblings, 0 replies; 4+ messages in thread
From: Nikolay Aleksandrov @ 2014-10-06  8:35 UTC (permalink / raw)
  To: David Miller, maheshb; +Cc: j.vosburgh, andy, vfalico, netdev, edumazet, maze

On 06/10/14 06:58, David Miller wrote:
>
> After 8 revisions, I want to see some ACKs before applying these
> two changes :)
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

On my side all comments have been taken care of, I don't know if it's 
appropriate to also ack the patches as I've already given a reviewed-by to the 
first and my sob to the second :-)

Nik

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v8 net-next 1/2] bonding: display xmit_hash_policy for non-dynamic-tlb mode
  2014-10-05  0:44 [PATCH v8 net-next 1/2] bonding: display xmit_hash_policy for non-dynamic-tlb mode Mahesh Bandewar
  2014-10-06  4:58 ` David Miller
@ 2014-10-06 21:13 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2014-10-06 21:13 UTC (permalink / raw)
  To: maheshb; +Cc: j.vosburgh, andy, vfalico, nikolay, netdev, edumazet, maze

From: Mahesh Bandewar <maheshb@google.com>
Date: Sat,  4 Oct 2014 17:44:44 -0700

> 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>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-06 21:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-05  0:44 [PATCH v8 net-next 1/2] bonding: display xmit_hash_policy for non-dynamic-tlb mode Mahesh Bandewar
2014-10-06  4:58 ` David Miller
2014-10-06  8:35   ` Nikolay Aleksandrov
2014-10-06 21:13 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.