[dpdk-dev] [PATCH 01/28] vhost: introduce vhost transport operations structure

2019-06-19 Thread Nikos Dragazis
follow this one to complete the task of moving AF_UNIX transport code out of core vhost-user code. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/Makefile| 2 +- lib/librte_vhost/trans_af_unix.c | 20 lib/librte_vhost/vhost.c

[dpdk-dev] [PATCH 00/28] vhost: add virtio-vhost-user transport

2019-06-19 Thread Nikos Dragazis
regards, Nikos [1] http://mails.dpdk.org/archives/dev/2018-January/088155.html Nikos Dragazis (23): vhost: introduce vhost transport operations structure vhost: move socket management code vhost: move socket fd and un sockaddr vhost: move vhost-user connection vhost: move vhost-user

[dpdk-dev] [PATCH 02/28] vhost: move socket management code

2019-06-19 Thread Nikos Dragazis
ut this is a temporary measure and will be cleaned up in later patches. By simply moving code unmodified in this patch it will be easier to review the actual refactoring that follows. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/socket.c

[dpdk-dev] [PATCH 03/28] vhost: allocate per-socket transport state

2019-06-19 Thread Nikos Dragazis
From: Stefan Hajnoczi vhost-user transports have per-socket state (like file descriptors). Make it possible for transports to keep state beyond what is included in struct vhost_user_socket. This patch makes it possible to move AF_UNIX-specific fields from struct vhost_user_socket into trans_af_u

[dpdk-dev] [PATCH 04/28] vhost: move socket fd and un sockaddr

2019-06-19 Thread Nikos Dragazis
socket_cleanup() to vhost_transport_ops. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/socket.c| 11 ++-- lib/librte_vhost/trans_af_unix.c | 55 lib/librte_vhost/vhost.h | 30

[dpdk-dev] [PATCH 06/28] vhost: move vhost-user connection

2019-06-19 Thread Nikos Dragazis
. Move struct vhost_user_connection to trans_af_unix.c and conn_list/conn_mutex into struct af_unix_socket. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/socket.c| 54 +++--- lib/librte_vhost/trans_af_unix.c | 72

[dpdk-dev] [PATCH 05/28] vhost: move start server/client calls

2019-06-19 Thread Nikos Dragazis
From: Stefan Hajnoczi Introduce a vhost_transport_ops->socket_start() interface so the transport can begin establishing vhost-user connections. This is part of the AF_UNIX transport refactoring and removes AF_UNIX code from vhost.h and socket.c. Signed-off-by: Stefan Hajnoczi --- lib/librte_v

[dpdk-dev] [PATCH 07/28] vhost: move vhost-user reconnection

2019-06-19 Thread Nikos Dragazis
The socket reconnection code is highly specific to AF_UNIX, so move the remaining pieces of it into trans_af_unix.c. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/socket.c| 4 lib/librte_vhost/trans_af_unix.c | 9 +++-- lib/librte_vhost

[dpdk-dev] [PATCH 09/28] vhost: propagate vhost transport operations

2019-06-19 Thread Nikos Dragazis
turn towards vhost_user.c and its mixture of vhost-user protocol processing and socket I/O. The socket I/O will be moved into trans_af_unix.c so that other transports can be added that don't use file descriptors. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/li

[dpdk-dev] [PATCH 08/28] vhost: move vhost-user fdset

2019-06-19 Thread Nikos Dragazis
The fdset is used by the AF_UNIX transport code but other transports may not need it. Move it to trans_af_unix.c and then make struct vhost_user private again since nothing outside socket.c needs it. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/socket.c

[dpdk-dev] [PATCH 10/28] vhost: use a single structure for the device state

2019-06-19 Thread Nikos Dragazis
these structs together. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/trans_af_unix.c | 60 +++- lib/librte_vhost/vhost.c | 12 lib/librte_vhost/vhost.h | 11 +++- 3 files changed, 40 insertions

[dpdk-dev] [PATCH 11/28] vhost: extract socket I/O into transport

2019-06-19 Thread Nikos Dragazis
core vhost-user code. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/trans_af_unix.c | 70 +--- lib/librte_vhost/vhost.h | 26 ++ lib/librte_vhost/vhost_user.c| 78

[dpdk-dev] [PATCH 12/28] vhost: move slave request fd and lock

2019-06-19 Thread Nikos Dragazis
-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/trans_af_unix.c | 87 +++- lib/librte_vhost/vhost.c | 4 +- lib/librte_vhost/vhost.h | 41 +-- lib/librte_vhost/vhost_user.c| 67

[dpdk-dev] [PATCH 13/28] vhost: move mmap/munmap

2019-06-19 Thread Nikos Dragazis
, after refactoring vhost_user_set_mem_table(), read_vhost_message() is no longer being used in vhost_user.c. So, mark it as static in trans_af_unix.c. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- lib/librte_vhost/trans_af_unix.c | 185

[dpdk-dev] [PATCH 14/28] vhost: move setup of the log memory region

2019-06-19 Thread Nikos Dragazis
set_log_base() transport operation is introduced. Signed-off-by: Nikos Dragazis --- lib/librte_vhost/trans_af_unix.c | 41 lib/librte_vhost/vhost.h | 13 + lib/librte_vhost/vhost_user.c| 27 +- 3 files changed

[dpdk-dev] [PATCH 15/28] vhost: remove main fd parameter from msg handlers

2019-06-19 Thread Nikos Dragazis
. However, this mechanism is transport-specific. Other transports may use other mechanisms for the master/slave communication. Therefore, the connection fds are moved into the AF_UNIX transport code. Signed-off-by: Nikos Dragazis --- lib/librte_vhost/trans_af_unix.c | 2 +- lib/librte_vhost

[dpdk-dev] [PATCH 16/28] vhost: move postcopy live migration code

2019-06-19 Thread Nikos Dragazis
feature by implementing these transport-specific functions. Signed-off-by: Nikos Dragazis --- lib/librte_vhost/trans_af_unix.c | 94 ++-- lib/librte_vhost/vhost.c | 1 - lib/librte_vhost/vhost.h | 41 -- lib/librte_vhost

[dpdk-dev] [PATCH 17/28] vhost: support registering additional vhost-user transports

2019-06-19 Thread Nikos Dragazis
transports outside of lib/librte_vhost/. Signed-off-by: Nikos Dragazis --- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/rte_vhost_version.map | 11 +++ lib/librte_vhost/socket.c | 26 +- lib/librte_vhost/vhost.h | 22

[dpdk-dev] [PATCH 18/28] drivers/virtio_vhost_user: add virtio PCI framework

2019-06-19 Thread Nikos Dragazis
better solution would be to extract the code cleanly from drivers/net/ and share it. Or perhaps we could backport SPDK's lib/virtio/. drivers/virtio_vhost_user/ will host the virtio-vhost-user transport implementation in the upcoming patches. Signed-off-by: Nikos Dragazis Signed-off-by: S

[dpdk-dev] [PATCH 19/28] vhost: add index field in vhost virtqueues

2019-06-19 Thread Nikos Dragazis
From: Stefan Hajnoczi Currently, the only way of determining a struct vhost_virtqueue's index is to search struct virtio_net->virtqueue[] for its address. Stash the index in struct vhost_virtqueue so we won't have to search the array. This new field will be used by virtio-vhost-user. Signed-of

[dpdk-dev] [PATCH 20/28] drivers: add virtio-vhost-user transport

2019-06-19 Thread Nikos Dragazis
backend for other guests. For more information on virtio-vhost-user, see https://wiki.qemu.org/Features/VirtioVhostUser. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- drivers/Makefile |2 + drivers/virtio_vhost_user/Makefile

[dpdk-dev] [PATCH 21/28] drivers/virtio_vhost_user: use additional device resources

2019-06-19 Thread Nikos Dragazis
d the location of the vhost memory regions in the device's memory address space. Also, support has been added for the notification capability, though this configuration structure is not currently being used by the virtio-vhost-user driver due to DPDK's poll-mode nature. Signed-off-by:

[dpdk-dev] [PATCH 22/28] vhost: add flag for choosing vhost-user transport

2019-06-19 Thread Nikos Dragazis
Extend the API to support the virtio-vhost-user transport as an alternative to the AF_UNIX transport. The caller provides a PCI DomBDF address: rte_vhost_driver_register(":00:04.0", RTE_VHOST_USER_VIRTIO_TRANSPORT); Signed-off-by: Nikos Dragazis Sig

[dpdk-dev] [PATCH 23/28] net/vhost: add virtio-vhost-user support

2019-06-19 Thread Nikos Dragazis
The new virtio-transport=0|1 argument enables virtio-vhost-user support: testpmd ... --pci-whitelist :00:04.0 \ --vdev vhost,iface=:00:04.0,virtio-transport=1 Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- drivers/net/vhost/rte_eth_vhost.c | 13

[dpdk-dev] [PATCH 24/28] examples/vhost_scsi: add --socket-file argument

2019-06-19 Thread Nikos Dragazis
From: Stefan Hajnoczi The default filename built into examples/vhost_scsi may not be convenient. Allow the user to specify the full UNIX domain socket path on the command-line. Signed-off-by: Stefan Hajnoczi --- examples/vhost_scsi/vhost_scsi.c | 93 1

[dpdk-dev] [PATCH 26/28] mk: link apps with virtio-vhost-user driver

2019-06-19 Thread Nikos Dragazis
Export the virtio-vhost-user transport to all the apps. Support using the virtio-vhost-user transport with shared libraries by unconditionally linking librte_virtio_vhost_user.so with the apps. Signed-off-by: Nikos Dragazis --- mk/rte.app.mk | 6 ++ 1 file changed, 6 insertions(+) diff

[dpdk-dev] [PATCH 25/28] examples/vhost_scsi: add virtio-vhost-user support

2019-06-19 Thread Nikos Dragazis
From: Stefan Hajnoczi The new --virtio-vhost-user-pci command-line argument uses virtio-vhost-user instead of the default AF_UNIX transport. Signed-off-by: Stefan Hajnoczi --- examples/vhost_scsi/vhost_scsi.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/e

[dpdk-dev] [PATCH 27/28] config: add option for the virtio-vhost-user transport

2019-06-19 Thread Nikos Dragazis
Add a configuration option for compiling and linking with the virtio-vhost-user library. Signed-off-by: Nikos Dragazis --- config/common_base | 6 ++ config/common_linux | 1 + drivers/Makefile| 5 - mk/rte.app.mk | 2 +- 4 files changed, 12 insertions(+), 2 deletions

[dpdk-dev] [PATCH 28/28] usertools: add virtio-vhost-user devices to dpdk-devbind.py

2019-06-19 Thread Nikos Dragazis
The virtio-vhost-user PCI adapter is not detected in any existing group of devices supported by dpdk-devbind.py. Add a new "Others" group for miscellaneous devices like this one. Signed-off-by: Nikos Dragazis Signed-off-by: Stefan Hajnoczi --- usertools/dpdk-devbind.py | 7 +

Re: [dpdk-dev] [PATCH 01/28] vhost: introduce vhost transport operations structure

2019-06-20 Thread Nikos Dragazis
On 19/6/19 11:14 μ.μ., Aaron Conole wrote: > Nikos Dragazis 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

Re: [dpdk-dev] [PATCH 01/28] vhost: introduce vhost transport operations structure

2019-06-20 Thread Nikos Dragazis
On 20/6/19 1:30 μ.μ., Bruce Richardson wrote: > On Wed, Jun 19, 2019 at 04:14:09PM -0400, Aaron Conole wrote: >> Nikos Dragazis writes: >> >>> This is the first of a series of patches, whose purpose is to add >>> support for the virtio-vhost-user transport. T

Re: [dpdk-dev] [PATCH 00/28] vhost: add virtio-vhost-user transport

2019-06-20 Thread Nikos Dragazis
On 20/6/19 2:32 μ.μ., Ilya Maximets wrote: > On 19.06.2019 18:14, Nikos Dragazis wrote: >> Hi everyone, > Hi. I didn't look at the code, just a few comments inline. > >> this patch series introduces the concept of the virtio-vhost-user >> transport. This is actually

Re: [dpdk-dev] [PATCH 00/28] vhost: add virtio-vhost-user transport

2019-06-22 Thread Nikos Dragazis
On 20/6/19 2:35 μ.μ., Maxime Coquelin wrote: > Hi Nikos, > > On 6/19/19 5:14 PM, Nikos Dragazis wrote: >> Hi everyone, >> >> this patch series introduces the concept of the virtio-vhost-user >> transport. This is actually a revised version of an earlier RFC >>

Re: [dpdk-dev] [PATCH 18/28] drivers/virtio_vhost_user: add virtio PCI framework

2019-09-09 Thread Nikos Dragazis
On 5/9/19 7:34 μ.μ., Maxime Coquelin wrote: > Hi Nikos, > > On 6/19/19 5:14 PM, Nikos Dragazis wrote: >> The virtio-vhost-user transport requires a driver for the >> virtio-vhost-user PCI device, hence it needs a virtio-pci driver. There >> is currently no librte