net/tls: don't look for decrypted frames on non-offloaded sockets
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 3 Jun 2019 22:17:01 +0000 (15:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jun 2019 21:33:50 +0000 (14:33 -0700)
commitb9d8fec927ef3cd157e6a0956f5ec89f6891ed27
tree22e675d699bb766f16911592ec16ea5b2cbc8ee3
parent87b11e0638c3dbf029a7c9020f8a779062db58fc
net/tls: don't look for decrypted frames on non-offloaded sockets

If the RX config of a TLS socket is SW, there is no point iterating
over the fragments and checking if frame is decrypted.  It will
always be fully encrypted.  Note that in fully encrypted case
the function doesn't actually touch any offload-related state,
so it's safe to call for TLS_SW, today.  Soon we will introduce
code which can only be called for offloaded contexts.

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>
net/tls/tls_sw.c