From nobody Wed May 11 21:04:34 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1072B1AE615D; Wed, 11 May 2022 21:04:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kz6q6717Vz4vLn; Wed, 11 May 2022 21:04:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652303075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHZyecZUZo+CCuP7IU7GRyfbPYSAy+02wF/zl1+XbnU=; b=Brc0A2SoP2267X3x9D/6TRYWS37CCl3r4vTHo60ok7/fgZxLyXPXv/1lMBe05/egMffU13 aUdfeskrXDf+cHS99StCjBbmhlOAZWQkbXXsZCOzd1cbRgjYr5aYTiWxEolqXLLywsQNFt RwbMnbiPdRmKj1+Q1pbb1vURj7gMntLV6OYu2eIfyx+nUIaxs4VtsuqcM0zKVwyYTHAkMp yu7vMkfGwtqswg6f+J8mG0ykg783aZ9CgG7QdUdFozLkbqRncyeQMN/2uusO1EahzZMOgT 8Tjk4YVvzksMjxPb3LkdkGqob4OWZ02ifiKpcLEervPTVifTwNNhafe5Dodw8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D07E1211AA; Wed, 11 May 2022 21:04:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24BL4YZh025638; Wed, 11 May 2022 21:04:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24BL4Yce025637; Wed, 11 May 2022 21:04:34 GMT (envelope-from git) Date: Wed, 11 May 2022 21:04:34 GMT Message-Id: <202205112104.24BL4Yce025637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 94b27fc812d1 - stable/13 - iscsi: Use ICL_NOCOPY for SCSI command immediate data and R2T. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 94b27fc812d1e6c635a50a757f6c35533ae37a74 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652303075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHZyecZUZo+CCuP7IU7GRyfbPYSAy+02wF/zl1+XbnU=; b=hkmL/2gTA68lQt+9fb/f1QhC8wiVGTG9BwaD9e3zk/Mj4sKNCqM53uIPMSr8lUVEBceWPA b8a/Py328/ctKAAPUQsaumy/BBsSjhtCbtcoHZCXrxvB4vQi94xZwFEgdFAXZQ4FunI5Go 37Im/kidozvzK15NGSCCxNXoBh0kPhWl+7AyM7CItv8WMPxCTat/qB3ws/GyEQsIco7hLK PBzCd4DiIoCrnWQhPZ+5SlcV6DIClZLzDrtw/Bn7jnH/j30uHgWcmC1b592D3/3w0rHl6V qizUEzOnxdgzNOLREdf0lACBja6DmLuwkvIPcf03wWEUvWuqoIgnEXw61rQpeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652303075; a=rsa-sha256; cv=none; b=T8OOiNMIO9wA5Z4RUa+lBdUW8r2v79MBckNrHvCRmb+fE0Em4Z0mt45rlFhz0W1OYmaUkR i6nj/qHYglXLfglRXC7pZi1t4CVsF0OXQ7bsdOwurNby+XAVO4W6Km37dT3Ir57st/RBif RvidtUOeR5j+zTZe70DzTN6NvfB39MaHDL+bYoqzzSBDTLTuPnTaGVa8atiSe+u6CXt37f ImottSu4BBYlwz/qQByNW6/XDbj5BnxGGIKPeQrCP7zDMwhL0rwQY+5CAUXHMRfp1ALiPf A8Ssp7UdCbNXgKWANQt+IDRHUVIXqflvOCBFjMGYK6+xYv8aLd6bnfJ3GiJ5ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=94b27fc812d1e6c635a50a757f6c35533ae37a74 commit 94b27fc812d1e6c635a50a757f6c35533ae37a74 Author: John Baldwin AuthorDate: 2022-03-10 23:48:20 +0000 Commit: John Baldwin CommitDate: 2022-05-11 20:50:26 +0000 iscsi: Use ICL_NOCOPY for SCSI command immediate data and R2T. The associated csio ccb will not be completed via xpt_done() until after the associated PDUs are transmitted to the other side and either the original PDU is acked with a SCSI response, or a response is received for a subsequent abort CCB (which means the earlier PDU has also been sent since it would have been sent before the abort PDU). This does assume that once an I/O request has been aborted, no further PDUs with data payload are queued for that I/O request. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34405 (cherry picked from commit 9c7a4875bce9d0f8308f92a816abf36af8551914) --- sys/dev/iscsi/iscsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 278f275d7309..155faa0910e4 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1283,7 +1283,7 @@ iscsi_pdu_handle_r2t(struct icl_pdu *response) bhsdo->bhsdo_datasn = htonl(datasn); bhsdo->bhsdo_buffer_offset = htonl(off); error = icl_pdu_append_data(request, csio->data_ptr + off, len, - M_NOWAIT); + M_NOWAIT | ICL_NOCOPY); if (error != 0) { ISCSI_SESSION_WARN(is, "failed to allocate memory; " "reconnecting"); @@ -2387,7 +2387,8 @@ iscsi_action_scsiio(struct iscsi_session *is, union ccb *ccb) len = is->is_conn->ic_max_send_data_segment_length; } - error = icl_pdu_append_data(request, csio->data_ptr, len, M_NOWAIT); + error = icl_pdu_append_data(request, csio->data_ptr, len, + M_NOWAIT | ICL_NOCOPY); if (error != 0) { iscsi_outstanding_remove(is, io); icl_pdu_free(request);