ofproto: Re-use port numbers of ports that were deleted an hour ago.
We have a least recently used algorithm for assigning ofport values
to newly created ports. i.e., when we don't have any unused ofport
numbers, we use ofport numbers from the oldest deleted port.
What this means is that after using ~65000 previously unused ofport
numbers, we will have to go through all of the possible ports
to see which one was least recently used. This will eventually
slow down ofport allocation.
With this commit, any port that was deleted more than an hour ago is
considered never to have been used. So it's ofport number becomes
free to be used.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>