lib/nvmf: another chance to calc crc32 when accel_tasks are used up

If accel_tasks are used up, we should not directly return but give
an another chance to calc it directly.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I983b65d7dfff0fea3974682e886d2dcf309cd2c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12841
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
This commit is contained in:
MengjinWu 2022-05-31 10:27:53 +08:00 committed by Tomasz Zawadzki
parent abdefd22e3
commit b5383af40a

View File

@ -999,9 +999,10 @@ pdu_data_crc32_compute(struct nvme_tcp_pdu *pdu)
/* Only suport this limitated case for the first step */ /* Only suport this limitated case for the first step */
if (spdk_likely(!pdu->dif_ctx && (pdu->data_len % SPDK_NVME_TCP_DIGEST_ALIGNMENT == 0) if (spdk_likely(!pdu->dif_ctx && (pdu->data_len % SPDK_NVME_TCP_DIGEST_ALIGNMENT == 0)
&& tqpair->group)) { && tqpair->group)) {
spdk_accel_submit_crc32cv(tqpair->group->accel_channel, &pdu->data_digest_crc32, if (!spdk_accel_submit_crc32cv(tqpair->group->accel_channel, &pdu->data_digest_crc32, pdu->data_iov,
pdu->data_iov, pdu->data_iovcnt, 0, data_crc32_accel_done, pdu); pdu->data_iovcnt, 0, data_crc32_accel_done, pdu)) {
return; return;
}
} }
crc32c = nvme_tcp_pdu_calc_data_digest(pdu); crc32c = nvme_tcp_pdu_calc_data_digest(pdu);