Thread (90 messages) 90 messages, 8 authors, 2024-04-02

Re: [PATCH net-next v2 04/22] ovpn: add basic interface creation/destruction/management routines

From: Andrew Lunn <andrew@lunn.ch>
Date: 2024-03-05 16:26:38

quoted
quoted
+void ovpn_iface_destruct(struct ovpn_struct *ovpn, bool unregister_netdev)
+{
+	ASSERT_RTNL();
+
+	netif_carrier_off(ovpn->dev);
You often see virtual devices turn their carrier off in there
probe/create function, because it is unclear what state it is in after
register_netdevice().
Are you suggesting to turn it off both here and in the create function?
Or should I remove the invocation above?
I noticed it in the _destruct function and went back to look at
create. You probably want it in both, unless as part of destruct, you
first disconnect all peers, which should set the carrier to off when
the last peer disconnects?

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