diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-05-14 19:16:51 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2021-10-29 22:41:29 +0000 |
commit | 4a0500122092b500f79d3fd8bd2620474630d659 (patch) | |
tree | a5a73dd7341537144d4d98d8edd381a2fe39da0e | |
parent | 8e90bce009bb6d931e7e259fd25cbd277d863fc5 (diff) | |
download | src-4a0500122092b500f79d3fd8bd2620474630d659.tar.gz src-4a0500122092b500f79d3fd8bd2620474630d659.zip |
cxgbei: Use hardware RX flow control for offloaded iSCSI connections.
Forthcoming T6 iSCSI DDP support requires hardware RX flow control.
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D29905
(cherry picked from commit 87bb5ed606fc02f6520bbb8f9dfe2bc834a50d4d)
-rw-r--r-- | sys/dev/cxgbe/cxgbei/cxgbei.c | 8 | ||||
-rw-r--r-- | sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/cxgbe/cxgbei/cxgbei.c b/sys/dev/cxgbe/cxgbei/cxgbei.c index 07f704752305..7027e6428515 100644 --- a/sys/dev/cxgbe/cxgbei/cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/cxgbei.c @@ -315,13 +315,13 @@ do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) tp = intotcpcb(inp); MPASS(icp->icp_seq == tp->rcv_nxt); - MPASS(tp->rcv_wnd >= pdu_len); tp->rcv_nxt += pdu_len; - tp->rcv_wnd -= pdu_len; tp->t_rcvtime = ticks; - /* update rx credits */ - t4_rcvd(&toep->td->tod, tp); /* XXX: sc->tom_softc.tod */ + /* + * Don't update the window size or return credits since RX + * flow control is disabled. + */ so = inp->inp_socket; sb = &so->so_rcv; diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 4e168a33e2ca..9ee31616b873 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -591,6 +591,9 @@ set_ulp_mode_iscsi(struct adapter *sc, struct toepcb *toep, u_int ulp_submode) t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_ULP_TYPE, V_TCB_ULP_TYPE(M_TCB_ULP_TYPE) | V_TCB_ULP_RAW(M_TCB_ULP_RAW), val, 0, 0); + + val = V_TF_RX_FLOW_CONTROL_DISABLE(1ULL); + t4_set_tcb_field(sc, toep->ctrlq, toep, W_TCB_T_FLAGS, val, val, 0, 0); } /* |