Commit b5383af4 authored by MengjinWu's avatar MengjinWu Committed by Tomasz Zawadzki
Browse files

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: default avatarMengjinWu <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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarXiaodong Liu <xiaodong.liu@intel.com>
parent abdefd22
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -999,10 +999,11 @@ pdu_data_crc32_compute(struct nvme_tcp_pdu *pdu)
		/* Only suport this limitated case for the first step */
		if (spdk_likely(!pdu->dif_ctx && (pdu->data_len % SPDK_NVME_TCP_DIGEST_ALIGNMENT == 0)
				&& tqpair->group)) {
			spdk_accel_submit_crc32cv(tqpair->group->accel_channel, &pdu->data_digest_crc32,
						  pdu->data_iov, pdu->data_iovcnt, 0, data_crc32_accel_done, pdu);
			if (!spdk_accel_submit_crc32cv(tqpair->group->accel_channel, &pdu->data_digest_crc32, pdu->data_iov,
						       pdu->data_iovcnt, 0, data_crc32_accel_done, pdu)) {
				return;
			}
		}

		crc32c = nvme_tcp_pdu_calc_data_digest(pdu);
		MAKE_DIGEST_WORD(pdu->data_digest, crc32c);