Thread (22 messages) read the whole thread 22 messages, 5 authors, 2017-07-19

Re: [PATCH v3] examples/vhost: introduce a new vhost-user-scsi sample application

From: Yuanhan Liu <hidden>
Date: 2017-07-07 09:44:28

On Fri, Jul 07, 2017 at 02:10:57PM +0530, Hemant Agrawal wrote:
On 7/7/2017 10:37 AM, Yuanhan Liu wrote:
quoted
On Sat, Jul 08, 2017 at 01:21:37PM +0800, Changpeng Liu wrote:
quoted
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 <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help