Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-08 Thread Jonathan Lemon
On 6 Aug 2019, at 12:06, Andrew Lunn wrote: On Tue, Aug 06, 2019 at 11:54:49AM -0700, Jakub Kicinski wrote: On Tue, 6 Aug 2019 20:38:41 +0200, Jiri Pirko wrote: So the proposal is to have some new device, say "kernelnet", that would implicitly create per-namespace devlink instance. This de

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-07 Thread David Ahern
On 8/7/19 12:49 PM, Jakub Kicinski wrote: > Perhaps I'm misinterpreting your point there. yes, this thread is getting out of hand. I am not pushing for an in-kernel, fib resource controller. Jiri wants to remove the existing devlink resource code from netdevsim into a standalone driver, code that

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-07 Thread Jakub Kicinski
On Tue, 6 Aug 2019 21:10:40 -0600, David Ahern wrote: > On 8/6/19 8:59 PM, Andrew Lunn wrote: > > However, zoom out a bit, from networking to the whole kernel. In > > general, across the kernel as a whole, resource management is done > > with cgroups. cgroups is the consistent operational model acr

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-07 Thread Jakub Kicinski
On Tue, 6 Aug 2019 20:33:47 -0600, David Ahern wrote: > Some time back supported was added for devlink 'resources'. The idea is > that hardware (mlxsw) has limited resources (e.g., memory) that can be > allocated in certain ways (e.g., kvd for mlxsw) thus implementing > restrictions on the number o

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread David Ahern
On 8/6/19 8:59 PM, Andrew Lunn wrote: > However, zoom out a bit, from networking to the whole kernel. In > general, across the kernel as a whole, resource management is done > with cgroups. cgroups is the consistent operational model across the > kernel as a whole. > > So i think you need a second

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread Andrew Lunn
On Tue, Aug 06, 2019 at 08:33:47PM -0600, David Ahern wrote: > Some time back supported was added for devlink 'resources'. The idea is > that hardware (mlxsw) has limited resources (e.g., memory) that can be > allocated in certain ways (e.g., kvd for mlxsw) thus implementing > restrictions on the n

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread David Ahern
Some time back supported was added for devlink 'resources'. The idea is that hardware (mlxsw) has limited resources (e.g., memory) that can be allocated in certain ways (e.g., kvd for mlxsw) thus implementing restrictions on the number of programmable entries (e.g., routes, neighbors) by userspace.

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread Andrew Lunn
On Tue, Aug 06, 2019 at 11:54:49AM -0700, Jakub Kicinski wrote: > On Tue, 6 Aug 2019 20:38:41 +0200, Jiri Pirko wrote: > > >> So the proposal is to have some new device, say "kernelnet", that > > >> would implicitly create per-namespace devlink instance. This devlink > > >> instance would be used t

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread Jakub Kicinski
On Tue, 6 Aug 2019 20:38:41 +0200, Jiri Pirko wrote: > >> So the proposal is to have some new device, say "kernelnet", that > >> would implicitly create per-namespace devlink instance. This devlink > >> instance would be used to setup resource limits. Like: > >> > >> devlink resource set kernelnet

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread Jiri Pirko
Tue, Aug 06, 2019 at 08:27:17PM CEST, jakub.kicin...@netronome.com wrote: >On Tue, 6 Aug 2019 18:40:36 +0200, Jiri Pirko wrote: >> Hi all. >> >> I just discussed this with DavidA and I would like to bring this to >> broader audience. David wants to limit kernel resources in network >> namespaces,

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread Jakub Kicinski
On Tue, 6 Aug 2019 18:40:36 +0200, Jiri Pirko wrote: > Hi all. > > I just discussed this with DavidA and I would like to bring this to > broader audience. David wants to limit kernel resources in network > namespaces, for example fibs, fib rules, etc. > > He claims that devlink api is rich enough

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread Andrew Lunn
On Tue, Aug 06, 2019 at 11:38:32AM -0600, David Ahern wrote: > On 8/6/19 10:40 AM, Jiri Pirko wrote: > > Hi all. > > > > I just discussed this with DavidA and I would like to bring this to > > broader audience. David wants to limit kernel resources in network > > namespaces, for example fibs, fib

Re: [RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread David Ahern
On 8/6/19 10:40 AM, Jiri Pirko wrote: > Hi all. > > I just discussed this with DavidA and I would like to bring this to > broader audience. David wants to limit kernel resources in network > namespaces, for example fibs, fib rules, etc. > > He claims that devlink api is rich enough to program thi

[RFC] implicit per-namespace devlink instance to set kernel resource limitations

2019-08-06 Thread Jiri Pirko
Hi all. I just discussed this with DavidA and I would like to bring this to broader audience. David wants to limit kernel resources in network namespaces, for example fibs, fib rules, etc. He claims that devlink api is rich enough to program this limitations as it already does for mlxsw hw resour