From: Jarod Wilson <jarod@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Jarod Wilson <jarod@redhat.com>,
Jay Vosburgh <j.vosburgh@gmail.com>,
Veaceslav Falico <vfalico@gmail.com>,
Andy Gospodarek <andy@greyhouse.net>,
netdev@vger.kernel.org
Subject: [PATCH net-next 1/7] bonding: improve event debug usability
Date: Fri, 7 Jun 2019 10:59:26 -0400 [thread overview]
Message-ID: <20190607145933.37058-2-jarod@redhat.com> (raw)
In-Reply-To: <20190607145933.37058-1-jarod@redhat.com>
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 <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
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
next prev parent reply other threads:[~2019-06-07 15:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 14:59 [PATCH net-next 0/7] bonding: clean up and standarize logging printks Jarod Wilson
2019-06-07 14:59 ` Jarod Wilson [this message]
2019-06-07 14:59 ` [PATCH net-next 2/7] bonding: fix error messages in bond_do_fail_over_mac Jarod Wilson
2019-06-07 14:59 ` [PATCH net-next 3/7] bonding: add slave_foo printk macros Jarod Wilson
2019-06-07 14:59 ` [PATCH net-next 4/7] bonding/main: convert to using slave " Jarod Wilson
2019-06-07 14:59 ` [PATCH net-next 5/7] bonding/802.3ad: " Jarod Wilson
2019-06-07 14:59 ` [PATCH net-next 6/7] bonding/alb: " Jarod Wilson
2019-06-07 14:59 ` [PATCH net-next 7/7] bonding/options: " Jarod Wilson
2019-06-07 14:59 ` [PATCH net] bonding: make debugging output more succinct Jarod Wilson
2019-06-07 15:02 ` Jarod Wilson
2019-06-09 20:37 ` David Miller
2019-06-09 20:36 ` [PATCH net-next 0/7] bonding: clean up and standarize logging printks David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190607145933.37058-2-jarod@redhat.com \
--to=jarod@redhat.com \
--cc=andy@greyhouse.net \
--cc=j.vosburgh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vfalico@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).