All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Yuval Avnery <yuvalav@mellanox.com>,
	netdev@vger.kernel.org, jiri@mellanox.com, saeedm@mellanox.com,
	leon@kernel.org, davem@davemloft.net, shuah@kernel.org
Subject: Re: [PATCH net-next 0/9] devlink vdev
Date: Wed, 23 Oct 2019 21:25:12 +0200	[thread overview]
Message-ID: <20191023192512.GA2414@nanopsycho> (raw)
In-Reply-To: <20191023120046.0f53b744@cakuba.netronome.com>

Wed, Oct 23, 2019 at 09:00:46PM CEST, jakub.kicinski@netronome.com wrote:
>On Tue, 22 Oct 2019 20:43:01 +0300, Yuval Avnery wrote:
>> This patchset introduces devlink vdev.
>> 
>> Currently, legacy tools do not provide a comprehensive solution that can
>> be used in both SmartNic and non-SmartNic mode.
>> Vdev represents a device that exists on the ASIC but is not necessarily
>> visible to the kernel.
>> 
>> Using devlink ports is not suitable because:
>> 
>> 1. Those devices aren't necessarily network devices (such as NVMe devices)
>>    and doesn’t have E-switch representation. Therefore, there is need for
>>    more generic representation of PCI VF.
>> 2. Some attributes are not necessarily pure port attributes
>>    (number of MSIX vectors)
>> 3. It creates a confusing devlink topology, with multiple port flavours
>>    and indices.
>> 
>> Vdev will be created along with flavour and attributes.
>> Some network vdevs may be linked with a devlink port.
>> 
>> This is also aimed to replace "ip link vf" commands as they are strongly
>> linked to the PCI topology and allow access only to enabled VFs.
>> Even though current patchset and example is limited to MAC address
>> of the VF, this interface will allow to manage PF, VF, mdev in
>> SmartNic and non SmartNic modes, in unified way for networking and
>> non-networking devices via devlink instance.
>> 
>> Example:
>> 
>> A privileged user wants to configure a VF's hw_addr, before the VF is
>> enabled.
>> 
>> $ devlink vdev set pci/0000:03:00.0/1 hw_addr 10:22:33:44:55:66
>> 
>> $ devlink vdev show pci/0000:03:00.0/1
>> pci/0000:03:00.0/1: flavour pcivf pf 0 vf 0 port_index 1 hw_addr 10:22:33:44:55:66
>> 
>> $ devlink vdev show pci/0000:03:00.0/1 -jp
>> {
>>     "vdev": {
>>         "pci/0000:03:00.0/1": {
>>             "flavour": "pcivf",
>>             "pf": 0,
>>             "vf": 0,
>>             "port_index": 1,
>>             "hw_addr": "10:22:33:44:55:66"
>>         }
>>     }
>> }
>
>I don't trust this is a good design. 
>
>We need some proper ontology and decisions what goes where. We have
>half of port attributes duplicated here, and hw_addr which honestly
>makes more sense in a port (since port is more of a networking
>construct, why would ep storage have a hw_addr?). Then you say you're
>going to dump more PCI stuff in here :(

Well basically what this "vdev" is is the "port peer" we discussed
couple of months ago. It provides possibility for the user on bare metal
to cofigure things for the VF - for example.

Regarding hw_addr vs. port - it is not correct to make that a devlink
port attribute. It is not port's hw_addr, but the port's peer hw_addr.


>
>"vdev" sounds entirely meaningless, and has a high chance of becoming 
>a dumping ground for attributes.

Sure, it is a madeup name. If you have a better name, please share.
Basically it is something that represents VF/mdev - the other side of
devlink port. But in some cases, like NVMe, there is no associated
devlink port - that is why "devlink port peer" would not work here.


>
>I'm kind of sour about the debug interfaces that were added to devlink.
>Seems like the health API superseded the region stuff to a certain
>extent and the two don't interact with each other.

Yeah, I admit that the regions were probably step into wrong direction.
But only one driver (mlx4) implements and will be hopefully soon
coverted into health.


>
>I'm slightly worried there is too much "learning by doing" going on
>with these new devlink uABIs.

I'm worried about this too.


>
>I'm sure you guys thought this all through in detail and have more
>documentation and design docs internally. Could you provide more of
>this information here? How things fit together? Bigger picture?
>
>The 20 lines of cover letters and no Documentation/ is definitely not
>going to cut it this time.

You are right, Documentation/ file is definitelly a good idea here.



  reply	other threads:[~2019-10-23 19:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 17:43 [PATCH net-next 0/9] devlink vdev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 1/9] devlink: Introduce vdev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 2/9] devlink: Add PCI attributes support for vdev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 3/9] devlink: Add port with vdev register support Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 4/9] devlink: Support vdev HW address get Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 5/9] devlink: Support vdev HW address set Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 6/9] netdevsim: Add max_vfs to bus_dev Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 7/9] netdevsim: Add devlink vdev creation Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 8/9] netdevsim: Add devlink vdev sefltest for netdevsim Yuval Avnery
2019-10-22 17:43 ` [PATCH net-next 9/9] net/mlx5e: Add support for devlink vdev and vdev hw_addr set/show Yuval Avnery
2019-10-23 15:48 ` [PATCH net-next 0/9] devlink vdev Or Gerlitz
2019-10-23 19:00 ` Jakub Kicinski
2019-10-23 19:25   ` Jiri Pirko [this message]
2019-10-23 22:14     ` Jakub Kicinski
2019-10-24  0:11       ` Yuval Avnery
2019-10-24  2:51         ` Jakub Kicinski
2019-10-25 14:58           ` Andy Gospodarek
2019-10-28 19:04             ` Yuval Avnery
2019-10-28 20:02             ` Parav Pandit
2019-10-29 17:08             ` Jakub Kicinski
2019-10-29 17:56               ` Andy Gospodarek
2019-10-29 18:06               ` Yuval Avnery
2019-10-29 18:32                 ` Jakub Kicinski
2019-10-30  2:30               ` Parav Pandit

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=20191023192512.GA2414@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@mellanox.com \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    --cc=shuah@kernel.org \
    --cc=yuvalav@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.