* [PATCH net-next v2] bonding: Added -ENODEV interpret for slaves option
@ 2021-03-14 14:56 Jianlin Lv
2021-03-15 19:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jianlin Lv @ 2021-03-14 14:56 UTC (permalink / raw)
To: j.vosburgh, vfalico, andy, davem, kuba
Cc: Jianlin.Lv, iecedge, netdev, linux-kernel
When the incorrect interface name is stored in the slaves/active_slave
option of the bonding sysfs, the kernel does not record the log that
interface does not exist.
This patch adds a log for -ENODEV error, which will facilitate users to
figure out such issue.
Signed-off-by: Jianlin Lv <Jianlin.Lv@arm.com>
---
v2: Update changlog.
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v2] bonding: Added -ENODEV interpret for slaves option
2021-03-14 14:56 [PATCH net-next v2] bonding: Added -ENODEV interpret for slaves option Jianlin Lv
@ 2021-03-15 19:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-15 19:50 UTC (permalink / raw)
To: Jianlin Lv
Cc: j.vosburgh, vfalico, andy, davem, kuba, iecedge, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Sun, 14 Mar 2021 22:56:29 +0800 you wrote:
> When the incorrect interface name is stored in the slaves/active_slave
> option of the bonding sysfs, the kernel does not record the log that
> interface does not exist.
>
> This patch adds a log for -ENODEV error, which will facilitate users to
> figure out such issue.
>
> [...]
Here is the summary with links:
- [net-next,v2] bonding: Added -ENODEV interpret for slaves option
https://git.kernel.org/netdev/net-next/c/acdff0df5426
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-15 19:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 14:56 [PATCH net-next v2] bonding: Added -ENODEV interpret for slaves option Jianlin Lv
2021-03-15 19:50 ` patchwork-bot+netdevbpf
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).