[PATCH net-next] bonding: improve nl error msg when device can't be enslaved because of IFF_MASTER

Subsystems: bonding driver, networking drivers, the rest

STALE1841d

2 messages, 2 authors, 2021-08-16 · open the first message on its own page

[PATCH net-next] bonding: improve nl error msg when device can't be enslaved because of IFF_MASTER

From: Antoine Tenart <atenart@kernel.org>
Date: 2021-08-16 10:08:33

Use a more user friendly netlink error message when a device can't be
enslaved because it has IFF_MASTER, by not referring directly to a
kernel internal flag.

Signed-off-by: Antoine Tenart <atenart@kernel.org>
---
 drivers/net/bonding/bond_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 04158a8368e4..b0966e733926 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1759,7 +1759,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev,
 	if (slave_dev->flags & IFF_MASTER &&
 	    !netif_is_bond_master(slave_dev)) {
 		BOND_NL_ERR(bond_dev, extack,
-			    "Device with IFF_MASTER cannot be enslaved");
+			    "Device type (master device) cannot be enslaved");
 		return -EPERM;
 	}
 
-- 
2.31.1

Re: [PATCH net-next] bonding: improve nl error msg when device can't be enslaved because of IFF_MASTER

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-08-16 13:12:43

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Mon, 16 Aug 2021 12:08:28 +0200 you wrote:
Use a more user friendly netlink error message when a device can't be
enslaved because it has IFF_MASTER, by not referring directly to a
kernel internal flag.

Signed-off-by: Antoine Tenart <atenart@kernel.org>
---
 drivers/net/bonding/bond_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
  - [net-next] bonding: improve nl error msg when device can't be enslaved because of IFF_MASTER
    https://git.kernel.org/netdev/net-next/c/1b3f78df6a80

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help