On Friday 29 October 2004 19:28, Stephen Hemminger wrote:
Provide port randomization for incoming connections using variation of
existing sequence number hash. Replace tcp_portalloc_lock and
tcp_port_rover with atomic operation to allow better parallelism.
This is based on
http://www.ietf.org/internet-drafts/draft-larsen-tsvwg-port-randomisation-0
0.txt (with confirmation of of no IPR issues).
I have looked through this, and have a few comments:
* It is probably a good strategy to set 'tcp_rover_next' such that
the next search is resumed from the previous port found to be free.
(similar to the old algorithm). I don't see this in your patch,
but of course I could have missed it.
* connect_port_offset() does not (at least from an algorithm point
of view) need to return an u32, an u16 is sufficient.
Michael Larsen