From: Stefano Garzarella <sgarzare@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: virtualization <virtualization@lists.linux-foundation.org>,
Parav Pandit <parav@nvidia.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vdpa: add driver_override support
Date: Fri, 5 Nov 2021 09:31:08 +0100 [thread overview]
Message-ID: <20211105083108.kfubtzdbucs2drzs@steredhat> (raw)
In-Reply-To: <CACGkMEvNZKc2K_bdKxiUmbLzoZL-Vdbc14+uw9Ro-2jzdFMRRw@mail.gmail.com>
On Fri, Nov 05, 2021 at 04:26:44PM +0800, Jason Wang wrote:
>On Fri, Nov 5, 2021 at 4:05 PM Stefano Garzarella <sgarzare@redhat.com> wrote:
>>
>> On Fri, Nov 05, 2021 at 11:01:30AM +0800, Jason Wang wrote:
>> >On Fri, Nov 5, 2021 at 12:17 AM Stefano Garzarella <sgarzare@redhat.com> wrote:
>> >>
>> >> `driver_override` allows to control which of the vDPA bus drivers
>> >> binds to a vDPA device.
>> >>
>> >> If `driver_override` is not set, the previous behaviour is followed:
>> >> devices use the first vDPA bus driver loaded (unless auto binding
>> >> is disabled).
>> >>
>> >> Tested on Fedora 34 with driverctl(8):
>> >> $ modprobe virtio-vdpa
>> >> $ modprobe vhost-vdpa
>> >> $ modprobe vdpa-sim-net
>> >>
>> >> $ vdpa dev add mgmtdev vdpasim_net name dev1
>> >>
>> >> # dev1 is attached to the first vDPA bus driver loaded
>> >> $ driverctl -b vdpa list-devices
>> >> dev1 virtio_vdpa
>> >>
>> >> $ driverctl -b vdpa set-override dev1 vhost_vdpa
>> >>
>> >> $ driverctl -b vdpa list-devices
>> >> dev1 vhost_vdpa [*]
>> >>
>> >> Note: driverctl(8) integrates with udev so the binding is
>> >> preserved.
>> >>
>> >> Suggested-by: Jason Wang <jasowang@redhat.com>
>> >> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
>> >> ---
>> >> include/linux/vdpa.h | 2 ++
>> >> drivers/vdpa/vdpa.c | 74 ++++++++++++++++++++++++++++++++++++++++++++
>> >> 2 files changed, 76 insertions(+)
>> >>
>> >> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
>> >> index c3011ccda430..ae34015b37b7 100644
>> >> --- a/include/linux/vdpa.h
>> >> +++ b/include/linux/vdpa.h
>> >> @@ -64,6 +64,7 @@ struct vdpa_mgmt_dev;
>> >> * struct vdpa_device - representation of a vDPA device
>> >> * @dev: underlying device
>> >> * @dma_dev: the actual device that is performing DMA
>> >> + * @driver_override: driver name to force a match
>> >
>> >This seems useless?
>>
>> I'm a bit lost, do you mean we should remove the documentation of
>> `driver_override`?
>
>I misread the code which was misled by vdpa_mgmt_dev above:(
Yeah, the same thing happened to me now while double checking ;-)
>
>The code should be fine.
>
>So:
>
>Acked-by: Jason Wang <jasowang@redhat.com>
>
Thanks,
Stefano
next prev parent reply other threads:[~2021-11-05 8:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 16:17 [PATCH] vdpa: add driver_override support Stefano Garzarella
2021-11-05 3:01 ` Jason Wang
2021-11-05 8:04 ` Stefano Garzarella
2021-11-05 8:26 ` Jason Wang
2021-11-05 8:31 ` Stefano Garzarella [this message]
2021-11-08 17:05 ` Stefano Garzarella
2021-11-09 13:10 ` Michael S. Tsirkin
2021-11-09 13:31 ` Stefano Garzarella
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=20211105083108.kfubtzdbucs2drzs@steredhat \
--to=sgarzare@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=parav@nvidia.com \
--cc=virtualization@lists.linux-foundation.org \
/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