Re: [PATCH net-next v2 5/8] net: ip_gre: Add netns_atomic module parameter

From
Jakub Kicinski <kuba@kernel.org>
Date
2024-11-08 04:04:11
Also in
linux-kselftest
Reply to
Xiao Liang, 2024-11-07
On Fri, 8 Nov 2024 00:53:55 +0800 Xiao Liang wrote:
quoted
quoted
It is to control driver behavior at rtnl_ops registration time. I
think rtnetlink
attributes are too late for that, maybe? Can't think of a way other than
module parameters or register separate ops. Any suggestions?  
Step back from the implementation you have a little, forget that there
is a boolean in rtnl_link_ops. User makes a request to spawn an
interface, surely a flag inside that request can dictate how the netns
attrs are interpreted.  
IMO, this is about driver capability, not about user requests.
The bit is a driver capability, that's fine. But the question was how
to achieve backward compatibility. A flag in user request shifts the
responsibility of ensuring all services are compatible to whoever
spawns the interfaces. Which will probably be some network management
daemon.
As you've pointed out earlier, probably no one would actually want
the old behavior whenever the driver supports the new one.
I added the module parameter just for compatibility, because ip_tunnels
was not implemented to support src_net properly.
And I maintain that it's very unlikely anyone cares about old behavior.
So maybe as a starting point we can have neither the flag nor the
module param? We can add them later if someone screams.
Yes it's possible to add an extra flag in user request, but I don't
think it's a good approach.
There are two maintainers with opposing intuition so more data may be
needed to convince..
BTW, I didn't find what's going on with module parameters, is there
any documentation?
Not sure if there is documentation, but module params are quite painful
to work with. Main reason is that they are global and not namespace
aware. Plus developers usually default to making them read only, which
means they practically speaking have to be configured at boot.
Thread (26 messages) 26 messages, 4 authors, last reply 2024-11-12
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help