tls: rx: jump out for cases which need to leave skb on list
authorJakub Kicinski <kuba@kernel.org>
Fri, 8 Apr 2022 18:31:34 +0000 (11:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Apr 2022 16:32:12 +0000 (17:32 +0100)
commitf940b6efb17257844341d04b4fc622752c23cb9f
treefdcd97ef1acda17a2d02f336d52feba54e800471
parentb1a2c1786330286f4b31c4bb9fd1d5ac8bb09807
tls: rx: jump out for cases which need to leave skb on list

The current invese logic is harder to follow (and adds extra
tests to the fast path). We have to enumerate all cases which
need to keep the skb before consuming it. It's simpler to
jump out of the full record flow as we detect those cases.

This makes it clear that partial consumption and peek can
only reach end of the function thru the !zc case so move
the code up there.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_sw.c