accel: move accel_get_iovlen() up
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I6117057a1e3812386a0fb7a10e07978415a48261 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17622 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
9a377ecb22
commit
0de931dc6b
@ -313,6 +313,19 @@ accel_submit_task(struct accel_io_channel *accel_ch, struct spdk_accel_task *tas
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline uint64_t
|
||||||
|
accel_get_iovlen(struct iovec *iovs, uint32_t iovcnt)
|
||||||
|
{
|
||||||
|
uint64_t result = 0;
|
||||||
|
uint32_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < iovcnt; ++i) {
|
||||||
|
result += iovs[i].iov_len;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/* Accel framework public API for copy function */
|
/* Accel framework public API for copy function */
|
||||||
int
|
int
|
||||||
spdk_accel_submit_copy(struct spdk_io_channel *ch, void *dst, void *src,
|
spdk_accel_submit_copy(struct spdk_io_channel *ch, void *dst, void *src,
|
||||||
@ -1359,19 +1372,6 @@ spdk_accel_sequence_next_task(struct spdk_accel_task *task)
|
|||||||
return TAILQ_NEXT(task, seq_link);
|
return TAILQ_NEXT(task, seq_link);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint64_t
|
|
||||||
accel_get_iovlen(struct iovec *iovs, uint32_t iovcnt)
|
|
||||||
{
|
|
||||||
uint64_t result = 0;
|
|
||||||
uint32_t i;
|
|
||||||
|
|
||||||
for (i = 0; i < iovcnt; ++i) {
|
|
||||||
result += iovs[i].iov_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
accel_set_bounce_buffer(struct spdk_accel_bounce_buffer *bounce, struct iovec **iovs,
|
accel_set_bounce_buffer(struct spdk_accel_bounce_buffer *bounce, struct iovec **iovs,
|
||||||
uint32_t *iovcnt, struct spdk_memory_domain **domain, void **domain_ctx,
|
uint32_t *iovcnt, struct spdk_memory_domain **domain, void **domain_ctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user