From: Alexander Duyck <alexander.duyck@gmail.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-pci <linux-pci@vger.kernel.org>,
linux-rdma@vger.kernel.org, Netdev <netdev@vger.kernel.org>,
Don Dutile <ddutile@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH mlx5-next v6 0/4] Dynamically assign MSI-X vectors count
Date: Tue, 9 Feb 2021 13:06:25 -0800 [thread overview]
Message-ID: <CAKgT0Ud+c6wzo3n_8VgtVBQm-2UPic6U2QFuqqN-P9nEv_Y+JQ@mail.gmail.com> (raw)
In-Reply-To: <20210209133445.700225-1-leon@kernel.org>
On Tue, Feb 9, 2021 at 5:34 AM Leon Romanovsky <leon@kernel.org> wrote:
>
> From: Leon Romanovsky <leonro@nvidia.com>
<snip>
> --------------------------------------------------------------------
> Hi,
>
> The number of MSI-X vectors is PCI property visible through lspci, that
> field is read-only and configured by the device.
>
> The static assignment of an amount of MSI-X vectors doesn't allow utilize
> the newly created VF because it is not known to the device the future load
> and configuration where that VF will be used.
>
> The VFs are created on the hypervisor and forwarded to the VMs that have
> different properties (for example number of CPUs).
>
> To overcome the inefficiency in the spread of such MSI-X vectors, we
> allow the kernel to instruct the device with the needed number of such
> vectors, before VF is initialized and bounded to the driver.
>
> Before this series:
> [root@server ~]# lspci -vs 0000:08:00.2
> 08:00.2 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5 Virtual Function]
> ....
> Capabilities: [9c] MSI-X: Enable- Count=12 Masked-
>
> Configuration script:
> 1. Start fresh
> echo 0 > /sys/bus/pci/devices/0000\:08\:00.0/sriov_numvfs
> modprobe -q -r mlx5_ib mlx5_core
> 2. Ensure that driver doesn't run and it is safe to change MSI-X
> echo 0 > /sys/bus/pci/devices/0000\:08\:00.0/sriov_drivers_autoprobe
> 3. Load driver for the PF
> modprobe mlx5_core
> 4. Configure one of the VFs with new number
> echo 2 > /sys/bus/pci/devices/0000\:08\:00.0/sriov_numvfs
> echo 21 > /sys/bus/pci/devices/0000\:08\:00.2/sriov_vf_msix_count
>
> After this series:
> [root@server ~]# lspci -vs 0000:08:00.2
> 08:00.2 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5 Virtual Function]
> ....
> Capabilities: [9c] MSI-X: Enable- Count=21 Masked-
>
> Thanks
>
> Leon Romanovsky (4):
> PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs
> net/mlx5: Add dynamic MSI-X capabilities bits
> net/mlx5: Dynamically assign MSI-X vectors count
> net/mlx5: Allow to the users to configure number of MSI-X vectors
>
> Documentation/ABI/testing/sysfs-bus-pci | 28 ++++
> .../net/ethernet/mellanox/mlx5/core/main.c | 17 ++
> .../ethernet/mellanox/mlx5/core/mlx5_core.h | 27 ++++
> .../net/ethernet/mellanox/mlx5/core/pci_irq.c | 72 +++++++++
> .../net/ethernet/mellanox/mlx5/core/sriov.c | 58 ++++++-
> drivers/pci/iov.c | 153 ++++++++++++++++++
> include/linux/mlx5/mlx5_ifc.h | 11 +-
> include/linux/pci.h | 12 ++
> 8 files changed, 375 insertions(+), 3 deletions(-)
>
This seems much improved from the last time I reviewed the patch set.
I am good with the drop of the folder in favor of using "sriov" in the
naming of the fields.
For the series:
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
next prev parent reply other threads:[~2021-02-09 21:54 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 13:34 [PATCH mlx5-next v6 0/4] Dynamically assign MSI-X vectors count Leon Romanovsky
2021-02-09 13:34 ` [PATCH mlx5-next v6 1/4] PCI: Add sysfs callback to allow MSI-X table size change of SR-IOV VFs Leon Romanovsky
2021-02-15 21:01 ` Bjorn Helgaas
2021-02-16 7:33 ` Leon Romanovsky
2021-02-16 16:12 ` Bjorn Helgaas
2021-02-16 19:58 ` Leon Romanovsky
2021-02-17 18:02 ` Bjorn Helgaas
2021-02-17 19:25 ` Jason Gunthorpe
2021-02-17 20:28 ` Bjorn Helgaas
2021-02-17 23:52 ` Jason Gunthorpe
2021-02-18 10:15 ` Leon Romanovsky
2021-02-18 22:39 ` Bjorn Helgaas
2021-02-19 7:52 ` Leon Romanovsky
2021-02-19 8:20 ` Greg Kroah-Hartman
2021-02-19 16:58 ` Leon Romanovsky
2021-02-20 19:06 ` Bjorn Helgaas
2021-02-21 6:59 ` Leon Romanovsky
2021-02-23 21:07 ` Bjorn Helgaas
2021-02-24 8:09 ` Greg Kroah-Hartman
2021-02-24 21:37 ` Don Dutile
2021-02-24 9:53 ` Leon Romanovsky
2021-02-24 15:07 ` Bjorn Helgaas
2021-02-21 13:00 ` Greg Kroah-Hartman
2021-02-21 13:55 ` Leon Romanovsky
2021-02-21 15:01 ` Greg Kroah-Hartman
2021-02-21 15:30 ` Leon Romanovsky
2021-02-16 20:37 ` Jason Gunthorpe
2021-02-09 13:34 ` [PATCH mlx5-next v6 2/4] net/mlx5: Add dynamic MSI-X capabilities bits Leon Romanovsky
2021-02-09 13:34 ` [PATCH mlx5-next v6 3/4] net/mlx5: Dynamically assign MSI-X vectors count Leon Romanovsky
2021-02-09 13:34 ` [PATCH mlx5-next v6 4/4] net/mlx5: Allow to the users to configure number of MSI-X vectors Leon Romanovsky
2021-02-09 21:06 ` Alexander Duyck [this message]
2021-02-14 5:24 ` [PATCH mlx5-next v6 0/4] Dynamically assign MSI-X vectors count Leon Romanovsky
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=CAKgT0Ud+c6wzo3n_8VgtVBQm-2UPic6U2QFuqqN-P9nEv_Y+JQ@mail.gmail.com \
--to=alexander.duyck@gmail.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=davem@davemloft.net \
--cc=ddutile@redhat.com \
--cc=jgg@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@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 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).