From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 0214F1DB1 for ; Thu, 21 Apr 2016 10:52:02 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id v188so235058683wme.1 for ; Thu, 21 Apr 2016 01:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FGzWYTOEF6otQZl1mVVjttmjCvJ5xJQOE5LN7DMq2AE=; b=JfyuV/62Pgb0qXWRq8tpPFmUE0z500/8nouR105rljvSqQwu6aGxbGbnJucEvUES3R lpBhU3Tm/80DAoUfk9g/a8sSe+7ij6/5cg/pyGsZowpnmjA4p/LPixdZP+IDdS7PqFLC /xHuAsX2EUqfrrHKg0xMSP+wtfI6MIwfaTKXwXkuWh1ZfPEfK4MM9lwqTxKnC6tYbZh/ 2cxUMxWSabSK2o4vIqQbL8EohXOrzf9icGVeeFyGUC7vVUwLMvvxVR4le2sArlxmSEPB /fXijrNRS3axvTJl9J+cmWpUNXXEUjzL2h8Qer+lhIVz3ra9J6QNH5oqZMu1mtanlrEi xnew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FGzWYTOEF6otQZl1mVVjttmjCvJ5xJQOE5LN7DMq2AE=; b=XvNR7GfVVlIiEjLmDRhDU7acVs2cGAliVIaEdML0SR1zfMBNOI56EnSbOZznj05U6U p3yYokRoT4IeY/EJVTTO2B4p6Lkb90A7li5FDODc0Zv0J7Mv7L972q300jSulAGJTBYn AeHtE8h+8CCSlYR7j+4GVwB2btfIbNiRkJopNknCi0iq4TOnk2GUKMUirCRmlB7uCFf6 xVjoER2LgQxCvP1PSzWPPa/+Jq10DlRaQCMaIyOqYXWd3jKzBp465mWP9zaEHYuGzZn1 p3g7bNcQ1v6xzsnDnj3D+IkDsXaOP9s0lYSEgDEiHuFqvio7o2HpxjbvfNoax/t6Brrs kYeQ== X-Gm-Message-State: AOPr4FW2jugB5kYn4xtfT/pbB2OrgIYYFSi1tWUQ9dPSxWcBU3L4LRY2qPwsY8yyLMKupXU9Wjq+Gka2tv/w1FJy X-Received: by 10.194.14.130 with SMTP id p2mr13753394wjc.173.1461228721790; Thu, 21 Apr 2016 01:52:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.96.2 with HTTP; Thu, 21 Apr 2016 01:51:42 -0700 (PDT) In-Reply-To: <1461207396-42742-3-git-send-email-jianfeng.tan@intel.com> References: <1446748276-132087-1-git-send-email-jianfeng.tan@intel.com> <1461207396-42742-1-git-send-email-jianfeng.tan@intel.com> <1461207396-42742-3-git-send-email-jianfeng.tan@intel.com> From: David Marchand Date: Thu, 21 Apr 2016 10:51:42 +0200 Message-ID: To: Jianfeng Tan Cc: "dev@dpdk.org" , Huawei Xie , rich.lane@bigswitch.com, Yuanhan Liu , "Michael S. Tsirkin" , nakajima.yoshihiro@lab.ntt.co.jp, p.fedin@samsung.com, "Qiu, Michael" , ann.zhuangyanying@huawei.com, Tetsuya Mukawa , nhorman@tuxdrver.com Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH v3 2/2] virtio/vdev: add a new vdev named eth_cvio X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2016 08:52:02 -0000 Hello, On Thu, Apr 21, 2016 at 4:56 AM, Jianfeng Tan wrote: > Add a new virtual device named eth_cvio, it can be used just like > eth_ring, eth_null, etc. > > Configured parameters include: > - rx (optional, 1 by default), number of rx, not used for now. > - tx (optional, 1 by default), number of tx, not used for now. > - cq (optional, 0 by default), not supported for now. > - mac (optional), random value will be given if not specified. > - queue_size (optional, 256 by default), size of virtqueue. > - path (madatory), path of vhost, depends on the file type, vhost > user if the given path points to a unix socket; vhost-net if the > given path points to a char device. > - ifname (optional), specify the name of backend tap device; only > valid when backend is vhost-net. > > The major difference with original virtio for vm is that, here we use > virtual addr instead of physical addr for vhost to calculate relative > address. > > When enable CONFIG_RTE_VIRTIO_VDEV (enabled by default), the compiled > library can be used in both VM and container environment. This implementation heavily relies on dev_type to keep as much code shared between pci / vdev path as possible. virtio code relies on drv_flags (even updating it while this should be per-device). So first, virtio should rely on dev_flags. The rest needs to be astracted in some virtio ops ? Thanks. -- David Marchand