[dpdk-dev] [PATCH v3 0/5] vhost: support selective datapath

Wang, Zhihong zhihong.wang at intel.com
Fri Mar 30 11:35:53 CEST 2018


Pawel,

> >  3. To make vhost aware of its own type, an engine id (eid) and a device
> >     id (did) are added into the vhost data structure to identify the actual
> >     device. APIs are introduced to let app configure them. When the default
> >     software datapath is used, eid and did are set to -1. When alternative
> >     datapath is used, eid and did are set by app to specify which device to
> >     use. Each vhost-user socket can have only 1 connection in this case.
> 
> Why only one connection is possible? We are already working on multiple
> simultaneous connections in SPDK. So this will be some kind of step
> backward.

Nothing is changed for existing use cases. This design is only true when
alternative vDPA backend (most likely HW) is used, because in this case
resource locking per vhost port is required for provisioning consideration.

> 
> >
> > Working process:
> > ====
> >
> >  1. Register driver during DPDK initialization.
> >
> >  2. Register engine with driver name and address.
> >
> >  3. Get engine attributes.
> >
> >  4. For vhost device creation:
> >
> >       a. Register vhost-user socket.
> >
> >       b. Set eid and did of the vhost-user socket.
> >
> >       c. Register vhost-user callbacks.
> >
> >       d. Start to wait for connection.
> >
> >  4. When connection comes and virtio device data structure is negotiated,
> >     the device will be configured with all needed info.
> >
> 
> Can you please provide new or modify existing example to show how to use
> this new API?
> It would be easier to find any possible gaps if we can see real use case.

This patch has only the lib change, a driver is also in progress at:
http://dpdk.org/ml/archives/dev/2018-March/093305.html

You can learn how it works from an old RFC patch at:
http://dpdk.org/ml/archives/dev/2017-December/085044.html
A lot of details are changed, but the idea is the same.

-Zhihong


More information about the dev mailing list