+14
−0
+80
−13
+2
−0
Loading
iobuf can internally queue requests that awaits free buffers.
Currently all nvmf transports are handling pending buffers internally.
With this change spdk_nvmf_request_get_buffers() API works as follows:
- Whenever all iovecs are allocated immediately then nothing changes
compared to the previous implementation.
- If iobuf does not have enough buffers then there are two flows:
- if req_get_buffers_done is not set in the spdk_nvmf_transport_ops
then again, nothing changes. All (if there were any) ioves are
released and caller must try again later.
- if callback was set then caller will be notified once all iovecs are
allocated.
To use iobuf queueing following changes are needed:
- spdk_nvmf_transport_ops has now a callback function pointer used to
notify that previously interrupted buffer allocation is now complete.
- spdk_nvmf_request has fields to store spdk_iobuf_entry and remaining
buffer length. Both are not in use when buffer allocation succeeds
immediately so there is no impact on the number of hot cache lines
within spdk_nvmf_request struct.
- transport.c contains all the logic to track buffers allocation
progress and notifies requester when it is done.
As requests waiting for the buffer might get aborted, another API to
remove such request from the iobuf queue is also added.
This patch brings only API change. Usage in transport implementations
will come in next patches.
Also, there is no support yet for the stripped buffers.
Change-Id: I95e30750dd83c27bb3be2f77b7635168a2b63e19
Signed-off-by:
Krzysztof Goreczny <krzysztof.goreczny@dell.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23214
Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by:
Jim Harris <jim.harris@samsung.com>
Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot