• David S. Miller's avatar
    tcp: Maintain dynamic metrics in local cache. · 51c5d0c4
    David S. Miller authored
    Maintain a local hash table of TCP dynamic metrics blobs.
    
    Computed TCP metrics are no longer maintained in the route metrics.
    
    The table uses RCU and an extremely simple hash so that it has low
    latency and low overhead.  A simple hash is legitimate because we only
    make metrics blobs for fully established connections.
    
    Some tweaking of the default hash table sizes, metric timeouts, and
    the hash chain length limit certainly could use some tweaking.  But
    the basic design seems sound.
    
    With help from Eric Dumazet and Joe Perches.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    51c5d0c4
tcp.c 91.8 KB