Commit 3a214821 authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

nvme/tcp: Enable zcopy send when qpair is attached to poll group



We can receive buffer reclaim notifications only when a qpair is
attached to a poll group (so qpair's socket is connected to a socket
poll group).
The previous assumption that we enable zcopy only for IO qpairs was
wrong since IO qpair might not use poll groups too (e.g. abort
application).

Fixes issue #1607

Change-Id: I67329d755d81da6606e65eddfeceb20839346d87
Signed-off-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4476


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 9c205577
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1736,7 +1736,7 @@ nvme_tcp_ctrlr_connect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_qpa
	opts.opts_size = sizeof(opts);
	spdk_sock_get_default_opts(&opts);
	opts.priority = ctrlr->trid.priority;
	opts.zcopy = false;
	opts.zcopy = !nvme_qpair_is_admin_queue(qpair) && qpair->poll_group != NULL;
	tqpair->sock = spdk_sock_connect_ext(ctrlr->trid.traddr, port, NULL, &opts);
	if (!tqpair->sock) {
		SPDK_ERRLOG("sock connection error of tqpair=%p with addr=%s, port=%ld\n",