]> asedeno.scripts.mit.edu Git - linux.git/commit
nfp: tls: use unique connection ids instead of 4-tuple for TX
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 9 Jul 2019 02:53:10 +0000 (19:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2019 03:21:09 +0000 (20:21 -0700)
commit53601c68b8541672e026c0596a9dd8a86d96d7ab
tree5c8680e233565dd6665f418042d5898968a864af
parentff8869d5ed4e798c6dad89809689cb9d2e2ab2f8
nfp: tls: use unique connection ids instead of 4-tuple for TX

Connection 4 tuple reuse is slightly problematic - TLS socket
and context do not get destroyed until all the associated skbs
left the system and all references are released. This leads
to stale connection entry in the device preventing addition
of new one if the 4 tuple is reused quickly enough.

Instead of using read 4 tuple as the key use a unique ID.
Set the protocol to TCP and port to 0 to ensure no collisions
with real connections.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/crypto/fw.h
drivers/net/ethernet/netronome/nfp/crypto/tls.c
drivers/net/ethernet/netronome/nfp/nfp_net.h