Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Dec 2008 15:49:02 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r185795 - head/sys/netinet
Message-ID:  <200812091549.mB9Fn2Pb094678@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Tue Dec  9 15:49:02 2008
New Revision: 185795
URL: http://svn.freebsd.org/changeset/base/185795

Log:
  Enhance one comment relating to recent TCP locking changes, and fix a
  typo in another.
  
  MFC after:	6 weeks

Modified:
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Tue Dec  9 14:56:39 2008	(r185794)
+++ head/sys/netinet/tcp_input.c	Tue Dec  9 15:49:02 2008	(r185795)
@@ -480,11 +480,11 @@ tcp_input(struct mbuf *m, int off0)
 
 	/*
 	 * Locate pcb for segment, which requires a lock on tcbinfo.
-	 * Optimisticaly acquire a global read lock unless header flags
-	 * necessarily imply a state change.  There are two cases where we
-	 * might discover later we need a write lock despite the flags: ACKs
-	 * moving a connection out of the syncache, and ACK relating to a
-	 * connection in TIMEWAIT.
+	 * Optimisticaly acquire a global read lock rather than a write lock
+	 * unless header flags necessarily imply a state change.  There are
+	 * two cases where we might discover later we need a write lock
+	 * despite the flags: ACKs moving a connection out of the syncache,
+	 * and ACKs for a connection in TIMEWAIT.
 	 */
 	if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 ||
 	    tcp_read_locking == 0) {
@@ -1087,7 +1087,7 @@ tcp_do_segment(struct mbuf *m, struct tc
 	 * allow either a read lock or a write lock, as we may have acquired
 	 * a write lock due to a race.
 	 *
-	 * Require a global write lock for SYN/SIN/RST segments or
+	 * Require a global write lock for SYN/FIN/RST segments or
 	 * non-established connections; otherwise accept either a read or
 	 * write lock, as we may have conservatively acquired a write lock in
 	 * certain cases in tcp_input() (is this still true?).  Currently we



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