From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Jianlin Lv <Jianlin.Lv@arm.com>
Cc: vfalico@gmail.com, andy@greyhouse.net, davem@davemloft.net,
kuba@kernel.org, iecedge@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] bonding: Added -ENODEV interpret for slaves option
Date: Sat, 13 Mar 2021 11:50:36 -0800 [thread overview]
Message-ID: <6676.1615665036@famine> (raw)
In-Reply-To: <20210313140210.3940183-1-Jianlin.Lv@arm.com>
Jianlin Lv <Jianlin.Lv@arm.com> wrote:
>After upgrading the kernel, the slave interface name is changed,
>Systemd cannot use the original configuration to create bond interface,
>thereby losing the connection with the host.
>
>Adding log for ENODEV will make it easier to find out such problem lies.
To be clear, this specifically affects add/remove of interfaces
to/from the bond via the "slaves" sysfs interface.
Please update your log to better describe this (that it affects
the sysfs API only) and resubmit.
I'm sympathetic to the problem this is trying to solve, and the
message shouldn't spam the kernel log particularly, but the commit log
needs to more clearly describe what the problem is and how it's being
fixed.
Thanks,
-J
>Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
>---
> drivers/net/bonding/bond_options.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
>diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
>index 77d7c38bd435..c9d3604ae129 100644
>--- a/drivers/net/bonding/bond_options.c
>+++ b/drivers/net/bonding/bond_options.c
>@@ -640,6 +640,15 @@ static void bond_opt_error_interpret(struct bonding *bond,
> netdev_err(bond->dev, "option %s: unable to set because the bond device is up\n",
> opt->name);
> break;
>+ case -ENODEV:
>+ if (val && val->string) {
>+ p = strchr(val->string, '\n');
>+ if (p)
>+ *p = '\0';
>+ netdev_err(bond->dev, "option %s: interface %s does not exist!\n",
>+ opt->name, val->string);
>+ }
>+ break;
> default:
> break;
> }
>--
>2.25.1
>
---
-Jay Vosburgh, jay.vosburgh@canonical.com
prev parent reply other threads:[~2021-03-13 19:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-13 14:02 [PATCH net-next] bonding: Added -ENODEV interpret for slaves option Jianlin Lv
2021-03-13 19:50 ` Jay Vosburgh [this message]
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=6676.1615665036@famine \
--to=jay.vosburgh@canonical.com \
--cc=Jianlin.Lv@arm.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=iecedge@gmail.com \
--cc=kuba@kernel.org \
--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).