Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp773725ybx; Wed, 30 Oct 2019 04:56:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhrnKtFIeMhLQmcPcfCp9V1uLTfPYq9MFBOEerDEe0cWuPWqTI07BUEp6KH2hCAIu7tWFN X-Received: by 2002:a05:6402:1e3:: with SMTP id i3mr24315460edy.222.1572436609517; Wed, 30 Oct 2019 04:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572436609; cv=none; d=google.com; s=arc-20160816; b=kTZJMJtfiv1MNbzqCUpLeFieSX52GKqEqxM01fl5hLBMdLifqsY1XJBxxpholnvi9i 5d5zXQhPXk7NKfdbY/1Ya1czA6m++2TEPwZob/vxAL7TfodcQDcajlMNdj7QqJpNgYAO zoy9sTkGR7FBRJs/Ek+9yacPa9tFKo6M4ePVEq8IBHFn88M566BUGtswwQ1pd8GPOlXc 9kemqDd+SQ9A2Ti1yUm7aa/OXq/kNlIlWspxy7Ojk816FhJ7rikt9qkC9scyHuvWkKep 5/8Udk82pIfj/xmrcMuEk2GADqhWlnsHWTtVsNQwoRSypzLBh8Ecna/Am+fSr4n8eBxi Ba+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=DbWrWuc4DewCA/AkZLrNgF6Y4gqy0Gk/aLKfZRfkwVA=; b=fU7YJSbNlXnAa1REdPIUrUrg0XW50zfg8pGl7jhg0EtZtSjcL/QeZma7OGWbqnfCz1 ZqwKm9ldipypLzLIpy1dm2nOjKaERv1z3syEdSW7kPNPG9X970WEn2VGe+gQ8NY8Fq/v LYZggnqkgnO+RdzBEs3xBBBFDxd5iNNli+e7Hv9jSx5L3BMg88IYEhX8jF3TWDUioHyj r/wnTAJB7b7AfeF15iNTdFd6fnReCTrPo4Yb7nENYtn5HBQJ1gVRWRpPatHULs27ZJkg R4jLXhW3aB7nyR3EOcqRqb4ha5hwRQcJCQpfIPY+lWXvIkTs5SeT23SdepH4cSWQ0wx7 +iYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si1442331edj.424.2019.10.30.04.56.26; Wed, 30 Oct 2019 04:56:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbfJ3Lxq (ORCPT + 99 others); Wed, 30 Oct 2019 07:53:46 -0400 Received: from mga06.intel.com ([134.134.136.31]:43399 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbfJ3Lxq (ORCPT ); Wed, 30 Oct 2019 07:53:46 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 04:53:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,247,1569308400"; d="scan'208";a="401479933" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.74]) by fmsmga006.fm.intel.com with ESMTP; 30 Oct 2019 04:53:43 -0700 Date: Wed, 30 Oct 2019 19:54:33 +0800 From: Tiwei Bie To: Jason Wang 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 Message-ID: <20191030115433.GA27220@___> References: <20191029101726.12699-1-tiwei.bie@intel.com> <59474431-9e77-567c-9a46-a3965f587f65@redhat.com> <20191030061711.GA11968@___> <39aa9f66-8e58-ea63-5795-7df8861ff3a0@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <39aa9f66-8e58-ea63-5795-7df8861ff3a0@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 >