tcp: md5: remove spinlock usage in fast path
authorEric Dumazet <edumazet@google.com>
Mon, 20 May 2013 06:52:26 +0000 (06:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 May 2013 21:00:42 +0000 (14:00 -0700)
TCP md5 code uses per cpu variables but protects access to them with
a shared spinlock, which is a contention point.

[ tcp_md5sig_pool_lock is locked twice per incoming packet ]

Makes things much simpler, by allocating crypto structures once, first
time a socket needs md5 keys, and not deallocating them as they are
really small.

Next step would be to allow crypto allocations being done in a NUMA
aware way.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found