Mellanox / spdk

Storage Performance Development Kit
http://www.spdk.io/
Other
7 stars 15 forks source link

lib/accel: Fix spdk_accel_append_copy_crc32c wrong assignment #91

Closed rzwei closed 8 months ago

rzwei commented 8 months ago

lib/accel: Fix spdk_accel_append_copy_crc32c wrong assignment

rzwei commented 8 months ago
int
spdk_accel_append_copy_crc32c(struct spdk_accel_sequence **pseq, struct spdk_io_channel *ch,
                  uint32_t *crc_dst, struct iovec *dst_iovs, uint32_t dst_iovcnt,
                  struct spdk_memory_domain *dst_domain, void *dst_domain_ctx,
                  struct iovec *src_iovs, uint32_t src_iovcnt,
                  struct spdk_memory_domain *src_domain, void *src_domain_ctx,
                  uint32_t seed, spdk_accel_step_cb cb_fn, void *cb_arg)
{
...
    task->dst_domain = dst_domain;
    task->src_domain_ctx = dst_domain_ctx;    // should be dst_domain_ctx = dst_domain_ctx;
    task->d.iovs = dst_iovs;
    task->d.iovcnt = dst_iovcnt;
    task->src_domain = src_domain;
    task->src_domain_ctx = src_domain_ctx;
    task->s.iovs = src_iovs;
    task->s.iovcnt = src_iovcnt;
    task->crc_dst = crc_dst;
    task->seed = seed;
    task->op_code = ACCEL_OPC_COPY_CRC32C;

    TAILQ_INSERT_TAIL(&seq->tasks, task, seq_link);
    *pseq = seq;

    return 0;
}
EugeneKochetov commented 8 months ago

Thanks a lot for noting! We ported the fix to our development branch and it will be available in the next release. v23.01.5 is old version and we don't plan new release from it. So, I'm cloing this PR.