netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	roopa@cumulusnetworks.com, shm@cumulusnetworks.com,
	jiri@mellanox.com, idosch@mellanox.com,
	jakub.kicinski@netronome.com, andy.roulin@gmail.com
Subject: Re: [PATCH net-next 6/6] netdevsim: Add simple FIB resource controller via devlink
Date: Fri, 6 Apr 2018 07:35:39 +0200	[thread overview]
Message-ID: <20180406053539.GA19345@nanopsycho> (raw)
In-Reply-To: <a916f016-5d8b-3f56-0a84-95d1712bec4c@cumulusnetworks.com>

Thu, Apr 05, 2018 at 10:10:29PM CEST, dsa@cumulusnetworks.com wrote:
>On 4/5/18 11:27 AM, Jiri Pirko wrote:
>> Wed, Mar 28, 2018 at 03:22:00AM CEST, dsa@cumulusnetworks.com wrote:
>>> Add devlink support to netdevsim and use it to implement a simple,
>>> profile based resource controller. Only one controller is needed
>>> per namespace, so the first netdevsim netdevice in a namespace
>>> registers with devlink. If that device is deleted, the resource
>>> settings are deleted.
>> 
>> I don't understand why you add 1:1 fixed relationship between
>> netnamespace and devlink instance. That is highly misleading and reader
>> might think that those 2 are somehow related. They are not. You can have
>> multiple devlink instances for many ports in a single namespace.
>
>The netdevsim devlink instance is an example of limiting the number of
>FIB entries and FIB rules for a namespace. It is currently limited to
>the init_net based on past discussion.
>
>It does not make sense to have multiple resource controllers for the
>same network namespace, hence the limit of only registering with devlink
>on the first device create.

Devlink instance represents an ASIC. 1:1. There is no relation with
network namespaces and should not be. I have no clue why you think so.

The model looks as I described it down below in the picture.


>
>> 
>> Could you please clarify?
>> 
>> Also, to see the relationship between individual netdevsim netdevices
>> and the parent devlink instance, we should use devlink_port
>> instances, like this: 
>> 
>>       devlink1              devlink2
>>        |    |                |    |
>>  dl_port1_1 dlport1_2   dlport2_1 dlport2_2
>>        |    |                |    |
>>      eth0  eth1             eth2 eth3
>> 
>> Note that "devlink instance" reprensents one ASIC.
>> The address of the devlink instance is the bus address of the ASIC.
>> Here, you use address of some/first netdevsim netdev instance.
>
>The ASIC here is the kernel tables in a namespace. It does not make
>sense to have 2 devlink instances for a single namespace.

Again. No clue why you build relationship with namespace.


>
>> 
>> The way it is implemented in netdevsim by this patch is wrong on
>> so many levels :(
>> 
>> Could you please fix this? I'm more than happy to help you with this,
>> please say so. Thanks!
>
>What is there to fix?
>
>Not creating a netdevsim device per netdevsim netdevice? That is
>completely unrelated to the devlink change.

To fit the model. Multiple devlink instances, each representing one
"virtual" ASIC, devlink_port instances, 1 for each netdevsim port.
Netdevsim port should simulate real devices. No real device should have
1:1 relation with network namespace. That is just simply wrong.

  parent reply	other threads:[~2018-04-06  5:35 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28  1:21 [PATCH net-next 0/6] net: Allow FIB notifiers to fail add and replace David Ahern
2018-03-28  1:21 ` [PATCH net-next 1/6] net: Fix fib notifer to return errno David Ahern
2018-03-29  8:19   ` Ido Schimmel
2018-03-28  1:21 ` [PATCH net-next 2/6] net: Move call_fib_rule_notifiers up in fib_nl_newrule David Ahern
2018-03-29  8:20   ` Ido Schimmel
2018-03-29  8:22   ` Ido Schimmel
2018-03-28  1:21 ` [PATCH net-next 3/6] net/ipv4: Move call_fib_entry_notifiers up for new routes David Ahern
2018-03-29  8:22   ` Ido Schimmel
2018-03-28  1:21 ` [PATCH net-next 4/6] net/ipv4: Allow notifier to fail route replace David Ahern
2018-03-29  8:23   ` Ido Schimmel
2018-03-28  1:21 ` [PATCH net-next 5/6] net/ipv6: Move call_fib6_entry_notifiers up for route adds David Ahern
2018-03-29  8:23   ` Ido Schimmel
2018-03-28  1:22 ` [PATCH net-next 6/6] netdevsim: Add simple FIB resource controller via devlink David Ahern
2018-03-28  1:34   ` Jakub Kicinski
2018-03-29 18:11     ` David Miller
2018-03-29 20:01       ` David Ahern
2018-04-05 17:27   ` Jiri Pirko
2018-04-05 20:10     ` David Ahern
2018-04-05 21:06       ` David Ahern
2018-04-06  5:52         ` Jiri Pirko
2018-04-06 21:22           ` David Ahern
2018-04-09  8:18             ` Jiri Pirko
2018-04-06  5:35       ` Jiri Pirko [this message]
2018-03-29  8:29 ` [PATCH net-next 0/6] net: Allow FIB notifiers to fail add and replace Ido Schimmel
2018-03-29 20:00   ` David Ahern
2018-03-29 18:11 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180406053539.GA19345@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=andy.roulin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    --cc=shm@cumulusnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).