Skip to contentSkip to conversation

bonding: delete always true device check

PATCH Applied Leon Romanovsky 4 participants 4 messages Feb 3, 2025 – Feb 4, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bonding: delete always true device check

From: Leon Romanovsky <[email protected]>

XFRM API makes sure that xs->xso.dev is valid in all XFRM offload callbacks. There is no need to check it again.

Fixes 1ddec5d0eec4 ("bonding: add common function to check ipsec device")

---
There is nothing urgent in this change, it can go to net-next too.

---
 drivers/net/bonding/bond_main.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/bonding/bond_main.c +0 -3
index bfb55c23380b..154e670d8075 100644
@@ -432,9 +432,6 @@ static struct net_device *bond_ipsec_dev(struct xfrm_state *xs)
 	struct bonding *bond;
 	struct slave *slave;
 
-	if (!bond_dev)
-		return NULL;
-
 	bond = netdev_priv(bond_dev);
 	if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)
 		return NULL;
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#2 lore raw
In reply to Leon Romanovsky
Quoted 18 lines · Leon Romanovsky

From: Leon Romanovsky <[email protected]>

XFRM API makes sure that xs->xso.dev is valid in all XFRM offload callbacks. There is no need to check it again.

Fixes 1ddec5d0eec4 ("bonding: add common function to check ipsec device")

---
There is nothing urgent in this change, it can go to net-next too.

---
 drivers/net/bonding/bond_main.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/bonding/bond_main.c +0 -0
index bfb55c23380b..154e670d8075 100644

drivers/net/bonding/bond_main.c static struct net_device *bond_ipsec_dev(struct xfrm_state *xs) · line 437

Quoted 9 lines
drivers/net/bonding/bond_main.c +0 -3
@@ -432,9 +432,6 @@ static struct net_device *bond_ipsec_dev(struct xfrm_state *xs)
 	struct bonding *bond;
 	struct slave *slave;
 
-	if (!bond_dev)
-		return NULL;
-
 	bond = netdev_priv(bond_dev);
 	if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)
 		return NULL;
#3 lore raw
In reply to Leon Romanovsky
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Mon, 3 Feb 2025 14:59:23 +0200 you wrote:

From: Leon Romanovsky <[email protected]>

XFRM API makes sure that xs->xso.dev is valid in all XFRM offload callbacks. There is no need to check it again.

Fixes 1ddec5d0eec4 ("bonding: add common function to check ipsec device")

[...]

Here is the summary with links:
- [net-next] bonding: delete always true device check

    https://git.kernel.org/netdev/net-next/c/546d98393abc

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html