From nobody Thu Mar 10 23:51:25 2022 X-Original-To: dev-commits-src-main@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 BFBE419FB286; Thu, 10 Mar 2022 23:51:25 +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 4KF5SF3BH9z3lWj; Thu, 10 Mar 2022 23:51:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646956285; 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=QqWmuKSE0JwjDBZamuq/elKVjgk+WpWP6hz2Ap1mr94=; b=lKYmOFEX9iNtHz6sKFeXVzoBnEpbqmRfUNE/KpvCdE/2WhU7wwBY+zvoIn52ImmHYNZ3Up k2ApZJ1Pf25jGomoKt21ogl6fJZGyIliYaFoWF0Vfh3Ca0fdW+/q8FWaKPXf2HsD63RtmQ PIqQbBhDpGsQ2pzhtXCwPLfUYPJv1ndn/gn+dlg5gJZujcT9OZsFfdIzP6CmaAtZCcpwfT OQfTJ2/xbSXjHV/qAnd94zG/Bwto26FbnsN+0GmqJ4eZo8vRt7sknFzvZCzGM+u6Jh0zlh gcTggYsjKue+mMhTaqrs8qLEaXy/+12e/y+fnMZenR0mETytpUheuv81vvHqvQ== 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 4EBB966D7; Thu, 10 Mar 2022 23:51:25 +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 22ANpPmP036863; Thu, 10 Mar 2022 23:51:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22ANpPab036862; Thu, 10 Mar 2022 23:51:25 GMT (envelope-from git) Date: Thu, 10 Mar 2022 23:51:25 GMT Message-Id: <202203102351.22ANpPab036862@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9c7a4875bce9 - main - iscsi: Use ICL_NOCOPY for SCSI command immediate data and R2T. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 9c7a4875bce9d0f8308f92a816abf36af8551914 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646956285; 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=QqWmuKSE0JwjDBZamuq/elKVjgk+WpWP6hz2Ap1mr94=; b=S7B3ePa8jYNeeN2HELC03NsHSkkeQJduy14OLowfMWpmRZlXttn1Hakbuj9LyIIkJr8lAc KKMhP3BVsf2doE7ycxVt01tR+0LclZ3yySJNJQZMr8wxzhlhOs73NRtS4df9oOLz1ntSi9 NUGWffwHzk39t7zg+H67hJm3Va74UReBtY5jvaaNCleLsVZAkM+V3qp907IwfsH38YVdqI wmcj6NaefD578++rKfBp0UlPrjIDQ2ADyAFRX/Y0bHrFiKrW4rK5qboIN5c8KkLQG5YI+5 G5Lx7dfuF6Bx+3JFE0hsoBdcQNbyvue6N5TAzpt7pA8+zqctGU+ZSHE5p1p6yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646956285; a=rsa-sha256; cv=none; b=dcDXiyfnflHfW8tsoDsIQnNZo9IQLau1/o6CWgRxr3IW8Y74I8gT3zia5NMwIgv5NU4iFD gilNcPR0DRgr3lfK6vm9jWBrLWIBzK7z+2n0K86HNZN1j+nkah5pvn9PaqXGRQvRugQsUi OeOqxFZwCSZw2SAVOwbHLkhjrCziCKDdIm2CKj5gFsbQWlopzBq/Vb4MS+qf/vx4scoLEz uaaQpYYGVOE9FX+kDzb4xSa+tJSQ1Z5x54zq9l6n19Yi2o+90xlMfHpEMLhG2d8awyOZdh qzSZ8H8f6jzAAfdrikX+VzBhVVCQwabeabqDo6nUXmNqJgnfpyq9vzLnDpoOtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c7a4875bce9d0f8308f92a816abf36af8551914 commit 9c7a4875bce9d0f8308f92a816abf36af8551914 Author: John Baldwin AuthorDate: 2022-03-10 23:48:20 +0000 Commit: John Baldwin CommitDate: 2022-03-10 23:48:20 +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 --- 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 c97bfaf0e6c5..7ac600efdddc 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1309,7 +1309,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"); @@ -2427,7 +2427,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);