[PATCH v4] vhost: add new `rte_vhost_vring_call_nonblock` API

2022-10-17 Thread Changpeng Liu
k may happen when SPDK is posting interrupts to VM. Here, we add a new API which allows caller to try again later for this case. Bugzilla ID: 1015 Fixes: c5736998305d ("vhost: fix missing virtqueue lock protection") Signed-off-by: Changpeng Liu --- doc/guides/prog_guide/vhost_

[PATCH v3] vhost: add new `rte_vhost_vring_call_nonblock` API

2022-10-17 Thread Changpeng Liu
k may happen when SPDK is posting interrupts to VM. Here, we add a new API which allows caller to try again later for this case. Bugzilla ID: 1015 Fixes: c5736998305d ("vhost: fix missing virtqueue lock protection") Signed-off-by: Changpeng Liu --- doc/guides/prog_guide/vhost_

[PATCH v2] vhost: add new `rte_vhost_vring_call_nonblock` API

2022-10-11 Thread Changpeng Liu
k may happen when SPDK is posting interrupts to VM. Here, we add a new API which allows caller to try again later for this case. Bugzilla ID: 1015 Fixes: c5736998305d ("vhost: fix missing virtqueue lock protection") Signed-off-by: Changpeng Liu --- lib/vhost/rte_vhost.h | 15 +

[PATCH] vhost: use try_lock in rte_vhost_vring_call

2022-09-05 Thread Changpeng Liu
Note that this function is in data path, so the thread context may not same as socket messages processing context, by using try_lock here, users can have another try in case of VQ's access lock is held by `vhost-events` thread. Signed-off-by: Changpeng Liu --- lib/vhost/vhost.c | 6

[dpdk-dev] [PATCH] eal/hotplug: suppress one error log on primary process

2021-05-18 Thread Changpeng Liu
This is a normal case that the primary process already owned one PCI device while the secondary process try to attach it, so suppress the error log here to exclude this case. Signed-off-by: Changpeng Liu --- lib/eal/common/hotplug_mp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[dpdk-dev] [PATCH] vhost: return ready when at least 1 vring is configured

2020-08-31 Thread Changpeng Liu
at least 3 vrings, and virtio_net needs at least 2 vrings, virtio_blk needs at least 1 vring. So instead of doing it in vhost library it's better that the application who uses this library do this check. Signed-off-by: Changpeng Liu --- lib/librte_vhost/vhost_user.c | 2 +- 1 file changed, 1

[dpdk-dev] [PATCH] vhost: add virtio configuration space access socket messages

2019-02-24 Thread Changpeng Liu
This patch adds new vhost user messages GET_CONFIG and SET_CONFIG used to get/set virtio device's PCI configuration space. Signed-off-by: Changpeng Liu --- lib/librte_vhost/rte_vhost.h | 8 lib/librte_vhost/vhost_user.c | 44 +++

[dpdk-dev] [PATCH 1/2] examples/vhost_scsi: add virtio-1.0 feature bit support

2018-05-17 Thread Changpeng Liu
Signed-off-by: Changpeng Liu --- examples/vhost_scsi/vhost_scsi.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/vhost_scsi/vhost_scsi.c b/examples/vhost_scsi/vhost_scsi.c index 2908ff6..a1d542b 100644 --- a/examples/vhost_scsi/vhost_scsi.c +++ b/examples

[dpdk-dev] [PATCH 2/2] examples/vhost_scsi: fix potential buffer overrun with safe copy API

2018-05-17 Thread Changpeng Liu
Signed-off-by: Changpeng Liu --- examples/vhost_scsi/scsi.c | 23 --- examples/vhost_scsi/vhost_scsi.c | 5 +++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c index 0c2fa3e..1572098 100644

[dpdk-dev] [PATCH] pci/uio: enable prefetchable resources mapping

2018-01-31 Thread Changpeng Liu
For PCI prefetchable resources, Linux will create a write combined file as well, the library will try to map resourceX_wc file first, if the file does not exist, then it will map resourceX as usual. Signed-off-by: Changpeng Liu --- drivers/bus/pci/linux/pci_uio.c | 19 ++- 1

[dpdk-dev] [PATCH v5] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-19 Thread Changpeng Liu
can be presented to Guest VM through vhost-user-scsi-pci controller. Similar with vhost-net, the sample application will process the I/Os sent via virt rings. Signed-off-by: Changpeng Liu --- MAINTAINERS | 2 + doc/guides/sample_app_ug/index.rst | 1 + doc

[dpdk-dev] [PATCH v4] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-14 Thread Changpeng Liu
can be presented to Guest VM through vhost-user-scsi-pci controller. Similar with vhost-net, the sample application will process the I/Os sent via virt rings. Signed-off-by: Changpeng Liu --- MAINTAINERS | 2 + doc/guides/sample_app_ug/index.rst | 1 + doc

[dpdk-dev] [PATCH v3] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-06 Thread Changpeng Liu
can be presented to Guest VM through vhost-user-scsi-pci controller. Similar with vhost-net, the sample application will process the I/Os sent via virt rings. Signed-off-by: Changpeng Liu --- MAINTAINERS | 2 + doc/guides/sample_app_ug/vhost_scsi.rst | 110

[dpdk-dev] [PATCH v2] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-06 Thread Changpeng Liu
can be presented to Guest VM through vhost-user-scsi-pci controller. Similar with vhost-net, the sample application will process the I/Os sent via virt rings. Signed-off-by: Changpeng Liu --- MAINTAINERS | 2 + doc/guides/sample_app_ug/vhost_scsi.rst | 110

[dpdk-dev] [PATCH] examples/vhost: introduce a new vhost-user-scsi sample application

2017-06-28 Thread Changpeng Liu
can be presented to Guest VM through vhost-user-scsi-pci controller. Similar with vhost-net, the sample application will process the I/Os sent via virt rings. Signed-off-by: Changpeng Liu --- MAINTAINERS | 2 + doc/guides/sample_app_ug/vhost_scsi.rst | 134

[dpdk-dev] [PATCH] pci/uio: enable prefetchable resources mapping

2017-06-02 Thread Changpeng Liu
For PCI prefetchable resources, Linux will create a write combined file as well, the library will try to map resourceX_wc file first, if the file does not exist, then it will map resourceX as usual. Signed-off-by: Changpeng Liu --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 19

[dpdk-dev] [PATCH v2 2/2] vhost: add vhost-scsi support to vhost library

2016-09-15 Thread Changpeng Liu
Since we changed the vhost library as a common framework to add other VIRTIO device type, here we add VIRTIO_ID_SCSI device type to vhost library to support vhost-scsi target. Signed-off-by: Changpeng Liu --- lib/librte_vhost/Makefile | 4 +- lib/librte_vhost/rte_virtio_dev.h | 1

[dpdk-dev] [PATCH v2 1/2] vhost: change the vhost library to a common framework which can support more VIRTIO devices

2016-09-15 Thread Changpeng Liu
: Changpeng Liu --- lib/librte_vhost/Makefile | 4 +- lib/librte_vhost/rte_virtio_dev.h | 140 lib/librte_vhost/rte_virtio_net.h | 97 +- lib/librte_vhost/socket.c | 6 +- lib/librte_vhost/vhost.c | 421 lib/librte_vhost/vhost.h

[dpdk-dev] [PATCH] vhost: change the vhost library to a common framework which can support more VIRTIO devices

2016-09-14 Thread Changpeng Liu
: Changpeng Liu --- lib/librte_vhost/Makefile | 4 +- lib/librte_vhost/rte_virtio_dev.h | 140 lib/librte_vhost/rte_virtio_net.h | 97 +- lib/librte_vhost/socket.c | 6 +- lib/librte_vhost/vhost.c | 421 lib/librte_vhost/vhost.h