netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: "Samudrala, Sridhar" <sridhar.samudrala@intel.com>,
	"saeed@kernel.org" <saeed@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jason Gunthorpe <jgg@nvidia.com>
Cc: Leon Romanovsky <leonro@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	David Ahern <dsahern@kernel.org>,
	Jacob Keller <jacob.e.keller@intel.com>,
	"david.m.ertman@intel.com" <david.m.ertman@intel.com>,
	"dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	"kiran.patil@intel.com" <kiran.patil@intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: RE: [PATCH net-next v2 00/14] Add mlx5 subfunction support
Date: Fri, 11 Dec 2020 08:33:54 +0000	[thread overview]
Message-ID: <BY5PR12MB43227784BB34D929CA64E315DCCA0@BY5PR12MB4322.namprd12.prod.outlook.com> (raw)
In-Reply-To: <f720c3fb-7401-4f3a-7de2-25309c2570f5@intel.com>



> From: Samudrala, Sridhar <sridhar.samudrala@intel.com>
> Sent: Friday, December 11, 2020 9:42 AM
> 
> On 12/8/2020 11:29 PM, saeed@kernel.org wrote:
> > From: Parav Pandit <parav@nvidia.com>


> > Subfunction provide the same functionality as SRIOV but in a very
> > lightweight manner, please see the thorough and detailed documentation
> > from Parav below, in the commit messages and the Networking
> > documentation patches at the end of this series.
> 
> What is the mechanism for assigning these subfunctions to VMs?
> OR is this only targeted for container usecases at this time?
> 
Currently subfunction cannot be assigned to VM as_is.
Some more vfio_pci style software may be developed in future to map subfunction auxiliary device to the VM.

> >
> > Add a devlink port of subfunction flaovur:
> > $ devlink port add pci/0000:06:00.0 flavour pcisf pfnum 0 sfnum 88
> Is there any requirement that subfunctions can be created only when
> eswitch mode is set to switchdev?
> I think we should not restrict this functionality without switchdev mode .
> 
It is not restricted. We discussed this before at [3].

> After this step, i guess an auxiliary device is created on the auxiliary bus and a
> devlink port.
> Does "devlink port show" show this port and can we list the auxiliary device.
Yes and yes.
Below command will show the the auxiliary device.
Auxiliary device is listed in detail in the patch_7 at [4] when its created.
$ devlink dev show auxiliary/mlx5_core.sf.4/
More below.

> > Configure mac address of the port function:
> > $ devlink port function set ens2f0npf0sf88 hw_addr 00:00:00:00:88:88
> What is ens2f0npf0sf88? Is this the port representer netdev? 
Yes, it is representor netdev associated with the devlink port.

> I think we should allow setting this by passing the devlink port.
Absolutely. It is. Every devlink port is identified by a unique port index.
So
$ devlink port show pci/0000:06:00.0/<devlink_port_index>  will show it.

It is captured in detailed example in the commit log of the patch_7 that adds it at [4].
Also present in the Documentation of mlx5.rst patch_14 at [5].

I just used the representor netdev example as it was intuitive to view the world from eswitch side.
Bu yes, instead of netdev port index is already supported natively.

> 
> What about other attributes like number of queues, interrupt vectors and
> port capabilities etc? Can we add other attributes via this interface?
> >
We believe that capabilities of the function should be controlled using the port function set command.
At the moment only mac address can be configured.
Number of queues is a resource so devlink resource is more suitable interface.

> > Now activate the function:
> > $ devlink port function set ens2f0npf0sf88 state active
> Is the subfunction netdev created after this step?
Yes.
> I thought there was a step to bind the auxiliary device to the driver.
Yes. User can always bind/unbind auxiliary driver from the auxiliary device.
Currently auxiliary bus do not have option to disable autoprobe (per device).
This is something to be extended in future so that user can select how a subfunction device to be used in the host system.

> How does the probe routine for the auxiliary device get invoked?
> >
When the subfunction auxiliary device is placed on the auxiliary bus, driver core invokes the registered driver probe routine.
Please refer to patch _7 at [4]. It is similar to how a pci device is probed.

[3] https://lore.kernel.org/netdev/BY5PR12MB43225AA5A5E42E76C03F645BDC3F0@BY5PR12MB4322.namprd12.prod.outlook.com/
[4] https://lore.kernel.org/netdev/20201209072934.1272819-4-saeed@kernel.org/
[5] https://lore.kernel.org/netdev/20201209072934.1272819-15-saeed@kernel.org/


      reply	other threads:[~2020-12-11  8:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  7:29 [PATCH net-next v2 00/14] Add mlx5 subfunction support saeed
2020-12-09  7:29 ` [PATCH net-next v2 01/14] devlink: Prepare code to fill multiple port function attributes saeed
2020-12-09  7:29 ` [PATCH net-next v2 02/14] devlink: Introduce PCI SF port flavour and port attribute saeed
2020-12-09  7:29 ` [PATCH net-next v2 03/14] devlink: Support add and delete devlink port saeed
2020-12-09  7:29 ` [PATCH net-next v2 04/14] devlink: Support get and set state of port function saeed
2020-12-09  7:29 ` [PATCH net-next v2 05/14] net/mlx5: Introduce vhca state event notifier saeed
2020-12-09  7:29 ` [PATCH net-next v2 06/14] net/mlx5: SF, Add auxiliary device support saeed
2020-12-09  7:29 ` [PATCH net-next v2 07/14] net/mlx5: SF, Add auxiliary device driver saeed
2020-12-09  7:29 ` [PATCH net-next v2 08/14] net/mlx5: E-switch, Prepare eswitch to handle SF vport saeed
2020-12-09  7:29 ` [PATCH net-next v2 09/14] net/mlx5: E-switch, Add eswitch helpers for " saeed
2020-12-09  7:29 ` [PATCH net-next v2 10/14] net/mlx5: SF, Add port add delete functionality saeed
2020-12-09  7:29 ` [PATCH net-next v2 11/14] net/mlx5: SF, Port function state change support saeed
2020-12-09  7:29 ` [PATCH net-next v2 12/14] devlink: Add devlink port documentation saeed
2020-12-09  7:29 ` [PATCH net-next v2 13/14] devlink: Extend devlink port documentation for subfunctions saeed
2020-12-09  7:29 ` [PATCH net-next v2 14/14] net/mlx5: Add devlink subfunction port documentation saeed
2020-12-11  4:11 ` [PATCH net-next v2 00/14] Add mlx5 subfunction support Samudrala, Sridhar
2020-12-11  8:33   ` Parav Pandit [this message]

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=BY5PR12MB43227784BB34D929CA64E315DCCA0@BY5PR12MB4322.namprd12.prod.outlook.com \
    --to=parav@nvidia.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=david.m.ertman@intel.com \
    --cc=dsahern@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jgg@nvidia.com \
    --cc=kiran.patil@intel.com \
    --cc=kuba@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=saeed@kernel.org \
    --cc=sridhar.samudrala@intel.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).