tls: drop unnecessary cipher_type checks in tls offload
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 9 Oct 2023 20:50:42 +0000 (22:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Oct 2023 10:26:09 +0000 (11:26 +0100)
commit8f1d532b4a49e196696b0aa150962d7ce96985e4
treeae8b7bba910851b9e560e9294d2f97f562e48c81
parent3bab3ee0f95ebd2a897ac3205b4fdee50c3b5f96
tls: drop unnecessary cipher_type checks in tls offload

We should never reach tls_device_reencrypt, tls_enc_record, or
tls_enc_skb with a cipher_type that can't be offloaded. Replace those
checks with a DEBUG_NET_WARN_ON_ONCE, and use cipher_desc instead of
hard-coding offloadable cipher types.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_device.c
net/tls/tls_device_fallback.c