Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 17:43:29 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320416 - head/sys/dev/cxgbe/tom
Message-ID:  <201706271743.v5RHhTt1033673@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Tue Jun 27 17:43:28 2017
New Revision: 320416
URL: https://svnweb.freebsd.org/changeset/base/320416

Log:
  cxgbe/t4_tom: sbspace on listening sockets is no longer supported (as of
  r319722), use sol_sbrcv_hiwat instead.
  
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/tom/t4_listen.c

Modified: head/sys/dev/cxgbe/tom/t4_listen.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_listen.c	Tue Jun 27 17:23:20 2017	(r320415)
+++ head/sys/dev/cxgbe/tom/t4_listen.c	Tue Jun 27 17:43:28 2017	(r320416)
@@ -1185,6 +1185,7 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss
 	struct synq_entry *synqe = NULL;
 	int reject_reason, v, ntids;
 	uint16_t vid;
+	u_int wnd;
 #ifdef INVARIANTS
 	unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl)));
 #endif
@@ -1326,10 +1327,10 @@ found:
 
 	mtu_idx = find_best_mtu_idx(sc, &inc, be16toh(cpl->tcpopt.mss));
 	rscale = cpl->tcpopt.wsf && V_tcp_do_rfc1323 ? select_rcv_wscale() : 0;
-	SOCKBUF_LOCK(&so->so_rcv);
 	/* opt0 rcv_bufsiz initially, assumes its normal meaning later */
-	rx_credits = min(select_rcv_wnd(so) >> 10, M_RCV_BUFSIZ);
-	SOCKBUF_UNLOCK(&so->so_rcv);
+	wnd = max(so->sol_sbrcv_hiwat, MIN_RCV_WND);
+	wnd = min(wnd, MAX_RCV_WND);
+	rx_credits = min(wnd >> 10, M_RCV_BUFSIZ);
 
 	save_qids_in_mbuf(m, vi);
 	get_qids_from_mbuf(m, NULL, &rxqid);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706271743.v5RHhTt1033673>