git: dcb793989863 - stable/13 - cxgbe t4_tls: Don't bother returning RX credits for a protocol receive error
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Oct 2023 19:06:34 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dcb7939898635424daf4c65179bbac75fcb0b09b commit dcb7939898635424daf4c65179bbac75fcb0b09b Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-09-08 23:30:52 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-10-11 15:09:52 +0000 cxgbe t4_tls: Don't bother returning RX credits for a protocol receive error Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41689 (cherry picked from commit 75af2d951cce7d51d2033405f96f083c01f39f04) --- sys/dev/cxgbe/tom/t4_tls.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index 3640ef410ca8..dcdbccb4fe7e 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -1125,7 +1125,7 @@ do_rx_data_tls(const struct cpl_rx_data *cpl, struct toepcb *toep, struct tcpcb *tp; struct socket *so; struct sockbuf *sb; - int len, rx_credits; + int len; len = m->m_pkthdr.len; @@ -1196,22 +1196,6 @@ do_rx_data_tls(const struct cpl_rx_data *cpl, struct toepcb *toep, so->so_error = EBADMSG; out: - /* - * This connection is going to die anyway, so probably don't - * need to bother with returning credits. - */ - rx_credits = sbspace(sb) > tp->rcv_wnd ? sbspace(sb) - tp->rcv_wnd : 0; -#ifdef VERBOSE_TRACES - CTR4(KTR_CXGBE, "%s: tid %u rx_credits %u rcv_wnd %u", - __func__, toep->tid, rx_credits, tp->rcv_wnd); -#endif - if (rx_credits > 0 && sbused(sb) + tp->rcv_wnd < sb->sb_lowat) { - rx_credits = send_rx_credits(toep->vi->adapter, toep, - rx_credits); - tp->rcv_wnd += rx_credits; - tp->rcv_adv += rx_credits; - } - sorwakeup_locked(so); SOCKBUF_UNLOCK_ASSERT(sb);