linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Tiwei Bie <tiwei.bie@intel.com>
Cc: mst@redhat.com, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, dan.daly@intel.com,
	cunming.liang@intel.com, zhihong.wang@intel.com,
	lingshan.zhu@intel.com
Subject: Re: [RFC] vhost_mdev: add network control vq support
Date: Thu, 31 Oct 2019 09:44:11 +0800	[thread overview]
Message-ID: <b1ab03ec-edb0-f955-2719-beb0653feed1@redhat.com> (raw)
In-Reply-To: <20191030115433.GA27220@___>


On 2019/10/30 下午7:54, Tiwei Bie wrote:
> On Wed, Oct 30, 2019 at 03:04:37PM +0800, Jason Wang wrote:
>> On 2019/10/30 下午2:17, Tiwei Bie wrote:
>>> On Tue, Oct 29, 2019 at 06:51:32PM +0800, Jason Wang wrote:
>>>> On 2019/10/29 下午6:17, Tiwei Bie wrote:
>>>>> This patch adds the network control vq support in vhost-mdev.
>>>>> A vhost-mdev specific op is introduced to allow parent drivers
>>>>> to handle the network control commands come from userspace.
>>>> Probably work for userspace driver but not kernel driver.
>>> Exactly. This is only for userspace.
>>>
>>> I got your point now. In virtio-mdev kernel driver case,
>>> the ctrl-vq can be special as well.
>>>
>> Then maybe it's better to introduce vhost-mdev-net on top?
>>
>> Looking at the other type of virtio device:
>>
>> - console have two control virtqueues when multiqueue port is enabled
>>
>> - SCSI has controlq + eventq
>>
>> - GPU has controlq
>>
>> - Crypto device has one controlq
>>
>> - Socket has eventq
>>
>> ...
> Thanks for the list! It looks dirty to define specific
> commands and types in vhost UAPI for each of them in the
> future. It's definitely much better to find an approach
> to solve it once for all if possible..
>
> Just a quick thought, considering all vhost-mdev does
> is just to forward settings between parent and userspace,
> I'm wondering whether it's possible to make the argp
> opaque in vhost-mdev UAPI and just introduce one generic
> ioctl command to deliver these device specific commands
> (which are opaque in vhost-mdev as vhost-mdev just pass
> the pointer -- argp) defined by spec.


It looks that using opaque pointer is probably not good for UAPI. And we 
need also invent API for eventq.


>
> I'm also fine with exposing ctrlq to userspace directly.
> PS. It's interesting that some devices have more than
> one ctrlq. I need to take a close look first..


Thanks.


>
>
>> Thanks
>>


      reply	other threads:[~2019-10-31  1:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 10:17 [RFC] vhost_mdev: add network control vq support Tiwei Bie
2019-10-29 10:51 ` Jason Wang
2019-10-30  6:17   ` Tiwei Bie
2019-10-30  7:04     ` Jason Wang
2019-10-30 11:54       ` Tiwei Bie
2019-10-31  1:44         ` Jason Wang [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=b1ab03ec-edb0-f955-2719-beb0653feed1@redhat.com \
    --to=jasowang@redhat.com \
    --cc=cunming.liang@intel.com \
    --cc=dan.daly@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=lingshan.zhu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=tiwei.bie@intel.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=zhihong.wang@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).