Spdk/include/spdk_internal
Konrad Sztyber 3fbe74fd82 accel: don't modify user iovs when allocating buffers
It is quite common for a user to use the exact same iovec (in memory) to
describe buffers for two different operations.  If that iovec was
describing accel buffer, accel would modify it replacing it with an
actual buffer.  This is broken if that iovec was used by some other task
in a sequence, as accel wouldn't be aware that it has been changed too.

To address this, accel will use a new iovec from the aux_iovs array.  It
means that accel buffers always *must* be passed using a single iovec.
Theoretically, users could chunk that buffer into several iovecs, but
spdk_accel_get_buf() always returns a single buffer, so, in practice,
this should never happen, and therefore is unsupported.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I25271bc032987dd6028fb7b3adde061657759b4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17039
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-03-13 21:02:27 +00:00
..
accel_module.h accel: don't modify user iovs when allocating buffers 2023-03-13 21:02:27 +00:00
assert.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
event.h thread: use spdk_thread_get_app_thread instead of _spdk_get_app_thread 2023-02-24 12:46:27 +00:00
idxd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
init.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
lvolstore.h bdev/lvol: retry lvol open if it fails due to insufficient resources 2023-02-24 21:01:11 +00:00
mlx5.h module/accel: Add mlx5 accel module 2023-01-19 22:00:58 +00:00
mock.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_tcp.h nvme/tcp: Remove iov_sgl from PDU structure 2023-03-10 11:43:40 +00:00
rdma.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
sgl.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
sock.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
thread.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
trace_defs.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
uring.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
usdt.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
utf.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vhost_user.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
virtio.h misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00