From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by dpdk.org (Postfix) with ESMTP id 7AD07235 for ; Fri, 7 Jul 2017 11:44:28 +0200 (CEST) Received: by mail-pf0-f196.google.com with SMTP id c24so3905516pfe.1 for ; Fri, 07 Jul 2017 02:44:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9jFlcxqfH5VBDRXpGFaZOhEna09gFFUhU0/0vRgyFK8=; b=JTtEpbXYuQ6wmbksd66Ygz/y2aQmMyDvKz0WF/hbcap+DU43K9EpX6TXUeII4OYGQH 2uLYAepBPqwTKORcAKPU6f47jGk8XBCR350Qik3/Ky8r3NPbHsBrntvdd8yp+KwI/SKc a2FTgjl80uF5+a2JNvL/hiKTcoYIqAx6sDGa1q5edpy0P2Vf33JbjOi9ZEKA8rUVKDZY Kyu+lcwiZvuMnazUwxCCvQ2xaIe06LwCz6HgC26HrftiAisirmoZeejZqYAuoN6nsjdL gRi4EuiQGZfsrE8ssS9RlYQqDIbBRj3pETbek9pZlBpP1isnsWkyr2P+KhFkfAS14+6P NnSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9jFlcxqfH5VBDRXpGFaZOhEna09gFFUhU0/0vRgyFK8=; b=ucvWbbxzlKJh92HYEvkdmOjINqTeEJ2/8wyQqaYLwP8RdR4lfPF7+FR19l0xhP44cu xLwCdL/7jCO26E0KZU3r9kTkdYJbNESaKu+5ho4ss1JoRDWL+WugYFiGdpqhkkVQP2N1 +3wJFCnUIyXzawqOeh7sUi3IoMonw/jbWTCLNjbfexDiDT5QkR7KnqQ6vAIB22tOkAVm H3yMSB2rj8pceg0bfbfFyJokU9z0/qfRzNicAIayYxq64346exq7dUXwqLFYh8vHrgpc KlTP7xvXBLIKE0gwYGPkI6sfUNIexFBtUO4lHfBunv7g/ppcHLpgldSNueXV5cer9egR JrnQ== X-Gm-Message-State: AIVw1118u4+hJwxu1/x78BXOCnVzArcTu11JePopJNriH0k9Szkg6y81 ikMtfnMVwdni05G0 X-Received: by 10.84.218.136 with SMTP id r8mr2006025pli.205.1499420667584; Fri, 07 Jul 2017 02:44:27 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id h90sm6419166pfh.133.2017.07.07.02.44.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Jul 2017 02:44:26 -0700 (PDT) Date: Fri, 7 Jul 2017 17:44:19 +0800 From: Yuanhan Liu To: Hemant Agrawal Cc: Changpeng Liu , dev@dpdk.org, Thomas Monjalon Message-ID: <20170707094419.GY11626@yliu-home> References: <1499487291-17053-1-git-send-email-changpeng.liu@intel.com> <1499491297-17800-1-git-send-email-changpeng.liu@intel.com> <20170707050734.GW11626@yliu-home> <0d8dbc6e-c6b3-4c75-18e7-5874f640f517@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d8dbc6e-c6b3-4c75-18e7-5874f640f517@nxp.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH v3] examples/vhost: introduce a new vhost-user-scsi sample application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jul 2017 09:44:28 -0000 On Fri, Jul 07, 2017 at 02:10:57PM +0530, Hemant Agrawal wrote: > On 7/7/2017 10:37 AM, Yuanhan Liu wrote: > >On Sat, Jul 08, 2017 at 01:21:37PM +0800, Changpeng Liu wrote: > >>vhost-user protocol is common to many virtio devices, such as > >>virtio_net/virtio_scsi/virtio_blk. Since DPDK vhost library > >>removed the NET specific data structures, the vhost library > >>is common to other virtio devices, such as virtio-scsi. > >> > >>Here we introduce a simple memory based block device that > >>can be presented to Guest VM through vhost-user-scsi-pci > >>controller. Similar with vhost-net, the sample application > >>will process the I/Os sent via virt rings. > >> > >>Signed-off-by: Changpeng Liu > > > >Applied to dpdk-next-virtio. > > > > Though my comment is late. > I am just wondering if it is not better to refactor the existing vhost > applications and add this as a mode instead of adding one more sample > application? Ideally, yes. However, I don't find a straightforward way to do that for this scsi example, for following reasons: - Current vhost switch example was not well designed. Worse, it has has few NIC features bond, say VMDq and VLAN. - Vhost switch is for networking, while this one is for storage. To let them co-exist in one app, we have to firstly refactor current vhost-user example, which should be a big rework that I don't think it's worthwhile. Or, maybe we could put vhost_switch and vhost_scsi into one dir (say "vhost") under examples and let them look like one example (with 2 standalone apps), like what we did for multi_process examples? And we probably could do more, for example, the l2fwd, l3fwd and their variants? However, IMO, it just make the examples dir more cleanly, nothing else. Except someone will spend more time to refactor them, such as removing the duplicate code and introduce them as helper functions. Again, It may not be that worthwhile, judging that they are just examples. --yliu