DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost
@ 2017-01-23 13:04 Yuanhan Liu
  2017-02-13 18:02 ` Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Yuanhan Liu @ 2017-01-23 13:04 UTC (permalink / raw)
  To: dev; +Cc: Thomas Monjalon, Maxime Coquelin, John McNamara, Yuanhan Liu

I made a vhost ABI/API refactoring at v16.04, meant to avoid such issue
forever. Well, apparently, I lied.

People are looking for more vhost-user options now days, other than
vhost-user net only. For example, SPDK (Storage Performance Development
Kit) are looking for chance of vhost-user SCSI and vhost-user block.

Apparently, they also need a vhost-user backend, while DPDK already
has a (mature enough) backend, they don't want to implement it again
from scratch. They want to leverage the one DPDK provides.

However, the last refactoring hasn't done that right, at least it's
not friendly for extending vhost-user to add more devices support.
For example, different virtio devices has its own feature set, while
APIs like rte_vhost_feature_disable(feature_mask) have no option to
tell the device type. Thus, a more proper API should look like:

    rte_vhost_feature_disable(device_type, feature_mask);

Besides that, few public files and structures should be renamed, to
not let it bind to virtio-net. Specifically, they are:

- virtio_net_device_ops --> vhost_device_ops
- rte_virtio_net.h      --> rte_vhost.h

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---

I intended to send out the code first (I have already finished the
better part of it), while I'm starting vacation since tomorrow, leaving
me no time for that.
---
 doc/guides/rel_notes/deprecation.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 755dc65..5d6e9b6 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -62,3 +62,12 @@ Deprecation Notices
   PMDs that implement the latter.
   Target release for removal of the legacy API will be defined once most
   PMDs have switched to rte_flow.
+
+* vhost: API/ABI changes are planned for 17.05, for making DPDK vhost library
+  generic enough so that applications can build different vhost-user drivers
+  (instead of vhost-user net only) on top of that.
+  Specifically, ``virtio_net_device_ops`` will be renamed to ``vhost_device_ops``.
+  Correspondingly, some API's parameter need be changed. Few more functions also
+  need be reworked to let it be device aware. For example, different virtio device
+  has different feature set, meaning functions like ``rte_vhost_feature_disable``
+  need be changed. Last, file rte_virtio_net.h will be renamed to rte_vhost.h.
-- 
1.9.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost
  2017-01-23 13:04 [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost Yuanhan Liu
@ 2017-02-13 18:02 ` Thomas Monjalon
  2017-02-14  3:21   ` Jerin Jacob
  2017-02-14 13:54 ` Maxime Coquelin
  2017-02-14 20:28 ` Thomas Monjalon
  2 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2017-02-13 18:02 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dev, Maxime Coquelin, John McNamara, Ben Walker

2017-01-23 21:04, Yuanhan Liu:
> I made a vhost ABI/API refactoring at v16.04, meant to avoid such issue
> forever. Well, apparently, I lied.
> 
> People are looking for more vhost-user options now days, other than
> vhost-user net only. For example, SPDK (Storage Performance Development
> Kit) are looking for chance of vhost-user SCSI and vhost-user block.
> 
> Apparently, they also need a vhost-user backend, while DPDK already
> has a (mature enough) backend, they don't want to implement it again
> from scratch. They want to leverage the one DPDK provides.
> 
> However, the last refactoring hasn't done that right, at least it's
> not friendly for extending vhost-user to add more devices support.
> For example, different virtio devices has its own feature set, while
> APIs like rte_vhost_feature_disable(feature_mask) have no option to
> tell the device type. Thus, a more proper API should look like:
> 
>     rte_vhost_feature_disable(device_type, feature_mask);
> 
> Besides that, few public files and structures should be renamed, to
> not let it bind to virtio-net. Specifically, they are:
> 
> - virtio_net_device_ops --> vhost_device_ops
> - rte_virtio_net.h      --> rte_vhost.h
> 
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost
  2017-02-13 18:02 ` Thomas Monjalon
@ 2017-02-14  3:21   ` Jerin Jacob
  0 siblings, 0 replies; 5+ messages in thread
From: Jerin Jacob @ 2017-02-14  3:21 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Yuanhan Liu, dev, Maxime Coquelin, John McNamara, Ben Walker

On Mon, Feb 13, 2017 at 07:02:56PM +0100, Thomas Monjalon wrote:
> 2017-01-23 21:04, Yuanhan Liu:
> > I made a vhost ABI/API refactoring at v16.04, meant to avoid such issue
> > forever. Well, apparently, I lied.
> > 
> > People are looking for more vhost-user options now days, other than
> > vhost-user net only. For example, SPDK (Storage Performance Development
> > Kit) are looking for chance of vhost-user SCSI and vhost-user block.
> > 
> > Apparently, they also need a vhost-user backend, while DPDK already
> > has a (mature enough) backend, they don't want to implement it again
> > from scratch. They want to leverage the one DPDK provides.
> > 
> > However, the last refactoring hasn't done that right, at least it's
> > not friendly for extending vhost-user to add more devices support.
> > For example, different virtio devices has its own feature set, while
> > APIs like rte_vhost_feature_disable(feature_mask) have no option to
> > tell the device type. Thus, a more proper API should look like:
> > 
> >     rte_vhost_feature_disable(device_type, feature_mask);
> > 
> > Besides that, few public files and structures should be renamed, to
> > not let it bind to virtio-net. Specifically, they are:
> > 
> > - virtio_net_device_ops --> vhost_device_ops
> > - rte_virtio_net.h      --> rte_vhost.h
> > 
> > Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost
  2017-01-23 13:04 [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost Yuanhan Liu
  2017-02-13 18:02 ` Thomas Monjalon
@ 2017-02-14 13:54 ` Maxime Coquelin
  2017-02-14 20:28 ` Thomas Monjalon
  2 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2017-02-14 13:54 UTC (permalink / raw)
  To: Yuanhan Liu, dev; +Cc: Thomas Monjalon, John McNamara

Hi Yuanhan,

On 01/23/2017 02:04 PM, Yuanhan Liu wrote:
> I made a vhost ABI/API refactoring at v16.04, meant to avoid such issue
> forever. Well, apparently, I lied.
>
> People are looking for more vhost-user options now days, other than
> vhost-user net only. For example, SPDK (Storage Performance Development
> Kit) are looking for chance of vhost-user SCSI and vhost-user block.
>
> Apparently, they also need a vhost-user backend, while DPDK already
> has a (mature enough) backend, they don't want to implement it again
> from scratch. They want to leverage the one DPDK provides.
>
> However, the last refactoring hasn't done that right, at least it's
> not friendly for extending vhost-user to add more devices support.
> For example, different virtio devices has its own feature set, while
> APIs like rte_vhost_feature_disable(feature_mask) have no option to
> tell the device type. Thus, a more proper API should look like:
>
>     rte_vhost_feature_disable(device_type, feature_mask);

I wonder if we could also change it to be per-instance, instead of
disabling features globally:
rte_vhost_feature_disable(vid, device_type, feature_mask);

It could be useful for live-migration with different backend versions on
the hosts, as it would allow to run instances with different compat
modes (like running vhost's DPDK v17.08 with v17.05-only supported
features).
I made a proposal about cross-version migration, but we are far from a
conclusion on the design.

>
> Besides that, few public files and structures should be renamed, to
> not let it bind to virtio-net. Specifically, they are:
>
> - virtio_net_device_ops --> vhost_device_ops
> - rte_virtio_net.h      --> rte_vhost.h
>
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

Anyway, the change you propose is necessary:
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost
  2017-01-23 13:04 [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost Yuanhan Liu
  2017-02-13 18:02 ` Thomas Monjalon
  2017-02-14 13:54 ` Maxime Coquelin
@ 2017-02-14 20:28 ` Thomas Monjalon
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-02-14 20:28 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: dev

Applied

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-14 20:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 13:04 [dpdk-dev] [PATCH] doc: announce API/ABI changes for vhost Yuanhan Liu
2017-02-13 18:02 ` Thomas Monjalon
2017-02-14  3:21   ` Jerin Jacob
2017-02-14 13:54 ` Maxime Coquelin
2017-02-14 20:28 ` Thomas Monjalon

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).