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
This commit is contained in:
John Baldwin 2021-07-29 14:17:45 -07:00
parent a191b4018f
commit d0d631d5f4

View File

@ -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;
}