From: Jacob Keller <email@example.com> To: Parav Pandit <firstname.lastname@example.org>, David Ahern <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com> Cc: Jiri Pirko <firstname.lastname@example.org>, Jason Gunthorpe <email@example.com>, "firstname.lastname@example.org" <email@example.com>, Leon Romanovsky <firstname.lastname@example.org>, Saeed Mahameed <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, Vu Pham <firstname.lastname@example.org> Subject: Re: [PATCH net-next 03/13] devlink: Support add and delete devlink port Date: Wed, 18 Nov 2020 16:52:42 -0800 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <BY5PR12MB43222AB94ED279AF9B710FF1DCE10@BY5PR12MB4322.namprd12.prod.outlook.com> On 11/18/2020 9:02 AM, Parav Pandit wrote: > >> From: David Ahern <firstname.lastname@example.org> >> Sent: Wednesday, November 18, 2020 9:51 PM >> >> On 11/12/20 12:24 PM, Parav Pandit wrote: >>> Extended devlink interface for the user to add and delete port. >>> Extend devlink to connect user requests to driver to add/delete such >>> port in the device. >>> >>> When driver routines are invoked, devlink instance lock is not held. >>> This enables driver to perform several devlink objects registration, >>> unregistration such as (port, health reporter, resource etc) by using >>> exising devlink APIs. >>> This also helps to uniformly use the code for port unregistration >>> during driver unload and during port deletion initiated by user. >>> >>> Examples of add, show and delete commands: >>> $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev >>> >>> $ devlink port show >>> pci/0000:06:00.0/65535: type eth netdev ens2f0np0 flavour physical >>> port 0 splittable false >>> >>> $ devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88 >>> >>> $ devlink port show pci/0000:06:00.0/32768 >>> pci/0000:06:00.0/32768: type eth netdev eth0 flavour pcisf controller 0 >> pfnum 0 sfnum 88 external false splittable false >>> function: >>> hw_addr 00:00:00:00:88:88 state inactive opstate detached >>> >> >> There has to be limits on the number of sub functions that can be created for >> a device. How does a user find that limit? > Yes, this came up internally, but didn't really converged. > The devlink resource looked too verbose for an average or simple use cases. > But it may be fine. > The hurdle I faced with devlink resource is with defining the granularity. > > For example one devlink instance deploys sub functions on multiple pci functions. > So how to name them? Currently we have controller and PFs in port annotation. > So resource name as > c0pf0_subfunctions -> for controller 0, pf 0 > c1pf2_subfunctions -> for controller 1, pf 2 > > Couldn't convince my self to name it this way. Yea, I think we need to extend the plumbing of resources to allow specifying or assigning parent resources to a subfunction. > > Below example looked simpler to use but plumbing doesn’t exist for it. > > $ devlink resource show pci/0000:03:00.0 > pci/0000:03:00.0/1: name max_sfs count 256 controller 0 pf 0 > pci/0000:03:00.0/2: name max_sfs count 100 controller 1 pf 0 > pci/0000:03:00.0/3: name max_sfs count 64 controller 1 pf 1 > > $ devlink resource set pci/0000:03:00.0/1 max_sfs 100 > > Second option I was considering was use port params which doesn't sound so right as resource. > I don't think port parameters make sense here. They only encapsulate single name -> value pairs, and don't really help show the relationships between the subfunction ports and the parent device. >> >> Also, seems like there are hardware constraint at play. e.g., can a user reduce >> the number of queues used by the physical function to support more sub- >> functions? If so how does a user programmatically learn about this limitation? >> e.g., devlink could have support to show resource sizing and configure >> constraints similar to what mlxsw has. > Yes, need to figure out its naming. For mlx5 num queues doesn't have relation to subfunctions. > But PCI resource has relation and this is something we want to do in future, as you said may be using devlink resource. > I've been looking into queue management and being able to add and remove queue groups and queues. I'm leaning towards building on top of devlink resource for this. Specifically I have been looking at picking up the work started by Magnus last year, around creating interface for representing queues to the stack better for AF_XDP, but it also has other possible uses. I'd like to make sure it aligns with the ideas here for partitioning resources. It seems like that should be best done at the devlink level, where the main devlink instance knows about all the part limitations and can then have new commands for allowing assignment of resources to ports.
next prev parent reply other threads:[~2020-11-19 0:52 UTC|newest] Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-12 19:24 [PATCH net-next 00/13] Add mlx5 subfunction support Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 01/13] devlink: Prepare code to fill multiple port function attributes Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 02/13] devlink: Introduce PCI SF port flavour and port attribute Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 03/13] devlink: Support add and delete devlink port Parav Pandit 2020-11-18 16:21 ` David Ahern 2020-11-18 17:02 ` Parav Pandit 2020-11-18 18:03 ` David Ahern 2020-11-18 18:38 ` Jason Gunthorpe 2020-11-18 19:36 ` David Ahern 2020-11-18 20:42 ` Jason Gunthorpe 2020-11-18 19:22 ` Parav Pandit 2020-11-19 0:41 ` Jacob Keller 2020-11-19 1:17 ` David Ahern 2020-11-19 1:56 ` Samudrala, Sridhar 2020-11-19 0:52 ` Jacob Keller [this message] 2020-11-12 19:24 ` [PATCH net-next 04/13] devlink: Support get and set state of port function Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 05/13] devlink: Avoid global devlink mutex, use per instance reload lock Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 06/13] devlink: Introduce devlink refcount to reduce scope of global devlink_mutex Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 07/13] net/mlx5: SF, Add auxiliary device support Parav Pandit 2020-12-07 2:48 ` David Ahern 2020-12-07 4:53 ` Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 08/13] net/mlx5: SF, Add auxiliary device driver Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 09/13] net/mlx5: E-switch, Prepare eswitch to handle SF vport Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 10/13] net/mlx5: E-switch, Add eswitch helpers for " Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 11/13] net/mlx5: SF, Add SF configuration hardware commands Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 12/13] net/mlx5: SF, Add port add delete functionality Parav Pandit 2020-11-12 19:24 ` [PATCH net-next 13/13] net/mlx5: SF, Port function state change support Parav Pandit 2020-11-16 22:52 ` [PATCH net-next 00/13] Add mlx5 subfunction support Jakub Kicinski 2020-11-17 0:06 ` Saeed Mahameed 2020-11-17 1:58 ` Jakub Kicinski 2020-11-17 4:08 ` Parav Pandit 2020-11-17 17:11 ` Jakub Kicinski 2020-11-17 18:49 ` Jason Gunthorpe 2020-11-19 2:14 ` Jakub Kicinski 2020-11-19 4:35 ` David Ahern 2020-11-19 5:57 ` Saeed Mahameed 2020-11-20 1:31 ` Jakub Kicinski 2020-11-25 5:33 ` David Ahern 2020-11-25 6:00 ` Parav Pandit 2020-11-25 14:37 ` David Ahern 2020-11-20 1:29 ` Jakub Kicinski 2020-11-20 17:58 ` Alexander Duyck 2020-11-20 19:04 ` Samudrala, Sridhar 2020-11-23 21:51 ` Saeed Mahameed 2020-11-24 7:01 ` Jason Wang 2020-11-24 7:05 ` Jason Wang 2020-11-19 6:12 ` Saeed Mahameed 2020-11-19 8:25 ` Parav Pandit 2020-11-20 1:35 ` Jakub Kicinski 2020-11-20 3:34 ` Parav Pandit 2020-11-17 18:50 ` Parav Pandit 2020-11-19 2:23 ` Jakub Kicinski 2020-11-19 6:22 ` Saeed Mahameed 2020-11-19 14:00 ` Jason Gunthorpe 2020-11-20 3:35 ` Jakub Kicinski 2020-11-20 3:50 ` Parav Pandit 2020-11-20 16:16 ` Jason Gunthorpe
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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH net-next 03/13] devlink: Support add and delete devlink port' \ /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
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).