[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] more about SO_REUSE and UDP
From: |
Luke |
Subject: |
Re: [lwip-devel] more about SO_REUSE and UDP |
Date: |
Fri, 26 Mar 2004 11:07:54 +1100 (EST) |
On Thu, 25 Mar 2004, Leon Woestenberg wrote:
> For optimal lookup behaviour (on heavy traffic networks) the alternative
> is to have dummy PCB's in the UDP/TCP list, that have a new PCB_DROP
> flag set.
>
> This way, the PCB's *can* be sorted by most-targetted destination port
> to least-targetted port, dynamically with reference count and the
> overall lookup time is reduced to a minimum. Increased overhead due to
> sorting though.
We found that traversing the PCB list was extremely expensive when we had
a system with lots of simultaneous connections. I fixed it by first
abstracting pcb lists into a separate, well defined interface, and then
implemented a hashtable to do fast PCB lookups. This approach would work
well for UDP as well, and is in my opinion a more thorough solution to the
linear searches currently used for handling PCB lists.
--
Luke