2019-06-07 15:04:22

by Jarod Wilson

[permalink] [raw]
Subject: [PATCH net-next 0/7] bonding: clean up and standarize logging printks

This set improves a few somewhat terse bonding debug messages, fixes some
errors in others, and then standarizes the majority of them, using new
slave_* printk macros that wrap around netdev_* to ensure both master
and slave information is provided consistently, where relevant. This set
proves very useful in debugging issues on hosts with multiple bonds.

I've run an array of LNST tests over this set, creating and destroying
quite a few different bonds of the course of testing, fixed the little
gotchas here and there, and everything looks stable and reasonable to me,
but I can't guarantee I've tested every possible message and scenario to
catch every possible "slave could be NULL" case.

Jarod Wilson (7):
bonding: improve event debug usability
bonding: fix error messages in bond_do_fail_over_mac
bonding: add slave_foo printk macros
bonding/main: convert to using slave printk macros
bonding/802.3ad: convert to using slave printk macros
bonding/alb: convert to using slave printk macros
bonding/options: convert to using slave printk macros

drivers/net/bonding/bond_3ad.c | 222 +++++++++++----------
drivers/net/bonding/bond_alb.c | 30 +--
drivers/net/bonding/bond_main.c | 309 +++++++++++++----------------
drivers/net/bonding/bond_options.c | 30 ++-
include/net/bonding.h | 9 +
5 files changed, 293 insertions(+), 307 deletions(-)

Suggested-by: Joe Perches <[email protected]>
CC: Jay Vosburgh <[email protected]>
CC: Veaceslav Falico <[email protected]>
CC: Andy Gospodarek <[email protected]>
CC: [email protected]
Signed-off-by: Jarod Wilson <[email protected]>

--
2.20.1


2019-06-07 15:05:10

by Jarod Wilson

[permalink] [raw]
Subject: [PATCH net-next 1/7] bonding: improve event debug usability

Seeing bonding debug log data along the lines of "event: 5" is a bit spartan,
and often requires a lookup table if you don't remember what every event is.
Make use of netdev_cmd_to_name for an improved debugging experience, so for
the prior example, you'll see: "bond_netdev_event received NETDEV_REGISTER"
instead (both are prefixed with the device for which the event pertains).

CC: Jay Vosburgh <[email protected]>
CC: Veaceslav Falico <[email protected]>
CC: Andy Gospodarek <[email protected]>
CC: [email protected]
Signed-off-by: Jarod Wilson <[email protected]>
---
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 407f4095a37a..32b6c1f9b82e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3212,7 +3212,8 @@ static int bond_netdev_event(struct notifier_block *this,
{
struct net_device *event_dev = netdev_notifier_info_to_dev(ptr);

- netdev_dbg(event_dev, "event: %lx\n", event);
+ netdev_dbg(event_dev, "%s received %s\n",
+ __func__, netdev_cmd_to_name(event));

if (!(event_dev->priv_flags & IFF_BONDING))
return NOTIFY_DONE;
--
2.20.1

2019-06-09 20:37:41

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net-next 0/7] bonding: clean up and standarize logging printks

From: Jarod Wilson <[email protected]>
Date: Fri, 7 Jun 2019 10:59:25 -0400

> This set improves a few somewhat terse bonding debug messages, fixes some
> errors in others, and then standarizes the majority of them, using new
> slave_* printk macros that wrap around netdev_* to ensure both master
> and slave information is provided consistently, where relevant. This set
> proves very useful in debugging issues on hosts with multiple bonds.
>
> I've run an array of LNST tests over this set, creating and destroying
> quite a few different bonds of the course of testing, fixed the little
> gotchas here and there, and everything looks stable and reasonable to me,
> but I can't guarantee I've tested every possible message and scenario to
> catch every possible "slave could be NULL" case.

Series applied, thanks.