Subject: Re: [net-next PATCH] hsr: Simplify code for announcing HSR nodes timer setup

From: Jakub Kicinski <[email-masked]>
Date: Tue, 30 Apr 2024 07:42:52 -0700

On Tue, 30 Apr 2024 14:52:43 +0200 Lukasz Majewski wrote:
> > Practically speaking I'm not sure if anyone uses any of the weird
> > IFF_* flags, but they are defined in uAPI (enum net_device_flags) and
> > I don't see much validation so presumably it's possible to flip them.  
> 
> Ok, I see.
> 
> Then - what would you recommend instead? The approach with manual
> checking the previous state has described drawbacks.

Add a bool somewhere to track if the timer has been scheduled?
The NETDEV_ events in question are called under rtnl_lock, so
no extra locking should be needed.