[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af1a5da4-12dc-47bd-8836-9b7bda0281fd@openvpn.net>
Date: Fri, 11 Apr 2025 10:38:20 +0200
From: Antonio Quartulli <antonio@...nvpn.net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Donald Hunter <donald.hunter@...il.com>,
Shuah Khan <shuah@...nel.org>, sd@...asysnail.net, ryazanov.s.a@...il.com,
Andrew Lunn <andrew+netdev@...n.ch>, Simon Horman <horms@...nel.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
Xiao Liang <shaw.leon@...il.com>
Subject: Re: [PATCH net-next v25 04/23] ovpn: keep carrier always on for MP
interfaces
On 11/04/2025 05:03, Jakub Kicinski wrote:
> On Mon, 07 Apr 2025 21:46:12 +0200 Antonio Quartulli wrote:
>> + /* carrier for P2P interfaces is switched on and off when
>> + * the peer is added or deleted.
>> + *
>> + * in case of P2MP interfaces we just keep the carrier always on
>> + */
>> + if (ovpn->mode == OVPN_MODE_MP)
>> + netif_carrier_on(dev);
>
> Any reason why you turn it during open rather than leaving it be before
> registration? Now the link is down until first open, then it stays up
> even if user closes?
Mh your concern makes sense.
Originally Andrew suggested adding the carrier_on() to _probe(), which I
interpreted as _open() (I don't think virtual drivers have any _probe()
hook).
Being the goal to keep the carrier always on for MP ifaces, I'd say I
should move the carrier_on() call to newlink().
There I can set the carrier on if MP or off if P2P.
Regards,
--
Antonio Quartulli
OpenVPN Inc.
Powered by blists - more mailing lists