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 2/7] bonding: fix error messages in bond_do_fail_over_mac
Date: Fri, 7 Jun 2019 10:59:27 -0400 [thread overview]
Message-ID: <20190607145933.37058-3-jarod@redhat.com> (raw)
In-Reply-To: <20190607145933.37058-1-jarod@redhat.com>
Passing the bond name again to debug output when referencing slave is wrong.
We're trying to set the bond's MAC to that of the new_active slave, so adjust
the error message slightly and pass in the slave's name, not the bond's.
Then we're trying to set the MAC on the old active slave, but putting the
new active slave's name in the output. While we're at it, clarify the
error messages so you know which one actually triggered.
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 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 32b6c1f9b82e..5823070f07a6 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -661,8 +661,8 @@ static void bond_do_fail_over_mac(struct bonding *bond,
if (new_active) {
rv = bond_set_dev_addr(bond->dev, new_active->dev);
if (rv)
- netdev_err(bond->dev, "Error %d setting MAC of slave %s\n",
- -rv, bond->dev->name);
+ netdev_err(bond->dev, "Error %d setting bond MAC from slave %s\n",
+ -rv, new_active->dev->name);
}
break;
case BOND_FOM_FOLLOW:
@@ -692,7 +692,7 @@ static void bond_do_fail_over_mac(struct bonding *bond,
rv = dev_set_mac_address(new_active->dev,
(struct sockaddr *)&ss, NULL);
if (rv) {
- netdev_err(bond->dev, "Error %d setting MAC of slave %s\n",
+ netdev_err(bond->dev, "Error %d setting MAC of new active slave %s\n",
-rv, new_active->dev->name);
goto out;
}
@@ -707,8 +707,8 @@ static void bond_do_fail_over_mac(struct bonding *bond,
rv = dev_set_mac_address(old_active->dev,
(struct sockaddr *)&ss, NULL);
if (rv)
- netdev_err(bond->dev, "Error %d setting MAC of slave %s\n",
- -rv, new_active->dev->name);
+ netdev_err(bond->dev, "Error %d setting MAC of old active slave %s\n",
+ -rv, old_active->dev->name);
out:
break;
default:
--
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 ` [PATCH net-next 1/7] bonding: improve event debug usability Jarod Wilson
2019-06-07 14:59 ` Jarod Wilson [this message]
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-3-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
Powered by JetHome