]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4bd74df2d92ce23786e5bf8ac7d8df38c7de59b8
treefdcd97ef1acda17a2d02f336d52feba54e800471
parent478ecf9cdc5e4cd742bee6674e8a221c5a34440e
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