Skip to contentSkip to conversation

ipvlan: Support bonding events

PATCH Applied Etienne Champetier 2 participants 4 messages Jan 9, 2025 – Jan 11, 2025

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

v2 cover ipvlan: Support bonding events

No changes for first commit.
Second commit rework bond_macvlan.sh test to add minimal ipvlan over bond testing (asked by Jakub during v1 review).

Etienne Champetier (2):
ipvlan: Support bonding events
selftests: bonding: add ipvlan over bond testing

 drivers/net/ipvlan/ipvlan_main.c              |  6 ++
 .../selftests/drivers/net/bonding/Makefile    |  2 +-
 .../drivers/net/bonding/bond_macvlan.sh       | 99 -------------------
 .../net/bonding/bond_macvlan_ipvlan.sh        | 96 ++++++++++++++++++
 .../selftests/drivers/net/bonding/config      |  1 +
 5 files changed, 104 insertions(+), 100 deletions(-)
 delete mode 100755 tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond_macvlan_ipvlan.sh
Signature · 1 line
2.47.1
#1 lore raw

PATCH v2 1/2 ipvlan: Support bonding events

This allows ipvlan to function properly on top of bonds using active-backup mode.
This was implemented for macvlan in 2014 in commit 4c9912556867 ("macvlan: Support bonding events").

---
 drivers/net/ipvlan/ipvlan_main.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/ipvlan/ipvlan_main.c +6 -0
index ee2c3cf4df36..da3a97a65507 100644
@@ -799,6 +799,12 @@ static int ipvlan_device_event(struct notifier_block *unused,
 	case NETDEV_PRE_TYPE_CHANGE:
 		/* Forbid underlying device to change its type. */
 		return NOTIFY_BAD;
+
+	case NETDEV_NOTIFY_PEERS:
+	case NETDEV_BONDING_FAILOVER:
+	case NETDEV_RESEND_IGMP:
+		list_for_each_entry(ipvlan, &port->ipvlans, pnode)
+			call_netdevice_notifiers(event, ipvlan->dev);
 	}
 	return NOTIFY_DONE;
 }
Signature · 1 line
2.47.1
#2 lore raw

PATCH v2 2/2 selftests: bonding: add ipvlan over bond testing

In reply to Etienne Champetier

This rework bond_macvlan.sh into bond_macvlan_ipvlan.sh We only test bridge mode for macvlan and l2 mode

]# ./bond_macvlan_ipvlan.sh
TEST: active-backup/macvlan_bridge: IPv4: client->server [ OK ]
...
TEST: active-backup/ipvlan_l2: IPv4: client->server [ OK ]
...
TEST: balance-tlb/macvlan_bridge: IPv4: client->server [ OK ]
...
TEST: balance-tlb/ipvlan_l2: IPv4: client->server [ OK ]
...
TEST: balance-alb/macvlan_bridge: IPv4: client->server [ OK ]
...
TEST: balance-alb/ipvlan_l2: IPv4: client->server [ OK ]
...

---
 .../selftests/drivers/net/bonding/Makefile    |  2 +-
 .../drivers/net/bonding/bond_macvlan.sh       | 99 -------------------
 .../net/bonding/bond_macvlan_ipvlan.sh        | 96 ++++++++++++++++++
 .../selftests/drivers/net/bonding/config      |  1 +
 4 files changed, 98 insertions(+), 100 deletions(-)
 delete mode 100755 tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh
 create mode 100755 tools/testing/selftests/drivers/net/bonding/bond_macvlan_ipvlan.sh
tools/testing/selftests/drivers/net/bonding/Makefile +1 -1
index 03a089165d3f..2b10854e4b1e 100644
@@ -10,7 +10,7 @@ TEST_PROGS := \
 	mode-2-recovery-updelay.sh \
 	bond_options.sh \
 	bond-eth-type-change.sh \
-	bond_macvlan.sh
+	bond_macvlan_ipvlan.sh
 
 TEST_FILES := \
 	lag_lib.sh \
tools/testing/selftests/drivers/net/bonding/bond_macvlan.sh deleted +0 -99

99 lines not on this page · raw message

tools/testing/selftests/drivers/net/bonding/bond_macvlan_ipvlan.sh new file +96 -0

96 lines not on this page · raw message

tools/testing/selftests/drivers/net/bonding/config +1 -0
index 899d7fb6ea8e..dad4e5fda4db 100644
@@ -3,6 +3,7 @@ CONFIG_BRIDGE=y
 CONFIG_DUMMY=y
 CONFIG_IPV6=y
 CONFIG_MACVLAN=y
+CONFIG_IPVLAN=y
 CONFIG_NET_ACT_GACT=y
 CONFIG_NET_CLS_FLOWER=y
 CONFIG_NET_SCH_INGRESS=y
Signature · 1 line
2.47.1
#3 lore raw
In reply to Etienne Champetier
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

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

Quoted 9 lines · On Wed, 8 Jan 2025 22:28:17 -0500 you wrote:

No changes for first commit.
Second commit rework bond_macvlan.sh test to add minimal ipvlan over bond testing (asked by Jakub during v1 review).

Etienne Champetier (2):
ipvlan: Support bonding events
selftests: bonding: add ipvlan over bond testing

[...]

Here is the summary with links:
- [net-next,v2,1/2] ipvlan: Support bonding events

    https://git.kernel.org/netdev/net-next/c/e79a98e68b96
  - [net-next,v2,2/2] selftests: bonding: add ipvlan over bond testing
    https://git.kernel.org/netdev/net-next/c/08ac69b24507

You are awesome, thank you!

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