[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210330150019.GA1270419@bjorn-Precision-5520>
Date: Tue, 30 Mar 2021 10:00:19 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Alexander Duyck <alexander.duyck@...il.com>,
Keith Busch <kbusch@...nel.org>,
Leon Romanovsky <leon@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Saeed Mahameed <saeedm@...dia.com>,
Jakub Kicinski <kuba@...nel.org>,
linux-pci <linux-pci@...r.kernel.org>,
linux-rdma@...r.kernel.org, Netdev <netdev@...r.kernel.org>,
Don Dutile <ddutile@...hat.com>,
Alex Williamson <alex.williamson@...hat.com>,
"David S . Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH mlx5-next v7 0/4] Dynamically assign MSI-X vectors count
On Tue, Mar 30, 2021 at 10:57:38AM -0300, Jason Gunthorpe wrote:
> On Mon, Mar 29, 2021 at 08:29:49PM -0500, Bjorn Helgaas wrote:
>
> > I think I misunderstood Greg's subdirectory comment. We already have
> > directories like this:
>
> Yes, IIRC, Greg's remark applies if you have to start creating
> directories with manual kobjects.
>
> > and aspm_ctrl_attr_group (for "link") is nicely done with static
> > attributes. So I think we could do something like this:
> >
> > /sys/bus/pci/devices/0000:01:00.0/ # PF directory
> > sriov/ # SR-IOV related stuff
> > vf_total_msix
> > vf_msix_count_BB:DD.F # includes bus/dev/fn of first VF
> > ...
> > vf_msix_count_BB:DD.F # includes bus/dev/fn of last VF
>
> It looks a bit odd that it isn't a subdirectory, but this seems
> reasonable.
Sorry, I missed your point; you'll have to lay it out more explicitly.
I did intend that "sriov" *is* a subdirectory of the 0000:01:00.0
directory. The full paths would be:
/sys/bus/pci/devices/0000:01:00.0/sriov/vf_total_msix
/sys/bus/pci/devices/0000:01:00.0/sriov/vf_msix_count_BB:DD.F
...
> > For NVMe, a write to vf_msix_count_* would have to auto-offline the VF
> > before asking the PF to assign the vectors, as Jason suggests above.
>
> It is also not awful if it returns EBUSY if the admin hasn't done
> some device-specific offline sequence.
Agreed. The concept of "offline" is not visible in this interface.
> I'm just worried adding the idea of offline here is going to open a
> huge can of worms in terms of defining what it means, and the very
> next ask will be to start all VFs in offline mode. This would be some
> weird overlap with the no-driver-autoprobing sysfs. We've been
> thinking about this alot here and there are not easy answers.
We haven't added any idea of offline in the sysfs interface. I'm
only trying to figure out whether it would be possible to use this
interface on top of devices with an offline concept, e.g., NVMe.
> mlx5 sort of has an offline concept too, but we have been modeling it
> in devlink, which is kind of like nvme-cli for networking.
>
> Jason
Powered by blists - more mailing lists