On 7/3/26 2:09 AM, Kuniyuki Iwashima wrote:
quoted hunk ↗ jump to hunk
@@ -800,9 +831,15 @@ static int ipvlan_device_event(struct notifier_block *unused,
if (dev->reg_state != NETREG_UNREGISTERING)
break;
- list_for_each_entry_safe(ipvlan, next, &port->ipvlans, pnode)
- ipvlan->dev->rtnl_link_ops->dellink(ipvlan->dev,
- &lst_kill);
+ list_for_each_entry_safe(ipvlan, next, &port->ipvlans, pnode) {
+#if IS_ENABLED(CONFIG_IPVTAP)
+ if (ipvlan->dev->rtnl_link_ops != &ipvlan_link_ops)
+ __ipvtap_dellink_ptr(ipvlan->dev, &lst_kill);
+ else
+#endif
+ __ipvlan_link_delete(ipvlan->dev, &lst_kill);
I'm not sure if it's worthy a repost, but what about adding a
link_delete_unlocked() cb to `struct ipvl_dev *`? IMHO should make this
code more straight forward.
/P