]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cxgbei: Wait for the final CPL to be received in icl_cxgbei_conn_close.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 12 Aug 2021 15:48:14 +0000 (08:48 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 12 Aug 2021 15:48:35 +0000 (08:48 -0700)
commit2eb0e53a6b5ec1a72be70e966d4e562e1a8d4e88
tree5db09bfdaeacf5d02b7cfa07468db93cfa6f75ee
parent95941b963606f6e03282cd6f866f3166dcedfa5b
cxgbei: Wait for the final CPL to be received in icl_cxgbei_conn_close.

A socket in the FIN_WAIT_1 state is marked disconnected by
do_close_con_rpl() even though there might still receive data pending.
This is because the socket at that point has set SBS_CANTRCVMORE which
causes the protocol layer to discard any data received before the FIN.
However, icl_cxgbei_conn_close needs to wait until all the data has
been discarded.  Replace the wait for SS_ISDISCONNECTED with instead
waiting for final_cpl_received() to be called.

Reported by: Jithesh Arakkan @ Chelsio
Sponsored by: Chelsio Communications
sys/dev/cxgbe/cxgbei/icl_cxgbei.c
sys/dev/cxgbe/tom/t4_tom.c
sys/dev/cxgbe/tom/t4_tom.h