Re: [RFC net-next v2 1/2] devlink: add whole device devlink instance

From
Jiri Pirko <jiri@resnulli.us>
Date
2025-03-18 15:43:08
Also in
intel-wired-lan, lkml
Reply to
Przemek Kitszel, 2025-02-19
Wed, Feb 19, 2025 at 05:32:54PM +0100, przemyslaw.kitszel@intel.com wrote:
Add a support for whole device devlink instance. Intented as a entity
over all PF devices on given physical device.

In case of ice driver we have multiple PF devices (with their devlink
dev representation), that have separate drivers loaded. However those
still do share lots of resources due to being the on same HW. Examples
include PTP clock and RSS LUT. Historically such stuff was assigned to
PF0, but that was both not clear and not working well. Now such stuff
is moved to be covered into struct ice_adapter, there is just one instance
of such per HW.

This patch adds a devlink instance that corresponds to that ice_adapter,
to allow arbitrage over resources (as RSS LUT) via it (further in the
series (RFC NOTE: stripped out so far)).

Thanks to Wojciech Drewek for very nice naming of the devlink instance:
PF0:		pci/0000:00:18.0
whole-dev:	pci/0000:00:18
But I made this a param for now (driver is free to pass just "whole-dev").

$ devlink dev # (Interesting part of output only)
pci/0000:af:00:
 nested_devlink:
   pci/0000:af:00.0
   pci/0000:af:00.1
   pci/0000:af:00.2
   pci/0000:af:00.3
   pci/0000:af:00.4
   pci/0000:af:00.5
   pci/0000:af:00.6
   pci/0000:af:00.7
Please check my RFC attempt to solve this for mlx5:
https://lore.kernel.org/all/20250318124706.94156-1-jiri@resnulli.us/ (local)

I believe that the same could work for you too.
Thread (19 messages) 19 messages, 4 authors, last reply 2025-03-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help