All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bonding: fix slave speed reporting in bond_miimon_commit
@ 2013-06-20 12:34 nikolay
  2013-06-20 13:42 ` Veaceslav Falico
  0 siblings, 1 reply; 3+ messages in thread
From: nikolay @ 2013-06-20 12:34 UTC (permalink / raw)
  To: netdev; +Cc: andy, fubar, davem

From: Nikolay Aleksandrov <nikolay@redhat.com>

When we have BOND_LINK_UP the speed is reported unconditionally with %u
format although it can be SPEED_UNKNOWN (-1). After this patch it returns
0 in that case in an attempt to keep the existing scripts happy.
One line is intenionally left 81 chars because it gets ugly if broken.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
---
If the scripts are not a concern I can re-post with a string "unknown".

 drivers/net/bonding/bond_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 02d9ae7..f975696 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2413,7 +2413,8 @@ static void bond_miimon_commit(struct bonding *bond)
 
 			pr_info("%s: link status definitely up for interface %s, %u Mbps %s duplex.\n",
 				bond->dev->name, slave->dev->name,
-				slave->speed, slave->duplex ? "full" : "half");
+				slave->speed == SPEED_UNKNOWN ? 0 : slave->speed,
+				slave->duplex ? "full" : "half");
 
 			/* notify ad that the link status has changed */
 			if (bond->params.mode == BOND_MODE_8023AD)
-- 
1.8.1.4

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

* Re: bonding: fix slave speed reporting in bond_miimon_commit
  2013-06-20 12:34 [PATCH] bonding: fix slave speed reporting in bond_miimon_commit nikolay
@ 2013-06-20 13:42 ` Veaceslav Falico
  2013-06-24  7:05   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Veaceslav Falico @ 2013-06-20 13:42 UTC (permalink / raw)
  To: nikolay; +Cc: netdev, andy, fubar, davem

On Thu, Jun 20, 2013 at 02:34:13PM +0200, nikolay@redhat.com wrote:
>From: Nikolay Aleksandrov <nikolay@redhat.com>
>
>When we have BOND_LINK_UP the speed is reported unconditionally with %u
>format although it can be SPEED_UNKNOWN (-1). After this patch it returns
>0 in that case in an attempt to keep the existing scripts happy.
>One line is intenionally left 81 chars because it gets ugly if broken.
>
>Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
>

Acked-by: Veaceslav Falico <vfalico@redhat.com>

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

* Re: bonding: fix slave speed reporting in bond_miimon_commit
  2013-06-20 13:42 ` Veaceslav Falico
@ 2013-06-24  7:05   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2013-06-24  7:05 UTC (permalink / raw)
  To: vfalico; +Cc: nikolay, netdev, andy, fubar

From: Veaceslav Falico <vfalico@redhat.com>
Date: Thu, 20 Jun 2013 15:42:48 +0200

> On Thu, Jun 20, 2013 at 02:34:13PM +0200, nikolay@redhat.com wrote:
>>From: Nikolay Aleksandrov <nikolay@redhat.com>
>>
>>When we have BOND_LINK_UP the speed is reported unconditionally with
>>%u
>>format although it can be SPEED_UNKNOWN (-1). After this patch it
>>returns
>>0 in that case in an attempt to keep the existing scripts happy.
>>One line is intenionally left 81 chars because it gets ugly if broken.
>>
>>Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
>>
> 
> Acked-by: Veaceslav Falico <vfalico@redhat.com>

Applied.

 

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

end of thread, other threads:[~2013-06-24  7:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 12:34 [PATCH] bonding: fix slave speed reporting in bond_miimon_commit nikolay
2013-06-20 13:42 ` Veaceslav Falico
2013-06-24  7:05   ` 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.