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
This commit is contained in:
parent
e43cf698d9
commit
8903d8e37f
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user