numam-spdk/lib/vhost
Dariusz Stojaczyk 60c1cd75dc vhost_blk: set proper vring_used_elem->len
This `len` field describes the amount of bytes
*written* by the device. It is used to prevent
the driver from reading buffer memory that wasn't
really written to - it could contain either
leftover values from previous requests or even
be completely unitialized.

In a couple of invalid-request error conditions
we still write the VIRTIO_BLK_S_UNSUPP response while
returning used_len == 0, but that's fine. A properly
written driver will likely handle both of these cases
the same way.

Change-Id: I8e9f3a8051561096e2ee755122d534b4ffd94db1
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393963
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-01-11 12:01:53 -05:00
..
rte_vhost vhost: Reduces size of vhost app coredump file. 2017-12-01 12:56:04 -05:00
Makefile env: Automatically register new memory with the IOMMU 2017-09-01 15:25:24 -04:00
test_plan.md test/vhost: Test Plan for vhost initiator. 2017-10-26 14:07:59 -04:00
vhost_blk.c vhost_blk: set proper vring_used_elem->len 2018-01-11 12:01:53 -05:00
vhost_internal.h vhost: interrupts coalescing 2017-10-27 13:06:40 -04:00
vhost_rpc.c util: add spdk_strerror() wrapper with TLS support 2018-01-04 15:00:09 -05:00
vhost_scsi.c vhost_scsi: set proper vring_used_elem->len 2018-01-11 12:01:53 -05:00
vhost.c util: add spdk_strerror() wrapper with TLS support 2018-01-04 15:00:09 -05:00