git: d0d631d5f443 - main - cxgbei: Round up the maximum PDU data length by the MSS for TXDATAPLEN_MAX.

John Baldwin jhb at FreeBSD.org
Fri Jul 30 20:51:09 UTC 2021


The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=d0d631d5f4437223664f7bbdfdb421ec05cf9657

commit d0d631d5f4437223664f7bbdfdb421ec05cf9657
Author:     John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-07-29 21:17:45 +0000
Commit:     John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-07-30 20:27:24 +0000

    cxgbei: Round up the maximum PDU data length by the MSS for TXDATAPLEN_MAX.
    
    Recent firmware versions round down the value passed here by the MSS
    and subsequently mishandle transmitted PDUs larger than the rounded
    down value.
    
    Reported by:    Jithesh Arakkan @ Chelsio
    Sponsored by:   Chelsio Communications
---
 sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
index 4a6cf0a19d44..7d8ebd1e040f 100644
--- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
@@ -826,7 +826,8 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd)
 		toep->params.ulp_mode = ULP_MODE_ISCSI;
 		toep->ulpcb = icc;
 
-		send_iscsi_flowc_wr(icc->sc, toep, ci->max_tx_pdu_len);
+		send_iscsi_flowc_wr(icc->sc, toep, roundup(ci->max_tx_pdu_len,
+		    tp->t_maxseg));
 		set_ulp_mode_iscsi(icc->sc, toep, icc->ulp_submode);
 		error = 0;
 	}


More information about the dev-commits-src-main mailing list