Subject: Re: [review please] tcp syn cache cleanup code for sc->sc_so
To: None <itojun@iijlab.net>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-net
Date: 08/20/1999 08:33:27
On Fri, 20 Aug 1999 16:07:00 +0900 
 itojun@iijlab.net wrote:

 > 	Hmm, this will save us from searching.  Thanks.
 > 	Is there any use for this extra structure other than in tcp?
 > 	(I guess not)
 > 	If not, I'd point it from syn cache and tcpcb, since to add
 > 	pointer to struct socket the pointer must be of universal use.

It seems to me that when you close a listen socket, you want all of
its related SYN cache entries to go away, tho (please sanity-check me
here; I haven't had any coffee yet this morning :-).  So, in your original
patch, you set sc_so = NULL, but I think you really want to remove the
entry altogether!

In the presence of many SYN cache entries, this could be expensive, tho.
Maybe the SYN hash could be replaced with a per-listen socket queue of
syn_cache_entry's?  I mean, we *already* have the listen socket when we
do this lookup...

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>