From: Yuanhan Liu <yliu@fridaylinux.org>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: dev@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] vhost: add flag for built-in virtio_net.c driver
Date: Thu, 1 Feb 2018 22:46:11 +0800 [thread overview]
Message-ID: <20180201144611.GP29540@yliu-mob> (raw)
In-Reply-To: <20180131174651.6386-2-stefanha@redhat.com>
Hi Stefan,
On Wed, Jan 31, 2018 at 05:46:50PM +0000, Stefan Hajnoczi wrote:
> The librte_vhost API is used in two ways:
> 1. As a vhost net device backend via rte_vhost_enqueue/dequeue_burst().
This is how DPDK vhost-user firstly implemented.
> 2. As a library for implementing vhost device backends.
This is how DPDK vhost-use extended later, and vhost-user scsi is
the first one being added.
> There is no distinction between the two at the API level or in the
> librte_vhost implementation. For example, device state is kept in
> "struct virtio_net" regardless of whether this is actually a net device
> backend or whether the built-in virtio_net.c driver is in use.
Indeed. virtio_net should be renamed to "vhost_dev" or something like
this. It's part of something un-finished in the last vhost-user extension
refactoring.
>
> The virtio_net.c driver should be a librte_vhost API client just like
> the vhost-scsi code and have no special access to vhost.h internals.
> Unfortunately, fixing this requires significant librte_vhost API
> changes.
The way I thought was to move the virtio_net.c completely to vhost
pmd (drivers/net/vhost). And let vhost-user just be a generic lib
without any device specific stuff.
Unfortunately, it can not be done recently, as there are still a lot
of applications using rte_vhost_enqueue/dequeue_burst directly, for
example, OVS.
> This patch takes a different approach: keep the librte_vhost API
> unchanged but track whether the built-in virtio_net.c driver is in use.
> See the next patch for a bug fix that requires knowledge of whether
> virtio_net.c is in use.
LGTM.
Thanks.
--yliu
next prev parent reply other threads:[~2018-02-01 14:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 17:46 [dpdk-dev] [PATCH 0/2] vhost: fix VIRTIO_NET_F_MQ vhost_scsi breakage Stefan Hajnoczi
2018-01-31 17:46 ` [dpdk-dev] [PATCH 1/2] vhost: add flag for built-in virtio_net.c driver Stefan Hajnoczi
2018-02-01 14:46 ` Yuanhan Liu [this message]
2018-01-31 17:46 ` [dpdk-dev] [PATCH 2/2] vhost: only drop vqs with " Stefan Hajnoczi
2018-01-31 18:07 ` Maxime Coquelin
[not found] ` <20180201102428.GA5783@stefanha-x1.localdomain>
2018-02-01 12:49 ` Maxime Coquelin
2018-02-01 12:58 ` [dpdk-dev] [PATCH 0/2] vhost: fix VIRTIO_NET_F_MQ vhost_scsi breakage Maxime Coquelin
2018-02-05 14:20 ` Ferruh Yigit
2018-02-01 14:46 ` Yuanhan Liu
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=20180201144611.GP29540@yliu-mob \
--to=yliu@fridaylinux.org \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stefanha@redhat.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).