All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com,
	davem@davemloft.net, edumazet@google.com, idosch@nvidia.com,
	petrm@nvidia.com, jacob.e.keller@intel.com, moshe@nvidia.com,
	shayd@nvidia.com, saeedm@nvidia.com
Subject: Re: [patch net-next v2 00/12] expose devlink instances relationships
Date: Thu, 14 Sep 2023 15:57:52 +0200	[thread overview]
Message-ID: <20230914135752.GB401982@kernel.org> (raw)
In-Reply-To: <20230913071243.930265-1-jiri@resnulli.us>

On Wed, Sep 13, 2023 at 09:12:31AM +0200, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@nvidia.com>
> 
> Currently, the user can instantiate new SF using "devlink port add"
> command. That creates an E-switch representor devlink port.
> 
> When user activates this SF, there is an auxiliary device created and
> probed for it which leads to SF devlink instance creation.
> 
> There is 1:1 relationship between E-switch representor devlink port and
> the SF auxiliary device devlink instance.
> 
> Also, for example in mlx5, one devlink instance is created for
> PCI device and one is created for an auxiliary device that represents
> the uplink port. The relation between these is invisible to the user.
> 
> Patches #1-#3 and #5 are small preparations.
> 
> Patch #4 adds netnsid attribute for nested devlink if that in a
> different namespace.
> 
> Patch #5 is the main one in this set, introduces the relationship
> tracking infrastructure later on used to track SFs, linecards and
> devlink instance relationships with nested devlink instances.
> 
> Expose the relation to the user by introducing new netlink attribute
> DEVLINK_PORT_FN_ATTR_DEVLINK which contains the devlink instance related
> to devlink port function. This is done by patch #8.
> Patch #9 implements this in mlx5 driver.
> 
> Patch #10 converts the linecard nested devlink handling to the newly
> introduced rel infrastructure.
> 
> Patch #11 benefits from the rel infra and introduces possiblitily to
> have relation between devlink instances.
> Patch #12 implements this in mlx5 driver.
> 
> Examples:
> $ devlink dev
> pci/0000:08:00.0: nested_devlink auxiliary/mlx5_core.eth.0
> pci/0000:08:00.1: nested_devlink auxiliary/mlx5_core.eth.1
> auxiliary/mlx5_core.eth.1
> auxiliary/mlx5_core.eth.0
> 
> $ devlink port add pci/0000:08:00.0 flavour pcisf pfnum 0 sfnum 106
> pci/0000:08:00.0/32768: type eth netdev eth4 flavour pcisf controller 0 pfnum 0 sfnum 106 splittable false
>   function:
>     hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable
> $ devlink port function set pci/0000:08:00.0/32768 state active
> $ devlink port show pci/0000:08:00.0/32768
> pci/0000:08:00.0/32768: type eth netdev eth4 flavour pcisf controller 0 pfnum 0 sfnum 106 splittable false
>   function:
>     hw_addr 00:00:00:00:00:00 state active opstate attached roce enable nested_devlink auxiliary/mlx5_core.sf.2
> 
> # devlink dev reload auxiliary/mlx5_core.sf.2 netns ns1
> $ devlink port show pci/0000:08:00.0/32768
> pci/0000:08:00.0/32768: type eth netdev eth4 flavour pcisf controller 0 pfnum 0 sfnum 106 splittable false
>   function:
>     hw_addr 00:00:00:00:00:00 state active opstate attached roce enable nested_devlink auxiliary/mlx5_core.sf.2 nested_devlink_netns ns1
> 
> Jiri Pirko (12):
>   devlink: move linecard struct into linecard.c
>   net/mlx5: Disable eswitch as the first thing in mlx5_unload()
>   net/mlx5: Lift reload limitation when SFs are present
>   devlink: put netnsid to nested handle
>   devlink: move devlink_nl_put_nested_handle() into netlink.c
>   devlink: extend devlink_nl_put_nested_handle() with attrtype arg
>   devlink: introduce object and nested devlink relationship infra
>   devlink: expose peer SF devlink instance
>   net/mlx5: SF, Implement peer devlink set for SF representor devlink
>     port
>   devlink: convert linecard nested devlink to new rel infrastructure
>   devlink: introduce possibility to expose info about nested devlinks
>   net/mlx5e: Set en auxiliary devlink instance as nested

Reviewed-by: Simon Horman <horms@kernel.org>


  parent reply	other threads:[~2023-09-14 13:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13  7:12 [patch net-next v2 00/12] expose devlink instances relationships Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 01/12] devlink: move linecard struct into linecard.c Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 02/12] net/mlx5: Disable eswitch as the first thing in mlx5_unload() Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 03/12] net/mlx5: Lift reload limitation when SFs are present Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 04/12] devlink: put netnsid to nested handle Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 05/12] devlink: move devlink_nl_put_nested_handle() into netlink.c Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 06/12] devlink: extend devlink_nl_put_nested_handle() with attrtype arg Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 07/12] devlink: introduce object and nested devlink relationship infra Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 08/12] devlink: expose peer SF devlink instance Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 09/12] net/mlx5: SF, Implement peer devlink set for SF representor devlink port Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 10/12] devlink: convert linecard nested devlink to new rel infrastructure Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 11/12] devlink: introduce possibility to expose info about nested devlinks Jiri Pirko
2023-09-13  7:12 ` [patch net-next v2 12/12] net/mlx5e: Set en auxiliary devlink instance as nested Jiri Pirko
2023-09-14 13:57 ` Simon Horman [this message]
2023-09-17 13:30 ` [patch net-next v2 00/12] expose devlink instances relationships patchwork-bot+netdevbpf

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=20230914135752.GB401982@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=idosch@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=shayd@nvidia.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.