[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Nov 2019 15:14:30 +0100
From: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Parav Pandit <parav@...lanox.com>,
David M <david.m.ertman@...el.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Saeed Mahameed <saeedm@...lanox.com>,
"kwankhede@...dia.com" <kwankhede@...dia.com>,
"leon@...nel.org" <leon@...nel.org>,
"cohuck@...hat.com" <cohuck@...hat.com>,
Jiri Pirko <jiri@...lanox.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Or Gerlitz <gerlitz.or@...il.com>
Subject: Re: [PATCH net-next 00/19] Mellanox, mlx5 sub function support
On Mon, Nov 11, 2019 at 02:30:26PM +0100, Jiri Pirko wrote:
> Mon, Nov 11, 2019 at 04:46:01AM CET, jakub.kicinski@...ronome.com wrote:
> >On Sun, 10 Nov 2019 10:18:55 +0100, gregkh@...uxfoundation.org wrote:
> >> > What I'm missing is why is it so bad to have a driver register to
> >> > multiple subsystems.
> >>
> >> Because these PCI devices seem to do "different" things all in one PCI
> >> resource set. Blame the hardware designers :)
> >
> >See below, I don't think you can blame the HW designers in this
> >particular case :)
> >
> >> > For the nfp I think the _real_ reason to have a bus was that it
> >> > was expected to have some out-of-tree modules bind to it. Something
> >> > I would not encourage :)
> >>
> >> That's not ok, and I agree with you.
> >>
> >> But there seems to be some more complex PCI devices that do lots of
> >> different things all at once. Kind of like a PCI device that wants to
> >> be both a keyboard and a storage device at the same time (i.e. a button
> >> on a disk drive...)
> >
> >The keyboard which is also a storage device may be a clear cut case
> >where multiple devices were integrated into one bus endpoint.
>
> Also, I think that very important differentiator between keyboard/button
> and NIC is that keyboard/button is fixed. You have driver bus with 2
> devices on constant addresses.
>
> However in case of NIC subfunctions. You have 0 at he beginning and user
> instructs to create more (maybe hundreds). Now important questions
> appear:
>
> 1) How to create devices (what API) - mdev has this figured out
> 2) How to to do the addressing of the devices. Needs to be
> predictable/defined by the user - mdev has this figured out
> 3) Udev names of netdevices - udev names that according to the
> bus/address. That is straightforeward with mdev.
> I can't really see how to figure this one in particular with
> per-driver busses :/
Are network devices somehow only allowed to be on mdev busses?
No, don't be silly, userspace handles this just fine today on any type
of bus, it's not an issue.
You don't have to like individual "driver busses", but you had better
not be using a fake platform device to use mdev. That's my main
objection...
thanks,
greg k-h
Powered by blists - more mailing lists