[dpdk-dev] [PATCH 01/28] vhost: introduce vhost transport operations structure
Bruce Richardson
bruce.richardson at intel.com
Thu Jun 20 12:30:01 CEST 2019
On Wed, Jun 19, 2019 at 04:14:09PM -0400, Aaron Conole wrote:
> Nikos Dragazis <ndragazis at arrikto.com> writes:
>
> > This is the first of a series of patches, whose purpose is to add
> > support for the virtio-vhost-user transport. This is a vhost-user
> > transport implementation that is different from the default AF_UNIX
> > transport. It uses the virtio-vhost-user PCI device in order to tunnel
> > vhost-user protocol messages over virtio. This lets guests act as vhost
> > device backends for other guests.
> >
> > File descriptor passing is specific to the AF_UNIX vhost-user protocol
> > transport. In order to add support for additional transports, it is
> > necessary to extract transport-specific code from the main vhost-user
> > code.
> >
> > This patch introduces struct vhost_transport_ops and associates each
> > device with a transport. Core vhost-user code calls into
> > vhost_transport_ops to perform transport-specific operations.
> >
> > Notifying callfd is a transport-specific operation, so it belongs to
> > trans_af_unix.c.
> >
> > Several more patches follow this one to complete the task of moving
> > AF_UNIX transport code out of core vhost-user code.
> >
> > Signed-off-by: Nikos Dragazis <ndragazis at arrikto.com>
> > Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com>
> > ---
>
> You'll need to also accommodate the meson build - probably with
> something like:
>
> diff --git a/lib/librte_vhost/meson.build b/lib/librte_vhost/meson.build
> index 3090bbe08..81b70683b 100644
> --- a/lib/librte_vhost/meson.build
> +++ b/lib/librte_vhost/meson.build
> @@ -14,6 +14,6 @@ allow_experimental_apis = true
> cflags += '-fno-strict-aliasing'
> sources = files('fd_man.c', 'iotlb.c', 'socket.c', 'vdpa.c',
> 'vhost.c', 'vhost_user.c',
> - 'virtio_net.c', 'vhost_crypto.c')
> + 'virtio_net.c', 'vhost_crypto.c', 'trans_af_unix.c')
> headers = files('rte_vhost.h', 'rte_vdpa.h', 'rte_vhost_crypto.h')
> deps += ['ethdev', 'cryptodev', 'hash', 'pci']
>
>
Yep, except I think we should try and keep the files in alphabetical order,
with only a couple of entries per line [so place trans_af_unix.c on a new
line with vdpa.c].
More information about the dev
mailing list