lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180326143334.GI1891@nanopsycho>
Date:   Mon, 26 Mar 2018 16:33:34 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     David Ahern <dsa@...ulusnetworks.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        roopa@...ulusnetworks.com, shm@...ulusnetworks.com,
        jiri@...lanox.com, idosch@...lanox.com,
        jakub.kicinski@...ronome.com, David Ahern <dsahern@...il.com>
Subject: Re: [PATCH RFC net-next 7/7] netdevsim: Add simple FIB resource
 controller via devlink

Sun, Mar 25, 2018 at 04:24:11PM CEST, dsa@...ulusnetworks.com wrote:
>On 3/24/18 10:02 AM, Jiri Pirko wrote:
>>>>>>>>
>>>>>>>> Wait a second. What do you mean by "per-network namespace"? Devlink
>>>>>>>> instance is always associated with one physical device. Like an ASIC.
>>>>>>>>
>>>>>>>>
>>>>>>>>> has a net entry, the simplest design is to put it into the namespace of
>>>>>>>>> the controller. Without it, controlling resource sizes in namespace
>>>>>>>>> 'foobar' has to be done from init_net, which is just wrong.
>>>>>>>
>>>>>>> you need to look at how netdevsim creates a device per netdevice.
>>>>>>
>>>>>> That means one devlink instance for each netdevsim device, doesn't it?
>>>>>>
>>>>>
>>>>> yes.
>>>>
>>>> Still not sure how to handle namespaces in devlink. Originally, I
>>>> thought it would be okay to leave all devlink instances in init_ns.
>>>> Because what happens if you move netdev to another namespace? Should the
>>>> devlink move as well? What if you have multiple ports, each in different
>>>> namespace. Can user move devlink instance to another namespace? Etc.
>>>>
>>>
>>> The devlink instance is associated with a 'struct device' and those do
>>> not change namespaces AFAIK.
>> 
>> Yeah. But you put devlink instance into namespace according to struct
>> net_device. That is mismatch.
>> 
>
>New netdevsim netdevice creates a new 'struct device' which creates a
>new devlink instance. The namespace the netdev is created in is then
>passed to the devlink instance. Yes, the netdev could change namespaces,
>but that is something we can easily prevent if it has a devlink instance.
>
>But really, we are way down a tangent with respect to the intent of this
>patch set. I am fine with limiting the example resource controller to

I know. That is just something that I spotted :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ