From nobody Tue Jan 04 22:38:49 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 B5C96192618D; Tue, 4 Jan 2022 22:38:50 +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 4JT6wV0mdvz4qPr; Tue, 4 Jan 2022 22:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 84CAF21261; Tue, 4 Jan 2022 22:38:49 +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 204Mcn34088367; Tue, 4 Jan 2022 22:38:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 204McnNd088366; Tue, 4 Jan 2022 22:38:49 GMT (envelope-from git) Date: Tue, 4 Jan 2022 22:38:49 GMT Message-Id: <202201042238.204McnNd088366@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: 8903d8e37f14 - main - iscsi: Pass the request PDU to icl_conn_transfer_setup(). 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/main X-Git-Reftype: branch X-Git-Commit: 8903d8e37f141ba12125d60a84b7c78d589e4867 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641335930; 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=ar42XJkWyPs+N1PbwuLLv8tHhARM+5MX+em7oKlx0qY=; b=bhi+CR2Gla+BFrsa5ZD9RvU8RRHtkQJS02eaunaDyU0AOHfHeZ7XH+aC1BtzztLX6p777D KNyg60wLHErTXmalcNQIJbCyOtZaTWHg0WDtuvpzknrcbupUzm7pfrSoaUvUHM0ngWF7WX Kyekwr50284jL00GX0REe9AYeqY54AyKCfQ0FRf30FnU11xlBc+/O3nUnjzRSi73SkLhXM hQixjIMwJbf3ntLjwo4ankkg2Nimza64FgvYRZhjEVvQ+nqBgb9bX4CLjcvasBqI3watr1 xSxICVSfAR9R+QLf0E1wt+U7fD2sDGiPG+H62rKbRNgRr6HuLSS632KpeGx0Fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641335930; a=rsa-sha256; cv=none; b=Pp9GZc6p1Rnda+XIn1d4EH+avBbkyExQhpTqG9pglDFKAji08QLsUEcH45YRR5z/J3VCWP jA1xRpnJs31RdbLta+Wx2F6mzCzL7PGj/kNU7JjuZFSUKO335Cu9J3l9Sf8RohoQzvKMj6 wy7LS5bl4BQz+YieG5Daeft4vDP8j2ptm2jmRIyZE35OAXfzMV3xOQdxw9Fl6z0uImxc9p aAlYPskyobIzNo4VIk8T2jVk1KzwHMKjJtOBBK1xzPPHKAE+ormRj4dX9US7ypcmHqjz3o oKMbqZeXaHYCOlsWVvvSLz3UNdYmpzTeeqwpync62PXKffURjkDHprlda8u4Bg== 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=8903d8e37f141ba12125d60a84b7c78d589e4867 commit 8903d8e37f141ba12125d60a84b7c78d589e4867 Author: John Baldwin AuthorDate: 2022-01-04 22:37:17 +0000 Commit: John Baldwin CommitDate: 2022-01-04 22:37:17 +0000 iscsi: Pass the request PDU to icl_conn_transfer_setup(). This matches icl_conn_task_setup() which passes the PDU and avoids the need for a layering violation in cxgbei to fetch the request PDU from the ctl_io. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D33746 --- sys/cam/ctl/ctl_frontend_iscsi.c | 4 ++-- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 7 ++----- sys/dev/iscsi/icl_conn_if.m | 1 + sys/dev/iscsi/icl_soft.c | 4 ++-- sys/dev/iscsi/icl_wrappers.h | 6 +++--- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index 6b002566b465..6368a81fe66f 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -1083,8 +1083,8 @@ cfiscsi_data_wait_new(struct cfiscsi_session *cs, union ctl_io *io, return (NULL); } - error = icl_conn_transfer_setup(cs->cs_conn, io, target_transfer_tagp, - &cdw->cdw_icl_prv); + error = icl_conn_transfer_setup(cs->cs_conn, PRIV_REQUEST(io), io, + target_transfer_tagp, &cdw->cdw_icl_prv); if (error != 0) { CFISCSI_SESSION_WARN(cs, "icl_conn_transfer_setup() failed with error %d", error); diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 9296488fd793..fbe0ce1ee5c4 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -1197,13 +1197,11 @@ ddp_sgl_check(struct ctl_sg_entry *sg, int entries, int xferlen) return (true); } -/* XXXNP: PDU should be passed in as parameter, like on the initiator. */ -#define io_to_request_pdu(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr) #define io_to_ddp_state(io) ((io)->io_hdr.ctl_private[CTL_PRIV_FRONTEND2].ptr) int -icl_cxgbei_conn_transfer_setup(struct icl_conn *ic, union ctl_io *io, - uint32_t *tttp, void **arg) +icl_cxgbei_conn_transfer_setup(struct icl_conn *ic, struct icl_pdu *ip, + union ctl_io *io, uint32_t *tttp, void **arg) { struct icl_cxgbei_conn *icc = ic_to_icc(ic); struct toepcb *toep = icc->toep; @@ -1226,7 +1224,6 @@ icl_cxgbei_conn_transfer_setup(struct icl_conn *ic, union ctl_io *io, if (ctsio->ext_data_filled == 0) { int first_burst; - struct icl_pdu *ip = io_to_request_pdu(io); #ifdef INVARIANTS struct icl_cxgbei_pdu *icp = ip_to_icp(ip); diff --git a/sys/dev/iscsi/icl_conn_if.m b/sys/dev/iscsi/icl_conn_if.m index e46b8cdc20dc..24f805f46362 100644 --- a/sys/dev/iscsi/icl_conn_if.m +++ b/sys/dev/iscsi/icl_conn_if.m @@ -115,6 +115,7 @@ METHOD void task_done { METHOD int transfer_setup { struct icl_conn *_ic; + struct icl_pdu *_ip; union ctl_io *_io; uint32_t *_transfer_tag; void **_prvp; diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index 37f3911204c4..8547a70ea535 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -1463,8 +1463,8 @@ icl_soft_conn_task_done(struct icl_conn *ic, void *prv) } int -icl_soft_conn_transfer_setup(struct icl_conn *ic, union ctl_io *io, - uint32_t *transfer_tag, void **prvp) +icl_soft_conn_transfer_setup(struct icl_conn *ic, struct icl_pdu *ip, + union ctl_io *io, uint32_t *transfer_tag, void **prvp) { return (0); diff --git a/sys/dev/iscsi/icl_wrappers.h b/sys/dev/iscsi/icl_wrappers.h index cc37771c7dba..515410b40045 100644 --- a/sys/dev/iscsi/icl_wrappers.h +++ b/sys/dev/iscsi/icl_wrappers.h @@ -129,11 +129,11 @@ icl_conn_task_done(struct icl_conn *ic, void *prv) } static inline int -icl_conn_transfer_setup(struct icl_conn *ic, union ctl_io *io, - uint32_t *transfer_tagp, void **prvp) +icl_conn_transfer_setup(struct icl_conn *ic, struct icl_pdu *ip, + union ctl_io *io, uint32_t *transfer_tagp, void **prvp) { - return (ICL_CONN_TRANSFER_SETUP(ic, io, transfer_tagp, prvp)); + return (ICL_CONN_TRANSFER_SETUP(ic, ip, io, transfer_tagp, prvp)); } static inline void